4 Here is a quick outline of *one* way you can build FG for Win32 using
5 a completely free development environment.
8 1. Install cygwin (latest is version 20.1)
10 http://sourceware.cygnus.com/cygwin/
14 (I believe "user.exe" is included in full.exe so you don't need to
15 install those separately)
18 2. This step may now be optional. I haven't tried without, but
19 cygwin is now egcs-1.1 (which should work I think.) This step
20 just upgrades to the latest greatest version of egcs.
22 Install egcs binary release for cygwin-20.x (latest egcs is version 1.1.2)
24 http://www.xraylith.wisc.edu/~khan/software/gnu-win32/egcs.html
26 For instance, if you've downloaded egcs to /tmp:
28 cd //c/cygnus/cygwin-b20
29 tar xzvf //c/tmp/egcs-1.1.2-cygb20.tar.gz
31 3. Install the free win32 api library (latest version is 0.1.5) from:
33 http://www.acc.umu.se/~anorland/gnu-win32/w32api.html
35 (Recommend you install in /usr/local)
37 Run "make; make install"
40 4. Also download glut import libraries from extra section at:
42 http://www.acc.umu.se/~anorland/gnu-win32/w32api.html
44 copy these libs to /usr/local/lib/lib*.a
47 5. Install the Mesa-3.0 includes:
49 Feel free to download mesa from www.mesa3d.org and grab them from
50 there. Line #453 of glut.h needs to be edited to look like the
53 GLUTAPI int APIENTRY glutCreateMenu(void (GLUTCALLBACK * func)(int));
55 Or you can grab just these headers from the fgfs ftp site.
57 ftp:://ftp.flightgear.org/pub/fgfs/Win32/Mesa-3.0-includes.zip
59 Copy these includes to /usr/local/include/gl/*.h
62 6. Install the glut dll's somewhere in your path:
64 You can fetch these from the fgfs site:
66 ftp:://ftp.flightgear.org/pub/fgfs/Win32/glut-dll-3.7.zip
69 7. Build and install plib (latest version is 1.0.5/6?) from:
71 http://www.woodsoup.org/~sjbaker/plib (check url)
73 Recommend you run configure as follows:
75 CFLAGS="-O2 -Wall" CXXFLAGS="-O2 -Wall" CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib ./configure --prefix=/usr/local --includedir=/usr/local/include/plib
80 8. Fetch the Flight Gear code which can be found at:
82 ftp://ftp.flightgear.org/pub/fgfs/Downloads/Source/
84 Grab the latest "FlightGear-X.XX.zip" or if you want to live on the
85 edge you can try one of the nightly snapshots in:
87 ftp://ftp.flightgear.org/pub/fgfs/Downloads/Source/Snapshots
90 9. Unpack the FG source code. Run:
92 pkunzip -d FlightGear-X.XX.zip
94 Be sure to use the -d option. This will create all the needed
95 subdirectories. Otherwise you will have one big mess! Trust me!
98 Side Note: we need to make a distinction between the "build tree" and
99 the "install tree." The "build tree" is what we've been talking
100 about up until this point. This is where the source code lives
101 and all the compiling takes place. Once the executables are
102 built, they need to be installed someplace. We shall call this
103 install location the "install tree". This is where the
104 executables, the scenery, the textures, and any other run-time
105 files will be located.
107 Open the Cygnus bash via its entry in the Start menu.
108 Mount the drive as follows (assuming you unpacked the code on d:):
113 You only have to do this once. The drive stays mounted (until you
114 umount it) even through reboots and switching off the machine.
117 10. Configure the make system for your environment and your "install
118 tree". Tell the configure script where you would like to install
119 the exectuables and all the scenery and textures by using the
120 "--prefix" option. In the following example the base of the
121 "install tree" is "\FlightGear". Stay within the bash shell. Run:
123 ./configure --prefix=/mnt/FlightGear
125 Side Note: the make procedure is designed to link against opengl.dll,
126 glu.dll, and glut.dll. However, some accelerated video cards
127 require you to link against opengl32.exe, glu32.exe, and
128 glut32.exe. If this is the case for your video card, you can edit
129 .../Simulator/Main/Makefile and rename these three libraries to
130 their version "32" counterparts. There is only one place in this
131 make file where these files are listed.
134 11. Build the executable. Run:
139 12. Assuming you have installed the updated version of install.exe (see
140 earlier instructions) you can now create and populate the install
145 You can save a significant amount of space by stripping all the
146 debuging symbols off of the executables. To do this run:
150 Important Note: so far you've built and installed the simulator and
151 related tools. Before you can actually try it out, you need to
152 make sure you have the appropriate scenery and texture downloaded
153 and unzip'ed in your "install tree".
156 13. Download and install the (most recent!) scenery and texture files.
159 14. In Windows explorer, change to /FlightGear/bin within your install tree.
160 Call runfg.bat which will set the environment variable FG_ROOT and
164 15. Try it out! There are several ways to run flight gear once it has
165 been installed. The simplest is as follows. Run:
167 \FlightGear\bin\runfg.bat (command shell)
170 16. I appreciate feedback. Tell me if it works! If it doesn't, tell me
171 what went wrong. My email is curt@me.umn.edu