Changes between Version 246 and Version 247 of BuildInstructions


Ignore:
Timestamp:
Sep 10, 2014, 5:44:58 AM (10 years ago)
Author:
historic_bruno
Comment:

Updates and reformatting for OS X sections - don't refer back to Linux sections, it's confusing

Legend:

Unmodified
Added
Removed
Modified
  • BuildInstructions

    v246 v247  
    227227
    228228 * '''-j3''' gives the number of parallel builds to run, and should typically be one plus the number of CPU cores available.
    229  * The '''Release''' mode builds (which are the default) are more optimised, but are harder to debug. Use `make config=debug` (and run `pyrogenesis_dbg`) if you need better debugging support.
     229 * The '''Release''' mode builds (which are the default) are more optimised, but are harder to debug. Use `make config=debug` (and run `pyrogenesis_dbg`) if you need better debugging support. See [wiki:Debugging] for more details.
    230230
    231231If you encounter any build errors, review the [http://trac.wildfiregames.com/report existing bug reports], check the [#Knownproblemsandsolutions known problems section] or please file a [http://trac.wildfiregames.com/newticket new bug in the tracker].
     
    299299    * The latest version of Xcode is also available for free from the [http://www.apple.com/mac/app-store/ Mac App Store], you'll need Snow Leopard 10.6.6 or later to access the App Store. ''Note: if you download the app, it is only the installer for Xcode. You need to open it and run the "Install Xcode" app.''
    300300  * If you want to build a distributable app bundle as described below, you will need Xcode.
    301  * '''Note:''' As of Mavericks (10.9) and Xcode 5, Apple [https://developer.apple.com/library/mac/releasenotes/DeveloperTools/RN-Xcode/xc5_release_notes/xc5_release_notes.html#//apple_ref/doc/uid/TP40001051-CH2-SW302 no longer supports] llvm-gcc, instead it is required to use clang. Additionally, the default C++ library is now libc++ instead of libstdc++.
    302    * If you've upgraded and previously built the game, you should pass the `--force-rebuild` flag to `build-osx-libs.sh`.
    303  * '''Note:''' As of Alpha 16, the game uses SpiderMonkey 24, which no longer supports gcc 4.2.x including llvm-gcc previously bundled with Xcode. The game can no longer be built on OS X Leopard (10.5), and there is a !SpiderMonkey [https://bugzilla.mozilla.org/show_bug.cgi?id=862657 bug] that breaks the build on Snow Leopard (10.6) with Xcode 3.2.6.
    304  * '''Note: CMake is a required dependency.''' You can download a prebuilt OS X package [http://www.cmake.org/cmake/resources/software.html here]. If prompted, install the command line CMake tools to the default location.
    305  * Obtain the game's source code from SVN as [#Gettingthecode described above].
     301  * '''Note:''' As of Mavericks (10.9) and Xcode 5, Apple [https://developer.apple.com/library/mac/releasenotes/DeveloperTools/RN-Xcode/xc5_release_notes/xc5_release_notes.html#//apple_ref/doc/uid/TP40001051-CH2-SW302 no longer supports] llvm-gcc, instead it is required to use clang. Additionally, the default C++ library is now libc++ instead of libstdc++. If you've upgraded and previously built the game, you should pass the `--force-rebuild` flag to `build-osx-libs.sh`.
     302  * '''Note:''' As of Alpha 16, the game uses SpiderMonkey 24, which no longer supports gcc 4.2.x including llvm-gcc previously bundled with Xcode. The game can no longer be built on OS X Leopard (10.5), and there is a !SpiderMonkey [https://bugzilla.mozilla.org/show_bug.cgi?id=862657 bug] that breaks the build on Snow Leopard (10.6) with Xcode 3.2.6.
     303  * '''Note: CMake is a required dependency.''' You can download a prebuilt OS X package [http://www.cmake.org/cmake/resources/software.html here]. If prompted, install the command line CMake tools to the default location.
     304 * Obtain the game's source code:
     305  * 0 A.D. is primarily developed on SVN. To checkout the latest code from SVN, run this command:
     306   {{{
     307#!sh
     308svn co http://svn.wildfiregames.com/public/ps/trunk/ 0ad
     309   }}}
     310   '''Note:''' Sometimes SVN stops before it has downloaded all files. You should check that it outputs something like `at revision rXXXX`. Otherwise run
     311   {{{
     312#!sh
     313svn up 0ad
     314   }}}
     315  * 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:
     316   {{{
     317#!sh
     318git clone https://github.com/0ad/0ad.git
     319   }}}
    306320
    307321Now you have two options:
    308322
    309 === 1. Build the game as a loose binary ===
    310 
    311  * Run [source:/ps/trunk/libraries/osx/build-osx-libs.sh libraries/osx/build-osx-libs.sh], the OS X libraries build script, this will download and build the game's dependencies (except CMake, see above).
     323=== 1. Build the game for your personal use ===
     324
     325 * Run [source:/ps/trunk/libraries/osx/build-osx-libs.sh libraries/osx/build-osx-libs.sh], the OS X libraries build script, this will download and build the game's dependencies (except CMake, see above). This script will take some time to finish when first run, after that it will reuse the old build.
    312326 {{{
    313327#!sh
     
    315329./build-osx-libs.sh -j3
    316330 }}}
    317  * '''-j3''' gives the number of parallel builds to run, and should typically be one plus the number of CPU cores available.
    318  * To build on the command line with `llvm-gcc`, follow the [#Build build] instructions for Linux beginning with `./update-workspaces.sh`.
    319   * 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]).
    320   * Or if you're on Snow Leopard and have Xcode 3 installed, you can open `build/workspaces/xcode3/pyrogenesis.xcodeproj`
     331  * '''-j3''' gives the number of parallel builds to run, and should typically be one plus the number of CPU cores available.
     332  * To force a rebuild for some reason, e.g. the SVN folder is moved or Xcode / OS X is upgraded, pass in the `--force-rebuild` flag.
     333 * Next, to build the game on the command line, use the following commands:
     334   {{{
     335#!sh
     336cd 0ad/build/workspaces
     337./update-workspaces.sh -j3
     338cd gcc
     339make -j3
     340   }}}
     341  * The '''Release''' mode builds (which are the default) are more optimised, but are harder to debug. Use `make config=debug` (and run `pyrogenesis_dbg`) if you need better debugging support. See [wiki:Debugging] for more details.
     342  * If you encounter any build errors, review the [http://trac.wildfiregames.com/report existing bug reports], check the [#Knownproblemsandsolutions known problems section] or please file a [http://trac.wildfiregames.com/newticket new bug in the tracker].
     343 * 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]).
     344 * Or if you're on Snow Leopard and have Xcode 3 installed, you can open `build/workspaces/xcode3/pyrogenesis.xcodeproj`
    321345 * '''Note:''' Newer versions of Xcode no longer include the command line tools by default, you need to install them as described above.
    322 
    323 === 2. Build the game as a distributable bundle ===
     346 * '''Note:''' It is recommended to use the command line build, since the Xcode build is not as well-tested, but Xcode's IDE can be very useful for code editing.
     347
     348=== 2. Build the game as a distributable app bundle ===
    324349
    325350 * You will need Xcode installed (for its SDKs)
    326  * 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.
    327  * Run `build-osx-bundle.sh`:
     351 * Open [source:/ps/trunk/build/workspaces/build-osx-bundle.sh build/workspaces/build-osx-bundle.sh] and read the comments. You will need to change a few settings depending on your version of OS X, Xcode, etc.
     352 * Run `build-osx-bundle.sh`, the bundle build script, which will download and build the game's dependencies for the appropriate SDK, build the game's source code, package the mod data, and set up the app bundle info.
    328353 {{{
    329354#!sh
     
    332357 }}}
    333358 * '''-j3''' gives the number of parallel builds to run, and should typically be one plus the number of CPU cores available.
    334  * When it's finished, there should be a complete '''0ad app''' bundle in `build/workspaces`. Consider packaging the bundle inside a DMG for distribution (see ReleaseProcess).
     359 * When it's finished, there should be a complete '''0ad app''' bundle in `build/workspaces`. Consider packaging the bundle inside a compressed DMG for easy distribution (see ReleaseProcess).
    335360
    336361[[BR]]