|- Quick Start -|- Special Notes -|- CMake -|- OSG -|- Ready -|- Build -|- Downloads -|- Summary -|- SET UP FG -|- Time Line -|- End -|


I had been building my own Microsoft Visual C++ .NET 2005 (MSVC8) solution files for the components of OSG, and including them in my SINGLE SOLUTION FILE - see previous, but here decided to try the 'make' utility OSG recommend ... that is, CMake - see - http://www.cmake.org/HTML/Index.html - the cross-platform, open-source make system. CMake generates native makefiles and workspaces that can be used in the compiler environment of your choice, and that includes MSVC8. This is what I now call my TWO SOLUTION SYSTEM ... as easy as 1, 2, 3, plus ;=))

Quick Start

1. Download my vc8sln07.zip and extract the setupfg.bat, which, if you have the updated sources in the same folder arrangement as me, will generate a new WORK folder, and copy all the sources, and data if desired, into that WORK folder.

2. Open CMake, and point it to the WORK/OpenSceneGraph folder, and it builds the MSVC8 solution files for OSG (with OpenThreads included), then MSVC8 can build the OSG components.

3. Unzip the balance of vc8sln07.zip into the WORK folder, and unzip the zips contained therein, using the folders contained, and overwriting existing files, then MSVC8, with WORK/fgfs/fgfs.sln loaded, will build all the rest.

4. Run WORK/upd.bat to copy the binary files to WORK/bin. If not done previously, change into WORK/bin/OpenAL folder and run the upd.bat there to 'install' OpenAL, the sound libraries. Change into WORK/bin/bats, and run rfg.bat, or any of the other bats supplied, and *** YOU SHOULD BE FLYING *** ...

Of course, if you want it real easy, then you can download the full runtime set of binaries, EXE and DLLS in, fgvc8rt07.zip. Take care, this is a big file ;=)) and as always, be warned about downloading and running executable files from the web.


Special Notes

OpenSceneGraph - The SVN server has changed again. In my case, I renamed my OpenSceneGraph folder to OSGOld, and did a fresh 'trunk' CHECKOUT using :-
svn checkout http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk OpenSceneGraph
and fully re-populated my OpenSceneGraph folder.

PLIB - Likewise, it seem the SVN server had changed, so I renamed the PLIB folder, PLIBOld, and did a complete fresh 'trunk' CHECKOUT using :-
svn co https://plib.svn.sourceforge.net/svnroot/plib/trunk plib
to fully re-populate my plib folder. Note, I ONLY take the 'trunk'!

SOURCE SETUP - I NEVER use the SVN/CVS download/update folders for building. I always copy the FULL SOURCES to another folder, in this case - C:/FG/18 - I used my powerful SETUPFG.BAT batch file below to copy ALL the SVN/CVS sources into appropriate folders, but this requires that ALL the sources are arranged per my source folder setup. Inside that folder, the batch file created an OpenSceneGraph folder, as well as all the other folders, and filled each with an xcopy of the relevant SVN/CVS source.

Work Folder View
Work Folder View

Above is the set of WORK folders, created by SETUPFG.BAT, containing each of the sources respectively ...



I downloaded the full CVS source, in case I wanted to build it myself, but it is real simple to downloaded the CMake Windows Installer -

Windows (Win32 Installer)

cmake-2.4.7-win32-x86.exe (note, version may have increased!)

This installer ran smoothly, and I had a new GUI program item available -
New CMake program item
During the install, you are asked if you want a path to CMake added, so you can also run it as a command line tool, but this is not really necessary. I just use All Programs -> CMake 2.4 -> CMake to run it.



From the OSG site -> Documentation -> Getting Started, it looks very simple ...

(a) Download OpenSceneGraph - I used SVN to check out the development version of OSG ... since I had already done this, I just changed into the folder and used 'svn up', to get a full update of the latest (20070805 in my case).

(b) You can OPTIONALLY download the 3rdParty_Win32binaries, namely -
23/05/2007 16:31 7,237,421 3rdParty_Win32binaries_2005_05_10.zip
but it seems this is really NOT necessary, at this time.

Note, 3rdParty and OpenThreads folders are _NOT_ required, and are not created by my latest SETUPFG.BAT batch file.


Ready For The CMake Build

Wow, it could not have been simpler! As the OSG web site generally states -
1. Launch CMake from the start menu.
2. Drag and drop OSG CMakeLists.txt into the frame, and choose your MSVC IDE tool version.
3. Click 'Configure' and wait ... I had to do this twice to get the 'Ok' to un-grey!
4. Fill in, if any, missing mandatory fields - CMake pops up an 'Error' dialog in the configuration process if something went wrong. Click 'Configure' again. I had none ;=))
5. Click 'Ok' to 'Generate'.

And a MSVC8 solution file, and the project files (some 120 plus!) were generated. Loading this OpenSceneGraph.sln into MSVC8, selecting Release, and pushing build (F7), built the 60 or so projects without a hitch. I only built the Release configuration. In almost no time at all, I had some 80+ OSG DLL (shared libraries) built! Ready for the following full build of FlightGear, using my single solution file, WORK/fgfs/fgfs.sln ... What a breeze this was ...


Build FlightGear

I downloaded my previous, which has no OSG projects, and I now remove OpenThreads, since that is included in OpenSceneGraph. I unzipped it into the new G:/FG/18 folder, but you can use the latest. I had a few about an hour of corrections to make, as can be read in the time line table below, adjusted my upd.bat batch and update.mak files, which also copies ALL the OSG DLL files to the bin folder.

I started FlightGear.exe, and IT FLEW! As now becoming usual, I got a frame rate in the high 80-90 fps range, and with no 'warning' messages ;=))

So my SINGLE SOLUTION FILE, has become a TWO SOLUTION SYSTEM (TSS) ;=)) First build OSG separately, which by the way now INCLUDES OpenThreads, so this does not have to be done separately. The my fgfs.sln pulls all the balance together. The following shows the 18 or so projects it contains -

fgfs project list

It took some work to get the dependencies right, such that FG is built last ... and when arranged like this MSVC8 takes care of including some of the appropriate libraries in the link.



List of FlightGear downloads
Date Download Description Size MD5 Digest
07/08/2007 vc8sln07.zip Single MSVC8 solution, excl OSG 66,655 2afbe987af9996b9f1b4156583b256cf
06/08/2007 fgvc8rt07.zip Runtime EXE and DLL - MSVC8 4,804,522 20cb69a472fbc75b7be11611424623c8

Note some of these zips are stored on a separate server (different domain). This is the index page containing these zips, and all the previous (and later) versions as well, in that domain.



This file, README.fgfs.htm, is include in the above zip file, and is repeated here just for convenience ...



This is my own special BATCH file to COPY all the updated CVS/SVN sources into a WORK folder. This setupfg.bat.txt can be downloaded, and renamed to setupfg.bat, but it is also included in the above solution zip file. This batch file creates all the WORK folders, and copies the source into each, provided you have the sources in the same order that I have ...


Time Line

This is an estimated time line on the building of FlightGear for this page ...

Action/Description Time Start End
Download latest solution zip, and extract SETUPFG.BAT 00:04 15:45 15:49
SVN/CVS Update of sources 00:14 15:49 16:03
Create new WORK folder (18) and copy sources, and DATA. 00:13 16:03 16:16
Unpack vc8sln07.zip in WORK folder, with folder structure. And likewise unpack the vc8cfg07.zip, vc8chg07.zip if available, and rfgbats.zip ... 00:06 16:16 16:22
Load Cmake application, fill in paths C:/FG/18/OpenScenegraph, Configure, Check, Configure, then OK 00:06 16:25 16:31
Open MSVC8, and load 18/OpenSceneGraph/OpenSceneGraph.sln - Build DEBUG and RELEASE, but end up only using 'release' 00:44 16:31 17:15
Load MSVC8, and load 18/fgfs/fgfs.sln with 18 projects, select 'Release' and build … got 3 FAILURES 00:11 17:19 17:30
OpenSceneGraph - OpenThreads seems missing 'Win32' at end of name. Changed flightgear.vcproj to use just OpenThreads.lib … 00:24 17:30 17:54
Back to build fgfs.sln, but got 38 unresolved externals - must find and add files - 01:01 17:54 18:55
To FG remove leaf.cxx, and for gearExtensible - add src/AIModel/performancedata.cxx and performancedb.cxx FGAITanker - add src\AIModel\AITanker.cxx FGActuator - add src\FDM\JSBSim\models\flight_control\FGActuator.cpp FGTaxiNode - add src\Airports\gnnode.cxx, runwayprefloader.cxx, dynamicloader.cxx and add a NEW FUNCTION FGTaxiNode::FGTaxiNode(double,double,int)??!!??!!?? XMLLoader - add src\Airports\xmlloader.cxx FG
To SG { SGSceneFeatures - add simgear\scene\util\SGSceneFeatures.cxx SGOceanTile - add simgear\scene\tgdb\SGOceanTile.cxx SGReaderWriterBTG - add simgear\scene\tgdb\SGReaderWriterBTG.cxx SGVasiDrawable - add simgear\scene\tgdb\ SGVasiDrawable.cxx SGTranslateTransform - add simgear\scene\model\SGTranslateTransform.cxx, SGOffsetTransform.cxx, SGScaleTransform.cxx, SGRotateTransform.cxx SGEnlargeBoundingBox - add simgear\scene\util\SGEnlargeBoundingBox.cxx to SG }
Run the UPD.BAT to copy the stuff to bin - have to make some adjustments to update.mak for the new DLL paths … 00:05 18:55 19:00
Unpack the rfgbats06.zip, change into bin/bat, and type >rfg 00:02 19:00 19:02


00:08 19:02 19:10
Total Time 03:18 HOURS


Geoff R. McLane
email address
August 5, 2007.


checked by tidy  Valid HTML 4.01 Transitional