|
|
(18 intermediate revisions by one other user not shown) |
Line 6: |
Line 6: |
| | | |
| To build Mumble you will need: | | To build Mumble you will need: |
− | * Mac OS X 10.7 (Lion), or greater | + | * Mac OS X 10.8 (Mountain Lion) |
− | * Xcode (from the Mac App Store, the Xcode Command Line installation may work as well, but has not been tested at present), | + | * Xcode 4.4 |
− | * pkg-config (http://pkg-config.freedesktop.org/)
| |
− | * The Mumble Qt branch (http://qt.gitorious.org/+mumble-developers/qt/mumble-developers-qt)
| |
− | * Boost (http://www.boost.org/)
| |
− | * libogg (http://www.xiph.org)
| |
− | * libvorbis (http://www.xiph.org/)
| |
− | * libFLAC (http://www.xiph.org/)
| |
− | * libsoundfile (http://www.mega-nerd.com/libsndfile/)
| |
− | * Protocol Buffers (http://code.google.com/p/protobuf/)
| |
| | | |
− | === Setting up the build environment === | + | === Creating a build environment === |
| | | |
− | Start off by creating a directory to host your new environment. By default, we'll be using $HOME/MumbleBuild,
| + | The git repository at https://github.com/mumble-voip/mumble-releng contains pre-made scripts that build the current canonical Mumble OS X build environment. |
− | but anything goes. (Just remember to change the script below:)
| |
| | | |
− | #!/bin/bash
| + | Simply clone the repo, and cd into it: |
| | | |
− | # C compiler
| + | $ git clone https://github.com/mumble-voip/mumble-releng |
− | export CC="clang"
| + | $ cd mumble-releng/buildenv/1.3.x/osx |
− | export CXX="clang++"
| |
| | | |
− | # Mac OS X SDK stuff
| + | Create a MumbleBuild directory in your home dir: |
− | export MACOSX_DEPLOYMENT_TARGET="10.6"
| |
− | export OSX_SDK="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/"
| |
| | | |
− | # Autotools, etc. setup
| + | $ mkdir -p ~/MumbleBuild |
− | export OSX_CFLAGS="-isysroot $OSX_SDK -arch x86_64 -mmacosx-version-min=10.6"
| |
− | export OSX_LDFLAGS="-isysroot $OSX_SDK -Wl,-syslibroot,$OSX_SDK -arch x86_64 -mmacosx-version-min=10.6"
| |
| | | |
− | export CFLAGS=$OSX_CFLAGS
| + | Copy the 'env' script to the directory you created in the previous step: |
− | export CXXFLAGS=$OSX_CFLAGS
| |
− | export LDFLAGS=$OSX_LDFLAGS
| |
| | | |
− | # Mumble stuff
| + | $ cp env ~/MumbleBuild/env |
− | export MUMBLE_PREFIX=$HOME/MumbleBuild
| |
| | | |
− | # pkgconfig, PATH, etc.
| + | Source the env script to set up the proper environment variables for the Mumble build environment: |
− | export PKG_CONFIG_PATH=/usr/lib/pkgconfig/:$MUMBLE_PREFIX/lib/pkgconfig/:$PKG_CONFIG_PATH
| |
− | export PATH=$MUMBLE_PREFIX/Qt4.8/bin/:$PATH
| |
− | export PATH=$MUMBLE_PREFIX/bin:$PATH
| |
| | | |
− | echo Now in x86-64 MumbleBuild environment
| + | $ source ~/MumbleBuild/env |
| | | |
− | Create a copy of the above script as $HOME/MumbleBuild/env, and remember to source it before continuing
| + | Build the enviroment: |
− | your build environment set up:
| |
| | | |
− | $ source $HOME/MumbleBuild/env
| + | $ ./build-all.bash |
− | Now in x86-64 MumbleBuild environment
| |
| | | |
− | === Installing or building pkg-config ===
| + | Once this is done, you should have a fully functional installation of Mumble's dependencies (tools and libs) in a self-contained MumbleBuild directory in your home directory. |
| | | |
− | If you have Homebrew, MacPorts or Fink available, you probably already have pkg-config installed. If not, either of those packaging solutions are probably the easiest way of acquiring it.
| + | === Building Mumble === |
| | | |
− | In case you want to compile it yourself, you'll have to download and unpack pkg-config.
| + | Make sure you've sourced ~/MumbleBuild/env into your current shell session: |
− | 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:
| + | $ source ~/MumbleBuild/env |
− | 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 | |
| | | |
− | === Building OpenSSL ===
| + | Fetch the Mumble source from Git into a directory of your choosing: |
| | | |
− | Grab it from http://www.openssl.org/. The latest version we use is 1.0.0g.
| + | git clone --recursive https://github.com/mumble-voip/mumble |
| | | |
− | Unpack and build:
| + | To build the client, execute: |
| | | |
− | ./Configure darwin64-x86_64-cc -shared --prefix=$MUMBLE_PREFIX --openssldir=$MUMBLE_PREFIX/openssl | + | cd mumble |
| + | qmake -recursive -Wall main.pro CONFIG+="release static" |
| make | | make |
− | make install
| |
| | | |
− | === Building libxar ===
| + | If everything went well, you should now have a Mumble.app application bundle in the release directory of the root of the source tree. |
− | | |
− | Fetch it via SVN:
| |
− | | |
− | svn checkout http://xar.googlecode.com/svn/trunk/ xar-read-only
| |
− | | |
− | And build it. LibXAR seems not to want to read the OS X SDK version of libxml2's headers. Instead, it uses the system headers. Therefore we must override the include path.
| |
− | | |
− | We also want libxar to link against our own OpenSSL dylibs, which is why we also add the include path and lib dir for our $MUMBLE_PREFIX.
| |
− | | |
− | cd xar-read-only/xar
| |
− | export CFLAGS="-I$OSX_SDK/usr/include/libxml2 ${CFLAGS} -I${MUMBLE_PREFIX}/include/"
| |
− | export LDFLAGS="${LDFLAGS} -L${MUMBLE_PREFIX}/lib/"
| |
− | ./autogen.sh --prefix=${MUMBLE_PREFIX}
| |
− | make
| |
− | | |
− | After the build, it's a good thing to make sure things went as they should. We want the built libxar to be able to run on both Lion and Snow Leopard.
| |
− | Check that it's linking against our own libcrypto, and that it's linking against the 9.0.0 compatibility version of libxml2 (that's the Leopard version).
| |
− | | |
− | FIXME:
| |
− | $ otool -L lib/libxar.1.dylib
| |
− | [...]
| |
− | /MumbleDeveloper/x86-64/lib/libcrypto.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.8)
| |
− | /usr/lib/libxml2.2.dylib (compatibility version 9.0.0, current version 9.16.0)
| |
− | [...]
| |
| | | |
− | When all is well, install it:
| + | === Building Murmur === |
| | | |
− | sudo make install
| + | Make sure you've sourced ~/MumbleBuild/env into your current shell session: |
| | | |
− | === Building Qt ===
| + | $ source ~/MumbleBuild/env |
| | | |
− | Download and unpack Qt:
| + | Fetch the Mumble and Murmur source from Git into a directory of your choosing: |
| | | |
− | git clone git://gitorious.org/+mumble-developers/qt/mumble-developers-qt.git | + | git clone --recursive https://github.com/mumble-voip/mumble |
− | cd mumble-developers-qt
| |
− | git branch -t 4.8-mumble origin/4.8-mumble
| |
− | git checkout 4.8-mumble
| |
| | | |
− | Then build it:
| + | To build the server, execute: |
| | | |
− | unset CFLAGS | + | cd mumble |
− | unset CXXFLAGS | + | qmake -spec unsupported/macx-clang -recursive CONFIG+="release static no-client no-dbus" |
− | unset LDFLAGS
| |
− | export CFLAGS="-I$MUMBLE_PREFIX/include"
| |
− | export CXXFLAGS="-I$MUMBLE_PREFIX/include"
| |
− | OPENSSL_LIBS="-L$MUMBLE_PREFIX/lib -lssl -lcrypto" ./configure -pch -debug-and-release -arch x86_64 -cocoa -qt-sql-sqlite -system-zlib -qt-gif -qt-libpng -qt-libjpeg -qdbus -webkit -no-phonon -no-phonon-backend -no-qt3support -openssl-linked -mysql_config no -sdk $OSX_SDK -prefix $MUMBLE_PREFIX/Qt4.8 -opensource -confirm-license
| |
| make | | make |
− | sudo make install
| |
− | export CFLAGS=$OSX_CFLAGS
| |
− | export CXXFLAGS=$OSX_CFLAGS
| |
− | export LDFLAGS=$OSX_LDFLAGS
| |
| | | |
− | === Installing Qt icns icon engine ===
| + | If everything went well, you should now have a murmur binary in the release directory of the root of the source tree. |
| | | |
− | Grab it:
| + | === Distributing Mumble === |
− | git clone git://github.com/mkrautz/qt-icns-iconengine.git
| |
| | | |
− | Build and install it
| + | If you wish to create a proper redistributable Mumble application bundle, please refer to the osxdist.py script in |
− | cd qt-icns-iconengine
| + | the macx/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! |
− | qmake CONFIG+='release'
| |
− | make
| |
− | sudo cp libqicnsicon.dylib $MUMBLE_PREFIX/qt-4.7/plugins/iconengines/libqicnsicon.dylib
| |
− | make distclean
| |
− | qmake CONFIG+='debug'
| |
− | make
| |
− | sudo cp libqicnsicon.dylib $MUMBLE_PREFIX/qt-4.7/plugins/iconengines/libqicnsicon_debug.dylib
| |
| | | |
− | For universal, use
| + | 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. |
− | qmake CONFIG+='release universal'
| |
− | or
| |
− | qmake CONFIG+='debug universal'
| |
− | when configuring, to get a universal build.
| |
− | | |
− | === Installing Boost ===
| |
− | | |
− | Grab the latest version of Boost from http://www.boost.org/, as of current writing, that is 1.45.0.
| |
| | | |
− | It is advisible to unpack Boost to $MUMBLE_PREFIX/include/, so the Boost headers will be available in $MUMBLE_PREFIX/include/boost-1_45_0/, since Mumble will look for the headers in this place by default.
| + | If you only have a Mumble.app, and have not built Murmur, you should also pass the |
| | | |
− | === Building libogg ===
| + | --no-server |
| | | |
− | Grab the latest version (current 1.2.0). Build:
| + | parameter to the osxdist.py script. This will not attempt to package Murmur-specific files in the generated .dmg. |
| | | |
− | ./configure --disable-dependency-tracking --prefix=$MUMBLE_PREFIX
| + | The script supports code signing, and among other things, allow you to build a copy of Mumble signed with your Developer ID certificates from Apple. |
− | make
| + | To build with code signing enabled, use the following three parameters to the osxdist.py script: |
− | sudo make install
| |
− | | |
− | === Building libvorbis ===
| |
− | | |
− | Grab the latest version (current 1.3.1). Build:
| |
− | | |
− | ./configure --disable-dependency-tracking --prefix=$MUMBLE_PREFIX
| |
− | make
| |
− | sudo make install
| |
− | | |
− | === Building libFLAC ===
| |
− | | |
− | Grab the latest version (currently 1.2.1). Build (x86-64):
| |
− | | |
− | ./configure --build=x86_64-apple-darwin10.2.0 --prefix=/MumbleDeveloper/x86-64/
| |
− | make
| |
− | sudo make install
| |
− | | |
− | === Building libsndfile ===
| |
− | | |
− | Grab the latest version (currently 1.0.21). Build:
| |
− | | |
− | ./configure --prefix=$MUMBLE_PREFIX --disable-sqlite
| |
− | make
| |
− | sudo make install
| |
− | | |
− | === Building Protocol Buffers ===
| |
− | | |
− | Grab the latest version of Protocol Buffers from its Google Code project: http://code.google.com/p/protobuf/. As of this writing, that is version 2.3.0.
| |
− | Direct link: http://protobuf.googlecode.com/files/protobuf-2.3.0.tar.bz2
| |
− | | |
− | Build and install it:
| |
− | | |
− | ./configure --disable-dependency-tracking --prefix=$MUMBLE_PREFIX
| |
− | make
| |
− | sudo make install
| |
− | | |
− | === Logitech LCD SDK (optional) ===
| |
− | | |
− | Grab it, install it. Build it:
| |
− | | |
− | sudo mkdir -p $MUMBLE_PREFIX/lglcd-sdk/
| |
− | sudo tar -zxvf /Applications/Logitech/GamePanel\ Software/LCD\ Manager/LCDSDK/LCDSDK.tgz -C $MUMBLE_PREFIX/lglcd-sdk/
| |
− | sudo chmod -vR +r $MUMBLE_PREFIX/lglcd-sdk/
| |
− | | |
− | == Building Mumble ==
| |
− | | |
− | Fetch the Mumble source from Git:
| |
− | | |
− | git clone git://mumble.git.sourceforge.net/gitroot/mumble mumble.git
| |
− | cd mumble.git
| |
− | git submodule init
| |
− | git submodule update
| |
− | | |
− | To build the client, execute: | |
− | | |
− | qmake main.pro CONFIG+='release no-server'
| |
− | make
| |
− | | |
− | 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.py script in
| |
− | the macx/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!
| + | * --developer-id='<Name or Organization>' |
| + | * --keychain=<keychain> (optional, defaults to 'login.keychain') |
| | | |
| [[Category:Development]] | | [[Category:Development]] |
Building Guides
This page is one of a set of Building pages/guides for the different OSes with information on building Mumble/Murmur.
Introduction
This guide describes the method to get a fully working and redistributable version of Mumble and Murmur that uses the Cocoa version of Qt 4.
To build Mumble you will need:
- Mac OS X 10.8 (Mountain Lion)
- Xcode 4.4
Creating a build environment
The git repository at https://github.com/mumble-voip/mumble-releng contains pre-made scripts that build the current canonical Mumble OS X build environment.
Simply clone the repo, and cd into it:
$ git clone https://github.com/mumble-voip/mumble-releng
$ cd mumble-releng/buildenv/1.3.x/osx
Create a MumbleBuild directory in your home dir:
$ mkdir -p ~/MumbleBuild
Copy the 'env' script to the directory you created in the previous step:
$ cp env ~/MumbleBuild/env
Source the env script to set up the proper environment variables for the Mumble build environment:
$ source ~/MumbleBuild/env
Build the enviroment:
$ ./build-all.bash
Once this is done, you should have a fully functional installation of Mumble's dependencies (tools and libs) in a self-contained MumbleBuild directory in your home directory.
Building Mumble
Make sure you've sourced ~/MumbleBuild/env into your current shell session:
$ source ~/MumbleBuild/env
Fetch the Mumble source from Git into a directory of your choosing:
git clone --recursive https://github.com/mumble-voip/mumble
To build the client, execute:
cd mumble
qmake -recursive -Wall main.pro CONFIG+="release static"
make
If everything went well, you should now have a Mumble.app application bundle in the release directory of the root of the source tree.
Building Murmur
Make sure you've sourced ~/MumbleBuild/env into your current shell session:
$ source ~/MumbleBuild/env
Fetch the Mumble and Murmur source from Git into a directory of your choosing:
git clone --recursive https://github.com/mumble-voip/mumble
To build the server, execute:
cd mumble
qmake -spec unsupported/macx-clang -recursive CONFIG+="release static no-client no-dbus"
make
If everything went well, you should now have a murmur binary 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.py script in
the macx/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.
If you only have a Mumble.app, and have not built Murmur, you should also pass the
--no-server
parameter to the osxdist.py script. This will not attempt to package Murmur-specific files in the generated .dmg.
The script supports code signing, and among other things, allow you to build a copy of Mumble signed with your Developer ID certificates from Apple.
To build with code signing enabled, use the following three parameters to the osxdist.py script:
- --developer-id='<Name or Organization>'
- --keychain=<keychain> (optional, defaults to 'login.keychain')