http://wiki.amule.org/t/api.php?action=feedcontributions&user=77.239.53.165&feedformat=atomAMule Project FAQ - User contributions [en]2024-03-28T18:11:04ZUser contributionsMediaWiki 1.23.3http://wiki.amule.org/t/index.php?title=HowTo_compile_on_MacHowTo compile on Mac2008-07-10T20:32:40Z<p>77.239.53.165: /* Compile wxMac */</p>
<hr />
<div><center>'''English''' | [[HowTo_compile_on_Mac-de|Deutsch]] | [[HowTo_compile_on_Mac-es|Español]] | [[HowTo_compile_on_Mac-fr | Français]] </center><br />
<br />
How to get and install [[aMule]] on [http://www.apple.com/macosx/ Apple Mac OS X].<br />
<br />
# You can simply download the finished application ('binary release') or <br />
# You compile it from a [[aMule SVN|SVN source snapshot]].<br />
<br />
== Binary releases ==<br />
If you don't want to bother with installing and compiling all those tools and sources, then get one of the pre-compiled [[aMule]] applications. The official release is considered 'stable', but every now and then applications are built from the current source to allow more people to test new features or the like. <br />
<br />
# Latest official binary release: [http://www.amule.org/files/files.php?cat=30 aMule-2.1.3-Mac]<br />
# Check the Mac forum for a more recent user posted binary: [http://forum.amule.org/index.php?board=49.0 aMule forum]<br />
<br />
Now, to install the downloaded binary, just drag the aMule application to a folder of your choice (e.g., ''/Applications'').<br />
<br />
To start aMule, double-click the application icon.<br />
<br />
'''Note:''' You might want to take a look at the [[Mac specific usage]] article.<br />
<br />
== Compiling from source ==<br />
Compiling from source allows most current bug reports, because you can compile and test the [[aMule CVS|CVS snapshot]] of the very day.<br />
<br />
To compile [[aMule]] from source you need some development tools, the [[wxWidgets]] library and the [http://dl.amule.org aMule source].<br />
<br />
=== Get the sources and development tools ===<br />
==== [http://developer.apple.com/tools/xcode Xcode] ====<br />
[http://developer.apple.com/tools/xcode Xcode] is [http://www.apple.com Apple]'s development environment. We need it for the [http://gcc.gnu.org GCC] compiler. <br />
<br />
You will need at least version 2.1 of Xcode, a more recent version is preferable though. [http://developer.apple.com/tools/xcode Xcode] is included on the OS X 10.4 DVD, but early versions of 10.4 were shipped with Xcode 2.0, so you will need to check that the version on your DVD is at least 2.1.<br />
<br />
Alternatively, you can download the most recent version of Xcode from Apple, but you will need to sign up for a free-of-charge developer account first.<br />
<br />
# Get Xcode from http://developer.apple.com/tools/download<br />
# "Member Site"->"Log In"->"Download Software"->"Developer Tools"->"Download Xcode Tools last release">"Install"<br />
<br />
==== [http://www.macports.org MacPorts]====<br />
[http://www.macports.org MacPorts] is an open source installer for lots of open source tools ported to [http://macos.apple.com Mac OS X]. aMule needs a few of these tools to compile properly. Alternatively, you can also use [http://www.finkproject.org/ Fink] to install these tools or you can install them manually.<br />
<br />
# Download the most recent version of [http://www.macports.org MacPorts]<br />
# Read [http://trac.macosforge.org/projects/macports/wiki MacPorts' documentation] to learn how to install applications through [http://www.macports.org MacPorts].<br />
<br />
The tools that you will need to install are:<br />
# automake<br />
# flex<br />
# gettext (only required if you want to use a language other than English in aMule)<br />
# libpng<br />
# libcryptopp<br />
# libiconv<br />
# gd2<br />
# jpeg<br />
# libgeoip<br />
<br />
====[http://www.cryptopp.com/ Crypto++]====<br />
'With the recent SVN builds, you will need the crypto++ library to compile with encryption. If not, you will get an error similar to the following,<br />
<pre><br />
checking for crypto++ version >= 5.1... configure: error:<br />
Could not find cryptopp header file "cryptlib.h".<br />
Please check if the path "/usr" is valid.<br />
</pre><br />
<br />
The MacPort is currently broken and very outdated (v5.1 while 5.5.2 is the current). So it is best to build it yourself.<br />
<br />
# Get the source from: http://www.cryptopp.com/#download<br />
# Extract the archive (just double-click it)<br />
<br />
==== [[wxWidgets|wxMac]] ====<br />
[[wxWidgets|wxMac]] is the port of the [[wxWidgets]] library for [http://www.apple.com/macosx Mac OS X]. This library is used to make [[aMule]] 'multi-platform'.<br />
<br />
# Get the source from: http://www.wxwidgets.org/downloads/ (Source Archives: wxMac)<br />
# Extract the archive (just double-click it)<br />
<br />
==== [http://www.amule.org aMule itself] ====<br />
# Get latest daily [[aMule CVS|CVS source snapshot]]: [http://www.hirnriss.net/?area=cvs aMule CVS]<br />
# Extract the archive (just double-click it)<br />
<br />
=== Compile the sources ===<br />
Put the ''amule'' folder, the ''wxMac'' folder and the "crypto552" folder in the same place, e.g. on the desktop (if using another location, ensure that there are no spaces in the path as this can lead to file not found errors with [[WxWidgets|wxMac]]).<br />
<br />
==== Compile gdlib ====<br />
This step is only needed once, even if you later download and compile a newer version of the [[aMule CVS]] source. Assuming you have unzipped it on your desktop, do the following:<br />
<br />
bash: cd ~/Desktop/gd-2.0.35/<br />
bash: ./configure<br />
bash: sudo make install<br />
<br />
Libraries have been installed in: /usr/local/lib<br />
<br />
==== Compile Crypto++ ====<br />
This step is only needed once, even if you later download and compile a newer version of the [[aMule CVS]] source. Assuming you have unzipped it on your desktop, do the following:<br />
<br />
bash: cd ~/Desktop/cryptopp552/<br />
bash: make<br />
bash: sudo make install PREFIX=/usr/local/cryptopp<br />
<br />
==== Compile [[WxWidgets|wxMac]] ====<br />
This step is only needed once, even if you later download and compile a newer version of the [[aMule CVS]] source. <br />
<br />
The following assumes that you have placed the above packages on your Desktop.<br><br />
''cd'' into the ''wxMac'' folder, ''configure'' and ''make'':<br />
<br />
bash: cd ~/Desktop/wxMac-2.8.7/build<br />
bash: ../configure --disable-shared --enable-unicode --enable-debug --enable-debug_gdb<br />
bash: make<br />
<br />
'''Note:''' The second command above makes sure that wxMac is compiled with debug information. This information allows you to submit a helpful stacktrace if [[aMule]] crashes or a sample if it hangs to the [[aMule devs|aMule developers]]. If you do not want to compile a debug version then you can use "--disable-debug --disable-debug_gdb" instead.<br />
<br />
'''Note:''' If you want to compile a [http://en.wikipedia.org/wiki/Universal_binary Universal Binary] of aMule (i.e., a version of aMule that runs on both PowerPC based and Intel based Macs) then you can add the "--enable-universal_binary" parameter at the end of the second command. If you don't include this parameter wxMac and aMule will be compiled for your native architecture only.<br />
<br />
'''Note:''' The above make command may take up to 50 minutes on a 1.33 GHz G4 processor, depending on the parameters you chose. A faster CPU will take shorter time.<br />
<br />
'''Note:''' The above make command if given with the option -j 8 (make -j 8) will take 5 minutes on an 2,4Ghz Intel iMac<br />
<br />
==== Compile [[aMule]] ====<br />
Now ''cd'' into the ''amule'' folder, ''configure'' and ''make'':<br />
<br />
'''Note:''' You can copy and paste the 4 lines for ''./configure'' in one go.<br />
<br />
'''Note:''' This takes about 30 minutes on a 1.33 GHz G4.<br />
<br />
bash: cd ~/Desktop/amule-cvs<br />
bash: ./configure --disable-systray --disable-gtk --enable-embedded_crypto \<br />
--with-wx-config=../wxMac-2.8.7/build/wx-config \<br />
--enable-cas --enable-webserver --enable-amulecmd \<br />
--enable-debug --disable-optimize --with-crypto-prefix=/usr/local/cryptopp<br />
<br />
bash: make<br />
bash: ./src/utils/scripts/mac_packager<br />
<br />
'''Note:''' If you don't want to compile aMule with debug information (see above) you can use "--disable-debug --enable-optimize" in the configure statement.<br />
<br />
'''Note:''' In order to compile aMule as a Universal Binary (see above) you will need to add the following parameters to the configure statement:<br />
--disable-dependency-tracking \<br />
CFLAGS="-arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk" \<br />
CXXFLAGS="-arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk"<br />
<br />
'''Note:''' Under Mac OS X 10.5 (Leopard) or higher version, you should change the parameters like this:<br />
--disable-dependency-tracking \<br />
CFLAGS="-arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk" \<br />
CXXFLAGS="-arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk"<br />
<br />
==== Running [[aMule]] ====<br />
Once the mac_packager script has finished, you can move the aMule application from the amule-cvs folder to anywhere on your hard drive.</div>77.239.53.165http://wiki.amule.org/t/index.php?title=HowTo_compile_on_MacHowTo compile on Mac2008-07-10T19:31:53Z<p>77.239.53.165: /* Compile wxMac */</p>
<hr />
<div><center>'''English''' | [[HowTo_compile_on_Mac-de|Deutsch]] | [[HowTo_compile_on_Mac-es|Español]] | [[HowTo_compile_on_Mac-fr | Français]] </center><br />
<br />
How to get and install [[aMule]] on [http://www.apple.com/macosx/ Apple Mac OS X].<br />
<br />
# You can simply download the finished application ('binary release') or <br />
# You compile it from a [[aMule SVN|SVN source snapshot]].<br />
<br />
== Binary releases ==<br />
If you don't want to bother with installing and compiling all those tools and sources, then get one of the pre-compiled [[aMule]] applications. The official release is considered 'stable', but every now and then applications are built from the current source to allow more people to test new features or the like. <br />
<br />
# Latest official binary release: [http://www.amule.org/files/files.php?cat=30 aMule-2.1.3-Mac]<br />
# Check the Mac forum for a more recent user posted binary: [http://forum.amule.org/index.php?board=49.0 aMule forum]<br />
<br />
Now, to install the downloaded binary, just drag the aMule application to a folder of your choice (e.g., ''/Applications'').<br />
<br />
To start aMule, double-click the application icon.<br />
<br />
'''Note:''' You might want to take a look at the [[Mac specific usage]] article.<br />
<br />
== Compiling from source ==<br />
Compiling from source allows most current bug reports, because you can compile and test the [[aMule CVS|CVS snapshot]] of the very day.<br />
<br />
To compile [[aMule]] from source you need some development tools, the [[wxWidgets]] library and the [http://dl.amule.org aMule source].<br />
<br />
=== Get the sources and development tools ===<br />
==== [http://developer.apple.com/tools/xcode Xcode] ====<br />
[http://developer.apple.com/tools/xcode Xcode] is [http://www.apple.com Apple]'s development environment. We need it for the [http://gcc.gnu.org GCC] compiler. <br />
<br />
You will need at least version 2.1 of Xcode, a more recent version is preferable though. [http://developer.apple.com/tools/xcode Xcode] is included on the OS X 10.4 DVD, but early versions of 10.4 were shipped with Xcode 2.0, so you will need to check that the version on your DVD is at least 2.1.<br />
<br />
Alternatively, you can download the most recent version of Xcode from Apple, but you will need to sign up for a free-of-charge developer account first.<br />
<br />
# Get Xcode from http://developer.apple.com/tools/download<br />
# "Member Site"->"Log In"->"Download Software"->"Developer Tools"->"Download Xcode Tools last release">"Install"<br />
<br />
==== [http://www.macports.org MacPorts]====<br />
[http://www.macports.org MacPorts] is an open source installer for lots of open source tools ported to [http://macos.apple.com Mac OS X]. aMule needs a few of these tools to compile properly. Alternatively, you can also use [http://www.finkproject.org/ Fink] to install these tools or you can install them manually.<br />
<br />
# Download the most recent version of [http://www.macports.org MacPorts]<br />
# Read [http://trac.macosforge.org/projects/macports/wiki MacPorts' documentation] to learn how to install applications through [http://www.macports.org MacPorts].<br />
<br />
The tools that you will need to install are:<br />
# automake<br />
# flex<br />
# gettext (only required if you want to use a language other than English in aMule)<br />
# libpng<br />
# libcryptopp<br />
# libiconv<br />
# gd2<br />
# jpeg<br />
# libgeoip<br />
<br />
====[http://www.cryptopp.com/ Crypto++]====<br />
'With the recent SVN builds, you will need the crypto++ library to compile with encryption. If not, you will get an error similar to the following,<br />
<pre><br />
checking for crypto++ version >= 5.1... configure: error:<br />
Could not find cryptopp header file "cryptlib.h".<br />
Please check if the path "/usr" is valid.<br />
</pre><br />
<br />
The MacPort is currently broken and very outdated (v5.1 while 5.5.2 is the current). So it is best to build it yourself.<br />
<br />
# Get the source from: http://www.cryptopp.com/#download<br />
# Extract the archive (just double-click it)<br />
<br />
==== [[wxWidgets|wxMac]] ====<br />
[[wxWidgets|wxMac]] is the port of the [[wxWidgets]] library for [http://www.apple.com/macosx Mac OS X]. This library is used to make [[aMule]] 'multi-platform'.<br />
<br />
# Get the source from: http://www.wxwidgets.org/downloads/ (Source Archives: wxMac)<br />
# Extract the archive (just double-click it)<br />
<br />
==== [http://www.amule.org aMule itself] ====<br />
# Get latest daily [[aMule CVS|CVS source snapshot]]: [http://www.hirnriss.net/?area=cvs aMule CVS]<br />
# Extract the archive (just double-click it)<br />
<br />
=== Compile the sources ===<br />
Put the ''amule'' folder, the ''wxMac'' folder and the "crypto552" folder in the same place, e.g. on the desktop (if using another location, ensure that there are no spaces in the path as this can lead to file not found errors with [[WxWidgets|wxMac]]).<br />
<br />
==== Compile gdlib ====<br />
This step is only needed once, even if you later download and compile a newer version of the [[aMule CVS]] source. Assuming you have unzipped it on your desktop, do the following:<br />
<br />
bash: cd ~/Desktop/gd-2.0.35/<br />
bash: ./configure<br />
bash: sudo make install<br />
<br />
Libraries have been installed in: /usr/local/lib<br />
<br />
==== Compile Crypto++ ====<br />
This step is only needed once, even if you later download and compile a newer version of the [[aMule CVS]] source. Assuming you have unzipped it on your desktop, do the following:<br />
<br />
bash: cd ~/Desktop/cryptopp552/<br />
bash: make<br />
bash: sudo make install PREFIX=/usr/local/cryptopp<br />
<br />
==== Compile [[WxWidgets|wxMac]] ====<br />
This step is only needed once, even if you later download and compile a newer version of the [[aMule CVS]] source. <br />
<br />
The following assumes that you have placed the above packages on your Desktop.<br><br />
''cd'' into the ''wxMac'' folder, ''configure'' and ''make'':<br />
<br />
bash: cd ~/Desktop/wxMac-2.8.7<br />
bash: ./configure --disable-shared --enable-unicode --enable-debug --enable-debug_gdb<br />
bash: make<br />
<br />
'''Note:''' The second command above makes sure that wxMac is compiled with debug information. This information allows you to submit a helpful stacktrace if [[aMule]] crashes or a sample if it hangs to the [[aMule devs|aMule developers]]. If you do not want to compile a debug version then you can use "--disable-debug --disable-debug_gdb" instead.<br />
<br />
'''Note:''' If you want to compile a [http://en.wikipedia.org/wiki/Universal_binary Universal Binary] of aMule (i.e., a version of aMule that runs on both PowerPC based and Intel based Macs) then you can add the "--enable-universal_binary" parameter at the end of the second command. If you don't include this parameter wxMac and aMule will be compiled for your native architecture only.<br />
<br />
'''Note:''' The above make command may take up to 50 minutes on a 1.33 GHz G4 processor, depending on the parameters you chose. A faster CPU will take shorter time.<br />
<br />
'''Note:''' The above make command if given with the option -j 8 (make -j 8) will take 5 minutes on an 2,4Ghz Intel iMac<br />
<br />
==== Compile [[aMule]] ====<br />
Now ''cd'' into the ''amule'' folder, ''configure'' and ''make'':<br />
<br />
'''Note:''' You can copy and paste the 4 lines for ''./configure'' in one go.<br />
<br />
'''Note:''' This takes about 30 minutes on a 1.33 GHz G4.<br />
<br />
bash: cd ~/Desktop/amule-cvs<br />
bash: ./configure --disable-systray --disable-gtk --enable-embedded_crypto \<br />
--with-wx-config=../wxMac-2.8.7/build/wx-config \<br />
--enable-cas --enable-webserver --enable-amulecmd \<br />
--enable-debug --disable-optimize --with-crypto-prefix=/usr/local/cryptopp<br />
<br />
bash: make<br />
bash: ./src/utils/scripts/mac_packager<br />
<br />
'''Note:''' If you don't want to compile aMule with debug information (see above) you can use "--disable-debug --enable-optimize" in the configure statement.<br />
<br />
'''Note:''' In order to compile aMule as a Universal Binary (see above) you will need to add the following parameters to the configure statement:<br />
--disable-dependency-tracking \<br />
CFLAGS="-arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk" \<br />
CXXFLAGS="-arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk"<br />
<br />
'''Note:''' Under Mac OS X 10.5 (Leopard) or higher version, you should change the parameters like this:<br />
--disable-dependency-tracking \<br />
CFLAGS="-arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk" \<br />
CXXFLAGS="-arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk"<br />
<br />
==== Running [[aMule]] ====<br />
Once the mac_packager script has finished, you can move the aMule application from the amule-cvs folder to anywhere on your hard drive.</div>77.239.53.165