internal: alphabetic | atlas | boost | cmake | curl | cvs | flightgear | fgrun | fltk | freeglut | folders | git | glut | openal | openscenegraph (osg) | plib | png | preamble | prerequisites | pthreads | sdl | simgear | svn | terragear | tools | zips | zlib | libjpeg | end
To build FlightGear, you must first download, and build all the prerequisites ... note, some items are optional, or alternates ...
2011-10-21: Update, changing SG/FG/DATA to use 'git', and added libjpeg
2010-02-26: Minor update. 2010-01-17: Update adding latest folder images
2009-03-05: Update added simgear-cs git source 2008-12-07: Update, adding FGRUN and FLTK
2008-11-28: Update, adding boost source download. Now a prerequisite to compile FlightGear ...
This page contains all the links necessary to get all the sources to build FlightGear, and some more ... In most cases I use the latest development source which is in a cvs, svn or git repository. To download, sometimes called a 'checkout', the sources from an online repository you need the appropriate 'version system' client software installed. Some sources are not available through such an online 'version' system, but will then have a tar ball or zip of the latest version available, and need a utility to 'unpack' these compressed files.
Links to where you can get these 'version' systems is given below, together with an image of the directory system I use. I use a root C:\FGCVS directory to store all the SOURCE downloads, updates, of FlightGear, SimGear, etc ... Also below is where you can get a utility to 'unpack' compressed files (zips).
-- FlightGear - This includes FlightGear source and data (base
CVS - http://www.flightgear.org/cvs/anoncvs.html
git clone git://gitorious.org/fg/flightgear.git source
git clone git://gitorious.org/fg/fgdata.git data
-- SimGear - FlightGear Simulation Construction Tools
There are two(2) sources, but as of 2011-10-20 only the first should be needed
1: Building FlightGear -
git clone git://gitorious.org/fg/simgear.git source
2: Building TerraGear - 2011-10-20 - may no longer be required - 2009-03-05 - added 'git' source
git - http://mapserver.flightgear.org/git/?p=simgear-cs;a=summary
command: git clone http://mapserver.flightgear.org/git/simgear-cs/ singear-cs
-- Glut (FreeGlut) - OpenGL Utility Toolkit (GLUT) library -
SVN - http://sourceforge.net/cvs/?group_id=1032 - NOTE, use SVN/trunk, NOT CVS
WARNING: There is also CVS, but this causes an update to \freeglut\freeglut! Use -
svn co https://freeglut.svn.sourceforge.net/svnroot/freeglut/trunk/freeglut/freeglut freeglut
-- OpenAL - Cross Platform 3D Audio. -
SDK - http://connect.creativelabs.com/openal/Downloads/Forms/AllItems.aspx - OpenAL and ALUT (ZIP)
was SVN - http://www.openal.org/downloads.html - 2 components OpenAL and ALUT
Folder: SOURCE\alut (was OpenAL, but use the OpenAL SDK instead)
-- PLIB - portability libraries. -
SVN - http://sourceforge.net/svn/?group_id=382
command: svn co https://plib.svn.sourceforge.net/svnroot/plib/trunk plib
but in most cases the last release should be sufficient : http://plib.sourceforge.net/dist/plib-1.8.5.tar.gz
-- Zlib - A Massively Spiffy Yet Delicately Unobtrusive Compression
tar.gz - http://www.zlib.net/
Folder: SOURCE\zlib-1.2.3 - This version changes over time
-- pthreads - POSIX Threads for Win32 - (optional, but ON by
CVS - http://sources.redhat.com/pthreads-win32/
-- OpenSceneGraph (OSG) - 3D graphics toolkit, and
SVN - http://www.openscenegraph.org/projects/osg -> Downloads -> SVN
Folder: SOURCE\OpenSceneGraph - To build this also requires CMake!
-- libpng (PNG) - Portable Network Graphics
ZIP - http://sourceforge.net/project/showfiles.php?group_id=5624
Folder: SOURCE\lpng1232 - This version continually changes over time ...
-- boost - free peer-reviewed portable C++ source libraries
SVN - http://www.boost.org/users/download/#repository
Folder: SOURCE\boost-trunk - 2011-10-20 - Still at this time no build of the libraries required.
command: svn co http://svn.boost.org/svn/boost/trunk boost-trunk
-- fgrun - FlightGear Launch Control
SVN - http://sourceforge.net/svn/?group_id=65363
command: svn co https://fgrun.svn.sourceforge.net/svnroot/fgrun/trunk fgrun
-- fltk - Fast Light Toolkit
SVN - http://www.fltk.org/software.php#SVN
page: http://www.fltk.org/software.php - download the zip or other compressed source files.
NOTE: 1.3 - This version is NOT compatible with FGRUN
command: svn co http://svn.easysw.com/public/fltk/fltk/branches/branch-1.3/ fltk-1.3
-- TerraGear - FlightGear Scenery Construction
command: git clone http://mapserver.flightgear.org/git/terragear-cs/
-- Atlas - A Moving Map Utility for FlightGear
commands: password = <enter key>
cvs -d:pserver:email@example.com:/cvsroot/atlas login
cvs -z3 -d:pserver:firstname.lastname@example.org:/cvsroot/atlas co Atlas
-- libjeg - a widely used free library for JPEG image compression
zip : http://ijg.org/ - version is release 8c of 16-Jan-2011
-- cURL - Transferring Files with URL Syntax
-- SDL - Simple DirectMedia Layer - (optional)
SVN - http://www.libsdl.org/svn.php
-- GLUT - The OpenGL Utility Toolkit (alternative)
ZIP - http://www.opengl.org/resources/libraries/glut/glut_downloads.php
This is an alternative to 'freeglut' above.
Concurrent Versions System or sometimes Concurrent Versioning System - CVS - was one of the first to be widely adopted, but some repositories have now replaced it with later systems that more or less do the same job ...
I use a command line version, but there are several GUI windows version, which I have never used or tried. I use an old version from circa 2004
C:\FGCVS>cvs -version Concurrent Versions System (CVS) 1.11.17 (client) Copyright (c) 1989-2004 Brian Berliner, david d `zoo' zuhn, Jeff Polk, and other authors
but it still works fine.
From http://ftp.gnu.org/non-gnu/cvs/binary/stable/x86-woe/ you can download cvs-1-11-22.zip (2006) -
C:\FGCVS>cvs1.11.22 -version Concurrent Versions System (CVS) 1.11.22 (client) Copyright (C) 2006 Free Software Foundation, Inc. Senior active maintainers include Larry Jones, Derek R. Price, and Mark D. Baushke.
which I assume will do the same thing.
Or you can download it, or my old version from here
This simple command line cvs.exe file must be installed in a directory listed in you PATH environment variable.
I use a convenient C:\MDOS directory for this, and other command line tools. In XP, in Control Panel -> System, 'Advanced' tab, [ Environment Variables ] button is where you can add such a path, to the existing PATH variable. Similarly, in Vista it is Control Panel -> System -> Advanced system settings -> [ Environment Variable ], and then select 'Path', then [ Edit... ] to add such a folder to the list.
At a command prompt you should be able to enter > cvs -version, and see the above output, or something similar, and you are ready to use cvs.
Each online source repository has its own command, but it is basically always has a 'login' step, with a password, and a 'checkout' (co) step to do the initial download. For example, after you have created a folder called FlightGear in your chosen root, so the FULL FlightGear instructions are -
C:\FGCVS> md FlightGear C:\FGCVS> cd FlightGear C:\FGCVS> set CVSROOT=C:\FGCVS C:\FGCVS\FlightGear> cvs -d :pserver:email@example.com:/var/cvs/FlightGear-0.9 login CVS passwd: guest C:\FGCVS\FlightGear> cvs -d :pserver:firstname.lastname@example.org:/var/cvs/FlightGear-0.9 co source
This will create a directory 'source', and download, checkout (co) all the source to that folder.
Sometimes the instructions will only give something generic like that for HTML Tidy - in this particular case the password for anonymous, simply press the Enter key :-
cvs -d:pserver:email@example.com:/cvsroot/tidy login cvs -z3 -d:pserver:firstname.lastname@example.org:/cvsroot/tidy co -P modulename
To get the modulename is is necessary to 'browse' the repository to find the name. In this case it is 'tidy' ...
Later, to UPDATE that folder to the latest repository source, the full instructions are -
C:\FGCVS> set CVSROOT=C:\FGCVS C:\FGCVS> cd FlightGear\source C:\FGCVS\FlightGear\source> cvs up -dP
Notice ALL cvs commands I use are preceded with a 'set CVSROOT=<something>' command. This must always be the SAME folder, and I usually place this instruction into a SETROOT.BAT batch file, and make sure I do it each time, or you can permanently ADD the CVSROOT setting through the Control Panel -> System -> Advanced -> [Environment Variables], so you do not have to remember it each time. Maybe this variable is really only required for the initial 'checkout', but I do it all the time ...
But as mentioned, there are also many GUI windows clients available. The two I read about, or
see the most are WinCVS, and TortoiseCVS, but there are many others. As stated I
have never used a GUI version, so have no comment on how well they work, or how easy they
are to setup ... I am sure they will have the same basic two steps -
1. to do the initial source 'checkout' (co), creating a new folder, and
2. an 'update' (up) to update that folder.
In general CVS is quite smart. During an update, it only downloads something when the source repository has been changed, and even then on a text file, only a vector diff, which it merges with the local copy, thus is all quite quick for the update ... in windows, it also adds CR/LF line endings to the file, only a LF in *nix systems, and CR in a MAC, so we each get a final file in our native file format.
If you want to use my build system, then you must make sure you put your CVS sources into folders to match mine given below ...
As the main http://subversion.tigris.org/ site proclaims "Subversion is an open source version control system" very similar to CVS ...
Again there are GUI windows version available, but I choose to use the command line version. And unless you intend to modify sources, and get permission to upload to the repository, you only need the SVN Client. Through the 'tigris' site link you can download a Windows client, with installer. That means it will install and take care of setting up a PATH to be able to run it from the command line...
C:\FGCVS>svn --version svn, version 1.4.0 (r21228) compiled Sep 11 2006, 17:46:59 Copyright (C) 2000-2006 CollabNet. Subversion is open source software, see http://subversion.tigris.org/ This product includes software developed by CollabNet (http://www.Collab.Net/).
As with CVS, the source repository will give the necessary instruction for the initial download, and the subsequent updates ... for example the instructions for OpenSceneGraph (OSG) is/was -
C:\FGCVS> svn co http://www.openscenegraph.org/svn/osg/OpenSceneGraph/tags/OpenSceneGraph-2.6.0 OpenSceneGraph
This will get you a specific 'tagged' version, namely 2.6.0. It is necessary to browse the repository to decide which version you want ... If you want the latest development version, and that is what I choose most of the time, then it is usually called the 'trunk' ... This OSG page shows you the instructions for the trunk development source -.
C:\FGCVS> svn checkout http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk OpenSceneGraph
NOTE WELL: It is sometimes very necessary to do some research
to find the actual version you want ... take some care - without adding the 'trunk' to this
command you will end up downloading _ALL_ the version, which -
(a) will take lots of time,
(b) will use up lots of disk space, and
(c) is NOT what you need for FlightGear ...
The UPDATE, after the first 'checkout', of usually the 'trunk' source, is very simple and easy - note you first change into the particular directory, then do the following command - 'up' is an allowed short form of 'update' ...
C:\FGCVS\OpenSceneGraph> svn up
Like CVS, SVN will only download deltas of text files changed, and perform a merge, thus the update is usually quite fast if done frequently ...
If you want to use my build system, then you must make sure you put your SVN sources into folders to match mine given below, or at least move, copy or rename them until they are the same ...
git is recent, circa 2005. As the wiki page states - 'Git is a distributed revision control, or software source code management project created by Linus Torvalds, perhaps best known for having initiated the development of the linux kernel, initially for the Linux kernel development.
git can be installed by downloading the windows installer from http://code.google.com/p/msysgit/downloads/list - it is so 'new' that at this time only 'beta' versions are available ... I downloaded Git-1.6.1-preview20081227.exe, and ran this installer, but by the time you read this, there may be other 'stable' versions available. I chose to NOT allow it to alter my PATH, and thus had to setup a BATCH file (in my C:\MDOS path) to run it ...
At this time only two FlightGear source items using this type of repository, and that is terragear-cs, see http://mapserver.flightgear.org/git/ , and openal-soft, see http://kcat.strangesoft.net/openal.html . TerraGear is only if you want to get into building FlightGear scenery tiles, and in my case I chose to use the OpenAL SDK, so had no need for the source.
If you want the TerraGear GIT source, then the command is (2008-11-28) :-
C:\FGCVS> git clone git://mapserver.flightgear.org/terragear-cs/ terragear-cs
If you want the OpenAL-soft GIT source then the command (2008-11-28) :-
C:\FGCVS> git clone git://repo.or.cz/openal-soft.git openal-soft
This will download the full source into a folder called 'openal-soft'. To later UPDATE this source, change into the openal-soft directory, and the command is -
C:\FGCVS\openal-soft> git pull
likewise for terragear-cs, when IN the terragear-cs folder ...
If, like me, you use the OpenAL SDK, then while there are presently NO git repository sources for FlightGear, however, it should be noted that there is copious discussion on the development board about changing FG/SG repository over to git ... so it may be worth getting to know it ... and at present the latest TerraGear is available via git, as mentioned ...
As mentioned, some source are NOT available via a repository like CVS, SVN, GIT mentioned above. Then the only alternative is to download what is frequently called a 'tar ball' (tar.gz, or tgz), but some source sites also offer zip files.
To unpack these sources you need an 'unzip' utility. Of course there are many applications to do this. XP and Vista will natively handle some 'unzipping', but the user interface is quite difficult to follow. It is usually better to have a dedicated tool.
WinZIP: Quite some time ago I purchases WinZIP for this purpose. I have an old version 9, but the latest at this time is 11.1 for about Euro 40 (about USD 60). And if you want to use it from the command line, then you also need the command line add-on, which is free with a purchased, register copy of WinZIP ...
7-Zip: Alternatively, 7-Zip offer a free product, that has both a GUI Window and a command line component. You simply download the 7z???.exe (or 64-bit MSI), run and install it ...
Undoubtedly there are others...
It is usually very important to ensure the 'decompressing' tool used re-creates the directory structure given in the particular compressed file, and not just put all extracted contents into the same folder. My command line WinZip requires a -d parameter to do this; 7-Zip uses an x command; etc ... Remember, to use my build system, you must put the SOURCES in the exact folders given below.
Of course, any folder arrangement is possible! Below are views of my SOURCE, that is either updated using CVS or SVN, or from a tar ball or zip, and the WORK folders, created by SETUPFG.BAT, needed for my TWO SOLUTION SYSTEM (TSS) ...
To use my TSS system you only have to get the SOURCE folder exactly correct to allow you to run SETUPFG.BAT. It will check for the SOURCE folders, and advise of any problem it finds. You can choose any 'root' for this SOURCE, but if you choose other than C:\FGCVS, will have to change the 'root', in the line @set TEMP2=C:\FGCVS, near the top of SETUPFG.BAT, then the 'WORK' will be generated, as the batch file copies _ALL_ the sources :-
|SOURCE||>>>== 2010-01-17 ==>>>||WORK|
=>> ======================== =>>
=>> SOURCE is copied to WORK =>>
=>> by the SETUPFG.BAT batch file =>>
=>> This bat file CREATES the WORK =>>
=>> with some minor name and structure =>>
=>> changes, like 'S/FlightGear/data' to =>>
=>> just 'W/data', 'S/FlightGear/source' =>>
=>> to 'W/FlightGear', etc, but this is all =>>
=>> done by the SETUPFG.BAT file =>>
=>> ======================== =>>
Versions - As of 28 Nov., 5 Oct., and 17 Sep., 2008 - in Vista
|2008-11-28||5 October, 2008||17 September, 2008|
As of April, 2008 - XP
|SOURCE folders||WORK folders|
As of December 07, 2008 - in Vista-32
ADDING FGRUN & FLTK
Of course none of the above can be done without a compiler or linker ;=)) The latest FREE offering from Microsoft is Visual C++ 2008 Express - MSVC9. While this is fairly complete, with system headers, you may also need the Platform SDK (PSDK) ... and before you can run MSVC9 on OpenSceneGraph, you also need CMake to build the solution files...
There are other 'build tools' for Windows. Perhaps one of the most well known is cygwin. This create a unix like emulation environment in Windows. I have used it with some success in the past, but not for quite some time now. Another, that I have not used, is MinGW ... there may be others ...
But if you are in Windows, why not stick to native windows tools ... MSVC9 is free, except for registration ;=))
alphabetic: atlas | boost | cmake | curl | cvs | flightgear | fgrun | fltk | freeglut | folders | git | glut | libjpeg | openal | openscenegraph (osg) | plib | png | preamble | prerequisites | pthreads | sdl | simgear | svn | terragear | tools | top | zips | zlib
EOP - prereq.htm