BuildingOnMac.wiki
author Caironater@gmail.com
Mon, 02 Dec 2013 08:02:24 +0000
changeset 353 63a39be0fe92
parent 335 fd93f8d6f64d
child 755 7ba641398b3e
permissions -rw-r--r--
Added sndPlane, sndTardis, sndFrozenHogImpact and sndIceBeam.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
25
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
     1
#summary Instructions for building Hedgewars on Mac OS X
117
5c10784de5cb notes added
vittorio.giovara@gmail.com
parents: 116
diff changeset
     2
#labels Phase-Implementation,Phase-Deploy,Phase-Support
25
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
     3
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
     4
= Prerequisites =
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
     5
271
175ecc89f964 added xcode 4 note
vittorio.giovara@gmail.com
parents: 270
diff changeset
     6
  * XCode must be installed with command line tools
25
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
     7
  * some knowledge of Terminal is preferred
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
     8
116
1c3643e4f6c5 Edited wiki page BuildingOnMac through web user interface.
vittorio.giovara@gmail.com
parents: 113
diff changeset
     9
=== Notes ===
1c3643e4f6c5 Edited wiki page BuildingOnMac through web user interface.
vittorio.giovara@gmail.com
parents: 113
diff changeset
    10
117
5c10784de5cb notes added
vittorio.giovara@gmail.com
parents: 116
diff changeset
    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
271
175ecc89f964 added xcode 4 note
vittorio.giovara@gmail.com
parents: 270
diff changeset
    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".
175ecc89f964 added xcode 4 note
vittorio.giovara@gmail.com
parents: 270
diff changeset
    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.
268
d3ee65445401 updated notes and links
vittorio.giovara@gmail.com
parents: 267
diff changeset
    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
116
1c3643e4f6c5 Edited wiki page BuildingOnMac through web user interface.
vittorio.giovara@gmail.com
parents: 113
diff changeset
    15
25
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    16
== Necessary Libraries ==
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    17
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    18
Download the following libraries and place them under `/Library/Frameworks/`
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    19
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    20
  * SDL - http://www.libsdl.org/release/SDL-1.2.14.dmg
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    21
  * SDL_image - http://www.libsdl.org/projects/SDL_image/release/SDL_image-1.2.10.dmg
27
6fc5b427224f Edited wiki page BuildingOnMac through web user interface.
vittorio.giovara@gmail.com
parents: 26
diff changeset
    22
  * SDL_mixer - http://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-1.2.11.dmg
335
fd93f8d6f64d update SDL_net link
vittorio.giovara@gmail.com
parents: 278
diff changeset
    23
  * SDL_net - http://www.libsdl.org/projects/SDL_net/release/SDL_net-1.2.8.dmg
25
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    24
  * SDL_ttf - http://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-2.0.10.dmg
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    25
  * Ogg sources - http://downloads.xiph.org/releases/ogg/libogg-1.2.1.tar.bz2
26
1c1ed695c676 Edited wiki page BuildingOnMac through web user interface.
vittorio.giovara@gmail.com
parents: 25
diff changeset
    26
  * Vorbis sources - http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.2.tar.bz2
25
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    27
278
eb590870e063 Added Optional Libraries section, containing Sparkle.
drew1313132@gmail.com
parents: 271
diff changeset
    28
== Optional Libraries ==
eb590870e063 Added Optional Libraries section, containing Sparkle.
drew1313132@gmail.com
parents: 271
diff changeset
    29
eb590870e063 Added Optional Libraries section, containing Sparkle.
drew1313132@gmail.com
parents: 271
diff changeset
    30
The following libraries are optional:
eb590870e063 Added Optional Libraries section, containing Sparkle.
drew1313132@gmail.com
parents: 271
diff changeset
    31
 * Sparkle (auto-updater) - http://sparkle.andymatuschak.org/files/Sparkle%201.5b6.zip
eb590870e063 Added Optional Libraries section, containing Sparkle.
drew1313132@gmail.com
parents: 271
diff changeset
    32
25
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    33
=== Compiling Ogg Vorbis ===
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    34
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    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.
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    36
108
c2f5407f8c19 Edited wiki page BuildingOnMac through web user interface.
henrik.rostedt@gmail.com
parents: 104
diff changeset
    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).
c2f5407f8c19 Edited wiki page BuildingOnMac through web user interface.
henrik.rostedt@gmail.com
parents: 104
diff changeset
    38
c2f5407f8c19 Edited wiki page BuildingOnMac through web user interface.
henrik.rostedt@gmail.com
parents: 104
diff changeset
    39
After that build as usual and copy the generated framework to the usual `/Library/Frameworks/` directory.
25
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    40
33
397cb8bbddde Edited wiki page BuildingOnMac through web user interface.
vittorio.giovara@gmail.com
parents: 27
diff changeset
    41
=== (Optional) Server ===
397cb8bbddde Edited wiki page BuildingOnMac through web user interface.
vittorio.giovara@gmail.com
parents: 27
diff changeset
    42
104
6ce496fecb0c updated (removed references to ghc deps and bundle macro)
vittorio.giovara@gmail.com
parents: 91
diff changeset
    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.
33
397cb8bbddde Edited wiki page BuildingOnMac through web user interface.
vittorio.giovara@gmail.com
parents: 27
diff changeset
    44
110
e2dfaa09f48a Edited wiki page BuildingOnMac through web user interface.
vittorio.giovara@gmail.com
parents: 109
diff changeset
    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
33
397cb8bbddde Edited wiki page BuildingOnMac through web user interface.
vittorio.giovara@gmail.com
parents: 27
diff changeset
    46
  * run `cabal update` to get an updated list of available libraries and install the necessary dependencies with
397cb8bbddde Edited wiki page BuildingOnMac through web user interface.
vittorio.giovara@gmail.com
parents: 27
diff changeset
    47
{{{
104
6ce496fecb0c updated (removed references to ghc deps and bundle macro)
vittorio.giovara@gmail.com
parents: 91
diff changeset
    48
sudo cabal install gameServer/hedgewars-server.cabal
33
397cb8bbddde Edited wiki page BuildingOnMac through web user interface.
vittorio.giovara@gmail.com
parents: 27
diff changeset
    49
}}}
112
e8e280ef6c23 Edited wiki page BuildingOnMac through web user interface.
vittorio.giovara@gmail.com
parents: 111
diff changeset
    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
33
397cb8bbddde Edited wiki page BuildingOnMac through web user interface.
vittorio.giovara@gmail.com
parents: 27
diff changeset
    51
25
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    52
== Necessary Tools ==
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    53
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    54
Download and install the following toolchains
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    55
268
d3ee65445401 updated notes and links
vittorio.giovara@gmail.com
parents: 267
diff changeset
    56
  * Freepascal compiler - http://sourceforge.net/projects/freepascal/files/Mac%20OS%20X/2.6.0/
d3ee65445401 updated notes and links
vittorio.giovara@gmail.com
parents: 267
diff changeset
    57
  * CMake - http://www.cmake.org/files/v2.8/cmake-2.8.10.2-Darwin64-universal.dmg
270
3fa4de1db010 fixed qt link apparently
vittorio.giovara@gmail.com
parents: 268
diff changeset
    58
  * QT - http://qt-project.org/downloads
3fa4de1db010 fixed qt link apparently
vittorio.giovara@gmail.com
parents: 268
diff changeset
    59
  * note that for compiling the 64 bit version you need download the `cocoa` version of QT
25
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    60
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    61
= Building process =
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    62
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    63
  * download the source tarball or clone the hg repo
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    64
  * configure the sources with the following line
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    65
{{{
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    66
cmake . -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake -DCMAKE_BUILD_TYPE=Release
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    67
}}}
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    68
  * run `make` and `make install`
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    69
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    70
Enjoy!