]> git.mxchange.org Git - flightgear.git/blob - docs-mini/README.MSVC
Add --fg-aircraft option, and aircraft dir path list. Partial support in places that...
[flightgear.git] / docs-mini / README.MSVC
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.
3
4 Precompiled librairies and headers for compiling x64 executables with VS2008 :
5 ftp://ftp.ihg.uni-duisburg.de/FlightGear/Win32/MSVC/fgfs-x64-VS90-3rdParty+OSG-20100501.zip
6
7 Precompiled librairies and headers for compiling Win32 executables with VS2008 :
8 ftp://ftp.ihg.uni-duisburg.de/FlightGear/Win32/MSVC/fgfs-win32-VS90-3rdParty+OSG-20100501.zip
9
10 The VS2008 / v9.0 project files assume the directory layout below :
11
12 Win32 build :
13  * any_directory_on_any_drive /
14       3rdParty /                 ( includes plib, fltk, zlib, libpng, libjpeg, libtiff, freetype, libsvn, gdal, ...
15          bin /
16          include /
17          lib /
18       boost_1_39_0 /
19          boost /
20       source /                   ( Flightgear CVS directory - It can also be renamed FlightGear or anything else
21          src /
22          projects /
23             VC90 /
24                Win32 /           ( generated at build time
25                   Debug /        ( Debug executable
26                   Release /      ( Release executable
27                FlightGear.sln    ( Main solution
28          utils /
29       install /
30          msvc90 /
31             OpenSceneGraph /     ( OSG CMake install
32                bin /
33                include /
34                lib /
35       SimGear /                  ( SimGear CVS directory
36          simgear /
37          projects /
38             VC90 /
39
40 3rdParty, boost_1_39_0 and install/msvc90 are included in the Win32 3rdParty archive.
41
42 x64 build :
43  * any_directory_on_any_drive /
44       3rdParty.x64 /             ( includes plib, fltk, zlib, libpng, libjpeg, libtiff, freetype, ...
45          bin /
46          include /
47          lib /
48       boost_1_39_0 /
49          boost /
50       source /                   ( Flightgear CVS directory - It can also be renamed FlightGear or anything else
51          src /
52          projects /
53             VC90 /
54                x64 /             ( generated at build time
55                   Debug /        ( Debug executable
56                   Release /      ( Release executable
57                FlightGear.sln    ( Main solution
58          utils /
59       install /
60          msvc90-64 /
61             OpenSceneGraph /     ( OSG CMake install
62                bin /
63                include /
64                lib /
65       SimGear /                  ( SimGear CVS directory
66          simgear /
67          projects /
68             VC90 /
69
70 3rdParty.x64, boost_1_39_0 and install/msvc90-64 are included in the x64 3rdParty archive.
71
72 Typical setup should decompose into the following steps :
73
74   1. Install Visual Studio 2008 Express (http://msdn.microsoft.com/fr-fr/express/aa975050.aspx)
75   2. Install msysGit (http://code.google.com/p/msysgit/)
76   3. Create a new directory, say D:\FGFSDevel (or anything else)
77   4. Unzip precompiled Win32 3rd party archive in it
78   5. Open a Git Bash session and cd to the new directory ( cd /d/FGFSDevel )
79   6. Get SimGear sources from Gitorious : git clone git://gitorious.org/fg/simgear.git SimGear
80   7. Get FlightGear source from Gitorious : git clone git://gitorious.org/fg/flightgear.git FlightGear
81   8. Go to D:\FGFSDevel\FlightGear\projects\VC90 and double-click on FlightGear.sln
82   9. Select the "Release" configuration
83  10. Open file D:\FGFSDevel\SimGear\simgear\version.h.in and change @VERSION@ into "2.0.0" or any current version
84  11. Save file as version.h in the same directory
85  12. Start build (usually F7)
86  13. Wait...
87  14. Enjoy - programs are in D:\FGFSDevel\FlightGear\projects\VC90\Win32\Release
88  
89 It is also possible to compile a Debug version. This is only useful when hacking the code because 
90 a Debug version is way slower than the Release one.
91
92 When the manual build works, it is possible to start it from the command line. This is useful 
93 when setting up a build server or automating the process of retrieving the code and building 
94 it in a scheduled task. To do that :
95
96  1. open a command line window
97  2. execute "C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\vsvars32.bat"
98      or "C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\vsvars32.bat" in a 
99      64bit environment (Vista 64-bit or Windows7 64-bit)
100      You should see : "Setting environment for using Microsoft Visual Studio 2008 x86 tools."
101      printed in the console
102  3. cd to the FlightGear project directory :
103      D:
104      cd \FGFSDevel\FlightGear\projects\VC90  (for example)
105  4. start the build with the command line below :
106      msbuild FlightGear.sln /p:Configuration=Release /m
107     or 
108      msbuild FlightGear.sln /p:Configuration=Debug /m
109
110 That's all...