Difference between revisions of "Building FlightGear - Windows"

From FlightGear wiki
Jump to: navigation, search
m (C++ compiler)
Line 32: Line 32:
 
# [[OpenSceneGraph]]
 
# [[OpenSceneGraph]]
 
# [[SimGear]] - Simulation support libraries. If you are building FlightGear from CVS, you need the CVS version of SimGear. If you have strange build errors, one of the first things to check is that you have an up-to-date version of SimGear built and installed.
 
# [[SimGear]] - Simulation support libraries. If you are building FlightGear from CVS, you need the CVS version of SimGear. If you have strange build errors, one of the first things to check is that you have an up-to-date version of SimGear built and installed.
 +
 +
Olaf Flebbe maintains a set of pre-built dependencies for FG (excluding SimGear). They are built for Visual Studio 2005, but may work with 2008: [http://www.oflebbe.de/FlightGear/index.html]
  
 
== Compiling ==
 
== Compiling ==
Line 88: Line 90:
  
 
== External links ==
 
== External links ==
* [http://www.oflebbe.de/oflebbe/FlightGear/index.html MSVC8 aka Visual 2005]
+
* [http://www.oflebbe.de/FlightGear/index.html MSVC8 aka Visual 2005]
  
 
{{Building}}
 
{{Building}}

Revision as of 02:31, 31 March 2009

1rightarrow.png See Building Flightgear for the main article about this subject.

NOTE: This page is a work in progress and is wrong. Use at your own peril. This notice will be removed when this page is ready.

This section describes how to build FlightGear on Windows using Visual C++ 2008 Express Edition (the "free" for personal use version). These procedures will be very similar if you have the full Visual Studio 2008 and mostly similar if you're using older versions of Visual C++.

Keep in mind that FlightGear is a large project with external dependencies and compiling it is not a task for novice users. If you just want to fly, we recommend you get the binary distribution and have fun. If you intend to get hip deep in the code, please proceed...

Requirements

Before you can compile FlightGear, you need to have the following installed on your computer:

C++ compiler

You may download the Express ("free" for personal use) version of Visual C++ 2008 from Microsoft. C++ Builder and Turbo C++ Explorer (by CodeGear, formerly by Borland) should work as well with some effort. We have not tried this.

Please note that when using MSVC++ Express, you'll probably want to download the full offline installation image file (iso) which -unlike the web installation- doesn't require any complicated and long-winded registration process. The direct link to the latest version (as of 11/2008) is [1] - after having downloaded the iso image, you'll either have to burn it or simply mount it in order to execute the installation.

You will also need the Platform SDK (Software Developer's Kit).

You can download the PSDK from http://www.microsoft.com/downloads/details.aspx?FamilyId=F26B1AA4-741A-433A-9BE5-FA919850BDBF&displaylang=en or http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm

Detailed installation instructions are available here (and [2]).

CVS

FlightGear uses CVS (Concurrent Versions System) for version control. You will need a CVS client to download the latest source code for both FlightGear and SimGear. Traditionally, these are command line tools, but TortoiseCVS provides a graphic interface for Windows users. Download the installer for the latest stable version of TortoiseCVS, run the installer, using all of its default settings (the installation destination folder is up to you). It will ask you to restart the computer when it's finished <grumble>. Do that.

Dependencies

FlightGear is dependent on quite a few number of libraries. You do not need to compile all of them yourself, but you will at least need to have their development version installed.

  1. Glut. Most distributions include glut packages, although you may have to hunt for them. Make sure you install both the glut and glut-devel packages, otherwise FlightGear may be able to compile but won't run correctly.
  2. Zlib. Most distributions install the basic zlib libraries by default, but not the development portions. If you don't have zlib.h, you probably need to install the zlib-devel package for your distribution.
  3. Plib - portability libraries and scene graph.
  4. OpenSceneGraph
  5. SimGear - Simulation support libraries. If you are building FlightGear from CVS, you need the CVS version of SimGear. If you have strange build errors, one of the first things to check is that you have an up-to-date version of SimGear built and installed.

Olaf Flebbe maintains a set of pre-built dependencies for FG (excluding SimGear). They are built for Visual Studio 2005, but may work with 2008: [3]

Compiling

Getting and compiling SimGear

Step 1

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 Update". On the "Module" tab, enter the following in the CVSROOT field:

:pserver:cvsguest@cvs.simgear.org:/var/cvs/SimGear-0.3

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

Since all the source code will be downloaded into a directory called source, you will need to rename that directory to simgear.

NOTE: add instructions for compilation here

Step 3

NOTE: add instructions for compilation here

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

Getting and compiling FlightGear

Step 1

Make a 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 Update". On the "Module" tab, enter the following in the CVSROOT field:

:pserver:cvsguest@cvs.flightgear.org:/var/cvs/FlightGear-0.9

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.

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

Next... make preparations for the compilation:

Step 3

Now you can compile and install Flightgear by:

Checking out the FlightGear data

The binary distribution package contains data for only a small subset of the existing aircraft and other objects. The instructions below tell you how to obtain the full set of data, in their latest, greatest form.

Make a 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:

:pserver:cvsguest@cvs.flightgear.org:/var/cvs/FlightGear-0.9

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 "data" and click the "OK" button to begin the checkout.

The result of the checkout is a directory called C:\FlightGear\data. To use this data directory with the FlightGear program, you can either (a) move it to C:\Program Files\FlightGear\ directory or (b) direct FlightGear to the actual location of this data directory from the command line or within the fgrun launcher application.

External links