It looks like you're new here. If you want to get involved, click one of these buttons!
How to compile ApexDC++
The most important thing about compiling: if it didn't work, you screwed up.
How to compile in few easy steps on Windows:
Install Visual Studio 2017, Git for Windows and optionally TortoiseGit (see below).
Preparing for gitdefs.inc file generation using a local git repository:
2.1 Create a repository on your local computer using Git (e.g. TortoiseGit has a contextual menu for creating local repositories).
2.2 Import the source code into the local repository you created and then clone a working copy out of it.
2.3 Run gitconfig.sh (e.g. using git bash). Note: you may need to manually install the iconv tool for windows if you don't have access to it already as it needs to be discoverable by git (see the GnuWin32 project, barring other options).
Open the solution file in Visual Studio and build away.
How reproduce a release version
For this manually editing the generated ./client/gitdefs.inc file is necessary as our version control is currently not public. You can explore the contents make-gitdefs.* scripts for more info (hint: create a tag in your repository). Example of the contents of gitdefs.inc file for 1.6.5 is included below.
#define GIT_TAG_SHORT "1.6.5" #define GIT_TAG_LONG "1.6.5" #define GIT_REF_COMMIT "47d5052582fd424d3a54edc33307607d1e87eb2b" #define GIT_COMMIT_COUNT 1165 #define VERSION_DATE 1545771673 #define COMPATIBLE_VERSIONID 2229
Creating redistributable binaries (with modifications)
To get a redistributable binary out of the source code distribution we recommend that you set up a git repository with services such as GitLab.com and use that with the above steps. Additionally you must change the version check URL in the file ./client/version.h (as your assigned build id will be initially much lower than ours) and then proceed to digitally sign a new version file with a private RSA key (generated by a tool such as openssl).
There is a small tool built into ApexDC itself that will do the signing for you, a windows batch file similar to the one below may be used to generate the necessary signature files (version.xml.sign).
@echo off ApexDC-x64.exe /sign "%CD%version.xml" "%CD%private.key" ApexDC-x64.exe /sign "%CD%beta.xml" "%CD%private.key"
There is also an additional switch you will need to specify the first time signing version file with a new key which is -pubout. When this switch is present ApexDC will generate a pubkey.h file corresponding to your private key which should then be used to replace our pubkey.h so that verification will work against your version file pair.
After you have a signed xml, the trick is to make it discoverable by your compiled version of ApexDC by uploading both the .xml and .sign files side by side to the location you specified inside version.h (remember to recompile with the correct pubkey.h file).
Recompiling ApexDC as a replacement for the release versions offered on ApexDC.net (for personal use) is not recommended or otherwise supported.