FlightGear Scenery Designer (fgsd)

index
Page links: preamble prerequisites building running downloads end

under construction

Preamble

2013-05-19: Yeek, another giant GAP! 4 more years this time. So much has changed since then that it took a LOT of 'fixing' to get fgsd compiled against a 'modern' SimGear, but I got there ;=)) So much change in fact I decided to start a NEW page.

2009-05-11: Wow, this web page was started 2007.11.14 - 1½ years ago! - but was not finished until now because I had BIG TROUBLE compiling it in WIN32. I HAVE NOW SUCCEEDED ;=)) Phew!!!

FlightGear Scenery Designer (fgsd) home site is - http://fgsd.sourceforge.net/ - That page gives the following simple description - 'FGSD is an Open-Source interactive program that allow its user to design custom sceneries for the FlightGear (FG) flight simulator project.' The development source can be downloaded (checked out), and updated using a Subversion client, (SVN). At the time of writing this the SVN command was :-

svn co https://fgsd.svn.sourceforge.net/svnroot/fgsd/trunk fgsd

Note that this is only the 'trunk' - the main development line. Ensure you check the fgsd SVN page for any changed or later SVN command. This will 'check out', (co) the full 'trunk' source, and place it in a 'fgsd' folder. I seldom compile using this folder, preferring to copy the complete source to a work folder, adjacent to each of the prerequisite sources.

Since FGSD is to be used to customize scenery for FG, it is recommended that you first download, and compile FG, and get it running. This will also ensure some of the following prerequisites are compiled and available.

top


Prerequisites

As the fgsd site says, the software to grab is :-

Name Link Description
This first set is also required for FG - this is NOT the full FG prerequisite list!
OpenGL http://www.opengl.org/ Open Graphic Library - (Note 1)
PLIB http://plib.sourceforge.net/ Steve's Portable Game Library.
SimGear http://www.simgear.org/ Simulator Construction Tools.
Boost http://www.boost.org portable C++ source libraries
zlib http://www.zlib.net/ A Massively Spiffy Yet Delicately Unobtrusive Compression Library
The following is only optionally required for FG.
libjpeg http://www.ijg.org/ Independent JPEG Group
Additional items for FGSD only.
FLTK 1.1.x http://www.fltk.org/ Fast Light Toolkit
FLU http://www.osc.edu/archive/FLU/ FLTK Utility Widgets
giflib http://gnuwin32.sourceforge.net/packages/giflib.htm GifLib for Windows
CGAL http://www.cgal.org/ Computational Geometry Algorithms Library
zZIPlib http://zziplib.sourceforge.net/ zZIPlib
curl http://curl.haxx.se/ client-side URL transfer library
Shapefile http://shapelib.maptools.org/ Shapefile C Library V1.2

As can be seen, compiling FG first ensures about half the FGSD prerequisites are already available.

top


Building

As indicated, this took some effort, but got there in the end ;=)) And with a few minor modification, also got it built in Ubuntu, against the current cvs simgear, with osg ;=)) a happy day!

RUNTIME LIBRARY CHOICE

As always it is important to choose a MSVC runtime library, and use the SAME runtime throughout. I chose 'Multi-threaded DLL (/MD)', and 'Multi-threaded Debug DLL (/MDd)', release and debug resp.

However, despite every care - I thought I did them all - I still got a runtime conflict in the final link of 'fgsd', but for once was able to remove it by using the 'ignore' default library, LIBCMT (and LIBCMTD for Debug) option for the link. Still not sure which library caused it, that is why this occurred.

1. Build FlightGear (FG), et al...

Obviously the FIRST step in building 'fgsd' is to build FlightGear -
(a) This will already load and build several of the prerequisites, PLIB, SimGear, zlib, ..., and
(b) should include the base data download, which be later required to run 'fgsd'.

You may have already built FG, or you may have your own way of going about it... OR you can use my  TWO SOLUTION SYSTEM (TSS)  last enumerated on this page -> fgfs-047.htm. And there is more on the prerequisites of FG on this page -> prereq.htm.

Anyway, this is about building 'fgsd', so nothing more will be said about those prerequisites that more or less come with building FG... although it should be noted, if you use my  TSS  above you will still need to take some steps to complete the PLIB build. My  TSS  only builds exactly what is required for SG/FG and skips some static library builds later needed in 'fgfs'. But PLIB comes with DSP build files to complete this easily.

2. Building Prerequisites

(a) CGAL - Computational Geometry Algorithms Library

To start with the one I found the hardest ;=() I hope after reading this you do not have the same problems! Until you find the 'trick', it has a dependence on one of the 'boost' libraries - libboost_thread-<build-rt-conf-version>.lib - or maybe - boost_thread-<build-rt-conf-version>.lib - never exactly worked out which! BUT this dependence is artificial, created by line in the auto_link.h header file in CGAL, and/or auto_link.hpp in boost.

Thus, silly me, I first set about building this 'boost' library - my FIRST for 'boost'! While, for some time now, SimGear has a dependence  on 'boost', this was for ONLY the headers - nothing to build. This 'boost' build, using CMake, then MSVC8, was not too bad, and I eventually got some ONE HUNDRED AND SIXTY FOUR (164) - 82 each for Debug and Release respectively - 'boost' libraries, 2x26 'boost' DLL built! OVER 2GB plus of disk space!!!

But all this effort, not to mention disk space, could have been avoided if I had found the pesky auto-link lines in the above mentioned auto-link headers. While CGAL does have a switch to NOT include this 'pragma lib(...)' line, namely - CGAL_NO_AUTOLINK_CGAL, I had to ADD one to the 'boost', which I called - BOOST_NO_AUTO_LINK.

If you add the macros #define CGAL_LIB_DIAGNOSTIC and BOOST_LIB_DIAGNOSTIC you will 'see' a #pragma message(...) output, showing what is being FORCED upon you! It seems neither CGAL, nor later 'fgsd', use the 'boost-thread' libraries, so this auto-link MESS was all for nothing!!!

Eventually I got six(6) CGAL libraries built, even though I only needed these two.

11/05/2009 18:05 2,493,782 CGAL-vc80-mt-gd.lib
11/05/2009 18:06 954,036 CGAL-vc80-mt.lib

If you read all the 'boost' documentation, you will note this 'vc80-mt-gd' and 'vc80-mt' (Debug and Release resp.), you may think these are archive libraries related to a DLL, since there is no 's' in the mangled string, BUT they are in fact 'static' libraries, which is the type I like for a single instance application like 'fgsd'...

(b) FLTK 1.1.19 - Fast Light Toolkit

I used version fltk-1.1.19, but it may be possible to use the version 2 - not tried.

I started with the fltk.sln file in the vc2005 folder, and had no real trouble getting about 14 static libraries build, 7 Debug, 7 Release. It seems 'fgsd' only requires 2 (x2) of these.

(c) FLU 2.8 - FLTK Utility Widgets

Of course to build this, you have to have downloaded (and built) FLTK first.

Again I had no problem starting with the fulib.sln in the visualc folder, and built 2 static libraries, fulib.lib and fullibd.lib, release and debug respectively.

(d) libjpeg - Independent JPEG Group

The jpeg-6b source has now been stable since the late 1990's. However it does not usually come with any MSVC build files, and these must be constructed. You must also decide on a jconfig.h file to use, and a memory model. I have always chose jconfig.vc, and that seems to work fine, although I add a few 'tweaks' ;=)) For memory I chose jmemnobs.c.

The build is essentially all the files in the source, except those to make the standalone applications. I end up with 2 static libraries, libjpeg.lib and libjpegd.lib.

(e) curl - client-side URL transfer library

Again 'curl' does not seem to come with MSVC build files, except for the 'ares' library, so I built my own in a new 'build' folder.

Very quickly I had a Release/Lib_curl.lib and Debug/Lib_curl.lib, static libraries, ready for linking with 'fgsd'

(f) giflib - gif file reading

The only 'make' files appeared to be 'Makefile.ms', so I built my own.

Shortly I had a giflib/Release/giflib.lib, and giflib/Debug/giflib.lib, ready to link into 'fgsd'.

(g) libpng - png file reading

This is actually a dependency of FG, and I used the vcproj file from my FG build to build this library.

This built libpng.lib and libpngd.lib

(h) zziplib - extract data from files archived in a single zip file

I am not sure what is the difference between this and zlib... I downloaded and used zziplib 0.13.50

The source has msvc6, 7 and 8 build files, so I used the msvc8, just for zziplib, and got zziplib-Release.lib, and zziplib-Debug.lib static libraries to link to 'fgsd'.

(i) Shapefile - C Library V1.2

I downloaded shapelib-1.2.10, and using the vcproj file that came with the 'fgsd' source, built shapelib\Release\shapefile.lib, and shapelib\Debug\shapefile.lib...

(j) newmat ????

The 'fgsd' source mentions this library, but it seems not to be used. It is used in building the TerraGear suite of tools, but does not seem directly required here.

 

top


Running

WIN32: On the first run, it will ask for paths to FlightGear data and scenery, and other options. One I like is to 'Display the position in decimal' - the default is like W 122:34'39.9 N 37:44'27.0 - as the mouse moves. These 'options' can be changed any time through MENU: Tools -> Options... re-loads this tabbed dialog box.

Once given the path to the FG data, it will spend some time, each time it loads, to load the airport database... then using MENU: File -> Open -> Tile I navigate to w130n30\w123n37\942050.stg, since I know this contains KSFO airport... but although it took some time to load, nothing showed... What now?

I tried an export, but a debug assertion failed, so the application aborted... after loading a 5443289.arr.gz file, I did see a yellow line if I reduced the scale slider...

Ubuntu: I had no luck running my newly built binary in linux! It crashed out with a segfault!!

Back in win32, after fiddling around for a while, I was eventually successful in loading Terrain/w130n30/w123n37/942050.stg, which is the KSFO region, and got a display - but of WHAT? ;=))

view 01

Clearly I do not know enough yet about the capabilities of this great application, but it does SOMETHING ;=)) after changing the tool bar slider I got a 'better' display :-

view 01

but it is clear, at this stage, I have no idea of what I am doing ;=)) I also saved this as a fgsd project file... and by reloading this project-01.fgsd (500+KB binary) file, and adjusting the scale a little, I was able to quickly return to this 'scene'. The yellow rectangle is due to the mouse hovering over that spot.

But how to actually manipulate scenery???

 

under construction

top


Downloads

 As always, binary builds, grace a Frederic Bouvier,  can be downloaded from ftp://ftp.ihg.uni-duisburg.de/FlightGear/Win32 - this contains a great list of FlightGear and flightgear related tools to download. The latest I could find there was  fgsd-win32-20060423.zip, about 1.2MB.

 

under construction

top


Geoff.
May, 2009 (started Nov, 2007!).

EOF - fgsd-01.doc

Note 1: The OpenGL libraries and drivers come with Windows (or perhaps the Windows SDK - PSDK), and the main header, glut.h, more commonly seen as <GL/glut.h>, in my case, comes with freeglut - http://freeglut.sourceforge.net/ - The Free OpenGL Utility Toolkit - return to above text.

Banner from the fgsd web site
fgsd banner

top


under construction

checked by tidy  Valid HTML 4.01 Transitional