Scripted Compilation on Linux Debian/Ubuntu: Difference between revisions

→‎Instructions: Fix contents and slightly improve markup
m (Rewording to avoid repetition)
(→‎Instructions: Fix contents and slightly improve markup)
Line 103: Line 103:
then execute it (no need to execute it as root).
then execute it (no need to execute it as root).


Here is for example a sequence of commands to get the script from the master branch.  You can replace master with next to get a later version of the script if one is available:
Here is for example a sequence of commands to get the script from the ''next'' branch:
<pre>
mkdir ~/fgfs
mkdir ~/fgfs
cd ~/fgfs
cd ~/fgfs
<nowiki>wget https://sourceforge.net/p/flightgear/fgmeta/ci/next/tree/download_and_compile.sh?format=raw</nowiki>
wget https://sourceforge.net/p/flightgear/fgmeta/ci/next/tree/download_and_compile.sh?format=raw
chmod 755 download_and_compile.sh
chmod 755 download_and_compile.sh
</pre>


You have two options now: build the latest ''stable'' FlightGear release or build the ''current development'' version (bleeding edge).
After building stable or the latest, if you need to build a different version, try the instructions for [[Avoiding multiple downloads of FGData on Linux]] (warning: as of April 2019, they are outdated).


You have two options now: build the latest ''stable'' FlightGear release or build the ''current development'' version (bleeding edge).
After building stable or the latest, if you need to build a different version, try the instructions for [[Avoiding multiple downloads of FGData on Linux]]. 
=== Build the latest stable FlightGear release ===
=== Build the latest stable FlightGear release ===
When executing the script, use the "-s" option to build the latest stable release:
When executing the script, use the "-s" option to build the latest stable release:  
<pre>
./download_and_compile.sh -s
./download_and_compile.sh -s
</pre>


=== Build the current FlightGear development version ===
=== Build the current FlightGear development version ===
Line 125: Line 121:


'''Warning''': The development version of FlightGear changes on an almost daily basis. It provides the latest features, but is not always guaranteed to work reliably. If you're unfamiliar with software testing, you may prefer to use the latest stable release.
'''Warning''': The development version of FlightGear changes on an almost daily basis. It provides the latest features, but is not always guaranteed to work reliably. If you're unfamiliar with software testing, you may prefer to use the latest stable release.
./download_and_compile.sh


<pre>
Once the script has finished running, you will successfully get FlightGear installed in the ~/fgfs directory.
./download_and_compile.sh
</pre>


=== Launching FlightGear ===


Once the script is finished, you will successfully get FlightGear and FGRun installed in the ~/fgfs directory.
When using <tt>download_and_compile.sh</tt>, apart from those installed with the package manager, the FlightGear dependencies (which are typically libraries) are not installed system-wide but under the directory from which <tt>download_and_compile.sh</tt> is run. This makes it possible to easily use, for instance, different [[OpenSceneGraph]], [[SimGear]] and FlightGear versions on a single system—e.g., for testing purposes—but also to have separate build trees (optimized/debug). This is also why you either need to set LD_LIBRARY_PATH to run the built programs, or simply use the scripts created by <tt>download_and_compile.sh</tt> in the directory where it is run, such as <tt>run_fgfs.sh</tt> and <tt>run_fgfs_debug.sh</tt>: these scripts automatically set up the required environment variables according to your build settings before firing the desired program (e.g., <tt>fgfs</tt>) with the arguments you provided.  


=== Launching FlightGear ===
Therefore, the simplest way to run your newly-built FlightGear is to launch the <tt>run_fgfs.sh</tt> script that <tt>download_and_compile.sh</tt> created in the directory from which it was run, for example:
When using Brisa's script, the two FG dependencies/libs are usually not installed system-wide, but in a custom location (that makes it possible, to easily use different OSG/SG/FG versions on a single system, i.e. for testing purposes - but also to have separate build trees (optimized/debug) ) - which is why you either need to set LD_LIBRARY_PATH or simply use Brisa's script to run everything (something like run_fgfs.sh, which automatically sets up all environment variables according to your build settings).
cd ~/fgfs
./run_fgfs.sh --launcher


To run your new git installation of FlightGear you have to launch the ''run_fgfs.sh'' command under the same folder, for example:
{{Note|<code>./run_fgfs.sh --launcher</code> starts FlightGear with its built-in launcher. If you just do <code>./run_fgfs.sh</code>, FlightGear will be started without any launcher, at the default airport and with the default aircraft.}}
<pre>
cd ~/fgfs
sh run_fgfs.sh
</pre>


=== Launching FGRun ===
=== Launching FGRun ===
{{Note|As of 2019, FGRun is not maintained anymore. You may want to try the built-in launcher (see above) or [[FFGo]].}}
[[File:fgrun-page2.jpg|thumb|right]]
[[File:fgrun-page2.jpg|thumb|right]]
For many users it's more comfortable having FlightGear launched by the graphical utility FGRun which is installed as well in the same folder. You have to launch the ''run_fgrun.sh'' command, for example:
For many users it's more comfortable having FlightGear launched by the graphical utility FGRun which is installed as well in the same folder. You have to launch the ''run_fgrun.sh'' command, for example:
Line 153: Line 149:


=== Launching FGo! ===
=== Launching FGo! ===
{{Note|As of 2019, FGo! is not maintained anymore. You may want to try the built-in launcher (see above) or [[FFGo]].}}
[[File:Fgo01.jpg|thumb|left]]
[[File:Fgo01.jpg|thumb|left]]
This is a graphical utility written in [[python]], You have to launch the ''run_fgo.sh'' command, for example:
This is a graphical utility written in [[python]], You have to launch the ''run_fgo.sh'' command, for example:
377

edits