FlightGear Git on Windows: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
mNo edit summary
Line 12: Line 12:


== Pre-installation work (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.
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:
Create the following directories on your drive:
Line 32: Line 32:


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


[[File:msysgit_clone_fgdata.jpg|thumb|270px|The Git Bash window]]
[[File:msysgit_clone_fgdata.jpg|thumb|270px|The Git Bash window]]
Open Git Bash via <tt>C:/Program Files/msysgit/Git Bash</tt> (or open via the shortcut) and run (replacing the path with your preferred path):
Open Git Bash via <tt>C:\Program Files\msysgit\Git Bash</tt> (or open via the shortcut) and run (replacing the path with your preferred path):
  cd D:/FlightGear/data
  cd D:/FlightGear/data


Line 45: Line 45:
  cd flightgear/data
  cd flightgear/data


(replace the above paths with wherever your fg/data folder should be -make sure the file doesn't exist, though!)
(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.)
Then run the following, to initialise a Git repository. This should create a .git folder in data/. (It will probably be a hidden folder.)
Line 54: Line 54:
  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.
Line 70: Line 70:
The generated checksum should match the downloaded one. If not, redownload.
The generated checksum should match the downloaded one. If not, redownload.


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


Open Git Bash via <tt>C:\Program Files\msysgit\Git Bash</tt> (the shortcut) and run (replacing the path with your preferred path):  
Open Git Bash via <tt>C:\Program Files\msysgit\Git Bash</tt> (the shortcut) and run (replacing the path with your preferred path):  
Line 114: Line 114:


=== Running FlightGear ===
=== 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.
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 ==
== 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.  
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).
# 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!
# 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.
## 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 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.
## 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 committing stuff to the Git repository.


=== Getting started ===
=== Getting started ===
224

edits

Navigation menu