How to build FlightGear 0.9.10 on Mac OS X

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.

  1. 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.
  2. Extract project files
    % cd /Users/me/dev
    % tar xvzf ~/Desktop/FlightGear-0.9.10-Xcodeproj.tar.gz
  3. 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.
  4. 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.

  1. Required libraries
  2. 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.

  1. PLIB
    1. Open PLIB/PLIB.xcodeproj
    2. Press the Build button
    3. Close the project when it's done (same for all projects)
  2. SimGear
    1. Open SimGear/SimGear.xcodeproj
    2. Press the Build button
  3. FlightGear
    1. Open flightgear/FlightGear.xcodeproj
    2. Press the Build button
  4. wxWidgets (wxMac) - for 0.9.10-pre1 or earlier
    1. Open wxMac/src/wxWindows.xcodeproj
    2. Select "static" at the "Active Target" drop-down listbox
    3. Set Active Configuration to "Deployment"
    4. Press the Build button
  5. FlightGearOSX
    1. Open FlightGearOSX/FlightGear.xcodeproj
    2. 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?

For general problems/information about FlightGear, consult http://www.flightgear.org

Leave a comment

Please DO NOT post a crash log here. it's hard to read and is not worth reading for most of users. Email it to me directly with some additional information including exact FlightFear version, machine spec, and what was you doing when it went crash. Thank you.
Begin the comment with //pukiwiki if you want to write a comment in PukiWiki format.

You must be logged in to post a comment.