1 Use FlightGear.sln to compile fgfs executable for Win32 or x64 architectures with Visual Studio 2008.
2 Previous versions of Visual Studio are not officially supported anymore.
4 Precompiled librairies and headers for compiling Win32 executables with VS2008 :
5 ftp://ftp.ihg.uni-duisburg.de/FlightGear/Win32/MSVC/fgfs-win32-VS90-3rdParty+OSG-20110801.zip
7 Precompiled librairies and headers for compiling x64 executables with VS2008 :
8 ftp://ftp.ihg.uni-duisburg.de/FlightGear/Win32/MSVC/fgfs-x64-VS90-3rdParty+OSG-20110801.zip
10 These two archives only contain 'release' versions of librairies and executables. In addition,
11 the archives below contain 'debug' version of libraries and should be dezipped over the previous one.
12 ftp://ftp.ihg.uni-duisburg.de/FlightGear/Win32/MSVC/fgfs-win32-VS90-3rdParty+OSG-20110801-debug.zip
13 ftp://ftp.ihg.uni-duisburg.de/FlightGear/Win32/MSVC/fgfs-x64-VS90-3rdParty+OSG-20110801-debug.zip
15 The VS2008 / v9.0 project files assume the directory layout below :
18 * any_directory_on_any_drive /
19 3rdParty / ( includes plib, fltk, zlib, libpng, libjpeg, libtiff, freetype, libsvn, gdal, ...
26 source / ( Flightgear CVS directory - It can also be renamed FlightGear or anything else
30 Win32 / ( generated at build time
31 Debug / ( Debug executable
32 Release / ( Release executable
33 FlightGear.sln ( Main solution
37 OpenSceneGraph / ( OSG CMake install
41 SimGear / ( SimGear CVS directory
46 3rdParty, boost_1_44_0 and install/msvc90 are included in the Win32 3rdParty archive.
49 * any_directory_on_any_drive /
50 3rdParty.x64 / ( includes plib, fltk, zlib, libpng, libjpeg, libtiff, freetype, ...
57 source / ( Flightgear CVS directory - It can also be renamed FlightGear or anything else
61 x64 / ( generated at build time
62 Debug / ( Debug executable
63 Release / ( Release executable
64 FlightGear.sln ( Main solution
68 OpenSceneGraph / ( OSG CMake install
72 SimGear / ( SimGear CVS directory
77 3rdParty.x64, boost_1_44_0 and install/msvc90-64 are included in the x64 3rdParty archive.
79 Typical setup should decompose into the following steps :
81 1. Install Visual Studio 2008 Express (http://msdn.microsoft.com/fr-fr/express/aa975050.aspx)
82 2. Install msysGit (http://code.google.com/p/msysgit/)
83 3. Create a new directory, say D:\FGFSDevel (or anything else)
84 4. Unzip precompiled Win32 3rd party archive in it
85 5. Open a Git Bash session and cd to the new directory ( cd /d/FGFSDevel )
86 6. Get SimGear sources from Gitorious : git clone git://gitorious.org/fg/simgear.git SimGear
87 7. Get FlightGear source from Gitorious : git clone git://gitorious.org/fg/flightgear.git FlightGear
88 8. Go to D:\FGFSDevel\FlightGear\projects\VC90 and double-click on FlightGear.sln
89 9. Select the "Release" configuration
90 10. Open file D:\FGFSDevel\SimGear\simgear\version.h.in and change @VERSION@ into "2.0.0" or any current version
91 11. Save file as version.h in the same directory
92 12. Start build (usually F7)
93 13. Get the data from Gitorious too : git clone git://gitorious.org/fg/fgdata.git fgdata
95 15. Add <any_directory_on_any_drive>/install/msvc90/OpenSceneGraph/bin and <any_directory_on_any_drive>/3rdParty/bin to your PATH environment variable
96 16. Enjoy - programs are in D:\FGFSDevel\FlightGear\projects\VC90\Win32\Release
98 It is also possible to compile a Debug version. This is only useful when hacking the code because
99 a Debug version is way slower than the Release one.
101 The 64bit build is only available to people having the Professional edition of Visual Studio 2008. In that case, 15. above should be :
102 15. Add <any_directory_on_any_drive>/install/msvc90-64/OpenSceneGraph/bin and <any_directory_on_any_drive>/3rdParty.x64/bin to your PATH environment variable
104 When the manual build works, it is possible to start it from the command line. This is useful
105 when setting up a build server or automating the process of retrieving the code and building
106 it in a scheduled task. To do that :
108 1. open a command line window
109 2. execute "C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\vsvars32.bat"
110 or "C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\vsvars32.bat" in a
111 64bit environment (Vista 64-bit or Windows7 64-bit)
112 You should see : "Setting environment for using Microsoft Visual Studio 2008 x86 tools."
113 printed in the console
114 ( To start 64-bit build, the right environment is set with :
115 "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" amd64
117 3. cd to the FlightGear project directory :
119 cd \FGFSDevel\FlightGear\projects\VC90 (for example)
120 4. start the build with the command line below :
121 msbuild FlightGear.sln /p:Configuration=Release /m
123 msbuild FlightGear.sln /p:Configuration=Debug /m
127 Note: you may experience the error below running the msbuild command :
128 FlightGear\projects\VC90\FlightGear.sln : error MSB4018: The "ResolveVCProjectOutput" task failed unexpectedly.
129 ...(lots of additionnal messages)
131 In that case, remove the /m switch from the command line.