23
edits
(→Getting and compiling SimGear: Use Gitorious for simgear (mapserver mirror down).) |
(→Compiling: We seem to have Geshi installed; using it for bash.) |
||
Line 86: | Line 86: | ||
== Compiling == | == Compiling == | ||
Assuming you are root, do: | Assuming you are root, do: | ||
<syntaxhighlight lang="bash"> | |||
# cd /usr/local/src | |||
</syntaxhighlight> | |||
'''Note:''' When tracking a fast changing software like FlightGear/Git it is highly advisable to install it in a separate directory. That way one can also easily build and reinstall without being root, which greatly reduces the risk of messing up one's system. | '''Note:''' When tracking a fast changing software like FlightGear/Git it is highly advisable to install it in a separate directory. That way one can also easily build and reinstall without being root, which greatly reduces the risk of messing up one's system. | ||
Line 97: | Line 100: | ||
Clone the SimGear git repository and set it up to track the 'next' branch. | Clone the SimGear git repository and set it up to track the 'next' branch. | ||
<syntaxhighlight lang="bash"> | |||
$ git clone git://gitorious.org/fg/simgear.git | |||
</syntaxhighlight> | |||
or if the git port is firewalled on you network, use the http transport | or if the git port is firewalled on you network, use the http transport | ||
<syntaxhighlight lang="bash"> | |||
$ git clone http://gitorious.org/fg/simgear.git | |||
</syntaxhighlight> | |||
By default after cloning you should have a local next branch that tracks the master next branch. It can be updated it with git pull. | By default after cloning you should have a local next branch that tracks the master next branch. It can be updated it with git pull. | ||
Line 110: | Line 117: | ||
Next, go into the directory and make preparations for the compilation: | Next, go into the directory and make preparations for the compilation: | ||
<syntaxhighlight lang="bash"> | |||
$ cd simgear | |||
$ cmake . | |||
</syntaxhighlight> | |||
'''Note''' that if you don't want to install simgear globally on the system but in a specific directory, you can do so by adding --prefix=/path/to/your/fgInstallation to the ./configure command | '''Note''' that if you don't want to install simgear globally on the system but in a specific directory, you can do so by adding --prefix=/path/to/your/fgInstallation to the ./configure command | ||
Line 118: | Line 128: | ||
Compile and install SimGear by doing: | Compile and install SimGear by doing: | ||
<syntaxhighlight lang="bash"> | |||
$ make; make install | |||
</syntaxhighlight> | |||
''Note:'' with gcc 4.2 or later,on some platforms, you can get compiling errors about alc.h like: | ''Note:'' with gcc 4.2 or later,on some platforms, you can get compiling errors about alc.h like: | ||
Line 131: | Line 143: | ||
Clone the FlightGear git repository and set it up to track the 'next' branch. | Clone the FlightGear git repository and set it up to track the 'next' branch. | ||
<syntaxhighlight lang="bash"> | |||
$ git clone git://gitorious.org/fg/flightgear.git | |||
</syntaxhighlight> | |||
By default after cloning you should have a local next branch that tracks the master next branch. It can be updated it with git pull. | By default after cloning you should have a local next branch that tracks the master next branch. It can be updated it with git pull. | ||
Line 138: | Line 153: | ||
Next, go into the folder and make preparations for the compilation: | Next, go into the folder and make preparations for the compilation: | ||
<syntaxhighlight lang="bash"> | |||
$ cd flightgear | |||
$ ./autogen.sh | |||
$ ./configure | |||
</syntaxhighlight> | |||
Note that if you don't want to install simgear globally on the system but in a specific directory, you can do so by adding --prefix=/path/to/your/fgInstallation to the ./configure command. | Note that if you don't want to install simgear globally on the system but in a specific directory, you can do so by adding --prefix=/path/to/your/fgInstallation to the ./configure command. | ||
If you didn't install OSG globally or in the same prefix as SimGear and FlightGear, you have to pass the OSG directory to the configure-command like this: | If you didn't install OSG globally or in the same prefix as SimGear and FlightGear, you have to pass the OSG directory to the configure-command like this: | ||
<syntaxhighlight lang="bash"> | |||
$ ./configure --prefix=/path/to/fgInstallation --with-osg=/path/to/osg/installation --enable-osgviewer | |||
</syntaxhighlight> | |||
In this case you have to tell your system where to find the OSG libraries before you can run flightgear: | In this case you have to tell your system where to find the OSG libraries before you can run flightgear: | ||
<syntaxhighlight lang="bash"> | |||
$ export LD_LIBRARY_PATH=/path/to/osgInstallation/lib:$LD_LIBRARY_PATH | |||
</syntaxhighlight> | |||
'''Step 3:''' | '''Step 3:''' | ||
Now you can compile and install Flightgear by: | Now you can compile and install Flightgear by: | ||
<syntaxhighlight lang="bash"> | |||
$ make; make install | |||
</syntaxhighlight> | |||
'''Step 4:''' | '''Step 4:''' | ||
Clone the data directory: | Clone the data directory: | ||
<syntaxhighlight lang="bash"> | |||
$ git clone git://gitorious.org/fg/fgdata.git | |||
</syntaxhighlight> | |||
The data directory is large (almost 2.5GB) so it will take considerable time to download. | The data directory is large (almost 2.5GB) so it will take considerable time to download. | ||
There mirror of fgdata that might be faster to download from: | There mirror of fgdata that might be faster to download from: | ||
<syntaxhighlight lang="bash"> | |||
$ git clone git://mapserver.flightgear.org/fgdata | |||
</syntaxhighlight> | |||
The mirror is synchronized with the master so either will do. | The mirror is synchronized with the master so either will do. | ||
And install it in (or as) /usr/local/share/FlightGear | And install it in (or as) /usr/local/share/FlightGear | ||
<syntaxhighlight lang="bash"> | |||
$ mv fgdata /usr/local/share/flightgear | |||
</syntaxhighlight> | |||
== External links == | == External links == |
edits