Building and packaging on OSX

This page will explain how to build and packaged SuperTuxKart on mac OS X.


Please note that this is meant for developers and not casual users. Information below are notes i gathered about building STK 0.7 with irrLicht 1.7+. For older versions of STK, see Building STK 06 on OSX

Note : building on OSX 10.7 is a little more painful because the compiler provided by Apple wants really hard to make 64-bits binaries but the dependencies pack I provide is 32-bits for backwards compatibility. If you want to compile on 10.7, you will need to either convince the compiler to produce 32-bits binaries, either produce a 64-bits dependency pack


Contents

Getting Started

sudo ln -s /System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/ /usr/local/include/GL (you might need to create /usr/local/include/ first if you never built and installed anything from source! sudo mkdir -p /usr/local/include/)

Dependencies


CMake

You can use the CMake build system to build STK. At this time CMake will not make a binary that is ready for distribution.

Note : due to a factor that eludes me, when generating a Xcode project rather than a makefile, Objective-C++ does not compile correctly. If you get errors in CIrrDeviceMacOSX.mm, you may need to comment out the @try statement and @catch block until a better solution is found


Building on 10.7 (and hopefully 10.8, but I can't test on this system) mkdir cmake_build cd cmake_build cmake .. -DCMAKE_CXX_COMPILER=/usr/bin/g++ -DCMAKE_C_COMPILER=/usr/bin/gcc make


Building on 10.6 export CMAKE_OSX_ARCHITECTURES=i386 mkdir cmake_build cd cmake_build cmake .. make

Building on 10.6 with compatibility for 10.5 alternatively, to make a build backwards compatible with OSX 10.5 (this will likely need to be done from 10.6, I don't think making builds that far backwards compatible is possible under 10.7+) export CMAKE_OSX_ARCHITECTURES=i386 mkdir cmake_build cd cmake_build cmake .. -DCMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.5.sdk/ -DCMAKE_OSX_DEPLOYMENT_TARGET=10.5 make

Xcode

The provided Xcode project currently works out-of-the-box only works with Xcode 3. If you are using Xcode 4, especially if on OSX 10.7 Lion, you will need to tweak the project to use the 10.6 SDK, as the 10.4 SDK which the current project uses was removed by Apple in Xcode 4


In SVN trunk, the Xcode project may not be up to date. We will update it for stable releases but during development you may need to manually add/remove files that changed so that the project builds


SuperTuxKart

Build SuperTuxKart using the provided Xcode project (in /src/ide/)

That's all! If all went well, you're ready to run STK by hitting the big green 'run' button.

Retrieved from "http://supertuxkart.sourceforge.net/Building_and_packaging_on_OSX"

User Tools