Building FlightGear with Cygwin
From wiki.flightgear.org
This page is based on the FlightGear tutorial "Building FlightGear with the free Cygwin compiler under Windows" [1]
The FlightGear project is constantly being developed and improved, but the newest features are only available to users who compile FlightGear from the latest source files. This guide will describe how to build FlightGear from source using Cygwin on Microsoft Windows.
Contents |
Reasons to build FlightGear from source
- Get access to the latest features (without waiting for the next stable version)
- Help test the newest version of FlightGear on Win32 systems and report bugs
- Contribute to FlightGear development by editing the source code yourself
- Learn something fun and useful - how to build software from scratch
Outline
- Install Cygwin (with the default base package)
- Install Cygwin packages from the "Devel" category
- Autoconf
- Automake (most recent version)
- Boost
- CVS
- GCC-core
- CGG-C++
- Make
- Install the Cygwin "OpenGL" package from the "Graphics" category
- Install the Cygwin "unzip" package from the "Archive" category
- Download the FlightGear source files and other required packages
- OpenAL
- Plib
- SimGear
- FlightGear
Install Cygwin Base
- Open your web browser and go to http://www.cygwin.com
- Click on “Install Cygwin Now” and save the setup.exe in C:\cygwin\
- Run setup.exe and accept the default choice for every option
- Just keep clicking the "Next" button until you get to the end, then click "Finish"
Install Cygwin Dev and Graphics Packages
- Run C:\cygwin\setup.exe
- Click the "Next" button several (7?) times until you get to the "Select Packages" screen
- Click the "Plus" next to the "Dev" category to see the list of software development packages. If the window is too small to let you see the full names of the packages, you might need to grab the right edge of the window with the mouse and drag it to the right to expand the window a little
- Scroll down the list until you see the "Autoconf" package. Click on the word "Skip" next to the package name to select the package for installation, and display the version number to be installed. Notice the checkbox in the "Binary" column is checked, and the "Source" column is not checked. This means you will be downloading the pre-compiled binary version of the package, not compiling these packages from source
- Scroll down to find several versions of Automake, and find the one with the highest version number. Click on the "Skip" link next to the automake package with the highest version number to select it for installation
- Find and select four more packages the same way: "CVS", "GCC-core", "GCC-C++" and "Make"
- Scroll down to the "Graphics" category, and press the plus-sign to show the list of Graphics packages
- Find the OpenGL package, and click the "Skip" icon to select it for installation
- Scroll up to the "Archive" category, and press the plus-sign to show the list of packages
- Find the "unzip" package, and click the "Skip" icon to select it for installation
- Click the Next button at the bottom of the setup window to begin the download-and-install process
Download Required Packages
Building FlightGear requires several additional software "libraries" which FlightGear depends on, including OpenAL, OSG, Plib and SimGear. Some of these may be available as pre-compiled binary versions, and some have to be compiled from source files. In either case, these libraries will have to be saved in specific directories before the rest of the FlightGear build process can succeed.
- Download OpenAL
- OpenAL for use with FlightGear 0.9.8 is available at ftp://ftp.ihg.uni-duisburg.de/FlightGear/Win32/openal_cyg.tgz
- (The link above did not work, but files from this link worked better http://www.oflebbe.de/FlightGear/3rdParty-2008-01-30.zip)
- OpenAl for use with FlightGear CVS (latest version) is at http://www.vso.cape.com/~nhv/files/cygwin/cyg_openAL.tgz
- OpenAL for use with FlightGear 0.9.8 is available at ftp://ftp.ihg.uni-duisburg.de/FlightGear/Win32/openal_cyg.tgz
- Download OSG from http://www.openscenegraph.org/downloads/stable_releases/OpenSceneGraph-2.8.2/source/OpenSceneGraph-2.8.2.zip
- Download Plib - Go to http://plib.sourceforge.net Download plib-1.8.4-tar.gz
- Download SimGear - Go to http://www.simgear.org Download SimGear-0.3.8-tar.gz
Download FlightGear Source and Data
- To build FlightGear 0.9.8
- Go to http://www.flightgear.org
- Download FlightGear-0.9.8-tar.gz - the source code files
- Download fgfs-base-0.9.8-tar.bz2 - the base package
- To build FlightGear CVS (latest version)
- Download FlightGear "source" using CVS
- Download FlightGear "data" using CVS
Build FlightGear 0.9.8
Build Plib-1.8.5
- cd ~
- tar –xzf ~/tar/plib-1.8.5.tar.gz
- cd plib-1.8.5
- (edit ./src/ssg/ssgLoadTexture.cxx, line line 242, change "#ifdef..." to "#if defined(UL_WIN32) && !defined(UL_CYGWIN)")
- ./configure -–prefix=/fg-1.9.1
- make
- make install
Extract OpenAL
- cd /fg-1.9.1
- tar –xzf ~/tar/openal_cyg.tgz
Build OpenSceneGraph 2.8.2
- cd ~
- unzip ~/tar/OpenSceneGraph-2.8.2.zip
- cd OpenSceneGraph-2.8.2
- ./configure –-prefix=/fg-1.9.1
- make (This took about an hour on my PC)
- make install
BuildFlightGear 0.9.8
- cd ~
- tar –xzf ~/tar/FlightGear-0.9.8.tar.gz
- cd FlightGear-0.9.8
- ./configure –-prefix=/fg-0.9.8
- make
- make install
Extract FlightGear 0.9.8 Base Package
- cd /fg-0.9.8
- tar –xjf ~/tar/fgfs-base-0.9.8.tar.bz2
Execute FlightGear
- /fg-0.9.8/bin/fgfs.exe –-fg-root=/fg-0.9.8/data
Build FlightGear CVS (Latest Version)
Build Plib 1.8.4 Source
- cd ~/plib-1.8.4
- ./configure -–prefix=/fg-cvs
- make
- make install
Extract OpenAL
- cd /
- tar –xzf ~/tar/cyg_openAL.tgz
Get Simger CVS
- cd ~
- mkdir SimGear-0.3-cvs
- cd SimGear-0.3-cvs
- cvs –d :pserver:cvsguest@cvs.simgear.org:/var/cvs/SimGear-0.3 login
- The password is “guest”
- cvs –d :pserver:cvsguest@cvs.simgear.org:/var/cvs/SimGear-0.3 co source
Build SimGear CVS
- cd ~/SimGear-0.3-cvs/source
- ./autogen.sh
- ./configure -–prefix=/fg-cvs
- make
- make install
Get FlightGear 0.9 CVS
- cd ~
- mkdir FlightGear-0.9-cvs
- cd FlightGear-0.9-cvs
- cvs –d :pserver:cvsguest@cvs.flightgear.org:/var/cvs/FlightGear-0.9 login
- The password is “guest”
- cvs –d :pserver:cvsguest@cvs.flightgear.org:/var/cvs/FlightGear-0.9 co source
Build FlightGear 0.9 CVS
- cd ~/FlightGear-0.9-cvs/source
- ./autogen.sh
- ./configure -–prefix=/fg-cvs
- make
- make install
Get FlightGear 0.9 CVS Base Package
- cd /fg-cvs
- cvs –d :pserver:cvsguest@cvs.flightgear.org:/var/cvs/FlightGear-0.9 login
- cvs –d :pserver:cvsguest@cvs.flightgear.org:/var/cvs/FlightGear-0.9 co data
Execute FlightGear 0.9 CVS
- /fg-cvs/bin/fgfs.exe -–fg-root-/fg-cvs/data
