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
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
Contents |
Getting Started
- Install developer tools, either from the OS X Install DVD or from Apple's website
- symlink include folder of OpenGL framework to /usr/local/include/GL (Unix programs have an easier time finding it this way)
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
- Download pre-built dependencies from here
- Put the frameworks in [hard disk root]/Library/Frameworks
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.
Distributing
The release build style will automatically build a 10.4-compatible, universal app bundle with data and frameworks inside.
Then the last step is to package libintl inside the application bundle, for this we use dylibbundler
dylibbundler -b -x ./SuperTuxKart.app/Contents/MacOS/supertuxkart -d ./SuperTuxKart.app/Contents/libs/ -od -p @executable_path/../libs/
CMake
Alternatively you can use the CMake build system. Even if you use CMake you must install the dependency package as explained above. At this time CMake will not make a binary that is ready for distribution.
export CMAKE_OSX_ARCHITECTURES=i386 mkdir cmake_build cd cmake_build cmake .. make
User Tools
- This page
- Other