]> git.mxchange.org Git - flightgear.git/blob - README.Win32
More reorganization.
[flightgear.git] / README.Win32
1 May 10, 1999
2 =============
3
4 Here is a quick outline of *one* way you can build FG for Win32 using
5 a completely free development environment.
6
7
8 1.  Install cygwin (latest is version 20.1)
9
10     http://sourceware.cygnus.com/cygwin/
11
12     Now called "full.exe"
13
14     (I believe "user.exe" is included in full.exe so you don't need to
15     install those separately)
16
17
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.
21
22     Install egcs binary release for cygwin-20.x (latest egcs is version 1.1.2)
23
24     http://www.xraylith.wisc.edu/~khan/software/gnu-win32/egcs.html
25
26     For instance, if you've downloaded egcs to /tmp:
27
28     cd //c/cygnus/cygwin-b20
29     tar xzvf //c/tmp/egcs-1.1.2-cygb20.tar.gz
30
31 3.  Install the free win32 api library (latest version is 0.1.5) from:
32
33     http://www.acc.umu.se/~anorland/gnu-win32/w32api.html
34
35     (Recommend you install in /usr/local)
36
37     Run "make; make install"
38
39
40 4.  Also download glut import libraries from extra section at:
41
42     http://www.acc.umu.se/~anorland/gnu-win32/w32api.html
43
44     copy these libs to /usr/local/lib/lib*.a
45
46
47 5.  Install the Mesa-3.0 includes:
48
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
51     following:
52
53     GLUTAPI int APIENTRY glutCreateMenu(void (GLUTCALLBACK * func)(int));
54
55     Or you can grab just these headers from the fgfs ftp site.
56
57     ftp:://ftp.flightgear.org/pub/fgfs/Win32/Mesa-3.0-includes.zip
58
59     Copy these includes to /usr/local/include/gl/*.h
60
61
62 6.  Install the glut dll's somewhere in your path:
63
64     You can fetch these from the fgfs site:
65
66     ftp:://ftp.flightgear.org/pub/fgfs/Win32/glut-dll-3.7.zip
67
68
69 7.  Build and install plib (latest version is 1.0.5/6?) from:
70
71     http://www.woodsoup.org/~sjbaker/plib (check url)
72
73     Recommend you run configure as follows:
74
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
76
77     make; make install
78
79
80 8.  Fetch the Flight Gear code which can be found at:
81
82         ftp://ftp.flightgear.org/pub/fgfs/Downloads/Source/
83
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:
86
87         ftp://ftp.flightgear.org/pub/fgfs/Downloads/Source/Snapshots
88
89
90 9.  Unpack the FG source code.  Run:
91
92         pkunzip -d FlightGear-X.XX.zip
93
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!
96
97
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.
106
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:):
109
110          mkdir /mnt
111          mount d: /mnt
112
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.
115
116
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:
122
123         ./configure --prefix=/mnt/FlightGear
124
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.
132
133
134 11. Build the executable.  Run:
135
136         make
137
138
139 12. Assuming you have installed the updated version of install.exe (see
140     earlier instructions) you can now create and populate the install 
141     tree.  Run:
142
143         make install
144
145     You can save a significant amount of space by stripping all the 
146     debuging symbols off of the executables.  To do this run:
147
148         strip file.exe
149
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".
154
155
156 13. Download and install the (most recent!) scenery and texture files.
157
158
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
161     call the executable.
162
163
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:
166
167         \FlightGear\bin\runfg.bat     (command shell)
168
169
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