Scripted Compilation on Linux Debian/Ubuntu: Difference between revisions

Update start of page
(fix that wiki link again)
(Update start of page)
Line 1: Line 1:
The following script takes care of downloading and compiling FlightGear from the git repositories with just one command execution for both 32-bit and 64-bit Debian based systems (Debian, Ubuntu). Pre-existing installed version (if any) of FlightGear are not touched at all since the script builds and installs everything under the directory in which it is launched. You can choose between building all or only specific tools and applications. For RedHat-based systems (Fedora, CentOS) you may want to check out [[CentOS]].
<tt>download_and_compile.sh</tt> is a [https://www.gnu.org/software/bash/ Bash] script that takes care of downloading and compiling FlightGear from the Git repositories with just one command execution<ref name="just-one-command">Due to technical problems on the [https://sourceforge.net/ SourceForge] side, this is currently only true once you have an [[FGData]] clone. See [[User:Rominet|here]] for details.</ref> for both 32-bit and 64-bit [https://www.debian.org/ Debian]-based systems (Debian, [https://www.ubuntu.com/ Ubuntu], [https://devuan.org/ Devuan], [https://www.linuxmint.com/ Linux Mint], etc.). Pre-existing installed versions (if any) of FlightGear are not touched at all since the script downloads, builds and installs everything under the directory in which it is launched. You can choose between building all or only specific tools and applications. For RedHat-based systems such as Fedora and CentOS, you may want to check out [[CentOS]].


Necessary packages are installed via the apt-get system while libraries not included in the repositories are downloaded and compiled on the fly (i.e. [[Plib]], [[Simgear]] and [[OSG]]).
By default, <tt>download_and_compile.sh</tt> installs most dependencies with <tt>apt-get</tt> run under <tt>sudo</tt>.<ref name="note-on-changing-how-packages-are-installed">This can be changed with options <code>--package-manager</code> and <code>--sudo</code>, or completely turned off with option <code>-pn</code> (see the output of <code>download_and_compile.sh --help</code> for the list of available options).</ref> Other dependencies, either because they aren't available in the standard APT repositories, or because it was explicitly requested using the non-option arguments of <tt>download_and_compile.sh</tt>, are downloaded and compiled on the fly (this can be the case for [[Plib]], [[Simgear]] and [[OSG]], for instance—depending on the arguments passed to <tt>download_and_compile.sh</tt>).


For Hints on Using a RPM based distribution like CentOS, please see [[CentOS]]
For hints on using a RPM-based distribution like CentOS, please see [[CentOS]].


Please also see [[Superbuild]].
Please also see [[Superbuild]].
Line 9: Line 9:
=== Update Available ===
=== Update Available ===


The FlightGear development team has published version 2.34 of the script.
The latest version of <tt>download_and_compile.sh</tt> can be obtained [https://sourceforge.net/p/flightgear/fgmeta/ci/next/tree/download_and_compile.sh?format=raw here], however there are advantages getting it from an [https://sourceforge.net/p/flightgear/fgmeta/ci/next/tree/ FGMeta] clone as explained [[User:Rominet#Getting_download_and_compile.sh_the_.E2.80.9Cright_way.E2.80.9D|here]]. Contents should be moved from [[User:Rominet|there]] to this page; what follows hasn't been updated recently.


download the newest script with this command:
=== Cut to the Chase: for the impatient ===


wget -O download_and_compile.sh http://sourceforge.net/p/flightgear/fgmeta/ci/next/tree/download_and_compile.sh?format=raw
Beware: with the following, you are likely to encounter problems when cloning [[FGData]]: read just above.
 
=== Cut to the Chase: for the impatient ===


  cd  <your working directory for building FlightGear>
  cd  <your working directory for building FlightGear>
  wget -O download_and_compile.sh http://sourceforge.net/p/flightgear/fgmeta/ci/next/tree/download_and_compile.sh?format=raw
  wget -O download_and_compile.sh https://sourceforge.net/p/flightgear/fgmeta/ci/next/tree/download_and_compile.sh?format=raw
  chmod +x download_and_compile.sh
  chmod +x download_and_compile.sh
  mkdir -p stable
  mkdir -p stable
  mkdir -p next
  mkdir -p next
  cd stable
  cd stable
  ../download_and_compile.sh -s
  ../download_and_compile.sh -j$(nproc) -s
  cd ../next
  cd ../next
  ../download_and_compile.sh -p n
  ../download_and_compile.sh -j$(nproc) -p n
 
{{Note|With <code>-j$(nproc)</code> as above, the compilation will use all cores available on your processor, which can save several hours. If you want to use, say, 4 cores, replace <code>-j$(nproc)</code> with <code>-j4</code>.}}


=== Conversion of directory structure from earlier versions of download_and_compile.sh ===
=== Conversion of directory structure from earlier versions of download_and_compile.sh ===
Line 258: Line 258:
[[nl:Compileren met een Script op Linux Debian/Ubuntu]]
[[nl:Compileren met een Script op Linux Debian/Ubuntu]]
[[fr:Script de compilation sous Linux Debian/Ubuntu]]
[[fr:Script de compilation sous Linux Debian/Ubuntu]]
== References ==
<references/>
377

edits