|Version 3 (modified by k776, 16 months ago) (diff)|
This page is a work in progress, please don't report bugs until it's done
Step 1: Install XCode
First you'll need to install XCode. The tools installed with it include the compilers you'll need to compile the game and the libraries it depends on.
You can obtain XCode from http://developer.apple.com/technologies/xcode.html . You'll need a Mac Dev account, but registration and download is free.
Once downloaded, double click the file and follow the installation instructions.
Step 2: Install Homebrew
Homebrew, a package management tool for Mac, is far superior to it's predecessors (like MacPorts? and FinkCommander?). It's lightweight, and very fast, and the preferred package management tool. If you use MacPorts? or FinkCommander?, you're on your own, since the content below will focus on using Homebrew to compile the game.
To install, follow the instructions at https://github.com/mxcl/homebrew/wiki/installation , but skip the step about installing XCode, as you did that above.
The rest of this guide assumes you installed Homebrew to /usr/local, not to /opt or any other non-standard prefix, and that you didn't use sudo. If you installed otherwise, you're on your own.
Step 3: Install 0 A.D. Dependencies
Run the following in a console to install the dependencies needed for 0 A.D. Installing all dependencies takes anywhere between 40 minutes up to as much as 2 hours, during which time, the computer is pretty slow, so be patient with it. Best to do it when you won't be using the computer while it's installing.
brew install subversion boost libxml2 cmake enet sdl libogg libvorbis nasm devil curl brew link libxml2 brew link curl
Step 4: Obtaining the 0 A.D. source
If you want to grab the release files, you can do that. But in this guide, we'll compile SVN, which has the newest features.
Step 5: Preparing 0 A.D. to compile
Atlas, the unit, building, and map editor used by 0 A.D. isn't compatible with Mac, so there is a special step required to get the game to compile.
Open up build/workspaces/update_workspaces.sh in a text editor and remove the text "--atlas" from the last line. Remove only that text (not the whole line or anything else on that line).
Step 6: Compiling 0 A.D.
Finally, to compile, run the following commands in a console (adjust the path on the first line to go to the actual directory source root):
cd /path/to/source cd build/workspaces ./update-workspaces.sh cd gcc make
Step 7: Running 0 A.D.
To run the game, run the following commands in a console:
cd /path/to/source cd binaries/system ./pyrogenesis