author RedGrinner
Mon, 06 Dec 2010 22:22:52 +0000
changeset 61 99fa236c7eb9
parent 34 bb98d418d1e3
child 88 460d92a9be10
permissions -rw-r--r--
change-log(06/12/10) Added a few entries. global vars - CurrentHedgehog event handlers - onGearResurrect - OnGearDamage functions - HogTurnLeft - HogSay small fixes - corrected a mistake in the example code in SetEffect, and added a note about integer/boolean distinction between 0.9.14 and dev. - moved the comments for AddVisualGear and SetVisualGearValues one line higher so that the width doesn't carry off the page

#summary Instructions for building Hedgewars on Mac OS X
#labels Phase-Deploy

= Prerequisites =

  * XCode must be installed
  * some knowledge of Terminal is preferred

== Necessary Libraries ==

Download the following libraries and place them under `/Library/Frameworks/`

  * SDL -
  * SDL_image -
  * SDL_mixer -
  * SDL_net -
  * SDL_ttf -
  * Ogg sources -
  * Vorbis sources -

=== Compiling Ogg Vorbis ===

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.

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.

=== (Optional) Server ===

If you want to compile server for hosting lan games, you need to download an Haskell compiler. We are going to use the Glasgow Haskell Compiler.

  * download the Haskell Platform and install both the GHC and Haskell Platform -
  * run `cabal update` to get an updated list of available libraries and install the necessary dependencies with
sudo cabal install dataenc hslogger network-bytestring
  * then in the following cmake comand, remember to add `-DWITH_SERVER=1` or `-DBUNDLE`

== Necessary Tools ==

Download and install the following toolchains

  * Freepascal compiler -
  * CMake -
  * QT -
  * note that for compiling the 64 bit version you need download the cocoa version of QT

= Building process =

  * download the source tarball or clone the hg repo
  * configure the sources with the following line
cmake . -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake -DCMAKE_BUILD_TYPE=Release
  * (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
  * (note) if you specify `-DBUNDLE` you'll need to install GHC as well
  * run `make` and `make install`