Hi fellow wiki editors!

To help newly registered users get more familiar with the wiki (and maybe older users too) there is now a {{Welcome to the wiki}} template. Have a look at it and feel free to add it to new users discussion pages (and perhaps your own).

I have tried to keep the template short, but meaningful. /Johan G

Difference between revisions of "FlightGear Git on Windows"

From FlightGear wiki
Jump to: navigation, search
(bin/win32 and bin/win64 do no longer exist)
m (Fixed wrong closing tag)
Line 55: Line 55:
 
  git clone git://gitorious.org/fg/fgdata.git
 
  git clone git://gitorious.org/fg/fgdata.git
  
Now msysGit will pull the entire fgdata package into your <tt>FlightGear\data<tt> directory. '''This can take up to a couple of hours on slow internet connections!'''
+
Now msysGit will pull the entire fgdata package into your <tt>FlightGear\data</tt> directory. '''This can take up to a couple of hours on slow internet connections!'''
  
 
'''IMPORTANT:''' Be sure you use msysGit 1.7.0.2 or newer version, as previous versions have problems with large repositories, and won't download more than 2Gb of data.
 
'''IMPORTANT:''' Be sure you use msysGit 1.7.0.2 or newer version, as previous versions have problems with large repositories, and won't download more than 2Gb of data.

Revision as of 04:02, 16 April 2014

This document guides you through the installation process of the development version of FlightGear (Git) on Windows.

Different needs

There are two kinds of people who would install Git - those who intend doing development, and those who just want to have the latest and greatest version. The big difference is the amount of data that needs to be downloaded. Another important factor is your Internet connection speed and the amount of bandwidth you have. This affects the way in which you do your downloading.

Developers need the entire history of Flightgear so that they can push changes, cutting-edge users just need the latest version of each file.

The various sub-headings will show whether they are intended for developers, users or all.


Pre-installation work (All)

We need to choose an installation directory which is different to the one where your release copy is installed. The folders you create must be empty. This can be any drive on your computer. In this document, we assume that you install FlightGear on the D: drive. Just replace the commands given in this document by your installation directory when using another drive or different directory root.

Create the following directories on your drive:

  • FlightGear
    • bin
    • data

In fact, it is identical to the folder structure of your working copy of FG.


A first Git install (Develop)

Obtaining data from Git

You can use any Git software, however we advise to use msysGit (which will be used in this document). You can download it through this link. Select the one with the Summary that says "Full installer for official Git for Windows." The file name will be similar to this: Git-x.x.x-previewyyyyddmm.exe. x.x.x s the version number. Choose the highest (newest) one. Follow the download/installation instructions that show up on your screen.

The amount of data to download is currently 5GB (and will grow over the years) so, if you have a slow internet connection or limited bandwidth per month or you cannot keep your computer on for the long time that it takes for the data to download from the git server, follow Method 2.

Method 1:

Before starting, confirm that the folder you're using DOES NOT contain an existing copy of FlightGear!

The Git Bash window

Open Git Bash via C:\Program Files\msysgit\Git Bash (or open via the shortcut) and run (replacing the path with your preferred path):

cd D:/FlightGear/data

In the event that the program refuses to change directory, try this instead:

cd "D:/FlightGear/data"

or, in some cases:

cd D:
cd Flightgear/data

(replace the above paths with whatever you have created.)

Then run the following, to initialise a Git repository. This should create a .git folder in data/. (It will probably be a hidden folder.)

git init

Add the following command and press Enter.

git clone git://gitorious.org/fg/fgdata.git

Now msysGit will pull the entire fgdata package into your FlightGear\data directory. This can take up to a couple of hours on slow internet connections!

IMPORTANT: Be sure you use msysGit 1.7.0.2 or newer version, as previous versions have problems with large repositories, and won't download more than 2Gb of data.

IMPORTANT II: Some files demand that CR/LF (carriage return / line feed) line breaks are kept in the way they are stored on Gitorious. Make sure to set "git-config core.safecrlf true" and "git-config core.autocrlf false" in your options or you may receive nasty error or even a crash on startup of FG (e.g. fgtzfile_read(): : Invalid argument... Fatal error: Timezone reading failed).

Method 2:

Download the fgdata.bundle from or http://flightgear.mxchange.org/pub/fgfs/. Use Right mouseclick > Save target as on the file, if you end up with a webpage full of weird characters.

You might want to use the fgdata.bundle.torrent, as this will give you pause and resume.

After downloading, download the MD5 checksum, fgdata.bundle.md5, from the same site.

Verify the checksum of your file using any free Md5 checking utility available on the internet like this one : http://www.bullzip.com/products/md5/info.php The generated checksum should match the downloaded one. If not, redownload.

Copy this file to your FlightGear\data directory.

Open Git Bash via C:\Program Files\msysgit\Git Bash (the shortcut) and run (replacing the path with your preferred path):

cd D:/FlightGear/data
git clone fgdata.bundle

Now msysGit will expand the entire fgdata.bundle package into FlightGear\data\fgdata. Wait for a few minutes until it is completed (the flashing cursor will reappear after it is done).

If your get this error:

warning: unrecognized header: -deg" - /orientation/roll += "-deg" - /position/altitude += "-ft" - /position/altitude-agl += "-ft" - /position/latitude += "-deg" - /position/longitude += "-deg" - /radios   
/adf/frequencies/selected += "-khz" - /radios/adf/frequencies/standby += "-khz" - /radios/adf/rotation += "-deg" - /radios/nav1/* => /radios/nav[0]/* - /radios/nav2/* => /radios/nav[1]/* - /radios/nav[*]
/dme/distance += "-nm" - /radios/nav[*]/frequencies/selected += "-mhz" - /radios/nav[*]/frequencies/standby += "-mhz" - /radios/nav[*]/radials/actual += "-deg" - /radios/nav[*]/radials/selected += "-deg" - 
/sim/view/goal-offset += "-deg" - /sim/view/offset += "-deg" - /steam/adf += "-deg" - /steam/airspeed += "-kt" - /steam/altitude += "-ft" - /steam/gyro-compass += "-deg" - /steam/gyro-compass-error += "-deg" - 
/steam/mag-compass += "-deg" - /steam/vertical-speed += "-fpm" - /velocities/airspeed += "-kt" - /velocities/side-slip += "-rad" - /velocities/speed-down += "-fps" - /velocities/speed-east += "-fps" - 
/velocities/speed-north += "-fp 
warning: remote HEAD refers to nonexistent ref, unable to checkout.

run this command:

cd fgdata

and press enter then

git checkout -b master origin/master

It should be fixed now. Go back to Flightgear/data.

Now pull from GIT to update to the latest files using

git pull git://gitorious.org/fg/fgdata.git master

A first Git install (User)

Obtaining data from Git

Open Git Bash via C:\Program Files\msysgit\Git Bash (or open via the shortcut) and run (replacing the path with your preferred path):

cd D:/FlightGear/data

In the event that the program refuses to change directory, try this instead:

cd "D:/FlightGear/data"

or, in some cases:

cd D:
cd Flightgear/data

(replace the above paths with whatever you have created.)

Then run the following, to initialise a Git repository. This should create a .git folder in data/. (It will probably be a hidden folder.)

git init

Add the following command and press Enter.

git pull --depth 1 git://gitorious.org/fg/fgdata master

This can be 3GB or more. Unfortunately, there is no way of doing pause and resume.

When it is finished, you will have the entire data structure of FG, including all the aircraft.

Getting the binary (All)

Now we've got all the data, we need to have a binaries, (.exe and .dll files) which contain the actual software that runs FlightGear.

  • 32-bit: Go to http://flightgear.simpits.org:8080/job/Win32-installer-Cmake/ and download the fgfs_win32_nightly_*.exe file. Run the installer and follow its instructions. Let it install the binary into your FlightGear/bin directory. (Otherwise install it anywhere handy and copy the entire contents into the bin folder.
  • 64-bit: Go to http://flightgear.simpits.org:8080/job/Win64-installer-Cmake/ and download the fgfs_win64_nightly_*.exe file. Run the installer and follow its instructions. Let it install the binary into your FlightGear/bin directory. (Otherwise install it anywhere handy and copy the entire contents into the bin folder.


  • If you want to automate this, the first time you download the binaries, make a note of the version number (to change it if needed in the examples below.) You can then run the installer in silent mode by passing the /S parameter. The /D parameter must be set to the folder into which the binaries must be installed.
    • e.g. fgfs_win32_vs2010_nightly_2.11.0.exe /S /D=C:\Flightgear\bin
    • e.g. fgfs_win64_vs2010_nightly_2.11.0.exe /S /D=C:\Flightgear\bin

Note that the version number changes each time a new version is released, so the 2.11.0 will have to be changed when this happens.


If your antivirus warns you of a trojan, ignore it. AVG and avast! are known for false positives.

Running FlightGear (All)

Run FlightGear\bin\fgrun.exe to launch the FlightGear Wizard, or run FlightGear\bin\fgfs.exe by commandline.

If using fgrun.exe You will have to use Prev to go back to the first page and change the entries for Executable and FG_ROOT to your new folders. Most of the time you can leave FG_SCENERY as it is. Until there is a major development in FG's scenery handling methods.

Keeping your FlightGear up to date (All)

Of course you want to keep FlightGear up to date, to keep current with the latest developments. Else you don't have a reason to use the development (or cutting-edge) version.

  1. Download the latest binary, as described in Getting the binary and overwrite the old one in FlightGear\bin (instead you could rename the current binary's directory to something like bin_latest, in case the newer binary doesn't work well).
  2. Update your FlightGear\data directory, to match it with the binary. For smooth operations, it is very important to have data and a binary from matching dates!
    1. Open Git Bash and navigate to FlightGear\data directory.
    2. (Developers) Run git reset --hard to revert any local changes. Note: this will delete all local changes! If you made local changes, make sure to backup those first, outside your FlightGear data directory! Or, better, learn to commit your changes to your local git repository.
    3. Run git pull git://gitorious.org/fg/fgdata and let it update, this can take a while, depending on how long ago you last did an update..

Commiting changes

As a developer, you probably want to share your work with the world. For FlightGear, most developers do this by committing stuff to the Git repository.

Related content