HowTo compile on Win32 with MinGW
Originally by Madcat
English | Deutsch
Requirements for compiling aMule
You will need the following packages:
- Windows port of GNU C compiler, MinGW -> Download (4.1.1)
- Minimal GNU shell for Windows, MSys -> Download (1.0.10)
- Developer toolkit for MSys (for CVS & co) -> Download (1.0.1)
- LibIConv (required by gettext) -> Download (1.8)
- GetText (for po files, autogen.sh, etc) -> Download (0.11.5)
- zlib compression library -> Download (1.2.3)
- Windows port of wxWidgets library (knows as wxMSW) -> Download (2.6.1)
- aMule's latest release sources or aMule CVS -> Download aMule
Also, 800MB-1500MB free space on your hard disk (around 40MB to download the above packages and the rest for temporary compilation files and installations. The amount of space needed will largely depend on the configuration flags you use).
As a reference, the whole compilation process will take around 3 hours on a medium-high resourced computer.
Installing the Minimal System
The first step is to create a Linux-like environment, which is required in order to be able to perform the build. This can be done by following these steps in this order:
- Install MinGW. Select Compact installation unless you know what you are doing. When it prompts you for a folder, the default (C:\mingw) is slightly messy but the safer selection.
- Install MSys. When it prompts you for the MinGW folder, it's very important to specify it correctly. Failure on this step will stop any compilation attempts. If for some reason you fail, install MSys again, or edit the file /etc/fstab in your MSys environment.
- Install the MSys developer toolkit.
- Install LibIConv.
- Install GetText.
Compiling the libraries
We will compile them from MSys, so just run it. Once you are running MSys, you'll be on your home folder. Copy the zlib and wxWidgets files you downloaded above into this folder (something like C:\msys\1.0\home\user).
The steps for compiling them is:
- zlib: Uncompress zlib, cd to the newly created directory and run ./configure --prefix=/mingw && make && make install
- wxWidgets: Uncompress wxWidgets, cd to the newly created directory and run ./configure --enable-unicode --disable-shared --without-checklistbox && make && make install
If you want to help us developers, you can add --enable-debug flag to the wxWidgets configure command, right after --disable-shared, but be warned it will result into an aMule.exe file bigger than 100MB.
Ok, we're all done with the compilation environment. Let's do the last step: compiling aMule.
First of all, extract aMule's sources and enter the newly created folder.
The compilation itself is actually just a matter of following the usual method: ./configure && make. Use your favorite flags on ./configure, for example, --disable-debug will remove debug info, but will also make it harder for us developers to understand the bugs you might find.
You might want to compile just the remote GUI: the flags would be --disable-monolithic --disable-ed2k --enable-amule-gui
Beware: The following programs do not work yet on Windows:
Note: To keep the size of the binnaries down, you can run strip from within MSys.
To run the binnaries we've created you need mingwm10.dll. This file can be found in C:\MinGW\bin\mingwm10.dll (or whatever path you used to install MinGW).
You now have to place this file in some place so that the binnaries find it when they are executed. Here you have three options:
- Place it in the same folder where the binnaries are (if you have them spread in several different folders, copy this file once into each folder. Since it is a very small file, it is not much of a loss).
- Place it in C:\windows or some other any other path where Windows might look for libraries (such as C:\Windows\System or C:\Windows\System32).
- Add C:\MinGW\bin (or whatever path you used to install MinGW) to your PATH environment variable.
Note: By default, the binnaries are compiled to C:\MSys\1.0\home\user\amule-2.0.3\src\.
Having different languages
Now aMule will be successfully running, but you will not be able to use any other language but default english.
cd cd amule-2.0.3/po
Now install the languages:
This language files are now in C:\MSys\1.0\local\share\locale, so exit MSys, go to C:\msys\1.0\local\share\locale and copy that folder to the folder were you are keeping your compiled amule.exe and amulegui.exe files.
Downloading precompiled win32 version
Keep in mind this is a user contributed build. Install it at your own risk
You can download aMuleGUI for win32 from CVS 22-09-2005 here: ed2k://|file|amulegui-win32-cvs22-09-2005(incl.dll+readme).zip|1990063|8553F619C878E3F0C916B7FBF82EB934|h=KFB3RUSI65EE2WMIBWQ2WHXIIUEA57VZ|/
Comunication on an linux box with amuled and this gui works very good... maybe its a little bit slow, but, its working!
Feel free to contact me at: therealfox AT gmail DOT com, if you have problems.
If you prefer a stable (and more recent) build, you can grab amulegui from the stable 2.1.1 sources here: http://conrausch.elise.no-ip.com/aMuleGUI-2.1.1-all_lang.zip
Again, this is a user contributed build, which you should not trust ;). It works pretty well though. It is a little big (almost 3MB), but it contains the .dll plus all language packs that were available with the release. For problems with this one, please contact conrausch [at] gmx de