Changes between Version 36 and Version 37 of BuildInstructions


Ignore:
Timestamp:
Jul 26, 2009, 7:39:28 PM (15 years ago)
Author:
arn34
Comment:

OS X build instructions

Legend:

Unmodified
Added
Removed
Modified
  • BuildInstructions

    v36 v37  
    8282  * and maybe some other things?
    8383 * For '''Ubuntu''' the following might help: ''sudo apt-get install build-essential libsdl1.2-dev zlib1g-dev libpng12-dev libjpeg62-dev libgamin-dev nasm libwxgtk2.8-dev libboost-dev libboost-signals-dev libboost-filesystem-dev libopenal-dev libalut-dev libvorbis-dev libogg-dev libcrypto++-dev binutils-dev libnspr4-dev libdevil-dev libenet-dev libxml2-dev''
    84  * For '''OS X''' you'll need [http://www.macports.org MacPorts] first. Then the following might help: ''sudo port install boost libsdl spidermonkey wxWidgets''
     84
     85 * For '''OS X''', please see detailed section here after
    8586
    8687 * You'll need a multi-threaded build of !SpiderMonkey. If you have a single-threaded version, you should get some compiler errors and you might need to compile the right version yourself (see below).
     
    9596 * If you encounter any build errors, look for an existing bug report or report a new bug.
    9697 * `( cd ../../../binaries/system && ./pyrogenesis_dbg )`
     98
     99
     100=== OS X ===
     101
     102Follow this steps to install under OS X:
     103 * Install Apple's XCode for your system : see your Mac OsX install DVD or go to [http://connect.apple.com Apple's Developer Connection Site]
     104   This provides the necessary tools to compile programs
     105
     106 * Install Macports : [http://www.macports.org/install.php MacPorts]
     107   This is the easiest way to install all the dependencies needed by 0ad.
     108
     109 * `sudo port install gcc43`
     110   You need this gcc version because the one provided by Apple is gcc 4.0.1 which will fail in compiling 0ad.  Note that gcc 4.1 will fail also (don't know about gcc 4.2).
     111   You'll also have to make symlinks in the /opt/local/bin/ directory to link the gcc command to gcc-mp-43 or OS X will use the default system gcc (so 4.0.1) : sudo ln -s /opt/local/bin/gcc-mp-43 gcc
     112   Make also symlinks for g++ and c++
     113
     114 * `sudo port install` the following packages :
     115   ** boost
     116   ** libsdl
     117   ** spidermonkey
     118   ** xercesc
     119   ** wxWidgets
     120   ** ffmpeg
     121   ** libxml2
     122
     123 * As mentionned in the help file : "You also need to install DevIL manually. It depends on some libraries downloaded through MacPorts above, so get those first. Next, obtain DevIL 1.6.8 RC2 from http://openil.sourceforge.net/download.php. Then extract the archive, and run ./configure, make, and sudo make install." - I downloaded 1.7.8 which is the latest version and it seems to work as well.
     124
     125 * Install the [http://enet.bespin.org/ enet library] for networking.
     126
     127 * Right, you're almost ready to compile 0ad : you need to patch Apple's OpenAL (/System/Library/Frameworks/OpenAL.Framework/alc.h : replace all ALCvoid by void (except first one which is a typedef)
     128
     129 * Now get the last revision of the game : `svn co http://svn.wildfiregames.com/public/ps/trunk/` (or `http://svn.wildfiregames.com/svn/ps/trunk/` if you have commit access)
     130
     131 * Recompile FCollada : `cd ''path-to-0ad''/libraries/fcollada/src && make` (where path-to-0ad is obviously the place you put the game folder)
     132
     133 * then compile the game :
     134   ** `cd trunk/build/workspaces`
     135   ** `./update-workspaces.sh` (you'll have to repeat this step each time a source file is added or removed)
     136   ** `cd gcc`
     137   ** `make -j3` (where `3` is the number of parallel builds to run, and could perhaps be one plus the number of CPU cores available)
     138   ** If you encounter any build errors, look for an existing bug report or report a new bug.
     139 
     140   I still get a last error, but it seems harmless.
     141
     142 * Finally, launch the game : ` cd ../../../binaries/system && ./pyrogenesis_dbg`
     143
     144
     145
    97146
    98147=== Known problems and solutions ===