HowTo compile on Mac
ATTENTION: wxMac 2.5.3 has a bug which causes aMule 2.0.0-rc8 to crash just after starting up :-(. The only work-around to compile wxMac without this bug and to have aMule 2.0.0-rc8 running is to pull the wxWidgets sources from CVS! See  to see how to do that. Then cd to the newly created directory wxWidgets and continue with step 6 in the chapter "Installing wxMac form sources" below.
NOTE: This document explains how to download files using curl. However, curl might not be installed on your system: either install it (you can use Fink to instal it) or download the files with whatever application you want (maybe your web browser), but place then in the directory that's being used on each part of the guide, otherwise the commands that are shown here will not work.
Compiling and installing aMule
- Install Xcode Tools from http://developer.apple.com/tools/download
- "Getting ADC ID"->"Log In"->"Download Software"->"Developer Tools"->"Download Xcode Tools last release">"Install"
- Install (or verify installation if already installed) Fink, since gettext and wxMac are installed along with Fink, from http://fink.sourceforge.net/download
- Install gettext and wxMac (wxMac is only available through Fink unstable on MacOS 10.3. If you are using Fink stable or MacOS 10.2 or earlier, either upgrade Fink to unstable and/or MacOS to 10.3, or check the Installing wxMac from sources section of this document and then go on with this section) through Fink. Read Fink's installation guide to learn how to install applications through Fink (the gettext package is gettext and the wxMac package is wxmac and wxmac-shlibs),
- Read the documentation at http://fink.sourceforge.net/download to learn how to install wxMac.
- Make amule dir in your home directory: mkdir ~/amule
- Enter the amule directory you just created: cd ~/amule
- Get aMule's latest source code (aMule 2.0.0-rc8 sourcecode: http://download.berlios.de/amule/aMule-2.0.0rc8.tar.bz2) and place it in your ~/amule directory: curl -O http://download.berlios.de/amule/aMule-2.0.0rc8.tar.bz2
- Extract it: tar -xjf aMule-2.0.0rc8.tar.bz2
- Enter aMule's sources directory: cd aMule-2.0.0rc8
- Prepare the compilation (thanks to one_2_one and Babboia for his test&fix): ./configure --disable-systray --disable-gtk --with-wx-config=/sw/bin/wx-config
- And compile it: make
- Optional: You can reduce the size of aMule from 44MB to 3MB by doing the following (anyway, this will make the aMule binary lose debug info, so you'll be unable to report problems to the aMule Team to make aMule a better program, which it is not recommended): strip src/amule
- Copy the amule binary to the app-Container directory: cp src/amule amule.app/Contents/MacOS/
- (On my system, the folder "MacOS" was missing from the amule.app so I had to create it by typing mkdir amule.app/Contents/MacOS before executing the above operation - dan)
- And copy amule.app directory to your Applications folder: cp -R amule.app /Applications
- If everything went OK, you can safely remove the downloaded packages:
- Remove aMule's sources package: rm ~/amule/aMule-2.0.0rc8.tar.bz2
- Optionally remove the extracted aMule sources (not recommended, since you might want to compile it again someday): rm -r ~/amule/aMule-2.0.0rc8
- Optionally, if you if you decided to remove the extracted aMule sources, remove the ~/amule directory (which should be empty by now): rmdir ~/amule
Installing wxMac from sources
- Create a directory where all the work will be done: mkdir ~/wxmac
- Enter that directory: cd ~/wxmac
- Download wxMac sources: curl -O ftp://biolpc22.york.ac.uk/pub/2.5.3/wxMac-2.5.3.tar.gz
- Extract the file: tar -xzf wxMac-2.5.3.tar.gz
- Enter the extracted sources' directory: cd wxMac-2.5.3
- Directory build should already be there. If not, create it with: mkdir build
- Now enter build directory: cd build
- Prepare the compilation: ../configure
- And compile: make
- Now install wxMac compilation: sudo make install
- Get back to your home directory, you're done: cd ~
- If everything went ok, you can safely remove:
NOTE: Since you're installing wxMac from sources instead of through Fink, use ./configure --disable-systray --disable-gtk --with-wx-config=/usr/local/bin/wx-config as your configure command at aMule's compilation instead of ./configure --disable-systray --disable-gtk --with-wx-config=/sw/bin/wx-config
Problems and solutions
- If Fink reports something like: After unpacking 11.2GB will be freed, don't be afraid. Fink has evolved into a different way of managing packet's size and some old ("old": at least some months old) packages' sizes aren't handled correctly on the output. If this is your case, devide the number by 1024. So, what the above example really means is: After unpacking 11.2MB will be freed.
- If you get an error like this: You cannot open the application "amule" because it may be damaged or incomplete, right click on amule, then click on Show Packages Contents, go to "Contents">"MacOS"> and double click on amule. Next time you start from amule.app it will run fine. If you still get the same error, move amule.app to the desktop and run it from there.
In older releases (aMule 2.0.0-rc7 and earlier), the app container wasn't included with the sources. If you are compiling any of this older releases and do not whish to upgrade (remember it is strongly recommended to upgrade to the latest release), you can:
- Download the latest aMule sources and get the app container from there (recommended option).
- Download aMule's app-Container: curl -O http://download.berlios.de/amule/aMule-App-Container.tar.bz2
You must extract the app container in your amule directory: possible ~/amule To extract it: tar -xjf aMule-App-Container.tar.bz2
NOTE: If the app-Container failed to extract try running this command instead of the app-Container extraction step: mkdir -p amule.app/Contents/MacOS
Once the installation is finished, you can safely remove the app-Container package: rm aMule-App-Container.tar.bz2