Changes between Version 201 and Version 202 of BuildInstructions


Ignore:
Timestamp:
Apr 3, 2013, 12:16:01 AM (11 years ago)
Author:
historic_bruno
Comment:

Clarifies some OS X build instructions

Legend:

Unmodified
Added
Removed
Modified
  • BuildInstructions

    v201 v202  
    265265The process on OS X is similar to Linux:
    266266
    267  * If you're using Lion 10.7.3 or later, Apple has made their ''Command Line Tools for Xcode'' package freely available, as a separate download. '''It does not include or require Xcode.''' If you don't want the Xcode IDE, it's recommended to install only this package from [https://developer.apple.com/downloads/index.action Apple Developer Downloads]. You need a free Apple ID to access the download. If you already have Xcode 4.3+, you can download the command line tools from the [https://developer.apple.com/library/IOs/#recipes/xcode_help-documentation_preferences/DownloadingandInstallingXcodeComponents/DownloadingandInstallingXcodeComponents.html download preferences].
    268  * If you're using Snow Leopard or Lion 10.7.2 or earlier, you'll probably need to install Xcode to get the command line tools (or you can try [https://github.com/kennethreitz/osx-gcc-installer/ OSX GCC Installer]):
    269    * If available, use your Mac OS X install DVD which saves downloading 1.72+ GB.
    270    * Visit [https://developer.apple.com/downloads/index.action Apple Developer Downloads] (logging in with your free Apple ID) and download the latest Xcode version for your OS. Version 4.x is required for Lion, while version 3.x is required for Snow Leopard. It's very important you install the correct version.
    271    * 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.''
    272  * CMake is a dependency required to build NVTT. You can download a prebuilt OS X package [http://www.cmake.org/cmake/resources/software.html here].
     267 * Obtain the command line tools:
     268  * If you're using Lion 10.7.3 or later, Apple has made their ''Command Line Tools for Xcode'' package freely available, as a separate download. '''It does not include or require Xcode.''' If you don't want the Xcode IDE, it's recommended to install only this package from [https://developer.apple.com/downloads/index.action Apple Developer Downloads]. You need a free Apple ID to access the download. If you already have Xcode 4.3+, you can download the command line tools from the [https://developer.apple.com/library/IOs/#recipes/xcode_help-documentation_preferences/DownloadingandInstallingXcodeComponents/DownloadingandInstallingXcodeComponents.html download preferences].
     269  * If you're using Snow Leopard or Lion 10.7.2 or earlier, you'll probably need to install Xcode to get the command line tools (or you can try [https://github.com/kennethreitz/osx-gcc-installer/ OSX GCC Installer]):
     270    * If available, use your Mac OS X install DVD which saves downloading 1.72+ GB.
     271    * Visit [https://developer.apple.com/downloads/index.action Apple Developer Downloads] (logging in with your free Apple ID) and download the latest Xcode version for your OS. Version 4.x is required for Lion, while version 3.x is required for Snow Leopard. It's very important you install the correct version.
     272    * 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.''
     273  * If you want to build a distributable app bundle as described below, you will need Xcode.
     274 * '''Note: CMake is a required dependency.''' You can download a prebuilt OS X package [http://www.cmake.org/cmake/resources/software.html here].
    273275 * Obtain the game's source code from SVN as [#Gettingthecode described above].
     276
    274277Now you have two options:
    275 1. Build the game as a loose binary
    276  * 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.
     278
     279=== 1. Build the game as a loose binary ===
     280
     281 * 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).
    277282 {{{
    278283#!sh
     
    281286 }}}
    282287 * '''-j3''' gives the number of parallel builds to run, and should typically be one plus the number of CPU cores available.
    283  * To build on the command line with LLVM/gcc, follow the [#Build build] instructions for Linux beginning with `./update-workspaces.sh`.
     288 * To build on the command line with `llvm-gcc`, follow the [#Build build] instructions for Linux beginning with `./update-workspaces.sh`.
    284289  * 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]).
    285290  * Or if you're on Snow Leopard and have Xcode 3 installed, you can open `build/workspaces/xcode3/pyrogenesis.xcodeproj`
    286  * 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:
    287 {{{
    288 #!sh
    289  export CC=gcc CXX=g++
    290 }}}
    291 2. Build the game as a distributable bundle
     291 * '''Note:''' 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 (on these systems, `gcc` is a symlink to `llvm-gcc`).
     292
     293=== 2. Build the game as a distributable bundle ===
     294
    292295 * You will need Xcode installed (for its SDKs)
    293296 * 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.
     
    299302 }}}
    300303 * '''-j3''' gives the number of parallel builds to run, and should typically be one plus the number of CPU cores available.
    301  * When it's finished, there should be a complete '''0ad app''' bundle in `build/workspaces`.
     304 * 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).
    302305
    303306== BSD ==