Changes between Version 7 and Version 8 of MacBuildInstructions


Ignore:
Timestamp:
Mar 16, 2013, 7:26:34 AM (11 years ago)
Author:
historic_bruno
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MacBuildInstructions

    v7 v8  
    1 '''This page is a work in progress, please don't report bugs until it's done'''
    2 
    3 == Step 1: Install XCode ==
    4 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.
    5 
    6 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.
    7 
    8 Once downloaded, double click the file and follow the installation instructions.
    9 
    10 == Step 2: Obtaining the 0 A.D. source ==
    11 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.
    12 
    13 {{{
    14 svn co http://svn.wildfiregames.com/public/ps/trunk/ 0ad
    15 }}}
    16 Note: Sometimes SVN stops before it has downloaded all files. You should check that it outputs something like at revision rXXXX. Otherwise run
    17 
    18 {{{
    19 svn up 0ad
    20 }}}
    21 There 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:
    22 
    23 {{{
    24 git clone https://github.com/0ad/0ad.git
    25 }}}
    26 == Step 3: Building the Libraries ==
    27 Now you have two options:
    28 
    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
    33 cd 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
    51 cd 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`.
    56 
    57 == Step 4: Compiling 0 A.D. ==
    58 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):
    59 
    60 {{{
    61 cd /path/to/source
    62 cd build/workspaces
    63 ./update-workspaces.sh --disable-atlas
    64 cd gcc
    65 make
    66 }}}
    67 == Step 5: Running 0 A.D. ==
    68 To run the game, run the following commands in a console:
    69 
    70 {{{
    71 cd /path/to/source
    72 cd binaries/system
    73 ./pyrogenesis
    74 }}}
     1This page is now obsolete. Please refer to BuildInstructions instead.