Compiling FlightGear under the MSYS command line environment
Giles Robertson, 2004 Written 1/05/2004 This file is in the public domain.
Acknowledgments: Andy Ross, who a) built the binary libraries needed by hand and b) wrote up how to compile using mingw32 on Cygwin/Linux, both of which were essential when writing this.
Comments/suggestions/flames to the flightgear-devel list
This gives instructions on how to build FlightGear under the MSYS environment. This was written for compiling a CVS checkout at 01/05/2004. I assume you have a fairly minimal knowledge of standard unix commands. You also need a working CVS client at present.
1) Download MingW from www.mingw.org. (Downloads page, look for MingW-x.x.x.exe among the plethora of packages)
2) Install it. I installed it to C:\mingw, but one could conceivably install it anywhere. It isn't material.
3) Download MSYS from www.mingw.org (Downloads page again, this time look for MSYS-x.x.x.exe)
4) Install that. After it has installed, it will ask to do a post install process. Let it. It will ask you for where you installed MingW. Give it the path you installed in step 2)
5) Download and install the Creative OpenAL SDK (follow link from www.openal.org)
6) Create a folder to put your fgfs sources in. I used C:\fg (under msys, this is /c/fg )
7) Download Plib 1.8.3 (though anything later than 1.7.0 should work) from www.plib.org
(NOTE: If FG 0.9.5 is out, you can skip the next two steps and grab the files straight from www.flightgear.org) (CVS instructions are available at www.flightgear.org)
8) Checkout SimGear from cvs.simgear.org:/var/cvs/SimGear-0.3
9) Checkout FlightGear from cvs.flightgear.org:/var/cvs/FlightGear-0.9
10) Run msys.
CD to the directory you have your source files in (that you made in step 6) If you followed step 6:
11) Install Andy's binary libraries.
Download http://plausible.org/andy/fgfs-mingw-libs.tar.gz to C:\fg Type (in MSYS)
cd /fg tar xvzf /c/fg/fgfs-mingw-libs.tar.gz tar xvf openal.tar tar xvf pthread.tar tar xvf sdl.tar tar xvf zlib.tar
Rename /fg/bin/pthread.dll to pthreadGC.dll
NOTE: You may have to find pthread.h (in /fg/include) and comment out line 154, the line containing #include "config.h", if you get a build error when building SimGear
12) Download and install Glut
The compilation of flightgear requires that Glut be present, even though plib may be compiled without it. Download win32 dll's of glut from http://www.opengl.org/resources/libraries/glut/glut_downloads.html?glut#first_hit and unzip it in a folder.
At the time of writing, October 6, 2005, the direct link to the zip file is http://www.opengl.org/resources/libraries/glut/glutdlls37beta.zip
Copy *.lib into /fg/lib Copy *.h into /fg/include/GL Copy *.dll into /fg/bin
13) Build and Install plib
cd /c/fg tar xvzf plib-1.8.3.tar.gz cd plib-1.8.3.tar.gz
./configure --prefix=/fg make make install
14) Build and Install SimGear
If you grabbed a tarball off the website, untar it before proceeding
cd /c/fg cd simgear
./autogen.sh ./configure --prefix=/fg make make install
15) Build and Install FlightGear
If you grabbed a tarball off the website, untar it before proceeding (and substitute source for your fg src directory?
At present, we only make the /src directory as the others do not work automatically?
cd /c/fg cd source
./autogen.sh ./configure --prefix=/fg --enable-sdl
cd src make make install
16) Strip the binaries
cd /fg/bin strip *.exe
17) Install the base package (from CVS or the website) and tell FlightGear where it is.