Difference between revisions of "BuildingMacOSX"

From Mumble Wiki
Jump to: navigation, search
(Redo 'Distributing Mumble' section - use new osxdist.sh script)
(Use Makefiles, not XCode - we've done everything else in the terminal, why stop? :-))
Line 63: Line 63:
  
 
Fetch the Mumble source from SVN. First build speex by changing into the ''speexbuild'' subdirectory and running:
 
Fetch the Mumble source from SVN. First build speex by changing into the ''speexbuild'' subdirectory and running:
  qmake speexbuild.pro && make
+
  qmake speexbuild.pro && make release
  
 
After that change to the ''src/mumble'' subdirectory. Here you might have to change some parameters in ''mumble.pro'', so open it in a text editor.
 
After that change to the ''src/mumble'' subdirectory. Here you might have to change some parameters in ''mumble.pro'', so open it in a text editor.
Line 71: Line 71:
  
 
then run:
 
then run:
  qmake -nocache -config release -spec macx-xcode mumble.pro
+
  qmake mumble.pro && make release
after that you can:
 
open mumble.xcodeproj
 
  
In XCode switch to Release target and press the build button. If this finishes without errors you have done everything right and the finished application is located in the subdir ''src/mumble/build/Release'' of the main mumble sourcedir.
+
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 ==
 
== Distributing Mumble ==
  
 
If you wish to create a proper redistributable Mumble application bundle, please refer to the osxdist.sh script in
 
If you wish to create a proper redistributable Mumble application bundle, please refer to the osxdist.sh script in
the scripts directory of Mumble. 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 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 Mumble source tree. After executing, it will spit out a .dmg of your Mumble build in the release folder.
+
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!
 
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!

Revision as of 15:35, 9 April 2008

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:

Compiling pkg-config

This is just a build tool, so you do not have to build it as universal binary. 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. Run

./configure -universal -qt-sql-sqlite -qt-libpng

in the QT dir. If configure is successful run

make && sudo make install

QT will be installed to /usr/local/Trolltech/Qt-4.3.X or similar.

To make the QT tools visible add the following line to your ~/.profile file:

export PATH=$PATH:/usr/local/Trolltech/Qt-4.3.X/bin

Compiling Boost

As Mumble only uses some Boost headers you do not have to build/install this. Just unpack Boost.

Compiling Portaudio

This builds universal by default. So just download, unpack and:

./configure && make

For the Mumble build system to find this you will have to modify the included portaudio-2.0.pc.in, rename it to portaudio-2.0.pc and put it in you PKG_CONFIG_PATH. My portaudio-2.0.pc file looks like this:

prefix=/Users/username/Development/portaudio
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${exec_prefix}/include

Name: PortAudio
Description: Portable audio I/O
Requires:
Version: 19

Libs: -L${libdir} -lportaudio 
Cflags: -I${includedir}

Building Mumble

Fetch the Mumble source from SVN. First build speex by changing into the speexbuild subdirectory and running:

qmake speexbuild.pro && make release

After that change to the src/mumble subdirectory. Here you might have to change some parameters in mumble.pro, so open it in a text editor. Change the path in the line:

INCLUDEPATH += /usr/local/include/boost-1_34/

to the path where your boost headers are located.

then run:

qmake mumble.pro && make release

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!