Scripted Compilation on Linux Debian/Ubuntu: Difference between revisions

Jump to navigation Jump to search
→‎Getting started with download_and_compile.sh: Update info and add section “For the impatient”
(→‎Options: Document --non-interactive)
(→‎Getting started with download_and_compile.sh: Update info and add section “For the impatient”)
Line 49: Line 49:
== <span id="getting-started-with-download-and-compile-sh"></span> Getting started with <tt>download_and_compile.sh</tt> ==
== <span id="getting-started-with-download-and-compile-sh"></span> Getting started with <tt>download_and_compile.sh</tt> ==


Because of technical problems at SourceForge (cloning [[FGData]] using the https protocol usually fails), the initial setup is unfortunately more complex than it used to be. You'll be guided step by step though, so don't be afraid. Besides, once you have a complete clone of the FGData repository, all future operations will be really easy.
=== For the impatient ===


We'll first explain how to get <tt>download_and_compile.sh</tt> in a way that makes it convenient to update and causes the command <code>download_and_compile.sh --version</code> to work as intended (the reported “version” is a Git blob id such as <tt>6a5e4f05e2ccf27115eec58313be027b11266097</tt><ref name="note-on-download-and-compile-sh-version-being-a-Git-blob-id">This looks like, but is ''not'' a Git commit identifier. This kind of “version number” is admittedly not very pretty, but it doesn't pollute Git commits  (the diffs) and is automatically updated by Git every time you update <tt>download_and_compile.sh</tt> the way we present here; thus, the advantages compensate for the ugliness.</ref>). Then we'll show how to clone the large FGData repository, and finally give instructions to get FlightGear up and running.
So, you're in a hurry, want to build FlightGear but don't want to read any explanation? You can try what follows, but be aware that you may need to come back and read part of the the following sections if you encounter a problem. All commands should be run under a normal user account; however, unless you pass option <code>-pn</code> or something similar to disable installation of packages from your distribution, you'll be asked for your <tt>sudo</tt> password during execution of the <tt>download_and_compile.sh</tt> command (<tt>sudo</tt> is used by <tt>download_and_compile.sh</tt> to run commands like <tt>apt-get</tt>). So, here is your quick recipe for getting <tt>download_and_compile.sh</tt> and using it to build FlightGear:
mkdir -p ~/flightgear/dnc-managed
cd ~/flightgear
<nowiki>git clone https://git.code.sf.net/p/flightgear/fgmeta</nowiki>
cd ~/flightgear/dnc-managed
~/flightgear/fgmeta/download_and_compile.sh -s -j$(nproc) SIMGEAR FGFS DATA
./run_fgfs.sh --launcher
 
The <code>-s</code> option passed to <tt>download_and_compile.sh</tt> instructs it to build the latest stable release of FlightGear. Use option <code>--lts</code> instead if you want the latest Long Term Support release (it may be older but possibly more stable). If you pass neither <code>-s</code> nor <code>--lts</code>, <tt>download_and_compile.sh</tt> will build the ''next'' suite, which contains the development version of FlightGear. For more details on these options, see [[#Release selection]].
 
The command <tt>run_fgfs.sh --launcher</tt> starts the [[FlightGear Qt launcher|FlightGear built-in launcher]]. This is often convenient but not compulsory. Another way to start FlightGear could be <code>./run_fgfs.sh --airport=PHTO --aircraft=c172p</code>. There are plenty of other options, which are listed by <code>./run_fgfs.sh --help --verbose</code>.
 
In some cases, <tt>download_and_compile.sh</tt> stops and waits for your answer before continuing. This is done when there is something important that you should know. When you are used to these prompts and would rather not see them anymore, you may pass the <code>--non-interactive</code> option to suppress them.
 
More detailed instructions are given below. The following sections also explain how to update <tt>download_and_compile.sh</tt> and FlightGear.


=== <span id="getting-started-with-download-and-compile-sh-notations"></span> Notations ===
=== <span id="getting-started-with-download-and-compile-sh-notations"></span> Notations ===
377

edits

Navigation menu