FlightGear Git on Windows: Difference between revisions

Jump to navigation Jump to search
m
Reverted edits by Gijs (talk) to last revision by BotFlightGear
mNo edit summary
m (Reverted edits by Gijs (talk) to last revision by BotFlightGear)
Line 1: Line 1:
{{FlightGearGitOn}}
This document guides you through the installation process of the development version of [[FlightGear]] ([[Git]]) on Windows.
== A first Git install ==
=== Pre-installation work ===
Before we start, we will choose an installation directory. 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:
* <tt>FlightGear/</tt>
** <tt>bin/</tt>
*** <tt>win32/</tt>
** <tt>data/</tt>
=== 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 [http://code.google.com/p/msysgit/downloads/list this link]. Follow the download/installation instructions that show up on your screen.
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]]
Once msysGit is installed, browse to your <tt>FlightGear/data</tt> directory and right click. Choosing the "Git Bash" option pops up a command prompt. Add the following command and press Enter.
git clone git://mapserver.flightgear.org/fgdata/
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!'''
'''Plase note:''' Gitorious apparently can't handle the initial <tt>git clone</tt>. Please, clone from mapserver and pull (update) from Gitorious:
git pull git://gitorious.org/fg/fgdata.git
'''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 this file : fgdata.bundle from http://peter-server.homelinux.net/fgdata/fgdata/
or http://flightgear.mxchange.org/pub/fgfs/
After downloading, verify that the file is not corrupted using this MD5 checksum:
2996221BD2B8AB7740F332F49396CF56
You can 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
It should match to the one given above. If not, redownload.
Copy this file to your <tt>FlightGear/data</tt>.
Browse to the Flightgear directory, right click on the
<tt>/data</tt> directory . Choosing the "Git Bash" option pops up a command prompt. Add the following command and press Enter.
git clone fgdata.bundle
Now msysGit will pull the entire fgdata package into your <tt>FlightGear/data</tt> directory.
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.
Now pull from GIT to update to the latest files using
git pull git://gitorious.org/fg/fgdata.git master
=== Getting the binary ===
Now we've got all the data, we need to have a binary, which contains the actual software that runs FlightGear. The are two places where you can get such a binary (the later is updated more frequent):
* Go to ftp://ftp.ihg.uni-duisburg.de/FlightGear/Win32 and download the latest <tt>fgrun+fgfs-osg-win32-git.zip</tt> file that is available. Unpack the file in your <tt>FlightGear/bin/win32</tt> directory.
* Got to http://flightgear.simpits.org:8080/job/Win32-installer/ 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.
If your antivirus warns you of a trojan, ignore. AVG and avast! are known for false positives.
=== Running FlightGear ===
Run <tt>FlightGear/bin/win32/fgrun.exe</tt> to launch the [[FlightGear Wizard]], or run <tt>FlightGear/bin/win32/fgfs.exe</tt> by commandline.
== Keeping your FlightGear up to date ==
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).
# 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!
## Navigate to <tt>FlightGear/data/</tt> directory and open Git Bash.
## 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 ==
== Commiting changes ==
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.
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.
Line 22: Line 121:
# ''git checkout -b <branch name>''
# ''git checkout -b <branch name>''
# ''git checkout master''
# ''git checkout master''
# ''git reset --hard HEAD'' <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.''' Make a copy of our to-be-commited work somewhere out of your data/ directory before doing this, and move it back in after pulling.</font>
# ''git reset --hard HEAD''
## Run ''git pull'' and let it update, this can take a while.
 
# ''git pull'' to make sure you can commit against the latest Git.
# ''git pull'' to make sure you can commit against the latest Git.
# ''git push <url> +master'' You will have to enter your SSH passphrase. Press Enter when you're done (note: your passphrase is hidden!). Git will now commit your work, this can take a long time, depending on the number of commits that have been made since you cloned fgdata.
# ''git push <url> +master'' You will have to enter your SSH passphrase. Press Enter when you're done (note: your passphrase is hidden!). Git will now commit your work, this can take a long time, depending on the number of commits that have been made since you cloned fgdata.

Navigation menu