User:Rominet: Difference between revisions

Jump to navigation Jump to search
3,644 bytes added ,  10 April 2019
Add section explaining how to use d&c.sh to update FG and/or other components
(Add section explaining how to use d&c.sh to update FG and/or other components)
Line 30: Line 30:
to work as intended (the “version” is a Git blob id such as <tt>6a5e4f05e2ccf27115eec58313be027b11266097</tt><ref name="not-on-download-and-compile-sh-version-being-a-Git-blob-id">It's admittedly not very pretty, but is automatically updated by Git every time you update <tt>download_and_compile.sh</tt> the way we are going to present, which is very convenient and compensates for the ugliness.</ref>). Then we'll show you how to clone the large [https://sourceforge.net/p/flightgear/fgdata/ref/next/ FGData] repository, and finally give the last instructions to get FlightGear up and running.
to work as intended (the “version” is a Git blob id such as <tt>6a5e4f05e2ccf27115eec58313be027b11266097</tt><ref name="not-on-download-and-compile-sh-version-being-a-Git-blob-id">It's admittedly not very pretty, but is automatically updated by Git every time you update <tt>download_and_compile.sh</tt> the way we are going to present, which is very convenient and compensates for the ugliness.</ref>). Then we'll show you how to clone the large [https://sourceforge.net/p/flightgear/fgdata/ref/next/ FGData] repository, and finally give the last instructions to get FlightGear up and running.


==== Getting <tt>download_and_compile.sh</tt> the “right way” ====
==== <span id="en-getting-download-and-compile-sh-the-right-way"></span> Getting <tt>download_and_compile.sh</tt> the “right way” ====


Go to a directory (folder) of your choice. Let's assume it is <tt>~/flightgear</tt>, but really, you can choose whatever you want. Now clone the [https://sourceforge.net/p/flightgear/fgmeta/ci/next/tree/ FGMeta] repository:
Go to a directory (folder) of your choice. Let's assume it is <tt>~/flightgear</tt>, but really, you can choose whatever you want. Now clone the [https://sourceforge.net/p/flightgear/fgmeta/ci/next/tree/ FGMeta] repository:
Line 260: Line 260:
  ./run_fgfs.sh --launcher
  ./run_fgfs.sh --launcher
In case you find this tedious to type or have more arguments to pass on a regular basis, you can follow the advice given at the end of [https://sourceforge.net/p/flightgear/mailman/message/36634426/ this message] or use another launcher such as [[FFGo]] (but the [[FlightGear Qt launcher|FlightGear built-in launcher]] started with <code>run_fgfs.sh --launcher</code> is quite fine, be sure to try it first!).
In case you find this tedious to type or have more arguments to pass on a regular basis, you can follow the advice given at the end of [https://sourceforge.net/p/flightgear/mailman/message/36634426/ this message] or use another launcher such as [[FFGo]] (but the [[FlightGear Qt launcher|FlightGear built-in launcher]] started with <code>run_fgfs.sh --launcher</code> is quite fine, be sure to try it first!).
==== <span id="en-using-download-and-compile-sh-to-update-flightgear"></span> Using <tt>download_and_compile.sh</tt> to update FlightGear ====
Just go to the directory from which you you previously ran <tt>download_and_compile.sh</tt>. This is the folder we called ''$dir'' in the previous section which, if you did a complete run of <tt>download_and_compile.sh</tt>, contains the <tt>run_fgfs.sh</tt> executable and a log file of what <tt>download_and_compile.sh</tt> did in its last run, named <tt>compilation_log.txt</tt>. If you wish to update, say, [https://sourceforge.net/p/flightgear/simgear/ci/next/tree/ SimGear], [https://sourceforge.net/p/flightgear/flightgear/ci/next/tree/ FlightGear] and [https://sourceforge.net/p/flightgear/fgdata/ci/next/tree/ FGData], simply execute this:
$ download_and_compile.sh -pn SIMGEAR FGFS DATA
We'll explain the <code>-pn</code> in a minute. <tt>SIMGEAR</tt>, <tt>FGFS</tt> and <tt>DATA</tt> are called ''components'' in <tt>download_and_compile.sh</tt> terminology. A component generally corresponds to a software repository, or something close. In fact, since <tt>SIMGEAR</tt>, <tt>FGFS</tt> and <tt>DATA</tt> are often precisely the components people wish to update, they form the default components set, so that the previous command is equivalent to:
$ download_and_compile.sh -pn
Now about this <code>-pn</code>. It is equivalent as <code>-p n</code> and means “don't install packages from my (Linux) distribution” (<code>y</code> means ''yes, please install'', <code>n</code> means ''no, don't install''). In case you forgot that, simply run:
$ download_and_compile.sh --help
What does it imply to pass <code>-pn</code>? This tells <tt>download_and_compile.sh</tt> to completely skip the step where it checks for needed packages from your distribution and installs them, by default using <tt>apt-get</tt>. It thus goes straight to the following steps:
* update each repository corresponding to one of the selected components (<tt>SIMGEAR</tt>, <tt>FGFS</tt> and <tt>DATA</tt> in our example);
* compile each selected component that requires compilation;
* install each selected component in the appropriate place under ''$dir''.
In case you don't have all required dependencies for the selected components, one of them is likely to fail, of course, since by passing <code>-pn</code> to <tt>download_and_compile.sh</tt>, you forbade it to install these dependencies for you. So, you can also very well update without passing the <code>-pn</code> option, it will simply take a little longer (the time to check if all dependencies of the selected components are available with <tt>APT</tt>). In fact, this is '''what you should do if the previous <tt>download_and_compile.sh</tt> run failed:''' first update <tt>download_and_compile.sh</tt> (see [[#en-getting-download-and-compile-sh-the-right-way|above]]) then run it ''without'' <code>-pn</code><ref name="en-passing-no-pn-option-equals-passing-py">Which is the same as passing <code>-py</code>.</ref> in case new dependencies have been recently added and you don't have them on your system yet—this would be a very likely cause for the failure.
'''Summary'''
Routine update:
$ download_and_compile.sh -pn ''COMPONENT...''
In case this fails, first update <tt>download_and_compile.sh</tt> (see [[#en-getting-download-and-compile-sh-the-right-way|above]]), then run
$ download_and_compile.sh ''COMPONENT...''
where ''COMPONENT...'' stands for the space-separated list of selected components, and defaults to <tt>SIMGEAR FGFS DATA</tt> if you don't specify any.


== Français ==
== Français ==
377

edits

Navigation menu