Version 75 (modified by youngk, 14 years ago) (diff) |
---|
Mac OS X
TracNav(TracNav/TOC_Development)?
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 April 28, 2011)
Finally! After about 8 months of development on Mac OS X, we have trunk compatibility. Getting the game to run has been simplified substantially: just do a checkout of the svn trunk (both source and data - detailed directions in the following sections). You don't actually need to download the dependencies by yourself, it's done automagically.
Old info: 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 the root of your build directory! 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.
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
Porting Orxonox to Mac OS X has taken very long now and it wouldn't have been possible without the help of the community (1337?, x3n?, Mozork? and many others). Although you can play Orxonox very well on the Mac, there is still a myriad of things that can and do go wrong - we'll be fixing those as we progress. One of the nicer new features is the addition of Cg shaders to Orxonox - maybe someone will manage to make a tutorial on that matter. And of course: we'll make a distributable Mac OS X bundle as soon as possible.
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.4. 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
Important Note: Currently, you CANNOT place your orxonox files on a path with white-spaces in it! Due to the fact that the entire Orxonox build structure will not tolerate whitespaces, we will not try to implement it at all. Sorry - you'll just have to build Orxonox in folders without spaces.
Once you have your Xcode set up, 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, or enter the following into your Terminal (without the dollar sign!):
$ mkdir -p ~/Development/Prxonox $ cd ~/Development/Orxonox $ svn co https://svn.orxonox.net/game/code/trunk $ svn co https://svn.orxonox.net/game/data/trunk data_extern $ mkdir trunk/build
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 download, or install the dependencies anymore. Everything's done automatically. The following link is just for reference and in case something goes wrong.
Dependency Package | Version | Size | Notes |
Mac OS X | 2.0 | 24M | Package for anything beyond kicklib2 |
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. But preferentially use the Lua version shipped with CEGUI |
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" (if you followed the tutorial to the point its ~/Development/Orxonox/trunk for the source directory and ~/Development/Orxonox/trunk/build for the build directory). 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 "Configure", followed by "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.
Note to Xcode3 users: When compiling, you'll get a huge list of linker warnings of the sort duplicate dyld. Even though they're annoying, you can safely ignore them - they don't appear on Xcode4 anymore.
Playing Orxonox
I'll assume you have done the appropriate of the above sections. Run Orxonox by double-clicking on the Orxonox.app in the build directory.
Debugging Orxonox
Apple includes its own crash reporter that collects the call stack and additional information upon the crashing of an application. To make development a little easier, you will want to do the following things:
- More to follow… (we're in the process of integrating our own crash reporter)