BuildingOnMac.wiki
changeset 25 4f6f055c0848
child 26 1c1ed695c676
equal deleted inserted replaced
24:a34dc3c46a47 25:4f6f055c0848
       
     1 #summary Instructions for building Hedgewars on Mac OS X
       
     2 #labels Phase-Deploy
       
     3 
       
     4 = Prerequisites =
       
     5 
       
     6   * XCode must be installed
       
     7   * some knowledge of Terminal is preferred
       
     8 
       
     9 == Necessary Libraries ==
       
    10 
       
    11 Download the following libraries and place them under `/Library/Frameworks/`
       
    12 
       
    13   * SDL - http://www.libsdl.org/release/SDL-1.2.14.dmg
       
    14   * SDL_image - http://www.libsdl.org/projects/SDL_image/release/SDL_image-1.2.10.dmg
       
    15   * SDL_mixer - http://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-1.2.1.dmg
       
    16   * SDL_net - http://dl.dropbox.com/u/24468/SDL_net.framework.zip
       
    17   * SDL_ttf - http://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-2.0.10.dmg
       
    18   * Ogg sources - http://downloads.xiph.org/releases/ogg/libogg-1.2.1.tar.bz2
       
    19   * Vorbis - http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.2.tar.bz2
       
    20 
       
    21 === Compiling Ogg Vorbis ===
       
    22 
       
    23 Since there is no framework distribution for ogg vorbis libraries, we will need to compile our own. Extract the sources and open the relative .xcodeproj file.
       
    24 
       
    25 It is likely that you will need to adjust some parameters, such as the Base SDK you have installed and for which architecture (ppc, i386, x86_64) you want to build. After that build as usual and copy the generated framework to the usual `/Library/Frameworks/` directory.
       
    26 
       
    27 == Necessary Tools ==
       
    28 
       
    29 Download and install the following toolchains
       
    30 
       
    31   * Freepascal compiler - http://sourceforge.net/projects/freepascal/files/Mac%20OS%20X/2.4.0/fpc-2.4.0.intel-macosx.dmg/download
       
    32   * CMake - http://www.cmake.org/files/v2.8/cmake-2.8.3-Darwin-universal.dmg
       
    33   * QT - http://download.qt.nokia.com/qtsdk/qt-sdk-mac-opensource-2010.05.dmg
       
    34   * note that for compiling the 64 bit version you need download the cocoa version of QT
       
    35 
       
    36 = Building process =
       
    37 
       
    38   * download the source tarball or clone the hg repo
       
    39   * configure the sources with the following line
       
    40 {{{
       
    41 cmake . -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake -DCMAKE_BUILD_TYPE=Release
       
    42 }}}
       
    43   * (optional) if you want to build a relocatable bundle, that is a bundle you can copy on your friend's mac or distribute it, add `-DBUNDLE` to the above command line
       
    44   * run `make` and `make install`
       
    45 
       
    46 Enjoy!