272 | | * Install [http://www.macports.org/install.php MacPorts]. This is the easiest way to install all the dependencies needed by the game. |
273 | | * `sudo port install` the following packages : |
274 | | * pkgconfig |
275 | | * boost |
276 | | * cmake |
277 | | * libenet |
278 | | * libsdl |
279 | | * libvorbis |
280 | | * libxml2 |
281 | | * curl |
282 | | * wxWidgets-devel (required for building Atlas, only the 2.9.x branch will work on 64-bit Macs) |
283 | | * subversion (the default version on 10.5 seems to cause checksum mismatch errors) |
284 | | |
285 | | Run the following command in a shell : |
286 | | {{{ |
287 | | #!sh |
288 | | sudo port install pkgconfig boost cmake libenet libsdl libvorbis libxml2 curl wxWidgets-devel subversion |
289 | | }}} |
290 | | |
291 | | * Now follow the [#Gettingthecode same instructions] as for Linux above, starting from the `svn co`. |
| 272 | * Obtain the game's source code from SVN as [#Gettingthecode described above]. |
| 273 | Now you have two options: |
| 274 | 1. Build the game as a loose binary |
| 275 | * Run [source:/ps/trunk/libraries/osx/build-osx-libs.sh build-osx-libs.sh], the OS X libraries build script, this will download and build the game's dependencies. |
| 276 | {{{ |
| 277 | #!sh |
| 278 | cd libraries/osx |
| 279 | ./build-osx-libs.sh -j3 |
| 280 | }}} |
| 281 | * '''-j3''' gives the number of parallel builds to run, and should typically be one plus the number of CPU cores available. |
| 282 | * Now follow the [#Build build] instructions for Linux, to build on the command line. Or if you have Xcode installed, you can open `build/workspaces/xcode4/pyrogenesis.xcworkspace` (see discussion on this [http://www.wildfiregames.com/forum/index.php?showtopic=15511&st=160#entry261743 here]). |
| 288 | 2. Build the game as a distributable bundle |
| 289 | * You will need Xcode installed for this (for its SDKs) |
| 290 | * Open [source:/ps/trunk/build/workspaces/build-osx-bundle.sh build/workspaces/build-osx-bundle.sh] and read the comments. You might need to change a few settings depending on your version of OS X, Xcode, etc. |
| 291 | * Run `build-osx-bundle.sh`: |
| 292 | {{{ |
| 293 | #!sh |
| 294 | cd build/workspaces |
| 295 | ./build-osx-bundle.sh -j3 |
| 296 | }}} |
| 297 | * '''-j3''' gives the number of parallel builds to run, and should typically be one plus the number of CPU cores available. |
| 298 | * When it's finished, there should be a complete '''0ad app''' bundle in `build/workspaces`. |