Instructions to compile DC++
The most important thing about compiling: It works for me.
How to compile in n easy steps:
1a) With GCC:
Install Mingw from www.mingw.org. You'll need w32api, binutils, mingw-runtime, gcc-core and
gcc-g++, see their site for installation instructions. I just untar the files into a folder
named mingw and add mingw\bin to my path. I've never used the installer, but that maybe works
as well. GCC 4.2+ is required (Technology preview release currently). I use the dw2 variant of
gcc, but if you want to experiment you can try the potentially slower sjlj. After installing
gcc, you will need to go to the bin folder of your mingw installation and copy g++-dw2/sjlj.exe
and gcc-dw2/sjlj.exe to g++.exe and gcc.exe respectively.
Note; Make sure gcc/g++ is in your path and before any cygwin installation.
1b) Or with Microsoft Visual C++ 9.0 (2008) with at least Service Pack 1:
Download OpenSSL from www.openssl.org and compile it. You should get libraries called
libeay32.lib and ssleay32.lib; copy them in openssl/lib.
To compile DC++ in debug mode, OpenSSL libraries have to be compiled in debug mode too
(read their instructions file; it's a matter of adding "debug" in the do_* file you use).
Rename debug libraries to libeay32d.lib and ssleay32d.lib; put them in openssl/lib.
Note; If you get errors about a missing file "natupnp.h", you need to download the Platform SDK from MS
and copy the file to the include directory of your compiler (or add it to the include path...).
2) Install recent stable release (at least version 0.98) of SCons (www.scons.org).
Make sure SCons and Python are in your PATH.
3) Download HTML help workshop from http://msdn2.microsoft.com/en-us/library/ms670169.aspx. Copy the
include and library files to the respective directories in the htmlhelp folder.
If you want to compile help files, make sure hhc.exe is in your PATH.
If you want to compile translated help files, get Perl and make sure it is in your PATH.
4) Install gettext (http://www.gnu.org/software/gettext/). The easiest way to do this is to get the
precompiled binaries from http://www.gimp.org/~tml/gimp/win32/downloads.html, you'll need
gettext-runtime and gettext-tools, at least version 0.17. These links should work:
http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-runtime-0.17.zip
http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-tools-0.17.zip
Make sure gettext is in your PATH.
5) Open a command prompt and type "scons" followed by some options:
"tools=mingw" - Use mingw for building (default)
"tools=default" - Use msvc for building (yes, the option value is strange)
"mode=debug" - Compile a debug build (default)
"mode=release" - Compile an optimized release build
To see more options, type "scons -h".
Tip: You can create a file custom.py and put your options in there.
You can choose which targets to build; eg:
scons build/debug-mingw/dwt
will only build DWT with MinGW in debug mode. By default, when no target is specified, SCons builds all targets.
For more possible arguments, consult the SCons manual.
Note; If you have problems, use google. It works for me.
Note; DC++ requires tr1 containers to be compiled. Those are already provided when using MinGW and
MSVC 9 SP1. Other ways of getting tr1 containers are using boost or STLPort (make sure to turn off
nativestl (see "scons -h") and compile/install STLPort in the stlport directory), but in these
cases you will probably encounter compile problems.
By the way, with doxygen, graphviz and some luck you can use the supplied doxygen configuration file
to generate some nice docs...just check that the paths in doxyfile are correct (graphviz)...
Linux / Unix:
Look at linuxdcpp.berlios.de for the *nix port of DC++ - they'll gladly accept any help.
Submitting patches
If you think you've done something that more people could use, you can always submit a patch for inclusion in the
original distribution. I will then consider whether I like the patch or not based on things that might seem to be
completely random, which just might be the case. Popular reasons for rejecting a patch include, but are not limited to,
ugly code, abusable features, features that I don't like that bloat the application and incompatibility with other
modifications I've already done.
To increase the chances of your patch being accepted, do like this:
1) Check out the latest code from BZR (see https://code.launchpad.net/dcplusplus for instructions)
2) Make your modification. If you make other modifications apart from the one you want to submit, do them
on a separate copy of the DC++ source code and then copy them to this folder.
3) In the source root folder (the one with this file in it) do "bzr diff > my-patch.diff". In alternative,
commit to your local branch and send a merge instruction using bzr send. See a bzr howto for detailed instructions.
4) Open a bug at https://bugs.launchpad.net/dcplusplus and attach your patch. If this doesn't suit you,
send the patch along with a description to the dcplusplus-devel mailing list (more information here:
http://sourceforge.net/mail/?group_id=40287). Please make sure to include a copyright handover notice (see below).
In order to avoid future licensing issues, I ask you to give me copyright over any submitted code.
If you don't like this policy, you are free to start your own distribution (as
many have done), and if you're lucky it might become more popular than the original =). Please
state explicitly when submitting the patch that you give me copyright over the code if the submission is larger
than trivial.