Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Version 67 (modified by youngk, 13 years ago) (diff)

Mac OS X

TracNav(TracNav/TOC_Development)?

No image "Big_Logo_Macintosh.jpg" attached to dev/MacOSX

Here's how to get Orxonox up and running on Steve Jobs' operating system. We support anything from 10.5 (Leopard) upwards, while keeping in mind that Orxonox currently only runs in 32-bit mode. The following procedure was tested on Mac OS X 10.6.4 (Snow Leopard).

Current Status (as of March 26th, 2011)

Important Note: Currently, you CANNOT place your orxonox files on a path with white-spaces in it! Will be fixed asap.

Xcode 4 has been released, and Orxonox builds well with it too; even though you always have to select the target "ALL_BUILD" manually - we don't know why. Even more progress: Orxonox is now integrated into Cocoa, which means we have (at least for development purposes) a runnable App-Bundle. Once Orxonox has been built on your Mac, you can start it from your Desktop! Ooooh, and it has a nice icon too (thanks to Mozork?)! Orxonox builds perfectly (with a few warnings) on Mac OS X 10.6, either with Xcode or with makefiles. We were although not able to test Orxonox on 10.5 machines, please try if you have Leopard. Dependency package is available down below for you to try out. Note that the svn trunk currently does not compile on OS X. To compile Orxonox on the mac you need to check out the branch mac_osx.

https://svn.orxonox.net/game/code/branches/mac_osx

For Leopard (10.5) users: We've resolved the trouble with lua, but now ogg and vorbis are giving us a hard time in terms of downwards compatibility. Please follow the building guide at Dependencies for Mac OS X, to build ogg and vorbis yourself.

Nice To Know

So far Orxonox ran only on Windows and Linux systems. Apple, as the third major OS player, opens yet another universe of possible problems for setting up, compiling and running Orxonox. Having a Unix kernel at its core, development isn't too different from Linux. However its structure and organization enforce much more strict adherence to rules than in any other operating system. Application structure and behavior are well-defined and the entire development framework on Apple builds on ease-of-use for the end-user, not the developer.

Prerequisites

Lets assume you have a more recent installation of OS X (i.e. whatever we support: ≥ 10.5). To get you started, we first need to set up your development environment:

  • Xcode (Download version 3 for free from: Apple Developer Connection. But its highly recommended to buy Xcode 4 via the AppStore (five bucks), because its just so much better than the old Xcode3.
  • Cmake (You need at least 2.8.3. Get the prebuilt dmg-Image for Mac OS X: Cmake)

For Xcode 3 you need to make absolutely sure to select the "MacOSX10.4u.sdk" for installation, while running the Xcode installer. It's needed for compatibility reasons.

Source Files

Once that's done, you need to check out the source files and the dependency package. There are two possibilities to get the source files, either via Xcode or by using subversion in the terminal (/Applications/Utilities/Terminal). To get the files via subversion in the terminal, follow these directions: Subversion

Xcode 4 automatically integrates with our svn repo! How cool is that! To get the files with Xcode 3, you first need to open Xcode (I'd recommend you drag the app from /Developer/Applications/Xcode to your dock). Navigate to the menu item "SCM" up top on the menu bar: SCM -> Configure SCM repositories…. Add a new repository by pressing the "+" sign on the bottom-left of the pop-up. Enter all information according to Subversion. Click "OK" and you're set. Next, navigate to SCM -> Repositories. Do a "Checkout" of code/trunk and data/trunk. That's it, you can quit Xcode once the downloads are done.

Dependencies

Orxonox has a pretty impressive list of dependencies and very few of them are pre-installed on our Apples. That's why we put together a package with precompiled dependencies for ease-of-use. Download below, extract it and place it into the directory where you have the data_extern and the trunk folders. NOTE: No need to install the dependencies anymore. Everything's done automatically.

Dependency Package Version Size Notes
Mac OS X 1.11 10M Current
Mac OS X 1.0 10M Without LOD-fix

Building the dependencies on your own

For the suicidal ones, here's the dependency list, if you want to compile them yourself (files are preferentially dynamically linked): Please note though: Apple uses an "install name" for its libraries. Follow the CocoaDev guide to set these install names appropriately: Application Linking. You can find a little help at Dependencies for Mac OS X.

Library name Minimum Version Recommended Version Notes
OGRE 3D Graphics Engine 1.4 1.7.2
CEGUI (Crazy Eddie's GUI System) 0.5 0.6.2 We need: CEGUI.framework, CEGUILuaScriptModule.framework and ceguitolua++.framework. Plus, disable all ppc architectures
Boost libraries 1.35 1.44 Hint: Use MacPorts
Lua (scripting language) 5.0 or 5.1 5.1.4 Hint: Use the patchfile located in the Tools directory of the dependency package. ($patch -p1 -i patchfile) inside source dir
Tcl (shell script language) 8.4 or 8.5 - Use Apple system version
OpenAL (audio) (not yet specified) - Use Apple system version
ALUT (audio) (not yet specified) - Can't be compiled on Apple. Use the package included in dependency package or consult Flight Gear. Sadly, I do not know how they compiled this framework.
LibOgg (not yet specified) 1.2.1
LibVorbis (not yet specified) 1.3.2
LibVorbisFile (not yet specified) 1.3.2 Comes with LibVorbis
ZLib (compression) (not yet specified) - Use Apple system version

Apple Mac OS X uses the following library paths:

  • /usr
  • /usr/local
  • /opt/local (MacPorts source distribution: MacPorts)
  • /sw (Fink binary distribution: Fink)
  • /Library/Frameworks (for Apple frameworks; dynamically linked and self-contained structures. See CFBundles for information.)
  • ~/Library/Frameworks
  • /System/Library/Frameworks
  • /Developer/Library/Frameworks

Building Orxonox

Once you have everything in place, fire up Cmake. Choose your source and build directories and click "Configure". Choose either Xcode or Makefiles as build mode, whichever suits your preferences. Check the correct locations of the dependencies and make sure you're using the right Apple SDK (MacOSX10.5.sdk or MacOSX10.6.sdk) and then click "Generate". In case you're using Makefiles as build mode, you can just follow the normal steps to compile Orxonox: Buildsystem. Otherwise switch to Xcode, open up the "Orxonox.xcodeproj" file inside your build directory and hit "Build". Let it simmer, while stirring the soup from time to time, and you're set to play the game (Hopefully). Mind always keeping an eye on the "Current Status" section, for I will write there if you have to follow special instructions.