Changes between Version 5 and Version 6 of MacBuildInstructions


Ignore:
Timestamp:
Mar 10, 2013, 4:53:28 AM (11 years ago)
Author:
MishFTW
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MacBuildInstructions

    v5 v6  
    22
    33== Step 1: Install XCode ==
    4 
    54First 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.
    65
     
    98Once downloaded, double click the file and follow the installation instructions.
    109
    11 == Step 2: Install Homebrew ==
    12 
    13 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.
    14 
    15 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.
    16 
    17 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.
    18 
    19 == Step 3: Install 0 A.D. Dependencies ==
    20 
    21 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.
     10== Step 2: Obtaining the 0 A.D. source ==
     11If you want to grab the release files, you can do that. But in this guide, we'll compile SVN, which has the newest features.
    2212
    2313{{{
    24 brew install subversion boost libxml2 cmake enet sdl libogg libvorbis nasm devil curl
    25 brew link libxml2
    26 brew link curl
     14svn co http://svn.wildfiregames.com/public/ps/trunk/ 0ad
    2715}}}
     16Note: Sometimes SVN stops before it has downloaded all files. You should check that it outputs something like at revision rXXXX. Otherwise run
    2817
    29 == Step 4: Obtaining the 0 A.D. source ==
     18{{{
     19svn up 0ad
     20}}}
     21There is also a Git mirror, which may be slightly less up-to-date but usually offers faster downloads. To use the Git mirror, use this command instead:
    3022
    31 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.
     23{{{
     24git clone https://github.com/0ad/0ad.git
     25}}}
     26== Step 3: Building the Libraries ==
     27Now you have two options:
    3228
    33 '''COMING SOON'''
     29 1. Build the game as a loose binary
     30   * 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.
     31{{{
     32#!sh
     33cd libraries/osx
     34./build-osx-libs.sh -j3
     35}}}
     36   * '''-j3''' gives the number of parallel builds to run, and should typically be one plus the number of CPU cores available.
     37   * To build on the command line with LLVM/gcc, follow the [#Build build] instructions for Linux beginning with `./update-workspaces.sh`.
     38     * Or if you have Xcode 4 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]).
     39     * Or if you're on Snow Leopard and have Xcode 3 installed, you can open `build/workspaces/xcode3/pyrogenesis.xcodeproj`
     40   * Newer versions of Xcode no longer include the command line tools by default, you need to install them as described above. Additionally, the command line tools package no longer includes GCC but it does include LLVM-GCC which is compatible. If you get errors during the build like "C compiler cannot create executables" then you probably have the newer command line tools with LLVM. The following command should fix it:
     41{{{
     42#!sh
     43 export CC=gcc CXX=g++
     44}}}
     45 1. Build the game as a distributable bundle
     46   * You will need Xcode installed (for its SDKs)
     47   * 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.
     48   * Run `build-osx-bundle.sh`:
     49{{{
     50#!sh
     51cd build/workspaces
     52./build-osx-bundle.sh -j3
     53}}}
     54   * '''-j3''' gives the number of parallel builds to run, and should typically be one plus the number of CPU cores available.
     55   * When it's finished, there should be a complete '''0ad app''' bundle in `build/workspaces`.
    3456
    3557== Step 5: Compiling 0 A.D. ==
    36 
    3758Finally, to compile, run the following commands in a console (adjust the path on the first line to go to the actual directory source root):
    3859
     
    4465make
    4566}}}
    46 
    4767== Step 6: Running 0 A.D. ==
    48 
    4968To run the game, run the following commands in a console:
    5069