FlightGear Git on Windows: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
 
Line 34: Line 34:
Before starting, confirm that the folder 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!


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):
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">
<syntaxhighlight lang="bash">
cd "D:/FlightGear/data"
cd "D:\FlightGear\data"
</syntaxhighlight>
</syntaxhighlight>


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):
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">
<syntaxhighlight lang="bash">
git init
git init
Line 49: Line 49:
{{Note|This command can take up to a couple of hours on slow Internet connections.}}
{{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 <code>FlightGear/data</code> directory.
Now msysGit will pull the entire [[fgdata]] package into your <code>FlightGear\data</code> 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:
{{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:
Line 70: Line 70:
The generated checksum should match the downloaded one. If it doesn't, download it again.
The generated checksum should match the downloaded one. If it doesn't, download it again.


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


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


Now msysGit will expand the entire <code>fgdata.bundle</code> package into <code>FlightGear/data/fgdata</code>.
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).


Line 102: Line 102:
</syntaxhighlight>
</syntaxhighlight>


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


Line 115: Line 115:
Before starting, confirm that the folder 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!


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):
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">
<syntaxhighlight lang="bash">
cd "D:/FlightGear/data"
cd "D:\FlightGear\data"
</syntaxhighlight>
</syntaxhighlight>


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):
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">
<syntaxhighlight lang="bash">
git init
git init
Line 138: Line 138:
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.
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.


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


{{Note|If your antivirus warns you of a Trojan horse, ignore it.  AVG and avast! are known for false positives.}}
{{Note|If your antivirus warns you of a Trojan horse, ignore it.  AVG and avast! are known for false positives.}}


== Running FlightGear (all) ==
== Running FlightGear (all) ==
Run <code>FlightGear/bin/fgrun.exe</code> to launch the [[FlightGear Wizard]], or run <code>FlightGear/bin/fgfs.exe</code> by commandline.  
Run <code>FlightGear\bin\fgrun.exe</code> to launch the [[FlightGear Wizard]], or run <code>FlightGear\bin\fgfs.exe</code> by commandline.  


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.
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.
Line 150: Line 150:
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.  
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.  


# Download the latest binary, as described [[#Getting the binary (all)|above]], and overwrite the old one in <code>FlightGear/bin</code>.
# Download the latest binary, as described [[#Getting the binary (all)|above]], and overwrite the old one in <code>FlightGear\bin</code>.
# 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!
# 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.
## Open Git Bash and navigate to <code>FlightGear\data</code> directory.
## '''(Developers only):''' Run this command:
## '''(Developers only):''' Run this command: <syntaxhighlight lang="bash">git reset --hard</syntaxhighlight> This will revert any changes that you have made to FlightGear.
<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.}}
{{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:
## Run this command: {{#tag:syntaxhighlight|
{{#tag:syntaxhighlight|
{{fgdata source|cmd=git pull|protocol=git|type=git|full=1}}
{{fgdata source|cmd=git pull|protocol=git|type=git|full=1}}
| lang = "sh"
| 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.
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 ==
== Commiting changes ==
1,089

edits

Navigation menu