A game launcher/updater/patcher written in C++ for the Windows platform.
For the accompanying patch creator, see: https://github.com/FLWL/CPPGameLauncher_PatchCreator
While the patch creator needs the private key in .der format, the launcher has hardcoded .pem public keys in its "constants.h". To generate a readable .pem format from the keypair.pem file generated during the patch creator setup, run the following command:
openssl rsa -in keypair.pem -outform PEM -pubout -out public.pem
Open the resulting public.pem file with a text editor, and copy the contents to constants.h into the variable "MAIN_PUBLIC_KEY", adding newlines and quotation marks as needed. It is also possible to use another backup key pair by repeating the whole generation process and putting the resulting public key file contents to the AUXILIARY_PUBLIC_KEY variable. The launcher will accept files signed with either one of the keys.
By default the CPPGameLauncher is configured to look for 1 update server, with the address of update1.example.com. It tries to find the patch files from http://update1.example.com/patch/. The files created by the patch creator must be uploaded to that folder, so that the launcher could access http://update1.example.com/patch/latest.txt and other files. The domain can be changed from "constants.h".
If you change the "NUMBER_OF_UPDATE_SERVERS" variable in constants.h to 3 for example, then the launcher will try to use http://update2.example.com/patch/ and so on in case the first update server is not responding.