Difference between revisions of "HowTo compile on Mac"

From AMule Project FAQ
Jump to: navigation, search
(Compile aMule: formatting)
m (Adjusted Links, Added Version-Tag)
Line 9: Line 9:
  
 
== Binary releases ==
 
== Binary releases ==
 
 
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.  
 
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.  
  
Line 22: Line 21:
  
 
== Compiling from source ==
 
== Compiling from source ==
 
 
Compiling from source allows most current bug reports, because you can compile and test the [[aMule CVS|CVS snapshot]] of the very day.
 
Compiling from source allows most current bug reports, because you can compile and test the [[aMule CVS|CVS snapshot]] of the very day.
  
Line 28: Line 26:
  
 
=== Get the sources and development tools ===
 
=== Get the sources and development tools ===
 
 
==== [http://developer.apple.com/tools/xcode Xcode] ====
 
==== [http://developer.apple.com/tools/xcode Xcode] ====
 
 
[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.  
 
[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.  
  
Line 41: Line 37:
  
 
==== [http://www.macports.org MacPorts] (formerly known as DarwinPorts) ====
 
==== [http://www.macports.org MacPorts] (formerly known as DarwinPorts) ====
 
 
[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://fink.sourceforge.net Fink] to install these tools or you can install them manually.
 
[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://fink.sourceforge.net Fink] to install these tools or you can install them manually.
  
Line 54: Line 49:
  
 
==== [[wxWidgets|wxMac]] ====
 
==== [[wxWidgets|wxMac]] ====
 
 
[[wxWidgets|wxMac]] is the port of the [[wxWidgets]] library for [http://macos.apple.com Mac OS X]. This library is used to make [[aMule]] 'multi-platform'.
 
[[wxWidgets|wxMac]] is the port of the [[wxWidgets]] library for [http://macos.apple.com Mac OS X]. This library is used to make [[aMule]] 'multi-platform'.
  
Line 61: Line 55:
  
 
==== [http://www.amule.org aMule itself] ====
 
==== [http://www.amule.org aMule itself] ====
 
 
# Get latest daily [[aMule CVS|CVS source snapshot]]: [http://www.hirnriss.net/?area=cvs aMule CVS]
 
# Get latest daily [[aMule CVS|CVS source snapshot]]: [http://www.hirnriss.net/?area=cvs aMule CVS]
 
# Extract the archive (just double-click it)
 
# Extract the archive (just double-click it)
  
 
=== Compile the sources ===
 
=== Compile the sources ===
 
+
Put the ''amule'' folder and the ''wxMac'' 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]]).  
Put the ''amule'' folder and the ''wxMac'' 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 [[wxMac]]).  
+
  
 
==== Compile [[wxMac]] ====
 
==== Compile [[wxMac]] ====
 
 
This step is only needed once, even if you later download and compile a newer version of the [[aMule CVS]] source.  
 
This step is only needed once, even if you later download and compile a newer version of the [[aMule CVS]] source.  
  
Line 87: Line 78:
  
 
==== Compile [[aMule]] ====
 
==== Compile [[aMule]] ====
 
 
Now ''cd'' into the ''amule'' folder, ''configure'' and ''make'':
 
Now ''cd'' into the ''amule'' folder, ''configure'' and ''make'':
  
Line 112: Line 102:
 
==== Running [[aMule]] ====
 
==== Running [[aMule]] ====
 
Once the mac_packager script has finished, you can move the aMule application from the amule-cvs folder to anywhere on your hard drive.
 
Once the mac_packager script has finished, you can move the aMule application from the amule-cvs folder to anywhere on your hard drive.
 +
 +
== Version ==
 +
Created by "Unknown User" on 16.07.04 at 04:46<br>
 +
Updated by Vollstrecker on 23.01.08 at 10:09

Revision as of 10:09, 23 January 2008

English | Deutsch | Español

How to get and install aMule on Apple Mac OS X.

  1. You can simply download the finished application ('binary release') or
  2. You compile it from a CVS source snapshot.

The preceding version of this page covering aMule 2.0.0rc8 and earlier is archived here.

Binary releases

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.

  1. Latest official binary release: aMule-2.1.3-Mac
  2. Check the Mac forum for a more recent user posted binary: aMule forum

Now, to install the downloaded binary, just drag the aMule application to a folder of your choice (e.g., /Applications).

To start aMule, double-click the application icon.

Note: You might want to take a look at the Mac specific usage article.

Compiling from source

Compiling from source allows most current bug reports, because you can compile and test the CVS snapshot of the very day.

To compile aMule from source you need some development tools, the wxWidgets library and the aMule source.

Get the sources and development tools

Xcode

Xcode is Apple's development environment. We need it for the GCC compiler.

You will need at least version 2.1 of Xcode, a more recent version is preferable though. 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.

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.

  1. Get Xcode from http://developer.apple.com/tools/download
  2. "Member Site"->"Log In"->"Download Software"->"Developer Tools"->"Download Xcode Tools last release">"Install"

MacPorts (formerly known as DarwinPorts)

MacPorts is an open source installer for lots of open source tools ported to Mac OS X. aMule needs a few of these tools to compile properly. Alternatively, you can also use Fink to install these tools or you can install them manually.

  1. Download the most recent version of MacPorts
  2. Read MacPorts' documentation to learn how to install applications through MacPorts.

The tools that you will need to install are:

  1. automake
  2. flex
  3. gettext (only required if you want to use a language other than English in aMule)
  4. libpng

wxMac

wxMac is the port of the wxWidgets library for Mac OS X. This library is used to make aMule 'multi-platform'.

  1. Get the source from: http://www.wxwidgets.org/downloads/ (Source Archives: wxMac)
  2. Extract the archive (just double-click it)

aMule itself

  1. Get latest daily CVS source snapshot: aMule CVS
  2. Extract the archive (just double-click it)

Compile the sources

Put the amule folder and the wxMac 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 wxMac).

Compile wxMac

This step is only needed once, even if you later download and compile a newer version of the aMule CVS source.

The following assumes that you have placed the above packages on your Desktop.
cd into the wxMac folder, configure and make:

bash: cd ~/Desktop/wxMac-2.8.7/build
bash: ../configure --disable-shared --enable-unicode --enable-debug --enable-debug_gdb
bash: make

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 developers. If you do not want to compile a debug version then you can use "--disable-debug --disable-debug_gdb" instead.

Note: If you want to compile a 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.

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.

Compile aMule

Now cd into the amule folder, configure and make:

Note: You can copy and paste the 4 lines for ./configure in one go.

Note: This takes about 30 minutes on a 1.33 GHz G4.

bash: cd ~/Desktop/amule-cvs
bash: ./configure --disable-systray --disable-gtk --enable-embedded_crypto    \
           --with-wx-config=../wxMac-2.8.7/build/wx-config    \
           --enable-cas --enable-webserver --enable-amulecmd    \
           --enable-debug --disable-optimize
bash: make
bash: ./src/utils/scripts/mac_packager

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.

Note: In order to compile aMule as a Universal Binary (see above) you will need to add the following parameters to the configure statement:

           --disable-dependency-tracking \
           CFLAGS="-arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk" \
           CXXFLAGS="-arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk"

Running aMule

Once the mac_packager script has finished, you can move the aMule application from the amule-cvs folder to anywhere on your hard drive.

Version

Created by "Unknown User" on 16.07.04 at 04:46
Updated by Vollstrecker on 23.01.08 at 10:09