Scripted Compilation on Linux Debian/Ubuntu: Difference between revisions

Jump to navigation Jump to search
→‎Options: Fix mistakes, add complements. Document --cleanup, -s and --lts.
(Mention the simplified procedure for the initial setup (available since FGMeta commit 420034d5b51ff2))
(→‎Options: Fix mistakes, add complements. Document --cleanup, -s and --lts.)
Line 600: Line 600:


== Options ==
== Options ==
=== Release selection ===
* Build the latest stable release: <code>-s</code>
* Build the latest Long Term Support release: <code>--lts</code>
Long Term Support (<code>--lts</code>) is supposed to yield a more stable setup than what you would obtain with option <code>-s</code>, however it will generally be older. Both of these options are suitable for users.
If you pass neither <code>-s</code> nor <code>--lts</code> in a <tt>download_and_compile.sh</tt> invocation, you'll build the the 'next' suite, which contains the development version of FlightGear. The corresponding FlightGear code will be very recent but may well be unstable—this is particularly the case starting from July 2020. This is therefore mostly intended for developers.
=== Cleaning built and installed files ===
Option <code>--cleanup</code> causes <tt>download_and_compile.sh</tt> to remove everything that was built and installed in the directory it is run from. The Git repositories will not be removed, so this is good if you want to restart a compilation from a clean state.
If you use <code>--cleanup</code> without specifying any component, only this removal will be done (nothing will be compiled nor installed). Otherwise, the usual rules concerning components apply.


=== Multicore acceleration ===
=== Multicore acceleration ===


 
Passing option <code>-j x</code> to <tt>download_and_compile.sh</tt> (where ''x'' is the number of your CPU cores you wish to assign to the job) will considerably speed up the compilation steps. Passing <code>-j$(nproc)</code> is a convenient way to automatically use all available cores.
Passing option <code>-j x</code> to <tt>download_and_compile.sh</tt> (where ''x'' is the number of your CPU cores you wish to assign to the job) will considerably speed up the compilation steps.


=== Advanced options ===
=== Advanced options ===
Line 612: Line 626:
* Build a full debug version for very complete bug reporting: <code>-b Debug</code>
* Build a full debug version for very complete bug reporting: <code>-b Debug</code>
* Skip download of distro packages (i.e., by default: <tt>apt-get install ...</tt>): <code>-p n</code>
* Skip download of distro packages (i.e., by default: <tt>apt-get install ...</tt>): <code>-p n</code>
* Skip retrieving of software updates (i.e., by default: <tt>apt-get update</tt>): <code>-d n</code>
* Skip retrieving of component downloads and updates (which typically use Git or wget): <code>-d n</code>
* Skip the configure step (like running [https://cmake.org/ CMake] or [https://www.gnu.org/software/autoconf/ autoconf]'s <tt>./configure</tt>): <code>-r n</code>
* Skip the configure step (like running [https://cmake.org/ CMake] or [https://www.gnu.org/software/autoconf/ autoconf]'s <tt>./configure</tt>): <code>-r n</code>
* Skip compilation of programs: <code>-c n</code>
* Skip compilation of programs: <code>-c n</code>
Line 618: Line 632:


For example, if you are a developer and wish to quickly recompile and reinstall only your own modifications for FlightGear, you can do this:
For example, if you are a developer and wish to quickly recompile and reinstall only your own modifications for FlightGear, you can do this:
  $ download_and_compile.sh -p n -d n -r n FGFS
  $ download_and_compile.sh -j$(nproc) -p n -d n -r n FGFS


Note that this is the same as:
Note that this is the same as:
  $ download_and_compile.sh -pn -dn -rn FGFS
  $ download_and_compile.sh -j$(nproc) -pn -dn -rn FGFS


This command will only rebuild modified files and reinstall FlightGear. Note that depending on the kind of changes you made, reconfiguring and thus dropping the <code>-d n</code> option may be necessary, though (this is the case in particular if you added or removed C++ files).
This command will only rebuild modified files and reinstall FlightGear. Note that depending on the kind of changes you made, reconfiguring and thus dropping the <code>-rn</code> option may be necessary, though (this is the case in particular if you added or removed C++ files).


== Optimus technology ==
== Optimus technology ==
377

edits

Navigation menu