FlightGear Git on Windows: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
(34 intermediate revisions by 9 users not shown)
Line 1: Line 1:
{{FlightGearGitOn}}
{{FlightGearGitOn}}
This document guides you through the installation process of the development version of [[FlightGear]] ([[Git]]) on Windows.
 
This document is intended to guide you through the installation of the development version of [[FlightGear]] through [[Git]] on Windows.


== Different needs ==
== 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.
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 various sub-headings will show whether they are intended for developers, users or all.
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 can do your downloading.


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


The various headings will indicate whether they are intended for developers, users or both.


== A first Git install (All) ==
'''Note:''' Where this document refers to your "release copy of FlightGear," it means the copy of FlightGear that you downloaded from the FlightGear website.
=== Pre-installation work ===
 
Before we start, we will choose an installation directory (preferably different to the one where your release copy is installed.) 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.
== Pre-installation work (both) ==
We need to choose an installation directory which is different to the one where your release copy of FlightGear is installed. The folders you create must be empty.  This can be any drive on your computer. In this document, we assume that you are installing 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:
Create the following directories on your drive:
* <code>FlightGear</code>
** <code>bin</code>
** <code>data</code>


* <tt>FlightGear/</tt>
You will notice that this is identical to the folder structure of of your working copy of FG.
** <tt>bin/</tt>
*** <tt>win32/</tt>
** <tt>data/</tt>


== A first Git install (developer) ==
=== Obtaining data from Git ===
=== Obtaining data from Git ===
You can use any Git software; however, msysGit will be used in this document.  You can download from [http://gitforwindows.org/ here].  When the file has finished downloading, begin the installation by double-clicking on it and following the installation instructions that show up on your screen.


You can use any Git software, however we advise to use msysGit (which will be used in this document). You can download it through [http://code.google.com/p/msysgit/downloads/list 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 (as of msysGit version 1.9.5) is  17.1 GB, so if you have a slow Internet connection, 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.


If you have a slow internet connection 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 ====
[[File:Msysgit clone fgdata.jpg|thumb|270px|The Git BASH window]]
Before starting, confirm that the folder you're using '''does not''' contain an existing copy of FlightGear!


==== Method 1: ====
Open Git BASH via <code>C:/Program Files/msysgit/Git Bash</code> (or via the shortcut) and run (replacing the path with the correct path on your system):
Before starting, confirm that the address you're using DOES NOT contain an existing copy of FlightGear!
<syntaxhighlight lang="bash">
cd "D:/FlightGear/data"
</syntaxhighlight>


[[File:msysgit_clone_fgdata.jpg|thumb|270px|The Git Bash window]]
Then, run the following command, to initialize a Git repository. This should create a <code>.git</code> folder in the <code>FlightGear/data</code> folder (although it may be a folder):
Open Git Bash via <tt>C:/Program Files/msysgit/Git Bash</tt> (or open via the shortcut) and run (replacing the path with your prefered path):
<syntaxhighlight lang="bash">
cd D:/FlightGear/data
git init
</syntaxhighlight>


In the event that the program refuses to read the file, try this instead:
Next, run this command:
cd "D:/FlightGear/data"
{{#tag:syntaxhighlight|{{fgdata clone}}|lang="sh"}}


(replace the above addresses with wherever your fg/data folder should be -make sure the file doesn't exist, though!)
{{Note|This command can take up to a couple of hours on slow Internet connections.}}
 
Then run the following, to initialise a Git repository. This should create a .git directory in data/.
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 <code>FlightGear/data</code> directory.


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!'''
{{Note|Some files demand that CR/LF (carriage return/line feed) line breaks are preserved.  To avoid errors or problems later, it is recommended that you run these commands:
<syntaxhighlight lang="bash">
git config --global core.autocrlf true
git config --global core.safecrlf true
</syntaxhighlight>
}}


'''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.
==== Method 2 ====
{{out of date}}


'''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).
Download <code>fgdata.bundle</code> from http://flightgear.mxchange.org/pub/fgfs/.


==== Method 2: ====
You might want to use the <code>fgdata.bundle.torrent</code>, as this will give you pause and resume.
Download the <tt>fgdata.bundle</tt> from http://peter-server.homelinux.net/fgdata/fgdata/
or http://flightgear.mxchange.org/pub/fgfs/. Use <tt>Right mouseclick > Save target as</tt> on the file, if you end up with a webpage full of weird characters.


After downloading, download the MD5 checksum, fgdata.bundle.md5, from the same site.
After downloading, download the MD5 checksum, <code>fgdata.bundle.md5</code>, 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
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.
The generated checksum should match the downloaded one. If it doesn't, download it again.


Copy this file to your <tt>FlightGear/data</tt> directory.
Copy this file to your <code>FlightGear/data</code> directory.


Open Git Bash via <tt>C:/Program Files/msysgit/Git Bash</tt> (the shortcut) and run (replacing the path with your prefered path):  
Open Git Bash via <code>C:/Program Files/msysgit/Git Bash</code> (the shortcut) and run (replacing the path with your preferred path):
cd FlightGear/data
<syntaxhighlight lang="bash">
git clone fgdata.bundle
cd D:/FlightGear/data
git clone fgdata.bundle
</syntaxhighlight>


Now msysGit will pull the entire fgdata package into your <tt>FlightGear/data</tt> directory.
Now msysGit will expand the entire <code>fgdata.bundle</code> package into <code>FlightGear/data/fgdata</code>.
Wait for a few minutes until it is completed (the flashing cursor will reappear after it is done).
Wait for a few minutes until it is completed (the flashing cursor will reappear after it is done).


If your get this error:
{{Note|If you get an error like this:
<pre style="white-space:pre-wrap">
  warning: unrecognized header: -deg" - /orientation/roll += "-deg" - /position/altitude += "-ft" - /position/altitude-agl += "-ft" - /position/latitude += "-deg" - /position/longitude += "-deg" - /radios   
  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[*]
  /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[*]
Line 78: Line 90:
  /velocities/speed-north += "-fp  
  /velocities/speed-north += "-fp  
  warning: remote HEAD refers to nonexistent ref, unable to checkout.
  warning: remote HEAD refers to nonexistent ref, unable to checkout.
</pre>


run this command:
run this command:
cd fgdata
<syntaxhighlight lang="bash">
cd fgdata
</syntaxhighlight>


and press enter
Next, do this command:
then
<syntaxhighlight lang="bash">
git checkout -b master origin/master
git checkout -b next origin/next
</syntaxhighlight>


It should be fixed now.
It should be fixed now. Go back to <code>Flightgear/data</code>.
}}


Now pull from GIT to update to the latest files using  
Now, pull from Git to update to the latest files using:
{{#tag:syntaxhighlight|
git pull git://gitorious.org/fg/fgdata.git master
{{fgdata source|cmd=git pull|protocol=git|type=git|post=next|full=1}}
| lang = "sh"
}}


=== Getting the binary ===
== A first Git install (user) ==
Now we've got all the data, we need to have a binary, which contains the actual software that runs FlightGear.
=== Obtaining data from Git ===
* Go to http://flightgear.simpits.org:8080/job/Win32-installer-Cmake/ and download the <tt>fgfs_win32_nightly_*.exe</tt> file. Run the installer and follow its instructions. Let it install the binary into your <tt>FlightGear/bin/win32</tt> directory.
Before starting, confirm that the folder you're using '''does not''' contain an existing copy of FlightGear!
* If you want to automate this, you can run the installer in silent mode by passing the /S parameter, the /D parameter can be used to set the target directory into which he needs to install the binaries:
** e.g. ''fgfs_win32_vs2010_nightly_2.7.0.exe /S /D=C:\Flightgear\bin\win32''


Open Git BASH via <code>C:/Program Files/msysgit/Git Bash</code> (or via the shortcut) and run (replacing the path with the correct path on your system):
<syntaxhighlight lang="bash">
cd "D:/FlightGear/data"
</syntaxhighlight>


If your antivirus warns you of a trojan, ignore. AVG and avast! are known for false positives.
Then, run the following command, to initialize a Git repository. This should create a <code>.git</code> folder in the <code>FlightGear/data</code> folder (although it may be a folder):
<syntaxhighlight lang="bash">
git init
</syntaxhighlight>


=== Running FlightGear ===
Add the following command and press Enter.
Run <tt>FlightGear/bin/win32/fgrun.exe</tt> to launch the [[FlightGear Wizard]], or run <tt>FlightGear/bin/win32/fgfs.exe</tt> by commandline.
{{#tag:syntaxhighlight|
{{fgdata source|cmd=git pull|opt=--depth=1|protocol=git|type=git|post=next|full=1}}
| lang = "sh"
}}


== Keeping your FlightGear up to date ==
This can be 3 GB or more.  Unfortunately, there is no way of doing pause and resume.
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 version.  


# Download the latest binary, as described in [[#Getting the binary|Getting the binary]] and overwrite the old one in <tt>FlightGear/bin/win32</tt> (instead you could rename the current binary's directory to something like win32_latest, in case the newer binary doesn't work well).
When it is finished, you will have the entire data structure of FG, however you will only have ''just a few aircraft''. Others must be downloaded or obtained from [[FGAddon]].
# Update your <tt>FlightGear/data/</tt> directory, to match it with the binary. For smooth operations, it is very important to have data and a binary from matching dates!
## Open Git Bash and navigate to <tt>FlightGear/data/</tt> directory.
## Run ''git reset --hard'' to revert any local changes. <font color="red">'''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.'''</font>
## Run ''git pull'' and let it update, this can take a while.


== Commiting changes ==
== Getting the binary (all) ==
As a developer, you probably want to share your work with the world. For FlightGear, most developers do this by commiting stuff to the Git repository.
Now that we've got all the data, we need to have a binaries (<code>.exe</code> and <code>.dll</code> files) which contain the actual software that runs FlightGear.


=== Getting started ===
Go to http://download.flightgear.org/builds/nightly/ and download the one of the binaries (as you have downloaded the data using git, you do not need the <code>-full.exe</code>. Run the installer and follow its instructions. Let it install the binary into your <tt>FlightGear/bin</tt> directory (make sure the installer points to the directory above the bin directory created in pre-installation work - otherwise you get a bin directory below the bin directory). The installer will detect whether you have a 32-bit or 64-bit system.
# Register an account at [http://gitorious.org Gitorious].
# [http://gitorious.org/fg/fgdata/clone Clone fgdata].
# Open Git Bash in your data directory and run ''ssh-keygen''.
# Enter the name of the file in which you prefer to save the key and press Enter.
# Enter your password/passphrase and press Enter. You'll have to do this twice.
# Your key is now being generated. Open the .pub file with an editor (eg. Notepad++) and copy the content.
# Visit your dashboard at Gitorious and navigate to "Manage SSH keys".
# Click the "Add SSH key" button and paste the content of the .pub file. Follow the instructions on the screen.
# Open Git Bash in your data directory and run ''git remote add fgdata git://gitorious.org/fg/fgdata.git''. This adds a remote ref to the master fgdata repository in Gitorious. You can also add the mapserver URL by running ''git remote add fgdata-mapserver git://mapserver.flightgear.org/fgdata/'', which may be faster than Gitorious.
# Now run ''git remote set-url origin <url>'', where ''<url>'' is the line that you get by clicking SSH on your fgdata clone page at Gitorious (should be something like ''git@gitorious.org:~your/fg/yours-fgdata.git''). This switches the origin ref to the correct URL that Gitorious will take when updating.


It is recommended to split your new fgdata clone into separate local branches for your work. For instance, if you're working on the [[Boeing 747-400]] and the [[Howto: Aircraft Reflection Shader|aircraft reflection shader]], you might create 2 branches named "747-400" and "reflect-shader". To do this,
{{Note|If your antivirus warns you of a Trojan horse, ignore it.  AVG and avast! are known for false positives.}}
# ''git checkout master''
# ''git branch <branch name>''
# ''git checkout <branch name>''


Then you can make your changes to the new local branch(es), which will make merge requests easier for both yourself and committers. To switch in between branches, simply use
== Running FlightGear (all) ==
* ''git checkout <branch name>''
Run <code>FlightGear/bin/fgrun.exe</code> to launch the [[FlightGear Wizard]], or run <code>FlightGear/bin/fgfs.exe</code> by commandline.


=== Pulling ===
If using [[FGRun]], you will have to use the {{button|Prev}} button to go back to the first page and change the paths for the FlightGear executable program and [[FG_ROOT]] to your new folders. Most of the time you can leave [[FG_SCENERY]] as it is.
To pull updates from the master fgdata repository,
* <branch name> is the name of the branch you want to update.
* &lt;ref&gt; is the repository ref. If you followed the [[#Getting Started|getting started]] section, this will be "fgdata" or "fgdata-mapserver".
# ''git checkout <branch name>''
# ''git pull &lt;ref&gt;''
# Assuming you got no merging errors, run ''git push origin <branch name>'' to push the updates out to Gitorious.


=== Pushing ===
== Keeping your FlightGear up to date (all) ==
{{WIP}}
Of course you want to keep FlightGear up to date, to keep current with the latest developments. Otherwise, you don't have any reason to use the latest development version.  
To push local updates to your fgdata clone,
* <branch name> is the name of the local branch you want to push.
# ''git checkout <branch name>''
# Use ''git status --'' to list all the changed files.
## If you want to commit all changed files, run ''git commit -a'' and type your commit message.
## If you only want to commit some files, run ''git add <path/to/file>'' to add certain files (you can use ''git add --all <path/to/folder>'' to add all files within a certain folder) and ''git rm <path/to/file>'' to mark files you have removed for deletion in the repository.
# If you used ''git commit -a'', the commit has already been created for you. Otherwise, run ''git commit -m "<commit message>"'' (quotes required), where <commit message> is the message for your commit (i.e. "747-400: Improved lightmaps").
# ''git push origin <branch name>''


==== Rebase the development branch ====
# Download the latest binary, as described [[#Getting the binary (all)|above]], and overwrite the old one in <code>FlightGear/bin</code>.
Normally developments take some time, so the root of a development branch most likely will be outdated by the time the development is finished and a merge can be prepared. In order to make the merge easier for the contributor, it could be helpful to rebase the development branch to the current HEAD of the master.
# Update your <code>FlightGear/data</code> directory, to match it with the binary. For smooth operations, it is very important to have data and a binary from matching dates!
## Open Git Bash and navigate to <code>FlightGear/data</code> directory.
## '''(Developers only):''' Run this command:
<syntaxhighlight lang="bash">
git reset --hard
</syntaxhighlight>
This will revert any changes that you have made to FlightGear.
{{Caution|If you made local changes, make sure to backup those first, outside your FlightGear data directory! Otherwise, you will lose those changes.  Or, even better, you can learn to commit your changes to your local Fit repository.}}
## Run this command:
{{#tag:syntaxhighlight|
{{fgdata source|cmd=git pull|protocol=git|type=git|full=1}}
| lang = "sh"
}}
This may take a while, but not as long as the first time; it will only pull any changes made since the last time you made an update.


Let <branch name> be the name of the local branch you want to push, that branch contains your work.
== Commiting changes ==
Furthermore, <tt>fgdata</tt> refers to the repository at <tt>git://gitorious.org/fg/fgdata</tt>, i.e. the official repository, whereas <tt>origin</tt> refers to your personal Gitorious repository.(You can use <code>git remote -v</code> to learn about all the remotes and their names.)
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. You can find out more at [[FlightGear Git: data developers]] and/or [[FlightGear Git: core developers]].
 
# Switch to that branch: <code>git checkout <branch name></code>
# Rebase your branch to the current HEAD of fgdata/master: <code>git rebase fgdata/master</code>
# Push your rebased development branch to your personal Gitorious repo
## First try <code>git push origin</code>. If that produces some warnings about merges, you can
## force it by using <code>git push origin -f</code> .


For more details on what rebasing does, check out http://book.git-scm.com/4_rebasing.html.
== Related content ==
* [[FlightGear Git for laymen]]
* [[FlightGear Git: data developers]]
* [[FlightGear Git: core developers]]


==== Creating a merge request ====
[[Category:Git]]
# Check that the commit to your fgdata clone is recognized by Gitorious.
# Click the "Request merge" button on your fgdata clone page. Loading the next page can take a while, as it will list all commits of the past years!
# Once again write a short summary (could be the same as used with git commit), but this time, also write an explanation of your merge request (what does it do). Make sure you set target repository to fgdata, Target Branch to master and Source Branch to the local branch with your updates.
# Tick the box in front of your commit and click the "Create merge request" button.
# Now, all you have to do is contact a [http://gitorious.org/+flightgear-developers contributor] and wait untill he accepts your merge request ;)


Creating merge requests using this method literally means merging an entire branch into fgdata; this may not be desirable for some situations, such as small changes that only require one little commit. There's a neat method to only push certain commits to a merge request discussed by Anders Gidenstam [http://flightgear.org/forums/viewtopic.php?f=4&t=10392&start=45#p115747 on the FlightGear Forums].
[[pl:FlightGear Git na Windows]]
[[pl:FlightGear Git na Windows]]
[[Category:Windows specific]]

Revision as of 07:50, 3 February 2018

This document is intended to guide you through the installation of the development version of FlightGear through 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 can do your downloading.

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

The various headings will indicate whether they are intended for developers, users or both.

Note: Where this document refers to your "release copy of FlightGear," it means the copy of FlightGear that you downloaded from the FlightGear website.

Pre-installation work (both)

We need to choose an installation directory which is different to the one where your release copy of FlightGear is installed. The folders you create must be empty. This can be any drive on your computer. In this document, we assume that you are installing 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

You will notice that this is identical to the folder structure of of your working copy of FG.

A first Git install (developer)

Obtaining data from Git

You can use any Git software; however, msysGit will be used in this document. You can download from here. When the file has finished downloading, begin the installation by double-clicking on it and following the installation instructions that show up on your screen.

The amount of data to download (as of msysGit version 1.9.5) is 17.1 GB, so if you have a slow Internet connection, 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

The Git BASH window

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

Open Git BASH via C:/Program Files/msysgit/Git Bash (or via the shortcut) and run (replacing the path with the correct path on your system):

cd "D:/FlightGear/data"

Then, run the following command, to initialize a Git repository. This should create a .git folder in the FlightGear/data folder (although it may be a folder):

git init

Next, run this command:

git clone git://git.code.sf.net/p/flightgear/fgdata/
Note  This command can take up to a couple of hours on slow Internet connections.

Now msysGit will pull the entire fgdata package into your FlightGear/data directory.

Note  Some files demand that CR/LF (carriage return/line feed) line breaks are preserved. To avoid errors or problems later, it is recommended that you run these commands:
git config --global core.autocrlf true
git config --global core.safecrlf true

Method 2

This article or section contains out-of-date information

Please help improve this article by updating it. There may be additional information on the talk page.

Download fgdata.bundle from http://flightgear.mxchange.org/pub/fgfs/.

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 it doesn't, download it again.

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).

Note  If you get an error like this:
 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

Next, do this command:

git checkout -b next origin/next

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

Now, pull from Git to update to the latest files using:

git pull git://git.code.sf.net/p/flightgear/fgdata/ next

A first Git install (user)

Obtaining data from Git

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

Open Git BASH via C:/Program Files/msysgit/Git Bash (or via the shortcut) and run (replacing the path with the correct path on your system):

cd "D:/FlightGear/data"

Then, run the following command, to initialize a Git repository. This should create a .git folder in the FlightGear/data folder (although it may be a folder):

git init

Add the following command and press Enter.

git pull --depth=1 git://git.code.sf.net/p/flightgear/fgdata/ next

This can be 3 GB 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, however you will only have just a few aircraft. Others must be downloaded or obtained from FGAddon.

Getting the binary (all)

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

Go to http://download.flightgear.org/builds/nightly/ and download the one of the binaries (as you have downloaded the data using git, you do not need the -full.exe. Run the installer and follow its instructions. Let it install the binary into your FlightGear/bin directory (make sure the installer points to the directory above the bin directory created in pre-installation work - otherwise you get a bin directory below the bin directory). The installer will detect whether you have a 32-bit or 64-bit system.

Note  If your antivirus warns you of a Trojan horse, 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, you will have to use the Prev button to go back to the first page and change the paths for the FlightGear executable program and FG_ROOT to your new folders. Most of the time you can leave FG_SCENERY as it is.

Keeping your FlightGear up to date (all)

Of course you want to keep FlightGear up to date, to keep current with the latest developments. Otherwise, you don't have any reason to use the latest development version.

  1. Download the latest binary, as described above, and overwrite the old one in FlightGear/bin.
  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 only): Run this command:
git reset --hard

This will revert any changes that you have made to FlightGear.

Caution  If you made local changes, make sure to backup those first, outside your FlightGear data directory! Otherwise, you will lose those changes. Or, even better, you can learn to commit your changes to your local Fit repository.
    1. Run this command:
git pull git://git.code.sf.net/p/flightgear/fgdata/

This may take a while, but not as long as the first time; it will only pull any changes made since the last time you made 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. You can find out more at FlightGear Git: data developers and/or FlightGear Git: core developers.

Related content