Scripted Compilation on Linux Debian/Ubuntu: Difference between revisions

Jump to navigation Jump to search
Mention the simplified procedure for the initial setup (available since FGMeta commit 420034d5b51ff2)
m (→‎Download: Better use of punctuation)
(Mention the simplified procedure for the initial setup (available since FGMeta commit 420034d5b51ff2))
Line 107: Line 107:


=== <span id="using-download-and-compile-sh-to-build-flightgear"></span> Building FlightGear ===
=== <span id="using-download-and-compile-sh-to-build-flightgear"></span> Building FlightGear ===
For the method described below, you'll need an account at [https://sourceforge.net/ SourceForge] (this is unfortunate, but methods that don't require such an account are either unreliable or insecure, as long as [[FGData]] can't be cloned using the <tt>https</tt> protocol). If you don't already have one, go to the [https://sourceforge.net/user/registration registration page] and create an account. In all this section, we'll assume that your account name at SourceForge is ''SFusername''.


In what follows, we won't give the full path to <tt>download_and_compile.sh</tt> when showing commands to be run, but you should prepend it to <tt>download_and_compile.sh</tt> whenever you see a <tt>download_and_compile.sh</tt> command. For instance, if you used the same path as in [[#getting-started-with-download-and-compile-sh-notations|Notations]] and see the command:
In what follows, we won't give the full path to <tt>download_and_compile.sh</tt> when showing commands to be run, but you should prepend it to <tt>download_and_compile.sh</tt> whenever you see a <tt>download_and_compile.sh</tt> command. For instance, if you used the same path as in [[#getting-started-with-download-and-compile-sh-notations|Notations]] and see the command:
Line 122: Line 120:


'''Don't run the commands from a non-dedicated directory,''' because it will be filled with files and directories created by <tt>download_and_compile.sh</tt> and the FlightGear, SimGear, etc. build systems. That would be a complete mess! In particular, ''don't'' run the commands from the directory containing your [[FGMeta]] clone.}}
'''Don't run the commands from a non-dedicated directory,''' because it will be filled with files and directories created by <tt>download_and_compile.sh</tt> and the FlightGear, SimGear, etc. build systems. That would be a complete mess! In particular, ''don't'' run the commands from the directory containing your [[FGMeta]] clone.}}
{{Note|This section will be reorganized. Reading the following is likely to be useful, but since {{fgmeta commit | 420034d5b51ff2d32fc0c3716b17a2d862841e0f}}, the initial setup has been greatly simplified. Having a [https://sourceforge.net/ SourceForge] account is not needed anymore for secure operation. Running
$ download_and_compile.sh
in the appropriate directory (initially empty) should be enough (don't forget that by convention here, <code>download_and_compile.sh</code> stands for <code>~/flightgear/fgmeta/download_and_compile.sh</code> or something like that). You'll probably want to pass the <code>-j</code> option with a value, as in <code>-j$(nproc)</code> (see below for explanations). If [[FGData]] hasn't been cloned yet, there will be a prompt. You may want to use, for instance:
$ download_and_compile.sh -j$(nproc) --non-interactive
if you want the default answer to be automatically used (you might still be prompted for your <tt>sudo</tt> password though, unless you disabled package installation with <code>-pn</code> or specified an alternative program with the <code>--sudo</code> option).}}
For the method described below (not necessary anymore as of May 2020, but still working), you'll need an account at [https://sourceforge.net/ SourceForge]. If you don't already have one, go to the [https://sourceforge.net/user/registration registration page] and create an account. In all this section, we'll assume that your account name at SourceForge is ''SFusername''.


{{Note|As explained in [[#getting-started-with-download-and-compile-sh-notations|Notations]], we assume that your Unix user name (login) is <tt>toto</tt>. Don't confuse the <tt>sudo</tt> password prompt (where you need to enter <tt>toto</tt>'s password) with the password prompt for your SourceForge account! The former appears as
{{Note|As explained in [[#getting-started-with-download-and-compile-sh-notations|Notations]], we assume that your Unix user name (login) is <tt>toto</tt>. Don't confuse the <tt>sudo</tt> password prompt (where you need to enter <tt>toto</tt>'s password) with the password prompt for your SourceForge account! The former appears as
Line 314: Line 320:
=== <span id="using-download-and-compile-sh-to-update-flightgear"></span> Updating FlightGear ===
=== <span id="using-download-and-compile-sh-to-update-flightgear"></span> Updating FlightGear ===


Just go to the directory from which you you previously ran <tt>download_and_compile.sh</tt> (<tt>~/flightgear/dnc-managed</tt> in our example). This is the folder which, if you did a complete run of <tt>download_and_compile.sh</tt> as shown in the previous section, contains the <tt>run_fgfs.sh</tt> script and a log file named <tt>compilation_log.txt</tt> that records what <tt>download_and_compile.sh</tt> did in its last run. If you wish to update, say, {{simgear source
Just go to the directory from which you previously ran <tt>download_and_compile.sh</tt> (<tt>~/flightgear/dnc-managed</tt> in our example). This is the folder which, if you did a complete run of <tt>download_and_compile.sh</tt> as shown in the previous section, contains the <tt>run_fgfs.sh</tt> script and a log file named <tt>compilation_log.txt</tt> that records what <tt>download_and_compile.sh</tt> did in its last run. If you wish to update, say, {{simgear source
| text = SimGear
| text = SimGear
}}, {{flightgear source
}}, {{flightgear source
377

edits

Navigation menu