| 98 | |
| 99 | |
| 100 | === OS X === |
| 101 | |
| 102 | Follow 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 | |