BuildingMacOSX
Contents
Universal or not Universal?
If you want to build Mumble as universal binary you will first have to build all dependencies as universal binary.
Dependencies
To build Mumble you will need:
- Mac OS X 10.4 (Tiger) or 10.5 (Leopard)
- XCode (http://developer.apple.com/tools/xcode/, or from your Mac OS X install disks)
- pkg-config (http://pkg-config.freedesktop.org/)
- Qt 4.3.4 (http://trolltech.com/developer/downloads/qt/mac)
- Boost (http://www.boost.org/)
- PortAudio (http://www.portaudio.com/)
Compiling pkg-config
This is just a build tool, so you do not have to build it as universal binary.
If you have MacPorts installed, you probably already have pkg-config as well. If not, you can install it by doing
sudo port install pkgconfig
In case you want to compile it yourself, you'll have to download and unpack pkg-config.
sudo mkdir /usr/lib/pkgconfig (choose a path you like) export PKG_CONFIG_PATH=/usr/lib/pkgconfig ./configure && make && sudo make install
To make the path permanent add the following line to your ~/.profile file:
export PKG_CONFIG_PATH=/usr/lib/pkgconfig
Also add a path entry to the pkg-config binary to this file:
export PATH=$PATH:/usr/local/bin
Compiling Qt
Download an unpack Qt.
Since we want our build to be as compatible as possible, we will build against the 10.4 (Tiger) SDK (even on Leopard). To build Qt, run:
export MACOSX_DEPLOYMENT_TARGET="10.4" ./configure -universal -qt-sql-sqlite -qt-libpng -sdk /Developer/SDKs/MacOSX10.4u.sdk
in the Qt directory. If configure runs sucessfully, continue by executing:
make && sudo make install
Qt will be installed to the directory /usr/local/Trolltech/Qt-4.3.4.
To make the Qt tools visible add the following line to your ~/.profile file:
export PATH=$PATH:/usr/local/Trolltech/Qt-4.3.4/bin
Installing Boost
As Mumble only uses some Boost headers you do not have to build Boost from scratch - you just need to unpack it.
It is advisible to unpack Boost to /usr/local/include/, so the Boost headers will be available in /usr/local/include/boost-1_34_1/, since Mumble will look for the headers in this place by default.
If you have MacPorts installed, you can install Boost by executing
sudo port install boost
Mumble will also look for the headers in /opt/local/include/boost-1_34_1/ - the default install location for MacPorts.
Compiling PortAudio
Download and extract the latest nightly PortAudio snapshot:
http://portaudio.com/archives/pa_snapshot.tar.gz
Build and install it:
export MACOSX_DEPLOYMENT_TARGET="10.4" export OSX_SDK="/Developer/SDKs/MacOSX10.4u.sdk" export OSX_CFLAGS="-isysroot $OSX_SDK -arch ppc -arch i386" export OSX_LDFLAGS="-Wl,-syslibroot,$OSX_SDK -arch ppc -arch i386" CFLAGS="-O2 -g $OSX_CFLAGS" LDFLAGS="$OSX_LDFLAGS" ./configure --disable-mac-universal --disable-dependency-tracking --prefix=/opt/mumble/portaudio/ make sudo make install
Building Mumble
Fetch the Mumble source from SVN.
To build the client, execute:
export PKG_CONFIG_PATH=/opt/mumble/portaudio/lib/pkgconfig/:$PKG_CONFIG_PATH qmake main.pro CONFIG+='no-server release' make
Note: If you didn't install Boost in the advised directory or through MacPorts, you should add your own include path to src/mumble/mumble.pro (search for boost).
If everything went well, you should now have a Mumble.app application bundle in the release directory of the root of the source tree.
Distributing Mumble
If you wish to create a proper redistributable Mumble application bundle, please refer to the osxdist.sh script in the scripts directory. This will help you clean up your application bundle, include the needed dependencies, resources etc., and create a compressed disk image - ready to redistribute!
The script expects you to be in the root of the source tree. After executing, it will spit out a .dmg of your Mumble build in the release folder.
Please note that the script currently is tuned for creating real redistributable versions of Mumble, and as such only works on universal (x86, ppc) release builds!