This document illustrates how to build 0.9.10 on Mac OS 10.4.x with Xcode 2.4.x.
Requirements
System Requirements
- Mac OS 10.4.x (Tiger)
- Xcode 2.4.x (2.4.1 is recommended as of Nov-17-2006)
- PPC / Intel Mac
Faster machine (G5 or Intel) is recommended as 0.9.10 has more precise scenery, which means 0.9.10 runs slower than 0.9.9. Compiling all the files also may take hours in slower machines. FYI, It takes approximately 30 mins to compile everything on MacBook Pro 2.33GHz.
Required Skills
We assume you have some basic knowledge about using:
- terminal (/Applications/Utilities/Terminal.app) - must
- Xcode
- Unix commands
If you are not familiar with the tools above, we highly recommend you consult some web articles and/or books about these before you get started. Please DO NOT ask project members about the use of these tools.
Instruction
Here is the step-by-step instruction of building FlightGear.
Download and Extract files
First of all, you need to download and extract all the files. This section assumes that you're downloading files at /Users/me/Desktop and extracting files at /Users/me/dev. Change directory names as needed.
- Download Xcode Project files and patches
- FlightGear-0.9.10-Xcodeproj.tar.gz from FlightGear Mac OS X download page
- The Latest source code is available from sourceforge's svn repository. checkout the source code with the following command:
$ svn co https://macflightgear.svn.sf.net/svnroot/macflightgear/trunk FlightGearMacOSX
You also need to download a svn client from the official site of subversion.
- Extract project files
% cd /Users/me/dev % tar xvzf ~/Desktop/FlightGear-0.9.10-Xcodeproj.tar.gz
- Download all other files
As the Xcode project files don't contain all the source files, you need to download these. However, you don't have to download these yourself. You can use a helper shell script to download everything to save your time and effort.% cd FlightGearMacOSX % ./download.sh
It may take a while so be patient. Probably you want to do something else. - Apply patches
There are some compilation errors I got when I first built FlightGear. You need to apply patches to avoid compilation errors. As of
% ./patch.sh
Okay, you're ready to build.
Note
If you encounter some download errors, either run download.sh again or get these files manually. Here is the list of the sites that you need to know.
- Required libraries
- PLIB-1.8.4 from http://plib.sourceforge.net/download.html
- SimGear-0.3.10 from http://www.simgear.org/
- wxMac-2.6.3 (Mac port of wxWidgets) from http://www.wxwidgets.org/downloads/ - for 0.9.10-pre1 or earlier
- RubyCocoa-0.4.3d2 - for 0.9.10-pre2 or later. binary package is available from http://sourceforge.net/project/showfiles.php?group_id=44114&package_id=36578&release_id=414954
- FlightGear 0.9.10 source files and base package from http://www.flightgear.org/Downloads/source.shtml
- You need both FlightGear-0.9.10.tar.gz and fgfs-base-0.9.10.tar.bz2
Build Everything
Compiling FlightGear is not that hard. Just type ./build.sh from the terminal. That's it!
To build these projects from Xcode (in the case you get errors), open Xcode project files and build in turn. The most important thing here is to follow the steps as shown below. Do not skip any step, otherwise you will have tons of errors.
- PLIB
- Open PLIB/PLIB.xcodeproj
- Press the Build button
- Close the project when it's done (same for all projects)
- SimGear
- Open SimGear/SimGear.xcodeproj
- Press the Build button
- FlightGear
- Open flightgear/FlightGear.xcodeproj
- Press the Build button
- wxWidgets (wxMac) - for 0.9.10-pre1 or earlier
- Open wxMac/src/wxWindows.xcodeproj
- Select "static" at the "Active Target" drop-down listbox
- Set Active Configuration to "Deployment"
- Press the Build button
- FlightGearOSX
- Open FlightGearOSX/FlightGear.xcodeproj
- Press the Build button
Ready to fly
Okay, you have successfully build FlightGear.app at FlightGearOSX/build/FlightGear/FlightGear.app. Copy it to /Applications folder and double-click it. You're ready to fly.
When you get errors
If you encounter some compilation errors or other errors during the instruction above, either post it to the tracker on our project web site or post a message to the discussion forum.
However, it is always good to check the followings before you complain.
- Any missing files?
- you might have overlooked download errors, which causes "no such file" error.
- you can also download missing files manually
- Did you follow the instruction above?
- changing the build order may cause "no such file" error.
- misconfiguration causes errors, especially for Development / Deployment configuration
- Did you change any Xcode configurations/options?
- if so, exit Xcode and extract project files, then try building again.
- Is the same problem posted on either Tracker or Forum?
- consult the following pages
For general problems/information about FlightGear, consult http://www.flightgear.org