Building FlightGear - Windows: Difference between revisions

Jump to navigation Jump to search
formatting for shorter TOC
(→‎External links: updated links)
(formatting for shorter TOC)
Line 59: Line 59:
== Getting '''Boost 1.39.0''' ==
== Getting '''Boost 1.39.0''' ==


===Step 1===
* '''Step 1''' - Download Boost packaged release Version 1.39.0 (about 188 MB) from
 
Download Boost packaged release Version 1.39.0 (about 188 MB) from
http://sourceforge.net/projects/boost/files/boost/1.39.0/boost_1_39_0.zip/download (direct link) or from the project releases page at http://www.boost.org/users/download/#releases
http://sourceforge.net/projects/boost/files/boost/1.39.0/boost_1_39_0.zip/download (direct link) or from the project releases page at http://www.boost.org/users/download/#releases


===Step 2===
* '''Step 2''' - Extract the contents of the boost archive in your '''\FlightGear''' directory. This will create a subdirectory named '''boost_1_39_0''' where the boost libraries and include files reside.
 
Extract the contents of the boost archive in your '''\FlightGear''' directory. This will create a subdirectory named '''boost_1_39_0''' where the boost libraries and include files reside.


== Getting "3rdParty" ALut, OpenAL and pthreads ==
== Getting "3rdParty" ALut, OpenAL and pthreads ==
Line 82: Line 78:
== Getting zlib ==
== Getting zlib ==


===Step 1===
* '''Step 1''' - Download the latest zlib binary package here http://sourceforge.net/projects/gnuwin32/files/zlib/1.2.3/zlib-1.2.3-lib.zip/download (direct link) or view the release page here http://sourceforge.net/projects/gnuwin32/files/zlib/1.2.3/
Download the latest zlib binary package here http://sourceforge.net/projects/gnuwin32/files/zlib/1.2.3/zlib-1.2.3-lib.zip/download (direct link) or view the release page here http://sourceforge.net/projects/gnuwin32/files/zlib/1.2.3/


===Step 2===
* '''Step 2''' - Extract the archive you downloaded in Step 1 in the "3rdParty" directory under your FlightGear project root directory.
Extract the archive you downloaded in Step 1 in the "3rdParty" directory under your FlightGear project root directory.


===Step 3===
* '''Step 3''' - As of zlib version 1.2.3, you must edit line 287 of the file "3rdParty\include\zconf.h" from "#if 1" to "#if 0" to avoid compiler errors when compiling SimGear against zlib.
As of zlib version 1.2.3, you must edit line 287 of the file "3rdParty\include\zconf.h" from "#if 1" to "#if 0" to avoid compiler errors when compiling SimGear against zlib.


== Getting jpeglib ==
== Getting jpeglib ==


===Step 1===
* '''Step 1''' - Download the latest jpeglib source package here http://www.ijg.org/
Download the latest jpeglib source package here http://www.ijg.org/


===Step 2===
* '''Step 2''' - This is a simple way to compile that should work with all versions of MSVC.
This is a simple way to compile that should work with all versions of MSVC.
Open a command prompt and navigate to the folder where you have extracted the sources.
Open a command prompt and navigate to the folder where you have extracted the sources.
Type the following commands:
Type the following commands:
Line 119: Line 110:
Going this route means that you must compile plib yourself by following the instructions below:
Going this route means that you must compile plib yourself by following the instructions below:


===Step 1===
* '''Step 1''' - Download the latest plib source tarball from http://sourceforge.net/projects/plib/ and extract it in some location that is NOT in your FlightGear project root directory.  This will create a subdirectory named '''plib-1.8.5-rc1'''
 
Download the latest plib source tarball from http://sourceforge.net/projects/plib/ and extract it in some location that is NOT in your FlightGear project root directory.  This will create a subdirectory named '''plib-1.8.5-rc1'''


===Step 2===
* '''Step 2''' - Double-click the file plib-1.8.5-rc1\plib.dsw. This should launch Visual C++ which will ask if you want to convert the project file; answer "Yes to all" at the convert prompt.


Double-click the file plib-1.8.5-rc1\plib.dsw. This should launch Visual C++ which will ask if you want to convert the project file; answer "Yes to all" at the convert prompt.
* '''Step 3''' - Build the debug version of the plib libraries first by setting the VC++ Solution Configuration for Debug and hitting the F7 key.
 
===Step 3===
 
Build the debug version of the plib libraries first by setting the VC++ Solution Configuration for Debug and hitting the F7 key.


Build the release version of the plib libraries next by setting the VC++ Solution Configuration for Release and hitting the F7 key.
Build the release version of the plib libraries next by setting the VC++ Solution Configuration for Release and hitting the F7 key.
Line 135: Line 120:
NOTE: as of this writing, 5 compile errors in 4 files will occur. In each case, a typecast of '''(char*)''' must be added in order to compile without error using VC++ 2008 (VC90).
NOTE: as of this writing, 5 compile errors in 4 files will occur. In each case, a typecast of '''(char*)''' must be added in order to compile without error using VC++ 2008 (VC90).


===Step 4===
* '''Step 4''' - Create the subdirectory '''plib''' in your FlightGear project root directory.
 
Create the subdirectory '''plib''' in your FlightGear project root directory.


Example:
Example:
   C:\FlightGear\plib
   C:\FlightGear\plib


===Step 5===
* '''Step 5''' - Copy all of the files in your plib-1.8.5-rc1 directory that have the extensions "h", "lib" and "pdb" to the new plib directory under your FlightGear project root directory.
 
Copy all of the files in your plib-1.8.5-rc1 directory that have the extensions "h", "lib" and "pdb" to the new plib directory under your FlightGear project root directory.


== Getting OpenSceneGraph (OSG)==
== Getting OpenSceneGraph (OSG)==


===Step 1===
* '''Step 1'''


To build SimGear and FlightGear from CVS head, you'll usually need the latest version of OSG. OSG from SVN head might be the best choice, but we don't have OSG for Windows build instructions prepared yet.
To build SimGear and FlightGear from CVS head, you'll usually need the latest version of OSG. OSG from SVN head might be the best choice, but we don't have OSG for Windows build instructions prepared yet.
Line 158: Line 139:
Get the archive(s) named "openscenegraph-all[...]". Get both the Release and Debug versions if you expect to do any debug builds of FlightGear. Otherwise, just the Release version should be fine.
Get the archive(s) named "openscenegraph-all[...]". Get both the Release and Debug versions if you expect to do any debug builds of FlightGear. Otherwise, just the Release version should be fine.


===Step 2===
* '''Step 2''' - Create a the following directure structure under your FlightGear project root directory: "install\msvc90\"
 
Create a the following directure structure under your FlightGear project root directory: "install\msvc90\"


Example:
Example:
Line 168: Line 147:
I have no idea why that directory structure was chosen, but that's what the MS VC++ project file(s) in FG CVS expect.
I have no idea why that directory structure was chosen, but that's what the MS VC++ project file(s) in FG CVS expect.


===Step 3===
* '''Step 3''' - Extract the OSG archive(s) you downloaded in Step 1 in the directory you created in Step 2.
 
* '''Step 4''' - Rename the resulting "OpenSceneGraph-[version]" directory to simply "OpenSceneGraph".
Extract the OSG archive(s) you downloaded in Step 1 in the directory you created in Step 2.
 
===Step 4===
 
Rename the resulting "OpenSceneGraph-[version]" directory to simply "OpenSceneGraph".


== Getting and compiling SimGear ==
== Getting and compiling SimGear ==


===Step 1===
* '''Step 1''' - Navigate to the base folder for your FlightGear stuff; In this example, we've chosen "C:\FlightGear"
Navigate to the base folder for your FlightGear stuff; In this example, we've chosen "C:\FlightGear"


In Windows Explorer, select the "C:\FlightGear" folder and right-click on it. From the resulting pop-up menu, choose "CVS Checkout". On the "Module" tab, enter the following in the CVSROOT field:
In Windows Explorer, select the "C:\FlightGear" folder and right-click on it. From the resulting pop-up menu, choose "CVS Checkout". On the "Module" tab, enter the following in the CVSROOT field:
Line 187: Line 160:
At the "Module" section near the bottom of the "Module" tab, click the "Fetch List" button. You will see some brief action and may see an error and a prompt for a password. Enter "guest" for the password (without the quote symbols). From the drop-down "Module" list, select "source" and click the "OK" button to begin the checkout.
At the "Module" section near the bottom of the "Module" tab, click the "Fetch List" button. You will see some brief action and may see an error and a prompt for a password. Enter "guest" for the password (without the quote symbols). From the drop-down "Module" list, select "source" and click the "OK" button to begin the checkout.


===Step 2===
* '''Step 2''' - Since all the source code will be downloaded into a directory called '''source''', you will need to rename that directory to '''simgear'''.
Since all the source code will be downloaded into a directory called '''source''', you will need to rename that directory to '''simgear'''.


Navigate to simgear\projects\VC90 and double-click on the file '''SimGear.vcproj'''.  This should launch Visual C++ with the SimGear project loaded.
Navigate to simgear\projects\VC90 and double-click on the file '''SimGear.vcproj'''.  This should launch Visual C++ with the SimGear project loaded.


===Step 3===
* '''Step 3''' - Build SimGear, either Release, Debug or both using VC++ 2008 (9.0)
 
Build SimGear, either Release, Debug or both using VC++ 2008 (9.0)


''Note:'' with the default settings, Visual C++ will yield many compiler warnings. Unfortunately, this is normal.
''Note:'' with the default settings, Visual C++ will yield many compiler warnings. Unfortunately, this is normal.


== Getting and compiling FlightGear ==
== Getting and compiling FlightGear ==
===Step 1===
 
* '''Step 1'''
Make a base folder for your FlightGear stuff; In this example, we've chosen "C:\FlightGear"
Make a base folder for your FlightGear stuff; In this example, we've chosen "C:\FlightGear"


Line 210: Line 181:
A directory with the name '''source''' will then be created with all of Flightgear's source code downloaded into it. Rename this directory from '''source''' to '''flightgear'''.
A directory with the name '''source''' will then be created with all of Flightgear's source code downloaded into it. Rename this directory from '''source''' to '''flightgear'''.


===Step 2===
* '''Step 2'''


Build either the Debug or Release version FlightGear as desired.
Build either the Debug or Release version FlightGear as desired.


===Step 3===
* '''Step 3'''


TODO: Installation.
TODO: Installation.
240

edits

Navigation menu