Difference between revisions of "HowTo compile on Win32 with MinGW"
m (Layout (this was HARD work ;-))) |
|||
Line 1: | Line 1: | ||
− | <center><h2>by | + | <center><h2>by '''Madcat'''</h2></center> |
− | == List of things you need to compile aMule == | + | == List of things you need to compile [[aMule]] == |
− | + | '''Note:''' Some of these require manually moving includes/libs into the right directories. | |
− | Windows port of GNU C compiler | + | [http://www.microsoft.com/windows Windows] port of [http://gcc.gnu.org GNU C compiler] -> [http://prdownloads.sf.net/mingw/MinGW-3.1.0-1.exe?download Download] |
− | [http://prdownloads.sf.net/mingw/MinGW-3.1.0-1.exe?download] | + | |
− | Minimal GNU shell for Windows | + | Minimal [http://www.gnu.org GNU] shell for [http://www.microsoft.com/windows Windows] -> [http://prdownloads.sf.net/mingw/MSYS-1.0.10.exe?download Download] |
− | [http://prdownloads.sf.net/mingw/MSYS-1.0.10.exe?download] | + | |
− | Developer toolkit for MSys (for CVS & co) | + | Developer toolkit for [http://www.mingw.org/msys.shtml MSys] (for [http://www.gnu.org/software/cvs CVS] & co) -> [http://prdownloads.sf.net/mingw/msysDTK-1.0.1.exe?download Download] |
− | [http://prdownloads.sf.net/mingw/msysDTK-1.0.1.exe?download] | + | |
− | LibIConv (required by gettext) | + | [http://www.gnu.org/software/libiconv LibIConv] (required by [http://www.gnu.org/software/gettext gettext]) -> |
− | [http://prdownloads.sf.net/mingw/libiconv-1.8.0-2003.02.01-1.exe?download] | + | [http://prdownloads.sf.net/mingw/libiconv-1.8.0-2003.02.01-1.exe?download Download] |
− | GetText (for po files, autogen.sh etc) | + | [http://www.gnu.org/software/gettext GetText] (for [http://www.gnu.org/software/gettext po files], [http://www.gnu.org/software/automake/automake.html autogen.sh], etc) -> |
− | [http://prdownloads.sf.net/mingw/gettext-0.11.5-2003.02.01-1.exe?download] | + | [http://prdownloads.sf.net/mingw/gettext-0.11.5-2003.02.01-1.exe?download Download] |
− | Curl library (compile w/o | + | [http://curl.haxx.se Curl] library (compile w/o [http://wp.netscape.com/eng/ssl3 SSL] support) -> |
− | [http://curl.haxx.se/download/curl-7.11.1.tar.gz] | + | [http://curl.haxx.se/download/curl-7.11.1.tar.gz Download] |
− | zlib compression library | + | [http://www.zlib.org zlib] compression library -> |
− | [http://ftp.lug.udel.edu/pub/cygwin/release/mingw/mingw-zlib/mingw-zlib-1.2.1-1.tar.bz2] | + | [http://ftp.lug.udel.edu/pub/cygwin/release/mingw/mingw-zlib/mingw-zlib-1.2.1-1.tar.bz2 Download] |
− | Crypto++ encryption library | + | [[libcrypto|Crypto++]] encryption library -> |
− | [http://www.eskimo.com/~weidai/crypto51.zip] | + | [http://www.eskimo.com/~weidai/crypto51.zip Download] |
− | Windows port of wxWidgets library | + | [http://www.microsoft.com/windows Windows] port of [[wxWidgets]] library -> |
− | [http://prdownloads.sourceforge.net/wxwindows/wxMSW-2.4.2.zip] | + | [http://prdownloads.sourceforge.net/wxwindows/wxMSW-2.4.2.zip Download] |
== Common guidelines, issues, solutions == | == Common guidelines, issues, solutions == | ||
− | Generally, compile wxMSW as static library. This avoids several linker issues, and provides you with static binary. | + | Generally, compile [[wxWidgets|wxMSW]] as static library. This avoids several linker issues, and provides you with static binary. |
− | Link statically against | + | Link statically against ''[http://www.zlib.org zlib]'', ''[[libcrypto|crypto]]'', ''[http://curl.haxx.se curl]'' and ''[[wxWidgets|wxMSW]]'' to avoid distributing extranous DLLs (and generally make life simpler). At this point, this requires manually hacking ''src/Makefile'' (after running ''configure'') and changing the necessary ''-l***'' places to paths to static libraries. |
− | You need to modify | + | You need to modify ''wx/setup.h'' file by hand (after installing [[wxWidgets|wx]]) and change ''[http://www.wxwindows.org/manuals/2.4.2/wx53.htm wxCheckListBox]'' to ''0'' (or, alternativly, configure [[wxWidgets|wx]] with ''--without-checklistbox''). Probably there's a better way around this, but I can't think of any right now. |
Why don't distribute a compiled version? | Why don't distribute a compiled version? | ||
− | + | Oh! Please complie it - it will be so much easier.... | |
− | == Compiling with | + | == Compiling with [http://www.parinya.ca/mingwstudio.html MinGW Studio] == |
− | Since the 2004/07/17, you can find in CVS the file amule.msp | + | Since the 2004/07/17, you can find in [http://www.gnu.org/software/cvs CVS] the file ''amule.msp'' which is the project file relative to the [http://www.parinya.ca/mingwstudio.html MinGW Studio] IDE ([http://www.gnu.org/philosophy/free-sw.html Free] and under [http://www.gnu.org/copyleft/gpl.html GPL] at http://www.parinya.ca/ and shipped with precompiled [[wxWidgets|wxMSW]]). |
− | Install | + | Install [http://www.parinya.ca/mingwstudio.html MinGW Studio], add [http://www.zlib.org Zlib], [http://curl.haxx.se Curl] and [[libcrypto|Crypto++]] compilled libs in The [http://www.parinya.ca/mingwstudio.html MinGW Studio] tree. |
− | Then, open amule.msp with | + | Then, open ''amule.msp'' with [http://www.parinya.ca/mingwstudio.html MinGW Studio], press '''F7''', and [[aMule]] "should" be compiled :) |
− | Yes, | + | Yes, I know, "compile" is not the same as "work" ... But it is a great begining |
− | == Compiling with | + | == Compiling with [http://www.gnu.org/software/make Makefile][http://www.microsoft.com/windows WIN32] == |
− | With MinSyS and MinGW, | + | With [http://www.mingw.org/msys.shtml MinSyS] and [http://www.mingw.org MinGW], you can use the shipped [http://www.gnu.org/software/make Makefile][http://www.microsoft.com/windows WIN32]. |
− | Just rename configWIN32.h to config.h, edit | + | Just rename ''configWIN32.h'' to ''config.h'', edit [http://www.gnu.org/software/make Makefile][http://www.microsoft.com/windows WIN32] to give it the path of your compiler, and type ''make -f MakefileWIN32'' |
Revision as of 14:44, 18 July 2004
Contents
by Madcat
List of things you need to compile aMule
Note: Some of these require manually moving includes/libs into the right directories.
Windows port of GNU C compiler -> Download
Minimal GNU shell for Windows -> Download
Developer toolkit for MSys (for CVS & co) -> Download
LibIConv (required by gettext) -> Download
GetText (for po files, autogen.sh, etc) -> Download
Curl library (compile w/o SSL support) -> Download
zlib compression library -> Download
Crypto++ encryption library -> Download
Windows port of wxWidgets library -> Download
Common guidelines, issues, solutions
Generally, compile wxMSW as static library. This avoids several linker issues, and provides you with static binary.
Link statically against zlib, crypto, curl and wxMSW to avoid distributing extranous DLLs (and generally make life simpler). At this point, this requires manually hacking src/Makefile (after running configure) and changing the necessary -l*** places to paths to static libraries.
You need to modify wx/setup.h file by hand (after installing wx) and change wxCheckListBox to 0 (or, alternativly, configure wx with --without-checklistbox). Probably there's a better way around this, but I can't think of any right now.
Why don't distribute a compiled version?
Oh! Please complie it - it will be so much easier....
Compiling with MinGW Studio
Since the 2004/07/17, you can find in CVS the file amule.msp which is the project file relative to the MinGW Studio IDE (Free and under GPL at http://www.parinya.ca/ and shipped with precompiled wxMSW).
Install MinGW Studio, add Zlib, Curl and Crypto++ compilled libs in The MinGW Studio tree.
Then, open amule.msp with MinGW Studio, press F7, and aMule "should" be compiled :)
Yes, I know, "compile" is not the same as "work" ... But it is a great begining
Compiling with MakefileWIN32
With MinSyS and MinGW, you can use the shipped MakefileWIN32.
Just rename configWIN32.h to config.h, edit MakefileWIN32 to give it the path of your compiler, and type make -f MakefileWIN32