BuildingOnMac.wiki
changeset 755 7ba641398b3e
parent 335 fd93f8d6f64d
child 756 03c80807b053
equal deleted inserted replaced
754:d5fa7015294b 755:7ba641398b3e
     1 #summary Instructions for building Hedgewars on Mac OS X
     1 #summary Instructions for building Hedgewars on Mac OS X
     2 #labels Phase-Implementation,Phase-Deploy,Phase-Support
     2 #labels Phase-Implementation,Phase-Deploy,Phase-Support
     3 
     3 
     4 = Prerequisites =
     4 = Building on Mac OS =
       
     5 == Prerequisites ==
     5 
     6 
     6   * XCode must be installed with command line tools
     7   * XCode must be installed with command line tools
     7   * some knowledge of Terminal is preferred
     8   * some knowledge of Terminal is preferred
     8 
     9 
     9 === Notes ===
    10 ==== Notes ====
    10 
    11 
    11    # it has been reported that Xcode 3.2.6 creates problem when linking frameworks! If you can't use another version, try this: https://discussions.apple.com/thread/2781968?threadID=2781968&tstart=105
    12    # it has been reported that Xcode 3.2.6 creates problem when linking frameworks! If you can't use another version, try this: https://discussions.apple.com/thread/2781968?threadID=2781968&tstart=105
    12    # for Xcode 4 onwards, you need to install the command line tools: open Xcode, go to Preferences, select "Downloads" and install the "Command Line Tools".
    13    # for Xcode 4 onwards, you need to install the command line tools: open Xcode, go to Preferences, select "Downloads" and install the "Command Line Tools".
    13    # for Qt series 4.7, only versions 4.7.0 and 4.7.4 are not suffering from this bug http://bugreports.qt.nokia.com/browse/QTBUG-17333 any other version will not work with online games.
    14    # for Qt series 4.7, only versions 4.7.0 and 4.7.4 are not suffering from this bug http://bugreports.qt.nokia.com/browse/QTBUG-17333 any other version will not work with online games.
    14    # Lion has an incompatible ABI with older version of Freepascal! Use only the new Freepascal version 2.6.0 or newer. See http://bugs.freepascal.org/view.php?id=19269
    15    # Lion has an incompatible ABI with older version of Freepascal! Use only the new Freepascal version 2.6.0 or newer. See http://bugs.freepascal.org/view.php?id=19269
    15 
    16 
    16 == Necessary Libraries ==
    17 === Necessary libraries ===
    17 
    18 
    18 Download the following libraries and place them under `/Library/Frameworks/`
    19 Download the following libraries and place them under `/Library/Frameworks/`
    19 
    20 
    20   * SDL - http://www.libsdl.org/release/SDL-1.2.14.dmg
    21   * SDL - http://www.libsdl.org/release/SDL-1.2.14.dmg
    21   * SDL_image - http://www.libsdl.org/projects/SDL_image/release/SDL_image-1.2.10.dmg
    22   * SDL_image - http://www.libsdl.org/projects/SDL_image/release/SDL_image-1.2.10.dmg
    23   * SDL_net - http://www.libsdl.org/projects/SDL_net/release/SDL_net-1.2.8.dmg
    24   * SDL_net - http://www.libsdl.org/projects/SDL_net/release/SDL_net-1.2.8.dmg
    24   * SDL_ttf - http://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-2.0.10.dmg
    25   * SDL_ttf - http://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-2.0.10.dmg
    25   * Ogg sources - http://downloads.xiph.org/releases/ogg/libogg-1.2.1.tar.bz2
    26   * Ogg sources - http://downloads.xiph.org/releases/ogg/libogg-1.2.1.tar.bz2
    26   * Vorbis sources - http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.2.tar.bz2
    27   * Vorbis sources - http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.2.tar.bz2
    27 
    28 
    28 == Optional Libraries ==
    29 === Optional libraries ===
    29 
    30 
    30 The following libraries are optional:
    31 The following libraries are optional:
    31  * Sparkle (auto-updater) - http://sparkle.andymatuschak.org/files/Sparkle%201.5b6.zip
    32  * Sparkle (auto-updater) - http://sparkle.andymatuschak.org/files/Sparkle%201.5b6.zip
    32 
    33 
    33 === Compiling Ogg Vorbis ===
    34 ==== Compiling Ogg Vorbis ====
    34 
    35 
    35 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.
    36 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.
    36 
    37 
    37 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. Go into "Project"->"Edit Project Settings", under "Build" set Architectures to Standard and Base SDK to 10.5 (otherwise newer).
    38 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. Go into "Project"->"Edit Project Settings", under "Build" set Architectures to Standard and Base SDK to 10.5 (otherwise newer).
    38 
    39 
    39 After that build as usual and copy the generated framework to the usual `/Library/Frameworks/` directory.
    40 After that build as usual and copy the generated framework to the usual `/Library/Frameworks/` directory.
    40 
    41 
    41 === (Optional) Server ===
    42 ==== (Optional) Server ====
    42 
    43 
    43 If you want to compile server for hosting lan games, you need to download a Haskell compiler: we are going to use the Glasgow Haskell Compiler.
    44 If you want to compile server for hosting lan games, you need to download a Haskell compiler: we are going to use the Glasgow Haskell Compiler.
    44 
    45 
    45   * download the Haskell Platform and install both the GHC and Haskell Platform - http://lambda.galois.com/hp-tmp/2011.2.0.1/Haskell%20Platform%202011.2.0.1-i386.pkg
    46   * download the Haskell Platform and install both the GHC and Haskell Platform - http://lambda.galois.com/hp-tmp/2011.2.0.1/Haskell%20Platform%202011.2.0.1-i386.pkg
    46   * run `cabal update` to get an updated list of available libraries and install the necessary dependencies with
    47   * run `cabal update` to get an updated list of available libraries and install the necessary dependencies with
    47 {{{
    48 {{{
    48 sudo cabal install gameServer/hedgewars-server.cabal
    49 sudo cabal install gameServer/hedgewars-server.cabal
    49 }}}
    50 }}}
    50   * _(even more optional)_ if you feel experimental, you can also try to use the 64bit variant of Haskell, just make sure that your `~/.cabal/` directory doesn't conflict with previous installations - http://lambda.galois.com/hp-tmp/2011.2.0.1/Haskell%20Platform%202011.2.0.1-x86_64.pkg
    51   * _(even more optional)_ if you feel experimental, you can also try to use the 64bit variant of Haskell, just make sure that your `~/.cabal/` directory doesn't conflict with previous installations - http://lambda.galois.com/hp-tmp/2011.2.0.1/Haskell%20Platform%202011.2.0.1-x86_64.pkg
    51 
    52 
    52 == Necessary Tools ==
    53 === Necessary tools ===
    53 
    54 
    54 Download and install the following toolchains
    55 Download and install the following toolchains
    55 
    56 
    56   * Freepascal compiler - http://sourceforge.net/projects/freepascal/files/Mac%20OS%20X/2.6.0/
    57   * Freepascal compiler - http://sourceforge.net/projects/freepascal/files/Mac%20OS%20X/2.6.0/
    57   * CMake - http://www.cmake.org/files/v2.8/cmake-2.8.10.2-Darwin64-universal.dmg
    58   * CMake - http://www.cmake.org/files/v2.8/cmake-2.8.10.2-Darwin64-universal.dmg
    58   * QT - http://qt-project.org/downloads
    59   * QT - http://qt-project.org/downloads
    59   * note that for compiling the 64 bit version you need download the `cocoa` version of QT
    60   * note that for compiling the 64 bit version you need download the `cocoa` version of QT
    60 
    61 
    61 = Building process =
    62 == Building process ==
    62 
    63 
    63   * download the source tarball or clone the hg repo
    64   * download the source tarball or clone the hg repo
    64   * configure the sources with the following line
    65   * configure the sources with the following line
    65 {{{
    66 {{{
    66 cmake . -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake -DCMAKE_BUILD_TYPE=Release
    67 cmake . -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake -DCMAKE_BUILD_TYPE=Release