<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.flightgear.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Rominet</id>
	<title>FlightGear wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.flightgear.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Rominet"/>
	<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/Special:Contributions/Rominet"/>
	<updated>2026-05-30T01:03:58Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.6</generator>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Scripted_Compilation_on_Linux_Debian/Ubuntu&amp;diff=144116</id>
		<title>Scripted Compilation on Linux Debian/Ubuntu</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Scripted_Compilation_on_Linux_Debian/Ubuntu&amp;diff=144116"/>
		<updated>2026-04-22T12:09:44Z</updated>

		<summary type="html">&lt;p&gt;Rominet: OpenRTI support has been removed from download_and_compile.sh (after SG &amp;amp; FG in next)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; is a Bash script that takes care of downloading and compiling FlightGear and related software from their source code repositories with just one command execution for both 32-bit and 64-bit [https://www.debian.org/ Debian]-based systems. Pre-existing versions (if any) of the software installed by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; are not touched at all since the script downloads, builds and installs everything under the directory in which it is launched. You can choose the particular components to download, build and install.&lt;br /&gt;
&lt;br /&gt;
Unless told not to do so, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; installs packages with &amp;lt;tt&amp;gt;apt-get&amp;lt;/tt&amp;gt;. For this reason, it is primarily useful on Debian-based distributions. However, if one disables package installation (using &amp;lt;code&amp;gt;-pn&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;--sudo=echo&amp;lt;/code&amp;gt;) and installs the corresponding dependencies oneself, it can be used on other Unix-like systems such as [https://fedoraproject.org/ Fedora Linux], [https://archlinux.org/ Arch Linux] or [https://www.openbsd.org/ OpenBSD].&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; is a [https://www.gnu.org/software/bash/ Bash] script written for [https://www.debian.org/ Debian]-derived distributions ([https://www.ubuntu.com/ Ubuntu], [https://devuan.org/ Devuan], [https://www.linuxmint.com/ Linux Mint], etc.). Its purpose is to automatically install dependencies using the package manager, then build and install FlightGear-related programs.&lt;br /&gt;
&lt;br /&gt;
By default, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; installs most dependencies with &amp;lt;tt&amp;gt;apt-get&amp;lt;/tt&amp;gt; run under &amp;lt;tt&amp;gt;sudo&amp;lt;/tt&amp;gt;.&amp;lt;ref name=&amp;quot;disabling-installation-of-dependencies-via-package-manager&amp;quot;&amp;gt;If you think you already have the dependencies, this installation can be disabled either by using option &amp;lt;code&amp;gt;-pn&amp;lt;/code&amp;gt; or by passing option &amp;lt;code&amp;gt;--sudo=echo&amp;lt;/code&amp;gt; (the latter results in printing the &amp;lt;tt&amp;gt;apt-get&amp;lt;/tt&amp;gt; command line without running it).&amp;lt;/ref&amp;gt; Other dependencies, either because they aren't available in the standard APT repositories, or because of non-option arguments passed to &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;, are downloaded and compiled on the fly (this can be the case for [[PLIB]], [[Simgear]] and [[OpenSceneGraph]], for instance—it all depends on the arguments passed to the script).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; works in the directory it is run from: apart from dependencies installed via the package manager, all programs built by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; are installed under the &amp;lt;tt&amp;gt;install&amp;lt;/tt&amp;gt; subdirectory of the directory from which the script was run. In other words, installation of programs by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; is clean, very easy to undo and doesn't interfere with other programs on the system.&lt;br /&gt;
&lt;br /&gt;
It is possible to manage several directory trees with &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;; as far as it is concerned, such directory trees are completely independent from each other. For instance, if you run &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; in &amp;lt;tt&amp;gt;dir1&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;dir2&amp;lt;/tt&amp;gt;, the programs installed under &amp;lt;tt&amp;gt;dir1&amp;lt;/tt&amp;gt; won't “see” those installed under &amp;lt;tt&amp;gt;dir2&amp;lt;/tt&amp;gt;, and vice versa.&lt;br /&gt;
&lt;br /&gt;
Apart from its main purpose, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; can be used to find hopefully up-to-date build-dependency information for FlightGear and related software. You would do so by inspecting {{fgmeta source&lt;br /&gt;
| path = download_and_compile.sh&lt;br /&gt;
| text = the script &lt;br /&gt;
}} at the point where it installs packages.&amp;lt;ref name=&amp;quot;note-inspecting-download-and-compile-sh-to-gather-build-dependency-information&amp;quot;&amp;gt;Look for strings such as &amp;lt;tt&amp;gt;zlib1g-dev&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;libglew-dev&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;qt5-default&amp;lt;/tt&amp;gt;.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
Before embarking on building your own FlightGear binaries, you need to install a few tools that &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; uses to retrieve and compile source code. These tools are found in the following packages on [https://www.debian.org/ Debian] systems (and presumably on most Debian derivatives too):&lt;br /&gt;
&lt;br /&gt;
* build-essential&lt;br /&gt;
* git&lt;br /&gt;
* cmake&lt;br /&gt;
&lt;br /&gt;
These packages can be installed by running a command such as:&lt;br /&gt;
 $ sudo apt-get install build-essential git cmake&lt;br /&gt;
Once this is done, the &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; script can be run. Unless told otherwise, it will install additional tools and libraries as it runs, depending on the chosen components (this will be explained in further sections).&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;disk-space-requirements-and-build-time&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; Disk space requirements and build time ==&lt;br /&gt;
&lt;br /&gt;
As of April 2019, building FlightGear requires about 12 [https://en.wikipedia.org/wiki/Gibibyte GiB] of disk space. Note that this includes downloaded source code for [[SimGear]] and FlightGear, generated build files and the large [[FGData]] repository (about 6 GiB for that one).&lt;br /&gt;
&lt;br /&gt;
With an Intel Core i7 860 CPU (2.80 GHz) purchased in 2009, compiling [[SimGear]] and FlightGear 2019.2 with option &amp;lt;code&amp;gt;-j8&amp;lt;/code&amp;gt; takes about 14 minutes. If you don't have a fast machine and build using only one core, it may require several hours.&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
&lt;br /&gt;
You can get &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; {{fgmeta source&lt;br /&gt;
| path = download_and_compile.sh&lt;br /&gt;
| text = from FGMeta &lt;br /&gt;
}}. It is contained in the [[FGMeta]] repository, which is maintained by the FlightGear developers. The script can be downloaded from the link given above, however, for easier updates and in order to have the command &amp;lt;code&amp;gt;download_and_compile.sh --version&amp;lt;/code&amp;gt; work as intended, it is recommended to get it as explained [[#getting-download-and-compile-sh-using-an-fgmeta-clone|below]].&lt;br /&gt;
&lt;br /&gt;
In case you build stable versions of FlightGear using either of the &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt; options of &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;, remember to update the script before trying to build a new version of FlightGear (see [[#updating-download-and-compile-sh-using-an-fgmeta-clone|Updating &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;]] below). Of course, you can update it more often in order to benefit from new features or bug fixes; this is especially useful if you are building ''next''—that is, the development branch of FlightGear.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;getting-started-with-download-and-compile-sh&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; Getting started with &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
=== For the impatient ===&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;-pn&amp;lt;/code&amp;gt; or something similar to disable installation of packages from your distribution, you'll be asked for your &amp;lt;tt&amp;gt;sudo&amp;lt;/tt&amp;gt; password during execution of the &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; command (&amp;lt;tt&amp;gt;sudo&amp;lt;/tt&amp;gt; is used by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; to run commands like &amp;lt;tt&amp;gt;apt-get&amp;lt;/tt&amp;gt;). So, here is your quick recipe for getting &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; and using it to build FlightGear:&lt;br /&gt;
 mkdir -p ~/flightgear/dnc-managed&lt;br /&gt;
 cd ~/flightgear&lt;br /&gt;
 {{fgmeta clone | protocol = https}}&lt;br /&gt;
 cd ~/flightgear/dnc-managed&lt;br /&gt;
 ~/flightgear/fgmeta/download_and_compile.sh -s -j$(nproc)&lt;br /&gt;
 ./run_fgfs.sh --launcher&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; option passed to &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; instructs it to build the latest stable release of FlightGear. Use option &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; instead if you want the latest Long Term Stable release (it may be older but possibly more stable), or &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt; for the previous LTS release. If you pass none of &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt;, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; will build the ''next'' suite, which contains the development version of FlightGear. For more details on these options, see [[#Release selection|Release selection]].&lt;br /&gt;
&lt;br /&gt;
The command &amp;lt;tt&amp;gt;run_fgfs.sh --launcher&amp;lt;/tt&amp;gt; starts the [[FlightGear Qt launcher|FlightGear built-in launcher]]. This is often convenient but not compulsory. Another way to start FlightGear could be &amp;lt;code&amp;gt;./run_fgfs.sh --airport=PHTO --aircraft=c172p&amp;lt;/code&amp;gt;. There are plenty of other options, which are listed by &amp;lt;code&amp;gt;./run_fgfs.sh --help --verbose&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
In some cases, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; 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, pass the &amp;lt;code&amp;gt;--non-interactive&amp;lt;/code&amp;gt; option to suppress them.&lt;br /&gt;
&lt;br /&gt;
More detailed instructions are given below. The following sections also explain how to update &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; and FlightGear.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;getting-started-with-download-and-compile-sh-notations&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; Notations ===&lt;br /&gt;
&lt;br /&gt;
When a command should be run as an unpriviledged user, it will be preceded by a dollar sign:&lt;br /&gt;
 $ whoami&lt;br /&gt;
 toto&lt;br /&gt;
In contrast, a hash sign (#) means that the command must be run with superuser privileges to achieve the desired effect:&lt;br /&gt;
 # whoami&lt;br /&gt;
 root&lt;br /&gt;
&lt;br /&gt;
In order to make instructions easy to understand, two directories (= folders) will be consistently used for the same purpose below:&lt;br /&gt;
* &amp;lt;tt&amp;gt;~/flightgear/fgmeta&amp;lt;/tt&amp;gt; will contain a clone of the [[FGMeta]] repository; therefore, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; will reside in that directory;&lt;br /&gt;
* &amp;lt;tt&amp;gt;~/flightgear/dnc-managed&amp;lt;/tt&amp;gt; will be the directory from which we run &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;. In other words, with this setup, a typical sequence of commands could be:&lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ ~/flightgear/fgmeta/download_and_compile.sh&lt;br /&gt;
or&lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ ~/flightgear/fgmeta/download_and_compile.sh CARES PLIB SIMGEAR FGFS DATA OSG&lt;br /&gt;
These are of course just examples. The aforementioned paths are not hardwired anywhere in the script; you are free to choose the directories you want for these purposes.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;getting-download-and-compile-sh-using-an-fgmeta-clone&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; Getting &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; the “right way” ===&lt;br /&gt;
&lt;br /&gt;
There are several ways to obtain {{fgmeta source&lt;br /&gt;
| path = download_and_compile.sh&lt;br /&gt;
| text = download_and_compile.sh&lt;br /&gt;
}}. The method described here makes it very easy to update the script and causes the command &amp;lt;code&amp;gt;download_and_compile.sh --version&amp;lt;/code&amp;gt; to work as intended.&lt;br /&gt;
&lt;br /&gt;
As explained in [[#getting-started-with-download-and-compile-sh-notations|Notations]], we want to clone the [[FGMeta]] repository in &amp;lt;tt&amp;gt;~/flightgear/fgmeta&amp;lt;/tt&amp;gt; and work with its ''next'' branch. Let's go:&lt;br /&gt;
 $ mkdir -p ~/flightgear&lt;br /&gt;
 $ cd ~/flightgear&lt;br /&gt;
 $ {{fgmeta clone | protocol = https}}&lt;br /&gt;
You now have a fresh FGMeta clone in &amp;lt;tt&amp;gt;~/flightgear/fgmeta&amp;lt;/tt&amp;gt; and your brand new &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; script is located in that directory. You can already try it to see the available options:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ~/flightgear/fgmeta/download_and_compile.sh --help&lt;br /&gt;
download_and_compile.sh [OPTION...] [--] [COMPONENT...]&lt;br /&gt;
Download and compile components belonging to the FlightGear ecosystem.&lt;br /&gt;
&lt;br /&gt;
Without any COMPONENT listed, or if ALL is specified, recompile all&lt;br /&gt;
components listed in the WHATTOBUILDALL variable. Each COMPONENT may&lt;br /&gt;
be one of the following words:&lt;br /&gt;
&lt;br /&gt;
  ALL, ATCPIE, CARES, CMAKE, DATA, FFGO, FGFS, FGRUN, FGX, OPENRADAR, OSG, PLIB, SIMGEAR, TERRAGEAR, TERRAGEARGUI, ZLIB.&lt;br /&gt;
&lt;br /&gt;
Available options:&lt;br /&gt;
  -h, --help    show this help message and exit&lt;br /&gt;
      --version print version and license information, then exit&lt;br /&gt;
&lt;br /&gt;
(...)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;updating-download-and-compile-sh-using-an-fgmeta-clone&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; Updating &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Now that you have &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; from the [[FGMeta]] repository, it is very easy to update (this assumes you didn't modify anything yourself inside &amp;lt;tt&amp;gt;~/flightgear/fgmeta&amp;lt;/tt&amp;gt;!):&lt;br /&gt;
 $ cd ~/flightgear/fgmeta &amp;amp;&amp;amp; git pull&lt;br /&gt;
&lt;br /&gt;
If you want to keep updates as easy as we just showed, it is best not to modify &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; yourself. &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; has plenty of options that usually make it unnecessary to modify the script. Just run &amp;lt;code&amp;gt;download_and_compile.sh --help&amp;lt;/code&amp;gt; and learn about the available options when you feel the need to change something. Unless you have special needs that can only be accomodated by modifying &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;, you are invited to skip to the next section.&lt;br /&gt;
&lt;br /&gt;
If you really, ''really'' want to modify &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; while keeping updates easy, a good technique is to add your changes to your FGMeta clone in the form of one or more Git ''commits'' (no need to push them anywhere, commits can remain in your clone). How to do that is beyond the scope of this document, though; read Git tutorials if you want to learn it (there are plenty on the Internet). Once you have committed your changes to your FGMeta clone, make sure the repository is clean (use &amp;lt;code&amp;gt;git status&amp;lt;/code&amp;gt;), then update it with:&lt;br /&gt;
 $ cd ~/flightgear/fgmeta &amp;amp;&amp;amp; git pull --rebase&lt;br /&gt;
This will apply your commits on top of the latest commit of the branch that is currently checked out, which so far contained the official version of &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;. In case your changes conflict with the update, Git will tell you and you'll have to resolve the conflict manually (look for “Git resolve conflict” on your favorite search engine)... or start again from a pristine [[FGMeta]] clone.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;using-download-and-compile-sh-to-build-flightgear&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; Building FlightGear ===&lt;br /&gt;
&lt;br /&gt;
In what follows, we won't give the full path to &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; when showing commands to be run, but you should prepend it to &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; whenever you see a &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; command. For instance, if you used the same path as in [[#getting-started-with-download-and-compile-sh-notations|Notations]] and see the command:&lt;br /&gt;
 $ download_and_compile.sh --help&lt;br /&gt;
what you should actually run is:&lt;br /&gt;
 $ ~/flightgear/fgmeta/download_and_compile.sh --help&lt;br /&gt;
&lt;br /&gt;
Apart from this harmless command, ''do not'' run other &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; commands from an arbitrary directory, in particular ''don't'' run them from &amp;lt;tt&amp;gt;~/flightgear/fgmeta&amp;lt;/tt&amp;gt;. This is because '''most other &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; commands write to the current directory''' (&amp;lt;code&amp;gt;download_and_compile.sh --help&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;download_and_compile.sh --version&amp;lt;/code&amp;gt; are safe to run from any directory, though).&lt;br /&gt;
&lt;br /&gt;
Of course, it is always possible to make commands shorter by setting up aliases (see tips at the end of [https://sourceforge.net/p/flightgear/mailman/message/36634426/ this message]), by adding the directory containing &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; to your &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt; or by creating a symbolink link pointing to &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; in a directory that is part of your &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt;. This is not necessary, though; do it only if you feel the need (when enabled, persistent shell history is often enough to obviate the need to extend the &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
{{Note|The following commands should be run from an empty directory&amp;lt;ref name=&amp;quot;dedicated-directory-won-t-stay-empty-forever&amp;quot;&amp;gt;Well, empty before the first time; later, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; is going to populate it with plenty of FlightGear files and subdirectories, of course.&amp;lt;/ref&amp;gt; in a partition that has enough free space (see [[#disk-space-requirements-and-build-time | Disk space requirements and build time]]). As explained in [[#getting-started-with-download-and-compile-sh-notations|Notations]], we are going to choose the directory &amp;lt;tt&amp;gt;~/flightgear/dnc-managed&amp;lt;/tt&amp;gt; for this purpose, in order to express that the whole directory tree is managed by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;. This is just an example; feel free to choose another directory if you want.&lt;br /&gt;
&lt;br /&gt;
'''Don't run the commands from a non-dedicated directory,''' because it will be filled with files and directories created by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; 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.}}&lt;br /&gt;
&lt;br /&gt;
{{Tip|For some commands, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; may use &amp;lt;tt&amp;gt;sudo&amp;lt;/tt&amp;gt;. In case you want to run some other program instead of &amp;lt;tt&amp;gt;sudo&amp;lt;/tt&amp;gt;, this can be done with the &amp;lt;code&amp;gt;--sudo&amp;lt;/code&amp;gt; option of &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;. For instance, in order to see the commands that would be run with sudo without actually running them, you can pass &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;--sudo=echo&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; to &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;. Like all other options, &amp;lt;code&amp;gt;--sudo&amp;lt;/code&amp;gt; must be given ''before'' all arguments that are component names (such as &amp;lt;tt&amp;gt;SIMGEAR&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;FGFS&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;DATA&amp;lt;/tt&amp;gt;, etc.).}}&lt;br /&gt;
&lt;br /&gt;
The package manager used by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; by default is &amp;lt;tt&amp;gt;apt-get&amp;lt;/tt&amp;gt; (it won't be used if you pass &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; the &amp;lt;code&amp;gt;-pn&amp;lt;/code&amp;gt; option). You can use another one if you wish, as long as it supports the following calls:&lt;br /&gt;
 ''pkg-mgr'' update&lt;br /&gt;
 ''pkg-mgr'' install ''pkg1 pkg2'' ...&lt;br /&gt;
This is the case for &amp;lt;tt&amp;gt;aptitude&amp;lt;/tt&amp;gt; as well as &amp;lt;tt&amp;gt;apt&amp;lt;/tt&amp;gt;. If you want &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; to use &amp;lt;tt&amp;gt;aptitude&amp;lt;/tt&amp;gt;, give it the option &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;--package-manager=aptitude&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; before any of the ''COMPONENT'' arguments.&lt;br /&gt;
&lt;br /&gt;
All options of &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; can be seen by running the following command:&lt;br /&gt;
 $ download_and_compile.sh --help&lt;br /&gt;
&lt;br /&gt;
Now the instructions. '''You have chosen a dedicated directory''' where all the stuff that is downloaded and built by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; will be stored. This is &amp;lt;tt&amp;gt;~/flightgear/dnc-managed&amp;lt;/tt&amp;gt; if you followed the suggestions given in [[#getting-started-with-download-and-compile-sh-notations|Notations]], and should be empty before you run &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; for the first time. However, it is quite correct to start &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; from the same directory for subsequent runs, even when non-empty (otherwise, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; would automatically reclone the repositories every time you run it; that would be a sheer waste of time and bandwidth). All that remains to do is to run:&lt;br /&gt;
 $ mkdir -p ~/flightgear/dnc-managed&lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ download_and_compile.sh -s -j$(nproc)&lt;br /&gt;
The &amp;lt;code&amp;gt;-j$(nproc)&amp;lt;/code&amp;gt; option is not necessary, but is likely to save you a lot of time; with it, all available CPU cores will be used when compiling—see [[#Multicore acceleration| Multicore acceleration]].&lt;br /&gt;
&lt;br /&gt;
{{Note|Because of the &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; option, the above &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; command would build the latest stable release of FlightGear. If you want to build the latest Long Term Stable release, use &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; instead. For the previous LTS release, use &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt;. If you want to build the development version of FlightGear, use none of &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt;, but be warned: it may very well be unstable and unsuitable for flying. For more details on these options, see [[#Release selection|Release selection]].}}&lt;br /&gt;
&lt;br /&gt;
When you don't pass any non-option argument to &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; as done here, it takes care of the base components needed to run FlightGear in good conditions: &amp;lt;tt&amp;gt;CARES&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;PLIB&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;SIMGEAR&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;FGFS&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;DATA&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;OSG&amp;lt;/tt&amp;gt; (these are the component names used by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;, i.e., the final arguments one can optionally give in a &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; command; in normal speech, they correspond to the {{github source&lt;br /&gt;
| proj = c-ares&lt;br /&gt;
| repo = c-ares&lt;br /&gt;
| text = c-ares&lt;br /&gt;
}}, {{sourceforge source&lt;br /&gt;
| proj = libplib&lt;br /&gt;
| repo = code&lt;br /&gt;
| text = PLIB&lt;br /&gt;
}}, {{simgear source&lt;br /&gt;
| text = SimGear&lt;br /&gt;
}}, {{flightgear source&lt;br /&gt;
| text = FlightGear&lt;br /&gt;
}} and {{fgdata source&lt;br /&gt;
| text = FGData&lt;br /&gt;
}} repositories, as well as a suitable repository for [[OpenSceneGraph]]). Therefore, the above command is presently exactly equivalent to:&lt;br /&gt;
 $ download_and_compile.sh -s -j$(nproc) CARES PLIB SIMGEAR FGFS DATA OSG&lt;br /&gt;
&lt;br /&gt;
In case you want to build another component such as, say, CMAKE, you can add it to the command, like this:&lt;br /&gt;
 $ download_and_compile.sh -s -j$(nproc) CARES PLIB SIMGEAR FGFS DATA OSG CMAKE&lt;br /&gt;
&lt;br /&gt;
When the command terminates, you should have a script called &amp;lt;tt&amp;gt;run_fgfs.sh&amp;lt;/tt&amp;gt; in the directory from which you ran &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; (i.e., &amp;lt;tt&amp;gt;~/flightgear/dnc-managed&amp;lt;/tt&amp;gt; in the suggested setup). This will be your script to run FlightGear. For instance, in order to start the [[FlightGear Qt launcher|built-in launcher]], you can run the following commands:&amp;lt;ref name=&amp;quot;no-need-to-change-to-dnc-managed-dir-before-starting-generated-scripts&amp;quot;&amp;gt;We give these commands because they are easy to read, but the &amp;lt;code&amp;gt;cd&amp;lt;/code&amp;gt; command is not needed if you use the correct path, as in &amp;lt;code&amp;gt;~/flightgear/dnc-managed/run_fgfs.sh --launcher&amp;lt;/code&amp;gt;.&amp;lt;/ref&amp;gt;&lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ ./run_fgfs.sh --launcher&lt;br /&gt;
(You may omit the &amp;lt;code&amp;gt;--launcher&amp;lt;/code&amp;gt; option; this would simply start FlightGear without any launcher, at the default airport and with the default aircraft.)&amp;lt;br /&amp;gt;&lt;br /&gt;
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 &amp;lt;code&amp;gt;run_fgfs.sh --launcher&amp;lt;/code&amp;gt; is quite fine, be sure to try it first!&lt;br /&gt;
&lt;br /&gt;
{{Note|If you ran &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; from &amp;lt;tt&amp;gt;~/flightgear/dnc-managed&amp;lt;/tt&amp;gt; as proposed above, the full path of the &amp;lt;tt&amp;gt;~/flightgear/dnc-managed/install/flightgear/fgdata&amp;lt;/tt&amp;gt; directory is your [[$FG_ROOT]]. This is a very important path for FlightGear; knowing this may be useful for troubleshooting or doing “advanced things.”}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;using-download-and-compile-sh-to-update-flightgear&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; Updating FlightGear ===&lt;br /&gt;
&lt;br /&gt;
{{Note|If you built FlightGear with either of &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt;, you need to pass the ''same option'' to the &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; command given below that will update your FlightGear installation. Otherwise, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; will automatically build the ''next'' suite (bleeding-edge development version), which is probably not what you wish. Moreover, if you do want to switch from one suite to another (for instance from ''stable'' to ''next'', or from ''Long Term Stable'' to ''stable''), using the &amp;lt;code&amp;gt;--cleanup&amp;lt;/code&amp;gt; option of &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; is heartily recommended.}}&lt;br /&gt;
&lt;br /&gt;
Keeping the above note in mind, go to the directory from which you previously ran &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; (&amp;lt;tt&amp;gt;~/flightgear/dnc-managed&amp;lt;/tt&amp;gt; in the [[#Notations|suggested setup]]). This is the folder which, if you did a complete run of &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; as shown in the previous section, contains the &amp;lt;tt&amp;gt;run_fgfs.sh&amp;lt;/tt&amp;gt; script and a log file named &amp;lt;tt&amp;gt;compilation_log.txt&amp;lt;/tt&amp;gt; that records what &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; did in its last run. If you wish to update, say, {{simgear source&lt;br /&gt;
| text = SimGear&lt;br /&gt;
}}, {{flightgear source&lt;br /&gt;
| text = FlightGear&lt;br /&gt;
}}, {{fgdata source&lt;br /&gt;
| text = FGData&lt;br /&gt;
}} and [[OpenSceneGraph|OSG]], simply execute this:&lt;br /&gt;
 $ download_and_compile.sh -I -pn -j$(nproc) SIMGEAR FGFS DATA OSG&lt;br /&gt;
The &amp;lt;code&amp;gt;-I&amp;lt;/code&amp;gt; option tells &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; to ignore inter-component dependencies. If you don't use it, other components may be processed too due to these dependencies. The purpose of the behaviour without &amp;lt;code&amp;gt;-I&amp;lt;/code&amp;gt; is to help people who aren't necessarily aware of new requirements as time goes (e.g., SIMGEAR and FGFS started to require CARES by the end of 2024; a FlightGear fork of OSG is also required for FGFS ''next'' in 2025). However, it may be frustrating to specify a list of components and see additional ones being automatically added, hence the option.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;-j$(nproc)&amp;lt;/code&amp;gt; option is not necessary, but is likely to save you a lot of time; with it, all available CPU cores will be used when compiling—see [[#Multicore acceleration| Multicore acceleration]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;SIMGEAR&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;FGFS&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;DATA&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;OSG&amp;lt;/tt&amp;gt; are called ''components'' in &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; terminology. A component generally corresponds to a software repository, or something close.&lt;br /&gt;
&lt;br /&gt;
Now about the &amp;lt;code&amp;gt;-pn&amp;lt;/code&amp;gt;. It is equivalent to &amp;lt;code&amp;gt;-p n&amp;lt;/code&amp;gt; and means “don't try to install or update packages from my (Linux) distribution” (&amp;lt;code&amp;gt;y&amp;lt;/code&amp;gt; means ''yes, please install or update'', &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; means ''no, please don't''). In case you forgot that, simply run:&lt;br /&gt;
 $ download_and_compile.sh --help&lt;br /&gt;
What does it imply to pass &amp;lt;code&amp;gt;-pn&amp;lt;/code&amp;gt;? This tells &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; to completely skip the step where it checks for needed packages from your distribution and installs/updates them, by default using &amp;lt;tt&amp;gt;apt-get&amp;lt;/tt&amp;gt;. It thus goes straight to the following steps:&lt;br /&gt;
* update each repository corresponding to one of the selected components (&amp;lt;tt&amp;gt;SIMGEAR&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;FGFS&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;DATA&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;OSG&amp;lt;/tt&amp;gt; in our example);&lt;br /&gt;
* compile each selected component that requires compilation;&lt;br /&gt;
* install each selected component in the appropriate place (under &amp;lt;tt&amp;gt;~/flightgear/dnc-managed&amp;lt;/tt&amp;gt; according to our [[#getting-started-with-download-and-compile-sh-notations|Notations]]).&lt;br /&gt;
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 &amp;lt;code&amp;gt;-pn&amp;lt;/code&amp;gt; to &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;, you forbid it to install these dependencies for you. So, you can also very well update without passing the &amp;lt;code&amp;gt;-pn&amp;lt;/code&amp;gt; option, it will simply take a little longer (the time to check if all dependencies of the selected components are available with &amp;lt;tt&amp;gt;APT&amp;lt;/tt&amp;gt;). In fact, this is '''what you should do if the previous &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; run failed:''' first update &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; (see [[#getting-download-and-compile-sh-using-an-fgmeta-clone|above]]) then run it ''without'' &amp;lt;code&amp;gt;-pn&amp;lt;/code&amp;gt;&amp;lt;ref name=&amp;quot;passing-no-pn-option-equals-passing-py&amp;quot;&amp;gt;Which is the same as passing &amp;lt;code&amp;gt;-py&amp;lt;/code&amp;gt;.&amp;lt;/ref&amp;gt; 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. In this case, running &amp;lt;code&amp;gt;download_and_compile.sh --cleanup&amp;lt;/code&amp;gt; to restart the build from a clean state is probably a good idea (see [[#Cleaning built and installed files|Cleaning built and installed files]] for details on this option).&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
&lt;br /&gt;
Routine update:&lt;br /&gt;
 $ download_and_compile.sh -pn -j$(nproc) ''COMPONENT...''&lt;br /&gt;
(add &amp;lt;code&amp;gt;-I&amp;lt;/code&amp;gt; if you don't want inter-component dependencies to pull additional components). In case this fails, first update &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; (see [[#getting-download-and-compile-sh-using-an-fgmeta-clone|above]]), then run&lt;br /&gt;
 $ download_and_compile.sh --cleanup&lt;br /&gt;
 $ download_and_compile.sh -j$(nproc) ''COMPONENT...''&lt;br /&gt;
where ''COMPONENT...'' stands for the space-separated list of components you want &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; to process.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;examining-download-and-compile-sh-history&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; Examining the history of &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Looking at the latest commits that affected &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; is quite easy with your FGMeta clone:&lt;br /&gt;
 $ cd ~/flightgear/fgmeta&lt;br /&gt;
 $ git log -- download_and_compile.sh&lt;br /&gt;
(then quit by typing &amp;lt;tt&amp;gt;q&amp;lt;/tt&amp;gt;, assuming your &amp;lt;tt&amp;gt;$GIT_PAGER&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;less&amp;lt;/tt&amp;gt;)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to do the same, but also see the patch for each commit:&lt;br /&gt;
 $ cd ~/flightgear/fgmeta&lt;br /&gt;
 $ git log -p -- download_and_compile.sh&lt;br /&gt;
&lt;br /&gt;
=== For the curious: the SSH way ===&lt;br /&gt;
&lt;br /&gt;
{{Note|The method described below is not necessary anymore since {{fgmeta commit | 420034d5b51ff2d32fc0c3716b17a2d862841e0f}} (May 2020). Also, it was written at a time where the canonical location for [[FGData]] was at SourceForge; however, in 2025, the canonical location for FGData is {{fgdata source&lt;br /&gt;
| text = here&lt;br /&gt;
}}.}}&lt;br /&gt;
&lt;br /&gt;
The purpose of this section is to teach you how to clone [[FGData]] using SSH, then change the Git remote setup in your clone of that repository to retrieve further updates using https—which is convenient, as it does not require you to provide a password. This technique used to be necessary to securely retrieve FGData because of a problem in the [https://sourceforge.net/ SourceForge] infrastructure (namely, &amp;lt;code&amp;gt;git clone&amp;lt;/code&amp;gt; from SourceForge doesn't work for the big FGData repository using https). This is not needed anymore in 2025.&lt;br /&gt;
&lt;br /&gt;
Because the following method will make you connect to [https://sourceforge.net/ SourceForge] using the SSH protocol, you'll need an account on that site. 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''.&lt;br /&gt;
&lt;br /&gt;
{{Note|As explained in [[#getting-started-with-download-and-compile-sh-notations|Notations]], we assume that your Unix user name (login) is &amp;lt;tt&amp;gt;toto&amp;lt;/tt&amp;gt;. Don't confuse the &amp;lt;tt&amp;gt;sudo&amp;lt;/tt&amp;gt; password prompt (where you need to enter &amp;lt;tt&amp;gt;toto&amp;lt;/tt&amp;gt;'s password) with the password prompt for your SourceForge account! The former appears as&lt;br /&gt;
 [sudo] password for toto:&lt;br /&gt;
whereas the latter is just:&lt;br /&gt;
 Password:&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Tip|For some commands, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; may use &amp;lt;tt&amp;gt;sudo&amp;lt;/tt&amp;gt;. In case you want to run some other program instead of &amp;lt;tt&amp;gt;sudo&amp;lt;/tt&amp;gt;, this can be done with the &amp;lt;code&amp;gt;--sudo&amp;lt;/code&amp;gt; option of &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;. For instance, in order to see the commands that would be run with sudo without actually running them, you can pass &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;--sudo=echo&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; to &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;. Like all other options, &amp;lt;code&amp;gt;--sudo&amp;lt;/code&amp;gt; must be given ''before'' all arguments that are component names (such as &amp;lt;tt&amp;gt;SIMGEAR&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;FGFS&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;DATA&amp;lt;/tt&amp;gt;, etc.).}}&lt;br /&gt;
&lt;br /&gt;
{{Note|The commands given below will build the ''next'' suite, which contains the bleeding-edge development version of FlightGear. This is likely to be unstable, possibly unsuitable for flying. If you'd rather build the latest stable release or the latest Long Term Stable release, add option &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; to all &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; commands given below (or &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt; for the previous LTS release). You may add the chosen option right after the &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; command name (in any case, the option should come before non-option arguments such as SIMGEAR, FGFS, DATA, etc.). See [[#Release selection|Release selection]] for more explanations on options &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
Now the instructions. You have chosen a dedicated directory where all the stuff that is downloaded and built by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; will be stored. This is &amp;lt;tt&amp;gt;~/flightgear/dnc-managed&amp;lt;/tt&amp;gt; in our example, and should be empty before you run &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; for the first time. However, it is quite correct to start &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; from the same directory for subsequent runs, even when non-empty (otherwise, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; would automatically reclone the repositories every time you run it; that would be a sheer waste of time and bandwidth).&lt;br /&gt;
&lt;br /&gt;
Ready? Let's go!&lt;br /&gt;
&amp;lt;pre&amp;gt;$ mkdir -p ~/flightgear/dnc-managed&lt;br /&gt;
$ cd ~/flightgear/dnc-managed&lt;br /&gt;
$ download_and_compile.sh --git-clone-site-params SourceForge=ssh:SFusername DATA&lt;br /&gt;
**********************************************************************&lt;br /&gt;
*                                                                    *&lt;br /&gt;
* Warning: a typical SimGear + FlightGear + FGData build requires    *&lt;br /&gt;
* about 12 GiB of disk space. The compilation part may last from a   *&lt;br /&gt;
* few minutes to hours, depending on your computer.                  *&lt;br /&gt;
*                                                                    *&lt;br /&gt;
* Hint: use the -j option if your CPU has several cores, as in:      *&lt;br /&gt;
*                                                                    *&lt;br /&gt;
*         download_and_compile.sh -j$(nproc)                         *&lt;br /&gt;
*                                                                    *&lt;br /&gt;
**********************************************************************&lt;br /&gt;
Running 'apt-get update'...&lt;br /&gt;
[sudo] password for toto:&lt;br /&gt;
&lt;br /&gt;
(...)&lt;br /&gt;
&lt;br /&gt;
Considering a package alternative: libcurl4-openssl-dev libcurl4-gnutls-dev&lt;br /&gt;
Package alternative matched for libcurl4-openssl-dev&lt;br /&gt;
Running 'apt-get install build-essential git libcurl4-openssl-dev cmake'...&lt;br /&gt;
[sudo] password for toto:&lt;br /&gt;
&lt;br /&gt;
(...)&lt;br /&gt;
&lt;br /&gt;
****************************************&lt;br /&gt;
**************** DATA ******************&lt;br /&gt;
****************************************&lt;br /&gt;
Fetching DATA with 'git clone ssh://SFusername@git.code.sf.net/p/flightgear/fgdata'&lt;br /&gt;
Cloning into '.'...&lt;br /&gt;
The authenticity of host 'git.code.sf.net (216.105.38.16)' can't be established.&lt;br /&gt;
ECDSA key fingerprint is SHA256:FeVkoYYBjuQzb5QVAgm3BkmeN5TTgL2qfmqz9tCPRL4.&lt;br /&gt;
Are you sure you want to continue connecting (yes/no)?&lt;br /&gt;
Warning: Permanently added 'git.code.sf.net,216.105.38.16' (ECDSA) to the list of known hosts.&lt;br /&gt;
Connection closed by 216.105.38.16 port 22&lt;br /&gt;
fatal: Could not read from remote repository.&lt;br /&gt;
&lt;br /&gt;
Please make sure you have the correct access rights&lt;br /&gt;
and the repository exists.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above messages are perfectly normal but deserve a little explanation. Here, &amp;lt;tt&amp;gt;ssh&amp;lt;/tt&amp;gt; asked us to confirm that the fingerprint sent by the remote host is that of the real &amp;lt;tt&amp;gt;git.code.sf.net&amp;lt;/tt&amp;gt;, as opposed to that of some malicious server ''pretending'' to be &amp;lt;tt&amp;gt;git.code.sf.net&amp;lt;/tt&amp;gt;. This confirmation only has to be done once, after which it is remembered thanks to &amp;lt;tt&amp;gt;~/.ssh/known_hosts&amp;lt;/tt&amp;gt;. You should visit the [https://sourceforge.net/p/forge/documentation/SSH%20Key%20Fingerprints/#fingerprint-listing page that gives the host key fingerprint of every publically-accessible SSH server at SourceForge] and carefully check that the fingerprint appearing on your terminal is listed on that page for &amp;lt;tt&amp;gt;git.code.sf.net&amp;lt;/tt&amp;gt;, or some matching pattern such as &amp;lt;tt&amp;gt;*.code.sf.net&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If the fingerprint that is printed on your terminal is not listed on that page, answer &amp;lt;tt&amp;gt;no&amp;lt;/tt&amp;gt; to the question ''Are you sure you want to continue connecting (yes/no)?'' and copy/paste to flightgear-devel (see [[Mailing lists]]) the above message from &amp;lt;tt&amp;gt;ssh&amp;lt;/tt&amp;gt; that contains the fingerprint sent to you by the remote host which pretends to be &amp;lt;tt&amp;gt;git.code.sf.net&amp;lt;/tt&amp;gt;. If this happened, you should stop here and wait for answers from readers of flightgear-devel.&lt;br /&gt;
&lt;br /&gt;
From now on, we'll assume that the fingerprint you received was correct, and therefore that you have answered &amp;lt;tt&amp;gt;yes&amp;lt;/tt&amp;gt; to the ''Are you sure you want to continue connecting (yes/no)?'' question.&lt;br /&gt;
&lt;br /&gt;
In this example, it took us several minutes to verify the fingerprint of the &amp;lt;tt&amp;gt;git.code.sf.net&amp;lt;/tt&amp;gt; server and confirm it to &amp;lt;tt&amp;gt;ssh&amp;lt;/tt&amp;gt;. Because of this delay, &amp;lt;tt&amp;gt;git.code.sf.net&amp;lt;/tt&amp;gt; hung up on us and closed the connection. This is absolutely ''not a problem:'' we can just rerun the &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; command with the same arguments as the first time. Since we answered &amp;lt;tt&amp;gt;yes&amp;lt;/tt&amp;gt; to the ''Are you sure you want to continue connecting (yes/no)?'' prompt, the fingerprint of &amp;lt;tt&amp;gt;git.code.sf.net&amp;lt;/tt&amp;gt;'s key has been stored in &amp;lt;tt&amp;gt;~/.ssh/known_hosts&amp;lt;/tt&amp;gt;, therefore we won't get this prompt anymore. But if some server claiming to be &amp;lt;tt&amp;gt;git.code.sf.net&amp;lt;/tt&amp;gt; presents a host key that has a different fingerprint in the future, &amp;lt;tt&amp;gt;ssh&amp;lt;/tt&amp;gt; will print a big fat warning that the server may belong to an attacker trying to impersonate &amp;lt;tt&amp;gt;git.code.sf.net&amp;lt;/tt&amp;gt;. Therefore, this SSH host key verification is very useful to protect us from future attacks (which hopefully won't happen at all).&lt;br /&gt;
&lt;br /&gt;
As said, we just rerun the &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; command with the same arguments:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ download_and_compile.sh --git-clone-site-params SourceForge=ssh:SFusername DATA&lt;br /&gt;
**********************************************************************&lt;br /&gt;
*                                                                    *&lt;br /&gt;
* Warning: a typical SimGear + FlightGear + FGData build requires    *&lt;br /&gt;
* about 12 GiB of disk space. The compilation part may last from a   *&lt;br /&gt;
* few minutes to hours, depending on your computer.                  *&lt;br /&gt;
*                                                                    *&lt;br /&gt;
* Hint: use the -j option if your CPU has several cores, as in:      *&lt;br /&gt;
*                                                                    *&lt;br /&gt;
*         download_and_compile.sh -j$(nproc)                         *&lt;br /&gt;
*                                                                    *&lt;br /&gt;
**********************************************************************&lt;br /&gt;
Running 'apt-get update'...&lt;br /&gt;
[sudo] password for toto:&lt;br /&gt;
&lt;br /&gt;
(...)&lt;br /&gt;
&lt;br /&gt;
Considering a package alternative: libcurl4-openssl-dev libcurl4-gnutls-dev&lt;br /&gt;
Package alternative matched for libcurl4-openssl-dev&lt;br /&gt;
Running 'apt-get install build-essential git libcurl4-openssl-dev cmake'...&lt;br /&gt;
[sudo] password for toto:&lt;br /&gt;
&lt;br /&gt;
(...)&lt;br /&gt;
&lt;br /&gt;
****************************************&lt;br /&gt;
**************** DATA ******************&lt;br /&gt;
****************************************&lt;br /&gt;
Fetching DATA with 'git clone ssh://SFusername@git.code.sf.net/p/flightgear/fgdata'&lt;br /&gt;
Cloning into '.'...&lt;br /&gt;
Password:&amp;lt;/pre&amp;gt;&lt;br /&gt;
As explained above, the preceding prompt is for your SourceForge password (which you could guess from the &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;git clone ssh://SFusername@git.code.sf.net/p/flightgear/fgdata&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; command).&lt;br /&gt;
&amp;lt;pre&amp;gt;remote: Enumerating objects: 67011, done.&lt;br /&gt;
remote: Counting objects: 100% (67011/67011), done.&lt;br /&gt;
remote: Compressing objects: 100% (31342/31342), done.&lt;br /&gt;
remote: Total 67011 (delta 38776), reused 59640 (delta 33570)&lt;br /&gt;
Receiving objects: 100% (67011/67011), 2.60 GiB | 313.00 KiB/s, done.&lt;br /&gt;
Resolving deltas: 100% (38776/38776), done.&lt;br /&gt;
Checking out files: 100% (12959/12959), done.&lt;br /&gt;
Password:&amp;lt;/pre&amp;gt;&lt;br /&gt;
(It will take a fair amount of time to get there, because this is the complete download of [[FGData]].)&amp;lt;br /&amp;gt;&lt;br /&gt;
This is again a prompt for your SourceForge password, because &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; wants to run &amp;lt;code&amp;gt;git pull --rebase&amp;lt;/code&amp;gt; in the repository (admittedly, it's a bit dumb after a &amp;lt;tt&amp;gt;clone&amp;lt;/tt&amp;gt; operation—please forgive us). In case you were not monitoring the &amp;lt;tt&amp;gt;clone&amp;lt;/tt&amp;gt; operation, you probably saw the password prompt way after &amp;lt;tt&amp;gt;git.code.sf.net&amp;lt;/tt&amp;gt; got bored waiting for you and closed our second connection:&lt;br /&gt;
&amp;lt;pre&amp;gt;Connection closed by 216.105.38.16 port 22&lt;br /&gt;
fatal: Could not read from remote repository.&lt;br /&gt;
&lt;br /&gt;
Please make sure you have the correct access rights&lt;br /&gt;
and the repository exists.&amp;lt;/pre&amp;gt;&lt;br /&gt;
(if not, there should be no error message and you should have a clean FGData clone)&amp;lt;br /&amp;gt;&lt;br /&gt;
No worries. Just as before, simply rerun the command with the same arguments:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ download_and_compile.sh --git-clone-site-params SourceForge=ssh:SFusername DATA&lt;br /&gt;
**********************************************************************&lt;br /&gt;
*                                                                    *&lt;br /&gt;
* Warning: a typical SimGear + FlightGear + FGData build requires    *&lt;br /&gt;
* about 12 GiB of disk space. The compilation part may last from a   *&lt;br /&gt;
* few minutes to hours, depending on your computer.                  *&lt;br /&gt;
*                                                                    *&lt;br /&gt;
* Hint: use the -j option if your CPU has several cores, as in:      *&lt;br /&gt;
*                                                                    *&lt;br /&gt;
*         download_and_compile.sh -j$(nproc)                         *&lt;br /&gt;
*                                                                    *&lt;br /&gt;
**********************************************************************&lt;br /&gt;
Running 'apt-get update'...&lt;br /&gt;
[sudo] password for toto:&lt;br /&gt;
&lt;br /&gt;
(...)&lt;br /&gt;
&lt;br /&gt;
Considering a package alternative: libcurl4-openssl-dev libcurl4-gnutls-dev&lt;br /&gt;
Package alternative matched for libcurl4-openssl-dev&lt;br /&gt;
Running 'apt-get install build-essential git libcurl4-openssl-dev cmake'...&lt;br /&gt;
[sudo] password for toto:&lt;br /&gt;
&lt;br /&gt;
(...)&lt;br /&gt;
&lt;br /&gt;
****************************************&lt;br /&gt;
**************** DATA ******************&lt;br /&gt;
****************************************&lt;br /&gt;
DATA: the repository already exists&lt;br /&gt;
Password:&lt;br /&gt;
Already up to date.&lt;br /&gt;
Current branch next is up to date.&lt;br /&gt;
Already on 'next'&lt;br /&gt;
Your branch is up to date with 'origin/next'.&lt;br /&gt;
All optional package alternatives have found a matching package.&lt;br /&gt;
&lt;br /&gt;
download_and_compile.sh has finished to work.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
There we are! You now have a clean, up-to-date [[FGData]] clone in &amp;lt;tt&amp;gt;~/flightgear/dnc-managed/install/flightgear/fgdata&amp;lt;/tt&amp;gt; (remember: &amp;lt;tt&amp;gt;~/flightgear/dnc-managed&amp;lt;/tt&amp;gt; is the directory from which you ran &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;). Note this place: the full path of the &amp;lt;tt&amp;gt;~/flightgear/dnc-managed/install/flightgear/fgdata&amp;lt;/tt&amp;gt; directory is your [[$FG_ROOT]].&lt;br /&gt;
&lt;br /&gt;
Now, change the protocol to use for future updates of your FGData clone:&amp;lt;ref name=&amp;quot;changing-the-protocol-for-a-git-remote-manual-method&amp;quot;&amp;gt;Another way would be to manually change the relevant line starting with &amp;lt;code&amp;gt;url = &amp;lt;nowiki&amp;gt;ssh://SFusername@&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; for the &amp;lt;code&amp;gt;origin&amp;lt;/code&amp;gt; remote in the &amp;lt;tt&amp;gt;.git/config&amp;lt;/tt&amp;gt; file that lives inside your repository clone (i.e., &amp;lt;tt&amp;gt;~/flightgear/dnc-managed/install/flightgear/fgdata/.git/config&amp;lt;/tt&amp;gt; in our example).&amp;lt;/ref&amp;gt;&lt;br /&gt;
 (cd install/flightgear/fgdata &amp;amp;&amp;amp; \&lt;br /&gt;
 git remote set-url origin &amp;lt;nowiki&amp;gt;https://git.code.sf.net/p/flightgear/fgdata&amp;lt;/nowiki&amp;gt;)&lt;br /&gt;
(you can check at any time the protocol(s) in use with the command &amp;lt;code&amp;gt;git remote -v&amp;lt;/code&amp;gt; run inside a Git repository—in this case, inside the folder &amp;lt;tt&amp;gt;install/flightgear/fgdata&amp;lt;/tt&amp;gt;). As a consequence of this change, all future updates of your FGData clone will use the &amp;lt;tt&amp;gt;https&amp;lt;/tt&amp;gt; protocol, therefore you won't be prompted anymore for your SourceForge password.&lt;br /&gt;
&lt;br /&gt;
All that remains to do is to run, from the same directory as before (&amp;lt;tt&amp;gt;~/flightgear/dnc-managed&amp;lt;/tt&amp;gt; in our example):&lt;br /&gt;
 $ download_and_compile.sh -j$(nproc)&lt;br /&gt;
The &amp;lt;code&amp;gt;-j$(nproc)&amp;lt;/code&amp;gt; option is not necessary, but is likely to save you a lot of time; with it, all available CPU cores will be used when compiling—see [[#Multicore acceleration| Multicore acceleration]].&lt;br /&gt;
&lt;br /&gt;
Assuming the compilation was successful, you can now start the [[FlightGear Qt launcher|FlightGear built-in launcher]] using for instance:&lt;br /&gt;
 $ ./run_fgfs.sh --launcher&lt;br /&gt;
See [[#Building FlightGear|Building FlightGear]] for more details.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;list-of-available-components&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; List of available components ==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; script is able to download, compile (when applicable) and install the following components:&lt;br /&gt;
&lt;br /&gt;
* ATCPIE (for the [[ATC-pie]] air traffic control simulation program)&lt;br /&gt;
* CMAKE (for the [https://cmake.org/ CMake] build tool—this can be useful in case CMake is too old in your distribution)&lt;br /&gt;
* DATA (for [[FGData]], the main set of data files used by FlightGear)&lt;br /&gt;
* FGFS (for FlightGear itself)&lt;br /&gt;
* FFGO (for the [[FFGo]] FlightGear launcher)&lt;br /&gt;
* FGRUN (for the [[Fgrun|FGRun]] FlightGear launcher)&lt;br /&gt;
* FGX (for the [[FGX|FGx]] FlightGear launcher&amp;lt;ref name=&amp;quot;note-on-the-status-of-FGx-support-in-download-and-compile-sh&amp;quot;&amp;gt;Support for FGx in &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; would probably benefit from a code review.&amp;lt;/ref&amp;gt;)&lt;br /&gt;
* OPENRADAR (for the [[OpenRadar]] air traffic control simulation program)&lt;br /&gt;
* OSG (for the [[OpenSceneGraph]] library)&lt;br /&gt;
* PLIB (for the [[PLIB]] library)&lt;br /&gt;
* SIMGEAR (for the [[SimGear]] library—foundation for FlightGear and TerraGear)&lt;br /&gt;
* TERRAGEAR (for the [[TerraGear]] terrain building toolchain)&lt;br /&gt;
* TERRAGEARGUI (for [[TerraGear GUI]], a graphical interface for TerraGear)&lt;br /&gt;
* ZLIB (for the [http://www.zlib.net/ zlib] compression library)&lt;br /&gt;
&lt;br /&gt;
Each of the items listed above is a ''component'' in &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; terminology. Components are written in uppercase by convention.&lt;br /&gt;
&lt;br /&gt;
{{Note|The preceding list might not be up-to-date. The up-to-date list of components supported by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; can always be obtained by running &amp;lt;code&amp;gt;download_and_compile.sh --help&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
What is the point of knowing this? Because you may pass component names to &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; in order to tell it what you want to download, build and install. By default, only the components [[SimGear|SIMGEAR]], [[FlightGear|FGFS]], [[FGData|DATA]] and [[OpenSceneGraph|OSG]] are taken care of, which means that the command:&lt;br /&gt;
 $ download_and_compile.sh&lt;br /&gt;
is equivalent to:&lt;br /&gt;
 $ download_and_compile.sh SIMGEAR FGFS DATA OSG&lt;br /&gt;
&lt;br /&gt;
In case you'd like to do the same build with just [[PLIB]] added, you could use:&lt;br /&gt;
 $ download_and_compile.sh SIMGEAR FGFS DATA OSG PLIB&lt;br /&gt;
&lt;br /&gt;
You get the idea. When several components are passed on the same command line, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; chooses a reasonable order for processing, so don't worry about that.&lt;br /&gt;
&lt;br /&gt;
== When building ''next'', you may encounter problems ==&lt;br /&gt;
&lt;br /&gt;
Keeping in mind that this script compiles sometimes bleeding edge software, it can happen that what was successfully compiling last week, does not compile anymore today. Building the latest stable version (option &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt;) or the latest Long Term Stable release (option &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt;) should always work, unless there is a problem with the script (well, in some cases, there may be packages of your distribution that are too recent for &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt;; for instance, in July 2020, &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; didn't build with OpenSceneGraph 3.6, but simply passing the OSG component on the &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; command solved the problem, because at that time, option &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; selected OpenSceneGraph 3.4).&lt;br /&gt;
&lt;br /&gt;
That said, you may want to build the development version (called ''next''): this is the one developers use all the time, so kindly asking on the flightgear-devel [[Mailing_lists|mailing list]] in case a problem popped up&amp;lt;ref name=&amp;quot;what-to-provide-when-asking-for-help&amp;quot;&amp;gt;Don't forget in this case to precisely tell what you did and include the &amp;lt;tt&amp;gt;compilation_log.txt&amp;lt;/tt&amp;gt; file written by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;.&amp;lt;/ref&amp;gt; should allow you to find good advice and get the problem quickly fixed, if it's a new one.&lt;br /&gt;
&lt;br /&gt;
{{Warning|As of July 2020, heavy development will be done on ''next'', the development branch of FlightGear. It is expected to be rather unstable for several months. Unless you are really interested in FlightGear development or in providing feedback to the developers, you're probably better off building either the latest stable version (option &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt;) or the latest Long Term Stable release (option &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt;). In case you want something even older, the previous LTS release can be selected with option &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
== Task-specific instructions ==&lt;br /&gt;
&lt;br /&gt;
{{Note|In this section, we assume you've read and followed the advice given in [[#getting-started-with-download-and-compile-sh|Getting started with &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;]].}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;selecting-the-components-to-work-on&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; Selecting the components to build ===&lt;br /&gt;
&lt;br /&gt;
By default, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; downloads or updates, then compiles, [[SimGear]], FlightGear, [[FGData]] and [[OpenSceneGraph|OSG]] (more precisely, FGData is downloaded but not compiled—that wouldn't make sense). This is what happens when running:&lt;br /&gt;
 $ download_and_compile.sh&lt;br /&gt;
The preceding command is therefore equivalent to:&lt;br /&gt;
 $ download_and_compile.sh SIMGEAR FGFS DATA OSG&lt;br /&gt;
&lt;br /&gt;
To make &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; take care of other programs or libraries, use non-option arguments naming the ''components'' you want, for instance:&lt;br /&gt;
 $ download_and_compile.sh SIMGEAR FGFS DATA OSG CMAKE&lt;br /&gt;
SIMGEAR, FGFS, DATA, OSG and CMAKE are the component names respectively corresponding to [[SimGear]], FlightGear, [[FGData]], [[OpenSceneGraph]] and [https://cmake.org/ CMake] in &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;'s terminology.&lt;br /&gt;
&lt;br /&gt;
A [[#list-of-available-components|list of available components]] is provided on this page, but the fully up-to-date list can always be obtained by running &amp;lt;code&amp;gt;download_and_compile.sh --help&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Choosing between stable and development versions ===&lt;br /&gt;
&lt;br /&gt;
By default, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; fetches code and data from development branches of the source repositories (which sometimes causes compilation or runtime errors). However, it is possible to tell the script to download the latest “stable” version of each component, for some suitable definition of “stable”. This is by means of the &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt; options:&lt;br /&gt;
 $ download_and_compile.sh -s ''COMPONENT1 COMPONENT2...''&lt;br /&gt;
or&lt;br /&gt;
 $ download_and_compile.sh --lts ''COMPONENT1 COMPONENT2...''&lt;br /&gt;
or&lt;br /&gt;
 $ download_and_compile.sh --old-lts ''COMPONENT1 COMPONENT2...''&lt;br /&gt;
&lt;br /&gt;
How does it work?&lt;br /&gt;
* For [[SimGear]], FlightGear and [[FGData]], &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; uses the most recent stable release branch of the corresponding Git repository, &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; uses the most recent Long Term Stable release (LTS) and &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt; uses the previous LTS release.&lt;br /&gt;
* For other components, a known-stable version is selected by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;, which may be influenced by the use of &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
So, as far as the SIMGEAR, FGFS and DATA components are concerned, you can:&lt;br /&gt;
* build the latest stable release (&amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt;);&lt;br /&gt;
* build the latest Long Term Stable release (&amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt;);&lt;br /&gt;
* build the previous Long Term Stable release (&amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt;);&lt;br /&gt;
* build the current development version (bleeding edge), which lives in the {{flightgear source&lt;br /&gt;
| branch = next&lt;br /&gt;
| text = next&lt;br /&gt;
}} branch of the FlightGear repository.&lt;br /&gt;
The use of &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt; also influences the version of other components you may have selected (this can be overridden using &amp;lt;code&amp;gt;--component-branch&amp;lt;/code&amp;gt; for advanced users—see [[#Component-specific settings|Component-specific settings]]).&lt;br /&gt;
&lt;br /&gt;
{{Note|In a given folder where &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; is run, you should normally either always use the &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; option, or always use &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt;, or always use &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt;, or always none of these (in other words, stick to the same suite: latest stable, latest LTS, previous LTS or ''next'', consistently accross all components).}}&lt;br /&gt;
&lt;br /&gt;
Actually, it ''is'' possible to switch between suites but you have to use the &amp;lt;code&amp;gt;--cleanup&amp;lt;/code&amp;gt; option when doing the switch (see [[#Cleaning built and installed files|Cleaning built and installed files]] for information on this option). For instance:&lt;br /&gt;
* Build with &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; as many times as you want.&lt;br /&gt;
* Want to try ''next''? Okay, then build once with &amp;lt;code&amp;gt;--cleanup&amp;lt;/code&amp;gt; (no &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; option anymore).&lt;br /&gt;
* You can then perform as many builds of ''next'' as you want; no need to use &amp;lt;code&amp;gt;--cleanup&amp;lt;/code&amp;gt; unless something special went wrong.&lt;br /&gt;
* If you later decide to switch back to the stable release, build once with &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--cleanup&amp;lt;/code&amp;gt;, then only with &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; for further builds.&lt;br /&gt;
* etc.&lt;br /&gt;
&lt;br /&gt;
This way, ''you don't need to download the repositories again'' when trying the various suites. In particular, you can switch between ''next'', stable, LTS and old LTS without downloading nor having several copies of [[FGData]] on your hard drive. (This works because a Git repository may internally contain data for several branches, even if only one is “normally visible” in the filesystem at a given time.)&lt;br /&gt;
&lt;br /&gt;
==== Building the latest Long Term Stable release of FlightGear ====&lt;br /&gt;
&lt;br /&gt;
When executing &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;, use the &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; option to build the latest Long Term Stable release: &lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ download_and_compile.sh --lts&lt;br /&gt;
(In this example, the implicitly-selected components are SIMGEAR, FGFS and DATA, as explained [[#selecting-the-components-to-work-on | above]].)&lt;br /&gt;
&lt;br /&gt;
{{Note|If you decide to use the &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; option in a given directory tree, you should use it for all components in that directory tree (SIMGEAR, FGFS, DATA, etc.). Running &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; in a given directory with the &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; option for some components and not for others is not supported.}}&lt;br /&gt;
&lt;br /&gt;
==== Building the latest stable release of FlightGear ====&lt;br /&gt;
&lt;br /&gt;
When executing &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;, use the &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; option to build the latest stable release: &lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ download_and_compile.sh -s&lt;br /&gt;
&lt;br /&gt;
{{Note|If you decide to use the &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; option in a given directory tree, you should use it for all components in that directory tree (SIMGEAR, FGFS, DATA, etc.). Running &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; in a given directory with the &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; option for some components and not for others is not supported.}}&lt;br /&gt;
&lt;br /&gt;
==== Building the current FlightGear development version ====&lt;br /&gt;
&lt;br /&gt;
When executing &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; without any option, the development version of every selected component is built:&lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ download_and_compile.sh&lt;br /&gt;
&lt;br /&gt;
{{Note|The development version of FlightGear changes on an almost daily basis. It provides the latest features, but is not guaranteed to always work reliably. If you don't want to take the risk of finding new bugs when updating, you may prefer to use the latest stable release.}}&lt;br /&gt;
&lt;br /&gt;
==== Building the previous Long Term Stable release of FlightGear ====&lt;br /&gt;
&lt;br /&gt;
When executing &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;, use the &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt; option to build the previous Long Term Stable release (i.e., oldish code): &lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ download_and_compile.sh --old-lts&lt;br /&gt;
(In this example, the implicitly-selected components are SIMGEAR, FGFS and DATA, as explained [[#selecting-the-components-to-work-on | above]].)&lt;br /&gt;
&lt;br /&gt;
{{Note|If you decide to use the &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt; option in a given directory tree, you should use it for all components in that directory tree (SIMGEAR, FGFS, DATA, etc.). Running &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; in a given directory with the &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt; option for some components and not for others is not supported.}}&lt;br /&gt;
&lt;br /&gt;
=== Overriding the source repository or branch for a component ===&lt;br /&gt;
&lt;br /&gt;
This section shows how to override the location and/or branch from which a given component will be downloaded.&lt;br /&gt;
&lt;br /&gt;
{{Warning|The rest of this section is for people who know what they are doing. Don't use the following unless you trust the person who publishes the repository and have good reasons to believe that it has been kept up-to-date.}}&lt;br /&gt;
&lt;br /&gt;
==== A short example ====&lt;br /&gt;
&lt;br /&gt;
Let's start with an example to make it easier to understand to following paragraphs. Suppose we want to build the current stable release of FlightGear, linked against an [[OpenSceneGraph]] library whose source code is to be retrieved from branch &amp;lt;tt&amp;gt;fgfs-osg-36-2&amp;lt;/tt&amp;gt; of the Git repository located at [https://gitlab.com/flightgear/openscenegraph.git https://gitlab.com/flightgear/openscenegraph.git] (this is actually the default in September 2024). Since the default protocol used when &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; clones a repository is [https://en.wikipedia.org/wiki/HTTPS HTTPS], this can be done with&lt;br /&gt;
 download_and_compile.sh --cleanup -s \&lt;br /&gt;
 --override-repo OSG=GitLab:gitlab.com/flightgear/openscenegraph.git \&lt;br /&gt;
 --component-branch OSG=fgfs-osg-36-2 SIMGEAR FGFS DATA OSG&lt;br /&gt;
&lt;br /&gt;
==== The site name ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; uses case-insensitive short names such as &amp;lt;tt&amp;gt;GitLab&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;GitHub&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;SourceForge&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;gitlab.kitware.com&amp;lt;/tt&amp;gt; as keys in order to identify the settings describing where and how a given component will be initially fetched (these settings are effective at clone time; later updates simply use the settings recorded in the local repository). These names are referred to as ''site'' in the output of &amp;lt;code&amp;gt;download_and_compile.sh --help&amp;lt;/code&amp;gt;, in particular in the &amp;lt;tt&amp;gt;--git-clone-site-params&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;--override-repo&amp;lt;/tt&amp;gt; options we'll present below. These ''site'' keys are simply identifier strings; they are not used in the DNS queries.&lt;br /&gt;
&lt;br /&gt;
==== The protocol ====&lt;br /&gt;
&lt;br /&gt;
Current &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; (from December 2022) fetches the source code of most components from Git repositories (earlier versions used Subversion for some components); a few non-core components (currently [[FGo!]] and [[OpenRadar]]) are fetched using &amp;lt;tt&amp;gt;wget&amp;lt;/tt&amp;gt; and are out-of-scope for this section.&lt;br /&gt;
&lt;br /&gt;
The default protocol used by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; when cloning a Git repository is [https://en.wikipedia.org/wiki/HTTPS HTTPS]. This can be overridden using the &amp;lt;tt&amp;gt;--git-clone-default-proto&amp;lt;/tt&amp;gt; option. In other words, the default is &amp;lt;tt&amp;gt;--git-clone-default-proto=https&amp;lt;/tt&amp;gt; (the protocol name is case-insensitive). Other possibilities for the protocol are &amp;lt;tt&amp;gt;git&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;ssh&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Warning|The &amp;lt;tt&amp;gt;git&amp;lt;/tt&amp;gt; protocol doesn't protect against man-in-the-middle attacks; use at your own risk! Unfortunately, “clever” people often recommend it on the forum without mentioning its downsides.}}&lt;br /&gt;
&lt;br /&gt;
Using the &amp;lt;tt&amp;gt;ssh&amp;lt;/tt&amp;gt; protocol as the argument of &amp;lt;tt&amp;gt;--git-clone-default-proto&amp;lt;/tt&amp;gt; has little use, because in general you'll want to specify a particular username when using SSH and this username is likely not to be the same for all components you intend to clone via SSH (right, &amp;lt;tt&amp;gt;~/.ssh/config&amp;lt;/tt&amp;gt; can be used to automatically provide a site-dependent username). That is why &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; offers the &amp;lt;tt&amp;gt;--git-clone-site-params&amp;lt;/tt&amp;gt; option.&lt;br /&gt;
&lt;br /&gt;
==== Site-specific settings ====&lt;br /&gt;
&lt;br /&gt;
Using&lt;br /&gt;
 --git-clone-site-params ''SITE''=''PROTOCOL''[:''USERNAME'']&lt;br /&gt;
you can tell &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; that every component fetched from ''SITE'' should be cloned with the specified protocol and username (allowed protocols are &amp;lt;tt&amp;gt;https&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;ssh&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;git&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
{{Note|In case you have several repositories at a given site (say, GitHub) and need to use different SSH usernames for these repositories, you can use different site names:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--override-repo COMPONENT_A=GitHubA:ADDRESS_A&lt;br /&gt;
--git-clone-site-params GitHubA=ssh:userA&lt;br /&gt;
--override-repo COMPONENT_B=GitHubB:ADDRESS_B&lt;br /&gt;
--git-clone-site-params GitHubB=ssh:userB&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here, the site names are &amp;lt;tt&amp;gt;GitHubA&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;GitHubB&amp;lt;/tt&amp;gt;; the &amp;lt;tt&amp;gt;--override-repo&amp;lt;/tt&amp;gt; option will be presented below.&lt;br /&gt;
&lt;br /&gt;
By default, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; case-insensitively uses the &amp;lt;tt&amp;gt;GitLab&amp;lt;/tt&amp;gt; (resp. &amp;lt;tt&amp;gt;SourceForge&amp;lt;/tt&amp;gt;) site name to identify the settings used when cloning a repository from gitlab.com (resp. git.code.sf.net). Therefore, the settings for GitHubA and GitHubB in this example would only apply to components ''c'' for which --override-repo ''c''&amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt;GitHubA:... or --override-repo ''c''&amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt;GitHubB:... has been specified.}}&lt;br /&gt;
&lt;br /&gt;
==== Component-specific settings ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;--override-repo&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;--component-branch&amp;lt;/tt&amp;gt; options allow one to override the default settings used by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; for cloning the repository corresponding to the specified component (they only apply to components whose source code is retrieved with Git). The syntax of these options is&lt;br /&gt;
 --override-repo ''COMPONENT''=''SITE'':''ADDRESS''&lt;br /&gt;
and&lt;br /&gt;
 --component-branch ''COMPONENT''=''BRANCH''&lt;br /&gt;
In this syntax:&lt;br /&gt;
* ''COMPONENT'' represents the name of a component for &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; (e.g., &amp;lt;tt&amp;gt;SIMGEAR&amp;lt;/tt&amp;gt;—see [[#List of available components|List of available components]]);&lt;br /&gt;
* ''ADDRESS'' is something like &amp;lt;tt&amp;gt;gitlab.com/flightgear/simgear.git&amp;lt;/tt&amp;gt; (don't include any &amp;lt;tt&amp;gt;protocol://&amp;lt;/tt&amp;gt; part in ''ADDRESS'');&lt;br /&gt;
* ''BRANCH'' should be the name of an existing branch of the Git repository hosted at ''ADDRESS'';&lt;br /&gt;
* ''SITE'' is a string used as a key in a mapping; &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; uses it to find out how to connect to ''ADDRESS'' in order to clone the repository for ''COMPONENT'' (see [[#Site-specific settings|Site-specific settings]]).&lt;br /&gt;
See the [[#A short example|above example]] for a concrete example where these options are used.&lt;br /&gt;
&lt;br /&gt;
{{Note|The argument of any long option of &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; that takes an argument may be introduced immediately after the option name using an equal sign. However, in the above cases, I find this way a bit confusing because the option value ''also'' uses an equal sign as separator. Hence the above use of separate command arguments: one for the option name, one for its argument.}}&lt;br /&gt;
&lt;br /&gt;
=== Passing custom arguments to CMake ===&lt;br /&gt;
&lt;br /&gt;
Sometimes, when building a program, you may want to enable a feature that is not enabled by default, or disable a feature that is enabled by default. With recent versions of &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; (October 2020 or later), this can be done for SimGear and FlightGear using the &amp;lt;code&amp;gt;--sg-cmake-arg&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--fg-cmake-arg&amp;lt;/code&amp;gt; options (the environment variables &amp;lt;tt&amp;gt;SG_CMAKEARGS&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;FG_CMAKEARGS&amp;lt;/tt&amp;gt; are still supported, but they don't allow one to pass arguments containing spaces). For instance, in order to link SimGear with the system Expat library, you can do:&lt;br /&gt;
 $ download_and_compile.sh --sg-cmake-arg='-DSYSTEM_EXPAT=ON' SIMGEAR&lt;br /&gt;
Similarly, disabling HID-based input when building FlightGear can be achieved this way:&lt;br /&gt;
 $ download_and_compile.sh --fg-cmake-arg='-DENABLE_HID_INPUT=OFF' FGFS&lt;br /&gt;
&lt;br /&gt;
{{Note|Such options are typically defined in &amp;lt;tt&amp;gt;CMakeLists.txt&amp;lt;/tt&amp;gt; files, for example {{simgear source&lt;br /&gt;
| path = CMakeLists.txt&lt;br /&gt;
| text = here&lt;br /&gt;
}} for SimGear and {{flightgear source&lt;br /&gt;
| path = CMakeLists.txt&lt;br /&gt;
| text = here&lt;br /&gt;
}} for FlightGear.}}&lt;br /&gt;
&lt;br /&gt;
This can be useful, for instance, to work around bugs in a part of SimGear or FlightGear that you don't need, but causes a build or runtime failure (see {{forum link|t=35740|text=here}} for example). This is often convenient when using the development version of FlightGear, but doesn't mean such bugs shouldn't be reported!&lt;br /&gt;
&lt;br /&gt;
If you have several such options to pass, just use &amp;lt;code&amp;gt;--sg-cmake-arg&amp;lt;/code&amp;gt; and/or &amp;lt;code&amp;gt;--fg-cmake-arg&amp;lt;/code&amp;gt; several times:&lt;br /&gt;
 $ download_and_compile.sh --fg-cmake-arg='-DENABLE_SWIFT=ON' \&lt;br /&gt;
                           --fg-cmake-arg='-DENABLE_HID_INPUT=OFF' FGFS&lt;br /&gt;
It is even possible to pass arguments containing spaces to CMake, as in:&lt;br /&gt;
 $ download_and_compile.sh \&lt;br /&gt;
     --sg-cmake-arg='-DCMAKE_CXX_FLAGS=-Wno-deprecated-declarations -Wall' \&lt;br /&gt;
     SIMGEAR&lt;br /&gt;
(just a silly example to show a working syntax) or:&lt;br /&gt;
 $ download_and_compile.sh \&lt;br /&gt;
     --fg-cmake-arg=&amp;quot;-DCMAKE_CXX_FLAGS=$(pkg-config --cflags gl)&amp;quot; \&lt;br /&gt;
     FGFS&lt;br /&gt;
Note the use of double-quotes here to enable the &amp;lt;code&amp;gt;$(...)&amp;lt;/code&amp;gt; command substitution.&lt;br /&gt;
&lt;br /&gt;
Using the (half-deprecated) environment variables &amp;lt;tt&amp;gt;SG_CMAKEARGS&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;FG_CMAKEARGS&amp;lt;/tt&amp;gt;, it is also possible to define CMake arguments in a single place that are going to be used for both SimGear and FlightGear. However, this technique doesn't allow one to pass arguments containing spaces to CMake.&lt;br /&gt;
 $ export SG_CMAKEARGS='-DSYSTEM_EXPAT=ON'&lt;br /&gt;
 $ export FG_CMAKEARGS='-DENABLE_SWIFT=ON -DENABLE_HID_INPUT=OFF'&lt;br /&gt;
 $ download_and_compile.sh&lt;br /&gt;
&lt;br /&gt;
=== Seeing the compilation commands run by Make ===&lt;br /&gt;
&lt;br /&gt;
As a simple application of the previous section, the following options are often useful. When passed to &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;, these options cause the compilation commands run via Make to be printed on the terminal and recorded in the compilation_log.txt file:&lt;br /&gt;
  --sg-cmake-arg='-DCMAKE_VERBOSE_MAKEFILE=1' \&lt;br /&gt;
  --fg-cmake-arg='-DCMAKE_VERBOSE_MAKEFILE=1'&lt;br /&gt;
(the backslash is unneeded if you put both options on the same line). Passing the value 0 instead of 1 would explicitly request the default, non-verbose behavior.&lt;br /&gt;
&lt;br /&gt;
=== Launching FlightGear ===&lt;br /&gt;
&lt;br /&gt;
When using &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;, apart from those installed with the package manager, the FlightGear dependencies (which are typically libraries) are not installed system-wide but under the directory from which &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; was run. This makes it possible to easily use, for instance, different [[OpenSceneGraph]], [[SimGear]] and FlightGear versions on a single system—e.g., for testing purposes—but also to have separate build trees (optimized/debug). This is also why you either need to set LD_LIBRARY_PATH to run the built programs, or simply use the scripts created by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; in the directory where it is run, such as &amp;lt;tt&amp;gt;run_fgfs.sh&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;run_fgfs_debug.sh&amp;lt;/tt&amp;gt;: these scripts automatically set up the required environment variables according to your build settings before firing the desired program (e.g., &amp;lt;tt&amp;gt;fgfs&amp;lt;/tt&amp;gt;) with the arguments you provided. &lt;br /&gt;
&lt;br /&gt;
Therefore, the simplest way to run a FlightGear program built by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; is to launch the &amp;lt;tt&amp;gt;run_fgfs.sh&amp;lt;/tt&amp;gt; script that &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; created in the directory from which it was run, for example:&lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ ./run_fgfs.sh --launcher&lt;br /&gt;
&lt;br /&gt;
{{Note|&amp;lt;code&amp;gt;./run_fgfs.sh --launcher&amp;lt;/code&amp;gt; starts FlightGear with its built-in launcher. If you just do &amp;lt;code&amp;gt;./run_fgfs.sh&amp;lt;/code&amp;gt;, FlightGear will be started without any launcher, at the default airport and with the default aircraft.}}&lt;br /&gt;
&lt;br /&gt;
In order to start FlightGear without any launcher, at a given airport (say, [https://en.wikipedia.org/wiki/Paro_Airport Paro airport], whose ICAO code is VQPR) and with a chosen aircraft, you can do:&lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ ./run_fgfs.sh --airport=VQPR --aircraft=dhc6&lt;br /&gt;
Actually, the directory change is not needed, we only gave it here for readability. Therefore, the following single command does the same:&lt;br /&gt;
 $ ~/flightgear/dnc-managed/run_fgfs.sh --airport=VQPR --aircraft=dhc6&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;avoiding-multiple-downloads-of-fgdata&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; Avoiding multiple downloads of FGData ===&lt;br /&gt;
&lt;br /&gt;
Some people use &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; to maintain several directory trees such as the tree starting at &amp;lt;tt&amp;gt;~/flightgear/dnc-managed&amp;lt;/tt&amp;gt; in [[#getting-started-with-download-and-compile-sh|Getting started with &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;]] (this can be useful if you want to have one tree with programs compiled in Release mode and another tree where they are built in Debug mode, for instance). This can easily be done by running &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; in each of the directories. But since [[FGData]] is so large, it may be tempting to share a single instance of this repository among several trees. This is not officially supported, but apparently can be made to work with symbolic links.&lt;br /&gt;
&lt;br /&gt;
Let's show how this can be done on an example. Suppose your master copy of FGData is in &amp;lt;tt&amp;gt;~/flightgear/dnc-managed/install/flightgear/fgdata&amp;lt;/tt&amp;gt;. Then the following appears to work:&lt;br /&gt;
 $ mkdir -p ~/flightgear/other-dnc-managed-tree/install/flightgear&lt;br /&gt;
 $ cd ~/flightgear/other-dnc-managed-tree/install/flightgear&lt;br /&gt;
 $ ln -s ../../../dnc-managed/install/flightgear/fgdata&lt;br /&gt;
 $ cd ~/flightgear/other-dnc-managed-tree&lt;br /&gt;
 $ download_and_compile.sh&lt;br /&gt;
&lt;br /&gt;
The last of these commands will use and update the FGData repository present in &amp;lt;tt&amp;gt;~/flightgear/dnc-managed/install/flightgear/fgdata&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Warning|This can only work simply if all trees that share a given FGData repository are from the same release (e.g., current stable or development). Running a “stable“ FlightGear with FGData from the ''next'' branch or the other way round, a development version of FlightGear with FGData from a release branch, doesn't work—and FlightGear should tell you when you start it in such a situation.&lt;br /&gt;
&lt;br /&gt;
That said, people comfortable with Git can check out the correct FGData branch before building or starting FlightGear, for instance:&lt;br /&gt;
 $ cd /path/to/fgdata &amp;amp;&amp;amp; git checkout release/2019.1&lt;br /&gt;
or&lt;br /&gt;
 $ cd /path/to/fgdata &amp;amp;&amp;amp; git checkout next&lt;br /&gt;
So, this is possible but somewhat acrobatic. You've been warned.}}&lt;br /&gt;
&lt;br /&gt;
Note: there is a [[Avoiding multiple downloads of FGData on Linux|wiki article about this subject]], but it is severely outdated as of April 2019.&lt;br /&gt;
&lt;br /&gt;
== Additional programs ==&lt;br /&gt;
&lt;br /&gt;
{{Note|In this section, we assume you've read and followed the advice given in [[#getting-started-with-download-and-compile-sh|Getting started with &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;]].}}&lt;br /&gt;
&lt;br /&gt;
If you wish to get other programs (precisely: download, build and install them), you need to launch &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; with the desired component names as arguments. For instance:&lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ download_and_compile.sh SIMGEAR FGFS DATA OSG&lt;br /&gt;
&lt;br /&gt;
See [[#list-of-available-components|above]] for the list of available components.&lt;br /&gt;
&lt;br /&gt;
=== TerraGear ===&lt;br /&gt;
&lt;br /&gt;
Run &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; with the TERRAGEAR component in order to build and install the [[TerraGear]] terrain building toolchain:&lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ download_and_compile.sh TERRAGEAR&lt;br /&gt;
&lt;br /&gt;
This creates the following scripts in &amp;lt;tt&amp;gt;~/flightgear/dnc-managed&amp;lt;/tt&amp;gt;:&lt;br /&gt;
* &amp;lt;tt&amp;gt;run_genapts850.sh&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;run_ogr-decode.sh&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;run_tg-construct.sh&amp;lt;/tt&amp;gt;&lt;br /&gt;
These scripts themselves run the corresponding TerraGear tools, as expected.&lt;br /&gt;
&lt;br /&gt;
=== TerraGear GUI ===&lt;br /&gt;
&lt;br /&gt;
[[TerraGear GUI]] is a graphical interface for [[TerraGear]] written with the Qt toolkit (still Qt 4 in 2019, but it works). In order to install it, run &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; with the TERRAGEARGUI component:&lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ download_and_compile.sh TERRAGEARGUI&lt;br /&gt;
This will create a &amp;lt;tt&amp;gt;run_terrageargui.sh&amp;lt;/tt&amp;gt; script in &amp;lt;tt&amp;gt;~/flightgear/dnc-managed&amp;lt;/tt&amp;gt;, and also a default configuration file &amp;lt;tt&amp;gt;~/.config/TerraGear/TerraGearGUI.conf&amp;lt;/tt&amp;gt;, unless you already have one. This default configuration file contains paths to the TerraGear and [[$FG_ROOT]] directories, assuming you have installed the TERRAGEAR and DATA components.&lt;br /&gt;
&lt;br /&gt;
To run TerraGear GUI:&lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ ./run_terrageargui.sh&lt;br /&gt;
&lt;br /&gt;
=== FGCom ===&lt;br /&gt;
&lt;br /&gt;
{{Note|[[FGCom]] has been integrated into FlightGear long ago, therefore the following is not needed in general.}}&lt;br /&gt;
&lt;br /&gt;
[[FGCom]] is the system used by FlightGear to simulate radio communications between users. It is automatically built and installed when you tell &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; to take care of the FGFS component. You can launch the standalone FGCom program by using the &amp;lt;tt&amp;gt;run_fgcom.sh&amp;lt;/tt&amp;gt; script:&lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ ./run_fgcom.sh&lt;br /&gt;
&lt;br /&gt;
=== FGRun ===&lt;br /&gt;
&lt;br /&gt;
{{Note|As of 2019, FGRun has been superseded by the [[FlightGear Qt launcher|FlightGear built-in launcher]]. The built-in launcher is the most actively maintained launcher for FlightGear. Other launchers are [[FFGo]] and [[FGX|FGx]].}}&lt;br /&gt;
&lt;br /&gt;
[[File:fgrun-page2.jpg|thumb|right]]&lt;br /&gt;
Before FlightGear had its built-in launcher (the one you get with &amp;lt;code&amp;gt;run_fgfs.sh --launcher&amp;lt;/code&amp;gt;), many users found comfortable having FlightGear launched by the graphical utility [[Fgrun|FGRun]]. This program is built and installed when &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; is run with the FGRUN component. You then have to launch the &amp;lt;tt&amp;gt;run_fgrun.sh&amp;lt;/tt&amp;gt; command, for example:&lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ ./run_fgrun.sh&lt;br /&gt;
&lt;br /&gt;
FGRun will save its settings in &amp;lt;tt&amp;gt;~/.fltk/flightgear.org/fgrun.prefs&amp;lt;/tt&amp;gt;. You may want to save copies of the preferences customized for stable and next.&lt;br /&gt;
&lt;br /&gt;
=== FGo! ===&lt;br /&gt;
&lt;br /&gt;
{{Note|As of 2019, FGo! is not maintained anymore. You may want to try the built-in launcher (started with &amp;lt;code&amp;gt;run_fgfs.sh --launcher&amp;lt;/code&amp;gt;) or [[FFGo]].}}&lt;br /&gt;
&lt;br /&gt;
[[File:Fgo01.jpg|thumb|left]]&lt;br /&gt;
FGo! is a graphical utility written in [[python]]. It is downloaded and installed when &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; is run with the FGO component. You then have to launch the &amp;lt;tt&amp;gt;run_fgo.sh&amp;lt;/tt&amp;gt; command, for example:&lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ ./run_fgo.sh&lt;br /&gt;
&lt;br /&gt;
Remember that the first time you run it, you have to go to open the ''Preferences'' dialog and set the paths to the &amp;lt;tt&amp;gt;fgfs&amp;lt;/tt&amp;gt; executable and to FGData.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== Compilation errors ===&lt;br /&gt;
Here we are, no fear, if you wish to use programs from the cvs/svn/git repositories, you might face compilation errors that will prevent you to have a working copy of one or more of the programs provided by this script. What can be the causes that prevent us from successfully compiling? As far as I know those:&lt;br /&gt;
# Software developers introduce a new functionality with a new piece of code that prevents the compilation under your architecture, this can happen working with cvs/svn/git sources.&lt;br /&gt;
# The program refuses to compile because of a divergence in the libraries on which it depends. For example FlightGear might not compile because OSG has been modified, while OSG itself compiles fine, FG won't.&lt;br /&gt;
# One or more repositories are down and you can't get the library you need. (Both from cvs/svn/git or apt-get)&lt;br /&gt;
&lt;br /&gt;
There is a simple solution to the above errors: wait and relaunch the script after some time (hours or days), if software developers repair or synchronize their code with the newly updated libraries (which generally happens eventually), your FlightGear will compile fine as if the previous error never took place.&lt;br /&gt;
&lt;br /&gt;
Sometimes it happens that the script fails to compile only [[Fgrun|FGRun]], [[FGCom]] or atlas, if you then see the run_fgfs.sh file it means that FlightGear installation was successful and you can safely run it.&lt;br /&gt;
&lt;br /&gt;
== Options ==&lt;br /&gt;
&lt;br /&gt;
=== Release selection ===&lt;br /&gt;
&lt;br /&gt;
* Build the latest stable release: &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt;&lt;br /&gt;
* Build the latest Long Term Stable release: &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt;&lt;br /&gt;
* Build the previous Long Term Stable release: &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Long Term Stable (&amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt;) is supposed to yield a more stable setup than what you would obtain with option &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt;, however it will generally be older. Both of these options are suitable for users.&lt;br /&gt;
&lt;br /&gt;
If you pass none of &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt; in a &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
=== Skipping most prompts ===&lt;br /&gt;
&lt;br /&gt;
For some important things, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; asks for confirmation in order to be sure that you are well informed about what will be done. When you have a good understanding of these informations, you may want to use the &amp;lt;code&amp;gt;--non-interactive&amp;lt;/code&amp;gt; option in order to suppress these prompts (technically, this causes the default answer to be automatically used).&lt;br /&gt;
&lt;br /&gt;
=== Cleaning built and installed files ===&lt;br /&gt;
&lt;br /&gt;
Option &amp;lt;code&amp;gt;--cleanup&amp;lt;/code&amp;gt; causes &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
If you use &amp;lt;code&amp;gt;--cleanup&amp;lt;/code&amp;gt; without specifying any component, only this removal will be done (nothing will be compiled nor installed). Otherwise, the usual rules concerning components apply.&lt;br /&gt;
&lt;br /&gt;
=== Multicore acceleration ===&lt;br /&gt;
&lt;br /&gt;
Passing option &amp;lt;code&amp;gt;-j x&amp;lt;/code&amp;gt; to &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; (where ''x'' is the number of your CPU cores you wish to assign to the job) will considerably speed up the compilation steps. Passing &amp;lt;code&amp;gt;-j$(nproc)&amp;lt;/code&amp;gt; is a convenient way to automatically use all available cores.&lt;br /&gt;
&lt;br /&gt;
=== Advanced options ===&lt;br /&gt;
&lt;br /&gt;
* Build a release version: &amp;lt;code&amp;gt;-b Release&amp;lt;/code&amp;gt;&lt;br /&gt;
* Build a version that should run as fast as a release build, yet has debug information that can be used to post backtraces: &amp;lt;code&amp;gt;-b RelWithDebInfo&amp;lt;/code&amp;gt; (this is the default)&lt;br /&gt;
* Build a full debug version for very complete bug reporting: &amp;lt;code&amp;gt;-b Debug&amp;lt;/code&amp;gt;&lt;br /&gt;
* Skip download of distro packages (i.e., by default: &amp;lt;tt&amp;gt;apt-get install ...&amp;lt;/tt&amp;gt;): &amp;lt;code&amp;gt;-p n&amp;lt;/code&amp;gt;&lt;br /&gt;
* Skip retrieving of component downloads and updates (which typically use Git or wget): &amp;lt;code&amp;gt;-d n&amp;lt;/code&amp;gt;&lt;br /&gt;
* Skip the configure step (like running [https://cmake.org/ CMake] or [https://www.gnu.org/software/autoconf/ autoconf]'s &amp;lt;tt&amp;gt;./configure&amp;lt;/tt&amp;gt;): &amp;lt;code&amp;gt;-r n&amp;lt;/code&amp;gt;&lt;br /&gt;
* Skip compilation of programs: &amp;lt;code&amp;gt;-c n&amp;lt;/code&amp;gt;&lt;br /&gt;
* Build with compositor: &amp;lt;code&amp;gt;--compositor&amp;lt;/code&amp;gt;&lt;br /&gt;
* Force the use of a particular branch for a given component: &amp;lt;code&amp;gt;--component-branch ''COMPONENT=BRANCH''&amp;lt;/code&amp;gt; (e.g., &amp;lt;code&amp;gt;--component-branch OSG=OpenSceneGraph-3.6&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;--component-branch FGFS=next&amp;lt;/code&amp;gt;, etc.—but remember that components FGFS, SIMGEAR and DATA must ''always'' be in sync). See [[#Component-specific settings|Component-specific settings]] for details.&lt;br /&gt;
* Override the repository from which a given component is initially fetched: &amp;lt;code&amp;gt;--override-repo ''COMPONENT''=''SITE'':''ADDRESS''&amp;lt;/code&amp;gt; (see [[#Component-specific settings|Component-specific settings]]).&lt;br /&gt;
* Generate build.ninja files and build using Ninja: &amp;lt;code&amp;gt;-G Ninja&amp;lt;/code&amp;gt;&lt;br /&gt;
* Run CMake in verbose mode: &amp;lt;code&amp;gt;--verbose&amp;lt;/code&amp;gt; (this shows compilation commands)&lt;br /&gt;
&lt;br /&gt;
For example, if you are a developer and wish to quickly recompile and reinstall only your own modifications for FlightGear, you can do this:&lt;br /&gt;
 $ download_and_compile.sh -j$(nproc) -p n -d n -r n FGFS&lt;br /&gt;
&lt;br /&gt;
Note that this is the same as:&lt;br /&gt;
 $ download_and_compile.sh -j$(nproc) -pn -dn -rn FGFS&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;-rn&amp;lt;/code&amp;gt; option may be necessary, though (this is the case in particular if you added or removed C++ files).&lt;br /&gt;
&lt;br /&gt;
=== ccache ===&lt;br /&gt;
[https://ccache.dev/ ccache] is a compiler cache that enormously speeds up subsequent recompilations (compilation times are often divided by a factor 6 or more). SimGear and FlightGear 2024.1 or later perform &amp;lt;tt&amp;gt;ccache&amp;lt;/tt&amp;gt;-enabled builds when &amp;lt;code&amp;gt;-DENABLE_CCACHE=ON&amp;lt;/code&amp;gt; is passed to [https://cmake.org/ CMake]. For &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; users, there are several ways to do this.&lt;br /&gt;
&lt;br /&gt;
The simplest way is to pass &amp;lt;code&amp;gt;--enable-ccache&amp;lt;/code&amp;gt; to &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;. This has an effect when processing components such as &amp;lt;tt&amp;gt;SIMGEAR&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;FGFS&amp;lt;/tt&amp;gt;; other components may support the option or ignore it. Using this option is equivalent to passing &amp;lt;code&amp;gt;--cmake-arg ALL=&amp;quot;-DENABLE_CCACHE=ON&amp;quot;&amp;lt;/code&amp;gt; to &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;. This causes the script to pass &amp;lt;code&amp;gt;-DENABLE_CCACHE=ON&amp;lt;/code&amp;gt; to all CMake-based components that are processed. For those that don't support this option, you'll see a harmless warning that you can safely ignore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CMake Warning:&lt;br /&gt;
  Manually-specified variables were not used by the project:&lt;br /&gt;
&lt;br /&gt;
    ENABLE_CCACHE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, if you prefer, you can pass &amp;lt;code&amp;gt;-DENABLE_CCACHE=ON&amp;lt;/code&amp;gt; to specific components using for instance&lt;br /&gt;
 --cmake-arg SIMGEAR=&amp;quot;-DENABLE_CCACHE=ON&amp;quot;&lt;br /&gt;
and/or&lt;br /&gt;
 --cmake-arg FGFS=&amp;quot;-DENABLE_CCACHE=ON&amp;quot;&lt;br /&gt;
This results in longer command lines than the previous methods but allows one to avoid the warning, if it bothers you.&lt;br /&gt;
&lt;br /&gt;
{{Note|&amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; automatically installs &amp;lt;tt&amp;gt;ccache&amp;lt;/tt&amp;gt; if its seems required and package installation hasn't been disabled. Otherwise, you can install it yourself using &amp;lt;code&amp;gt;apt install ccache&amp;lt;/code&amp;gt; before using &amp;lt;code&amp;gt;--enable-ccache&amp;lt;/code&amp;gt; or similar.}}&lt;br /&gt;
&lt;br /&gt;
== Optimus technology ==&lt;br /&gt;
If your computer has a GPU with Optimus technology, you need a dedicated script in order to make FlightGear run with the powerful GPU.&lt;br /&gt;
&lt;br /&gt;
After having installed required tools (Bumblebee) you just need to run this command line in your FlightGear installation directory (where you executed &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;):&lt;br /&gt;
 $ sed  's|\./fgfs|optirun ./fgfs|' run_fgfs.sh &amp;gt; run_fgfs_optirun.sh &amp;amp;&amp;amp; chmod +x run_fgfs_optirun.sh&lt;br /&gt;
Now you can run FlightGear with &amp;lt;code&amp;gt;./run_fgfs_optirun.sh&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The same can be done for the [[FlightGear_Launch_Control|FGRun]] launcher:&lt;br /&gt;
 $ sed  's|\./fgrun|optirun ./fgrun|' run_fgrun.sh &amp;gt; run_fgrun_optirun.sh &amp;amp;&amp;amp; chmod +x run_fgrun_optirun.sh&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* {{fgmeta source&lt;br /&gt;
| path = fg-from-scratch&lt;br /&gt;
| text = fg-from-scratch&lt;br /&gt;
}};&lt;br /&gt;
* [[Fedora Packages and Compiling]];&lt;br /&gt;
* [[Superbuild]];&lt;br /&gt;
* [http://geoffmclane.com/fg/fgfs-052.htm Another script] for building FlightGear and all its dependencies in an automated fashion. The page seems a bit oldish, though (as of 2019).&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Building from source]]&lt;br /&gt;
&lt;br /&gt;
[[fr:Script de compilation sous Linux Debian/Ubuntu]]&lt;br /&gt;
[[nl:Compileren met een Script op Linux Debian/Ubuntu]]&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=FlightGear_wiki:Village_pump&amp;diff=144067</id>
		<title>FlightGear wiki:Village pump</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=FlightGear_wiki:Village_pump&amp;diff=144067"/>
		<updated>2026-04-21T13:40:14Z</updated>

		<summary type="html">&lt;p&gt;Rominet: /* Nasal unit test assertion documentation */ Add signature&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NEWSECTIONLINK__&lt;br /&gt;
{{Archives|[[/Archive 2012|2012]]|[[/Archive 2013|2013]]|[[/Archive 2014|2014]]|[[/Archive 2015|2015]]|[[/Archive 2016|2016]]|[[/Archive 2017|2017]]|[[/Archive 2018|2018]]|[[/Archive 2019|2019]]|[[/Archive 2020|2020]]|[[/Archive 2021|2021]]|[[/Archive 2022|2022]]}}&lt;br /&gt;
{{shortcut|FGW:VP}}&lt;br /&gt;
&lt;br /&gt;
Welcome to the '''Village Pump'''. This page is used to discuss the technical issues, operations and guidelines of the [[FlightGear wiki]].&lt;br /&gt;
&lt;br /&gt;
Please &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[{{fullurl:{{FULLPAGENAME}}|action=edit&amp;amp;section=new}} add new topics]&amp;lt;/span&amp;gt; to the '''bottom''' of this page.&lt;br /&gt;
&lt;br /&gt;
Old discussions should be moved to a [[FlightGear wiki:Village pump/Archive YEAR]]. These discussions can then be moved to a relevant talk page if appropriate.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== MediaWiki updated to 1.39.6 ==&lt;br /&gt;
&lt;br /&gt;
We have updated MediaWiki to its latest LTS version 1.39.6 today. Although we've tested the update, chances are that we've missed certain scenarios or features. Please report any issues that you may encounter.&lt;br /&gt;
&lt;br /&gt;
[[User:Gijs|Gijs]] ([[User talk:Gijs|talk]]) 09:31, 30 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Embedded YouTube videos broken ==&lt;br /&gt;
&lt;br /&gt;
It seems that the [[mw:Extension:EmbedVideo|EmbedVideo extension]] was removed at some point. Consequently, pages such as [[Howto:Creating FlightGear Promo Videos]] are broken. At present, the best replacements seems to be [[mw:Extension:EmbedVideo_(fork)|a fork]] and [[mw:Extension:YouTube|Extension:YouTube]].&lt;br /&gt;
&lt;br /&gt;
—'''''[[User:Red Leader|&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Red Leader&amp;lt;/span&amp;gt;]]''''' ([[User talk:Red Leader|talk]], [[Special:Contributions/Red Leader|contribs]]) 19:21, 30 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Hi,&lt;br /&gt;
: Thanks for the report. It was introduced by today's update, but should be fixed now.&lt;br /&gt;
: [[User:Gijs|Gijs]] ([[User talk:Gijs|talk]]) 21:21, 30 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: Confirmed, thanks. And I’d completely forgotten about {{[[Template:Wikipedia|wikipedia]]}}. 😅&lt;br /&gt;
:: '''''[[User:Red Leader|&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Red Leader&amp;lt;/span&amp;gt;]]''''' ([[User talk:Red Leader|talk]], [[Special:Contributions/Red Leader|contribs]]) 21:57, 30 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Forum registration problem ==&lt;br /&gt;
&lt;br /&gt;
Hello,&lt;br /&gt;
I would like to register on the forum, but I tried several times without success. I sent an email to the administrator some time ago, but it seems to have been lost. I don't know what to do, is there somebody here who could help? Please tell me if you need additional information.&lt;br /&gt;
Thanks very much in advance. [[User:Kestrel|Kestrel]] ([[User talk:Kestrel|talk]]) 13:14, 25 March 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Hi,&lt;br /&gt;
: That's unfortunate! You can find my email address at https://forum.flightgear.org/contact.php Please try again if you've done that before, I'll actively monitor the address for any incoming messages, and let me know if you don't get a reply.&lt;br /&gt;
: [[User:Gijs|Gijs]] ([[User talk:Gijs|talk]]) 15:01, 25 March 2024 (UTC) (forum admin)&lt;br /&gt;
&lt;br /&gt;
== Sidebar link for &amp;quot;Build server&amp;quot; is broken ==&lt;br /&gt;
&lt;br /&gt;
Hello, &lt;br /&gt;
&lt;br /&gt;
Just wanted to bring to someones attention that the URL for &amp;quot;Build server&amp;quot; currently 404s. Not sure if this resource still exists or if its URL has changed.&lt;br /&gt;
&lt;br /&gt;
Cheers!&lt;br /&gt;
-Joshua&lt;br /&gt;
&lt;br /&gt;
: Hi Joshua,&lt;br /&gt;
: The URL is still correct, but the build server is temporarily down due to a server failure. It's being worked on, so should be back up &amp;quot;soon&amp;quot;.&lt;br /&gt;
: [[User:Gijs|Gijs]] ([[User talk:Gijs|talk]]) 12:29, 3 September 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
== FlightGear Wikipedia article image needs correctly sourced Flightgear wiki screenshot ==&lt;br /&gt;
https://en.wikipedia.org/wiki/FlightGear&lt;br /&gt;
&lt;br /&gt;
The image used for the Flightgear Wikipedia article appears to have been deleted, because it was sourced from the following Flightgear-wiki screenshot page:&lt;br /&gt;
&lt;br /&gt;
[[:File:Bo 105 over Sint Marteen.png]]&lt;br /&gt;
&lt;br /&gt;
which referred to an imgur link instead of the following thread, which gives a CC license based on a google search of the file name:&lt;br /&gt;
&lt;br /&gt;
https://forum.flightgear.org/viewtopic.php?f=88&amp;amp;t=32163&amp;amp;start=0&lt;br /&gt;
&lt;br /&gt;
Discussion on Wikipedia:&lt;br /&gt;
&lt;br /&gt;
https://en.wikipedia.org/wiki/Wikipedia:Files_for_discussion/2024_December_7#File:FlightGear_Flight_Sim_Bo_105_over_Sint_Marteen.png&lt;br /&gt;
&lt;br /&gt;
&amp;gt; ''Subsequent comments should be made on the appropriate discussion page (such as the file's talk page or in a [https://en.wikipedia.org/wiki/Wikipedia:Deletion_review deletion review]).''&lt;br /&gt;
&lt;br /&gt;
The person who uploaded it, or someone from the wiki, should ideally fix the FlightGear wiki page, and do a deletion review for the Wikipedia file. The file may have been used in multiple pages since screenshots are uncommon on Wikipedia due to proprietary apps. Feel free to remove this comment once it's taken care of. Good luck&lt;br /&gt;
&lt;br /&gt;
== Issues with three templates ==&lt;br /&gt;
&lt;br /&gt;
Hi,&lt;br /&gt;
&lt;br /&gt;
The [[Template:Fgmeta_commit|fgmeta commit]] template appears to be broken. It used to work in the first ''Note'' [[Scripted_Compilation_on_Linux_Debian/Ubuntu#For_the_curious:_the_SSH_way|here]] (see the URL).&lt;br /&gt;
&lt;br /&gt;
Also, I tried to use [[Template:Repo_link#Site:_Generic]] to create a link to the [https://gitlab.kitware.com/cmake/cmake.git CMake repo], but didn't manage: IIRC, the link text was empty.&lt;br /&gt;
&lt;br /&gt;
Finally, [[Template:Fgmeta_source]] doesn't seem to to what the doc. says for ''simplepath'': with&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;{{fgmeta source&lt;br /&gt;
| path = download_and_compile.sh&lt;br /&gt;
| simplepath = 1&lt;br /&gt;
}}&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the link text starts with a slash, so I used&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;{{fgmeta source&lt;br /&gt;
| path = download_and_compile.sh&lt;br /&gt;
| text = download_and_compile.sh&lt;br /&gt;
}}&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
which is of course more redundant.&lt;br /&gt;
&lt;br /&gt;
Thanks for considering! :-)&lt;br /&gt;
&lt;br /&gt;
[[User:Rominet|Rominet]] ([[User talk:Rominet|talk]])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
: Good catch.  I need to look into that one.  I may not have coded the commit part of GitLab into the master {{tl|repo_link}} template.&lt;br /&gt;
&lt;br /&gt;
: [[User:Bugman|Bugman]] ([[User talk:Bugman|talk]]) 15:41, 13 March 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: All fixed.  It was quite simple - the {{tl|fgmeta_source}} template was missing the &amp;lt;code&amp;gt;proj&amp;lt;/code&amp;gt; parameter.  I've also fixed {{tl|fgmeta_clone}}.&lt;br /&gt;
&lt;br /&gt;
:: [[User:Bugman|Bugman]] ([[User talk:Bugman|talk]]) 15:53, 13 March 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
::: Thanks for the reply and fixes, Bugman! (And sorry for the delay, I didn't see any notification...) I see the first item is indeed addressed. Regarding the second item, well, I see no place where I'd really want to use this now on the d&amp;amp;c page, so didn't test it. As for the third one, I still get &amp;lt;code&amp;gt;/download_and_compile.sh&amp;lt;/code&amp;gt; in the Preview when I try the above {{tl|fgmeta_source}} snippet with &amp;lt;code&amp;gt;simplepath = 1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
::: I looked at {{tl|fgmeta_clone}} too; it looks nice but seems to default to the &amp;lt;code&amp;gt;git://&amp;lt;/code&amp;gt; protocol. Would it be possible to make it default to using &amp;lt;code&amp;gt;https://&amp;lt;/code&amp;gt;? Thanks again. :-)&lt;br /&gt;
 &lt;br /&gt;
::: [[User:Rominet|Rominet]] ([[User talk:Rominet|talk]])&lt;br /&gt;
&lt;br /&gt;
:::: Not a problem.  For the &amp;lt;code&amp;gt;simplepath&amp;lt;/code&amp;gt; parameter, that is the designed behaviour in the {{tl|repo link}} template.  In most cases our repositories have complex directory structures and the desired output is the absolute file path, removing the protocol and URL parts of the path.  Do you wish to simply have the file name there?  No one had asked for that before, so I never added an option for that.  In the case of the source repositories, you often want to remove the first part of the absolute path so that for example in SimGear, {{simgear source|path=simgear/scene/util/QuadTreeBuilder.hxx|simplepath=1}} (&amp;lt;nowiki&amp;gt;{{simgear source|path=simgear/scene/util/QuadTreeBuilder.hxx|simplepath=1}}&amp;lt;/nowiki&amp;gt;) would be shown as {{simgear source|path=simgear/scene/util/QuadTreeBuilder.hxx|text=scene/util/QuadTreeBuilder.hxx}} (&amp;lt;nowiki&amp;gt;{{simgear source|path=simgear/scene/util/QuadTreeBuilder.hxx|text=scene/util/QuadTreeBuilder.hxx}}&amp;lt;/nowiki&amp;gt;.  This is not scriptable in MediaWiki so I left it all for the text parameter.&lt;br /&gt;
&lt;br /&gt;
:::: For the protocol, I have now added the &amp;lt;code&amp;gt;protocol&amp;lt;/code&amp;gt; parameter.  E.g. &amp;lt;nowiki&amp;gt;{{fgmeta clone | protocol = https}}&amp;lt;/nowiki&amp;gt;.  That will give &amp;lt;code&amp;gt;{{fgmeta clone | protocol = https}}&amp;lt;/code&amp;gt; (as of today generated as &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;git clone https://gitlab.com/flightgear/fgmeta.git&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
:::: [[User:Bugman|Bugman]] ([[User talk:Bugman|talk]]) 08:51, 24 March 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
::::: Thanks Bugman, I've updated the [[Scripted_Compilation_on_Linux_Debian/Ubuntu|download_and_compile.sh page]] to use &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{fgmeta clone | protocol = https}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; as you proposed; it works great. For the link to download_and_compile.sh, I can continue to use &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{fgmeta source | path = download_and_compile.sh | text = download_and_compile.sh}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, no problem.&lt;br /&gt;
&lt;br /&gt;
::::: As far as I'm concerned, everything is resolved here, so this thread/section can be deleted if someone wants to “clean up”.&lt;br /&gt;
&lt;br /&gt;
::::: ''Other subject:'' the only remaining thing is that I didn't receive any notification, neither for your replies here nor for the January changes by [[User:Jebba|Jebba]] to the [[Scripted_Compilation_on_Linux_Debian/Ubuntu|download_and_compile.sh page]] that is on my watchlist. I used to receive email notifications for these things years ago, haven't changed my preferences regarding this and don't see any setting that would explain why I don't receive these notifications anymore. Maybe email sending by the wiki software is not quite well configured according to current standards (SPF, DKIM, DMARC)?&lt;br /&gt;
&lt;br /&gt;
::::: [[User:Rominet|Rominet]] ([[User talk:Rominet|talk]])&lt;br /&gt;
&lt;br /&gt;
== Improve the 'simgear clone', 'flightgear clone' and 'fgdata clone' templates ==&lt;br /&gt;
&lt;br /&gt;
Hi,&lt;br /&gt;
&lt;br /&gt;
In order to improve [[Fedora_Packages_and_Compiling]], it would be nice to have the &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{simgear clone}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{flightgear clone}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{fgdata clone}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; templates on par with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{fgmeta clone}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (support for the &amp;lt;code&amp;gt;protocol&amp;lt;/code&amp;gt; parameter, etc.). I tried&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;{{simgear clone | protocol = https | opt = --single-branch --branch release/2024.1 | post = simgear}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
but it doesn't seem to work, as the preview shows this:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;git clone --single-branch --branch release/2024.1 git://gitlab.com simgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(ditto with &amp;lt;code&amp;gt;flightear clone&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;fgdata clone&amp;lt;/code&amp;gt;). Thanks in advance :-)&lt;br /&gt;
&lt;br /&gt;
[[User:Rominet|Rominet]] ([[User talk:Rominet|talk]])&lt;br /&gt;
&lt;br /&gt;
: I needed a while to work out the best strategy for these changes.  I've now gone through all of the {{tl|repo link}} cloning subtemplates listed on {{tl|repo link/doc related}} and added the &amp;lt;code&amp;gt;project&amp;lt;/code&amp;gt; parameter to the templates and the optional &amp;lt;code&amp;gt;protocol&amp;lt;/code&amp;gt; parameter.  These changes were required as the &amp;lt;code&amp;gt;gl&amp;lt;/code&amp;gt; section of the {{tl|repo_link}} template is constructed differently to the &amp;lt;code&amp;gt;sf&amp;lt;/code&amp;gt; section.  I've also updated the git cloning documentation {{tl|repo link/doc git clone}}.  I hope this covers everything you need.&lt;br /&gt;
&lt;br /&gt;
: [[User:Bugman|Bugman]] ([[User talk:Bugman|talk]]) 07:48, 1 April 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: Thanks a lot, Bugman, this works great! Your changes allowed me to perform [https://wiki.flightgear.org/w/index.php?title=Fedora_Packages_and_Compiling&amp;amp;type=revision&amp;amp;diff=141687&amp;amp;oldid=141513 this edit] in [[Fedora_Packages_and_Compiling]]. The only remaining &amp;lt;code&amp;gt;git clone&amp;lt;/code&amp;gt; command written in full on that page is for FG's fork of OpenSceneGraph at GitLab. I understand that choosing a proper name for an applicable &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{... clone}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; template probably requires some careful thinking... ;-)&lt;br /&gt;
&lt;br /&gt;
:: [[User:Rominet|Rominet]] ([[User talk:Rominet|talk]])&lt;br /&gt;
&lt;br /&gt;
== Default text in Template:Repo link ==&lt;br /&gt;
&lt;br /&gt;
Hi,&lt;br /&gt;
&lt;br /&gt;
The default ''text'' in {{tl|Repo link}} gives somewhat pleasant link texts such as&lt;br /&gt;
 flightgear/flightgear/src/Scripting/NasalSys.cxx&lt;br /&gt;
when the ''site'' is &amp;lt;code&amp;gt;sourceforge&amp;lt;/code&amp;gt;, however the result looks like a bug for other sites (though I understand this may be as intended). To be clear, the URLs are correct but the default link texts look weird because they start with the unqualified site name rather than the fully-qualified domain name. For instance,&lt;br /&gt;
 {{obr}}fgmeta source{{cbr}}&lt;br /&gt;
yields [https://gitlab.com/flightgear/fgmeta gitlab/flightgear/fgmeta/next] rather than [https://gitlab.com/flightgear/fgmeta gitlab.com/flightgear/fgmeta/next]. I suggest to replace &amp;lt;code&amp;gt;gitlab&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;gitlab.com&amp;lt;/code&amp;gt; in the default text (where the HTML comment says “Site advertising”) and do the same for &amp;lt;code&amp;gt;github&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Note: the Gitorious web site doesn't exist anymore, maybe that should be removed from the template?&lt;br /&gt;
&lt;br /&gt;
Thanks for considering; I can do the replacement if you wish.&lt;br /&gt;
&lt;br /&gt;
[[User:Rominet|Rominet]] ([[User talk:Rominet|talk]]) 10:38, 12 November 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Sounds sensible, so please go ahead!&lt;br /&gt;
: Regarding Gitorious, it may be nice to link to an archived version of the repos, such as https://archive.softwareheritage.org/browse/origin/directory/?origin_url=https://gitorious.org/flightgear/fgdata.git&amp;amp;visit_type=git Altough this only makes sense for repos or branches that are not part of our current GitLab...&lt;br /&gt;
: [[User:Gijs|Gijs]] ([[User talk:Gijs|talk]]) 13:58, 12 November 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: [https://wiki.flightgear.org/w/index.php?title=Template:Repo_link&amp;amp;action=history Done], thanks Gijs!&lt;br /&gt;
::&lt;br /&gt;
&lt;br /&gt;
:: One should be careful using this, though, because the resulting link ''texts'' may be non-existing URLs (after prepending the protocol) despite looking like valid ones, as shown by the first example in [[User:Rominet/Sandbox#FGMeta-Python repo templates]]!&lt;br /&gt;
&lt;br /&gt;
:: So, to avoid people getting trapped by this, maybe the default link text should start with something like &amp;lt;code&amp;gt;[GitLab]/...&amp;lt;/code&amp;gt; rather than the &amp;lt;code&amp;gt;gitlab.com/...&amp;lt;/code&amp;gt; I just put (to make it clear that such link texts are not supposed to be “Internet addresses”).&lt;br /&gt;
:: [[User:Rominet|Rominet]] ([[User talk:Rominet|talk]]) 16:20, 12 November 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
::: This is now implemented. For instance, &amp;lt;code&amp;gt;{{obr}}fgmeta-python source {{!}} path = pyproject.toml {{!}} tag  = 1.0.0b1 {{cbr}}&amp;lt;/code&amp;gt; results in {{fgmeta-python source | path = pyproject.toml | tag  = 1.0.0b1 }}. This also holds for GitHub and GitoriousIsNowClosed. SourceForge has no such prefix for now (it initially didn't, and editing its part of {{tl|Repo link}} requires a bit more temerity than what I have at the moment :-)).&lt;br /&gt;
::: [[User:Rominet|Rominet]] ([[User talk:Rominet|talk]]) 09:15, 14 November 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
: That's a good idea.  Note for Gitorious - I added this because there are a number of historical documents/pages that refer to developments that occurred on Gitorious which were not migrated to SourceForge.  I originally made the Gitorious links work by pointing to the archive by the Internet Archive (see [[Gitorious]]).  However that archive has been offline for a few years now.  The Internet Archive are storing all the data so it may return one day.&lt;br /&gt;
&lt;br /&gt;
: [[User:Bugman|Bugman]] ([[User talk:Bugman|talk]]) 22:06, 13 November 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Beware of shortened Git commit IDs ==&lt;br /&gt;
&lt;br /&gt;
While fixing broken links due to the {{tl|foo commit}} templates not specifying &amp;lt;code&amp;gt;proj=flightgear&amp;lt;/code&amp;gt; (this was implicit with &amp;lt;code&amp;gt;site=sf&amp;lt;/code&amp;gt; but isn't with &amp;lt;code&amp;gt;site=gl&amp;lt;/code&amp;gt;), I found that URLs at GitLab don't accept the same shortened Git commit IDs as those at SourceForge:&lt;br /&gt;
 https://sourceforge.net/p/flightgear/fgdata/ci/807062 - OK&lt;br /&gt;
 https://gitlab.com/flightgear/fgdata/-/commit/807062  - NOK&lt;br /&gt;
 https://gitlab.com/flightgear/fgdata/-/commit/807062d - OK&lt;br /&gt;
 https://gitlab.com/flightgear/fgdata/-/commit/807062d0b6f858885547f27325e829c2bf42a12b - OK&lt;br /&gt;
&lt;br /&gt;
As a consequence, there are probably a lot of broken links in the wiki due to shortened commit IDs. Better always use the long ones...&lt;br /&gt;
&lt;br /&gt;
{{Note|Commit ID 807062 in FGData is not ambiguous at the time of this writing.}}&lt;br /&gt;
[[User:Rominet|Rominet]] ([[User talk:Rominet|talk]]) 15:45, 3 December 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
: I have modified {{tl|Simgear_commit}}, {{tl|Flightgear_commit}}, {{tl|Fgdata_commit}}, etc. (12 templates!) to show a commit ID truncated to 7 characters in the automatically generated link text, so there is no excuse for not using the full commit IDs anymore when using these templates (see the result [[Howto:Building_FlightGear_without_HiDPI_support#Commits|here]] for instance). Thanks to [[User:Gijs|Gijs]] for installing [https://en.wikipedia.org/wiki/Module:Ustring Module:Ustring] which made this possible!&lt;br /&gt;
&lt;br /&gt;
: Note that manually provided ''text'' arguments are not truncated.&lt;br /&gt;
: {{tip|In case you feel like replacing shortened commit IDs with full ones in {{tl|foo commit}} template calls, the full commit IDs can be found like so:&lt;br /&gt;
 cd /path/to/repository&lt;br /&gt;
 git rev-parse ''shortened-id1'' ''shortened-id2'' ...&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
: [[User:Rominet|Rominet]] ([[User talk:Rominet|talk]]) 18:05, 25 December 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Nasal unit test assertion documentation ==&lt;br /&gt;
I just started an article about [[Nasal unit tests]] but could need some help improving the section about the tests.&lt;br /&gt;
&lt;br /&gt;
The only documentation I find is the {{flightgear source|path=src/Scripting/NasalUnitTesting.cxx|text=C++ source code}} and the existing test files (&amp;lt;code&amp;gt;test_*.nut&amp;lt;/code&amp;gt;) in {{fgdata source|path=Nasal|text=fgdata/Nasal}} (side note: it took me several days to figure out where the &amp;lt;code&amp;gt;nasal-test&amp;lt;/code&amp;gt; FGCommand was implemented).&lt;br /&gt;
&lt;br /&gt;
—[[User:Johan G|Johan G]] ([[User_talk:Johan_G|Talk]] | [[Special:Contributions/Johan_G|contribs]]) 12:36, 14 March 2026 (UTC)&lt;br /&gt;
&lt;br /&gt;
: In order to find the &amp;lt;code&amp;gt;nasal-test&amp;lt;/code&amp;gt; FGCommand, a simple approach is to run, in the three main repositories, &amp;lt;code&amp;gt;git grep -Fe nasal-test&amp;lt;/code&amp;gt; (or, more accurately but slower: &amp;lt;code&amp;gt;git grep -Ee '\bnasal-test\b'&amp;lt;/code&amp;gt;). This shows a few lines including&lt;br /&gt;
 globals-&amp;gt;get_commands()-&amp;gt;addCommand(&amp;quot;nasal-test&amp;quot;, &amp;amp;command_executeNasalTest);&lt;br /&gt;
: which indicates that the command is implemented by {{flightgear source | path=src/Scripting/NasalUnitTesting.cxx | line=148 | text=command_executeNasalTest()}}, which can be found using either IDE-like features (LSP server, etc.) or the same &amp;lt;code&amp;gt;git grep&amp;lt;/code&amp;gt; technique. :-)&lt;br /&gt;
&lt;br /&gt;
: [[User:Rominet|Rominet]] ([[User talk:Rominet|talk]]) 13:40, 21 April 2026 (UTC)&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=FlightGear_wiki:Village_pump&amp;diff=144013</id>
		<title>FlightGear wiki:Village pump</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=FlightGear_wiki:Village_pump&amp;diff=144013"/>
		<updated>2026-04-19T13:55:42Z</updated>

		<summary type="html">&lt;p&gt;Rominet: /* Nasal unit test assertion documentation */ How to find where an FGCommand is implemented&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NEWSECTIONLINK__&lt;br /&gt;
{{Archives|[[/Archive 2012|2012]]|[[/Archive 2013|2013]]|[[/Archive 2014|2014]]|[[/Archive 2015|2015]]|[[/Archive 2016|2016]]|[[/Archive 2017|2017]]|[[/Archive 2018|2018]]|[[/Archive 2019|2019]]|[[/Archive 2020|2020]]|[[/Archive 2021|2021]]|[[/Archive 2022|2022]]}}&lt;br /&gt;
{{shortcut|FGW:VP}}&lt;br /&gt;
&lt;br /&gt;
Welcome to the '''Village Pump'''. This page is used to discuss the technical issues, operations and guidelines of the [[FlightGear wiki]].&lt;br /&gt;
&lt;br /&gt;
Please &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[{{fullurl:{{FULLPAGENAME}}|action=edit&amp;amp;section=new}} add new topics]&amp;lt;/span&amp;gt; to the '''bottom''' of this page.&lt;br /&gt;
&lt;br /&gt;
Old discussions should be moved to a [[FlightGear wiki:Village pump/Archive YEAR]]. These discussions can then be moved to a relevant talk page if appropriate.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== MediaWiki updated to 1.39.6 ==&lt;br /&gt;
&lt;br /&gt;
We have updated MediaWiki to its latest LTS version 1.39.6 today. Although we've tested the update, chances are that we've missed certain scenarios or features. Please report any issues that you may encounter.&lt;br /&gt;
&lt;br /&gt;
[[User:Gijs|Gijs]] ([[User talk:Gijs|talk]]) 09:31, 30 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Embedded YouTube videos broken ==&lt;br /&gt;
&lt;br /&gt;
It seems that the [[mw:Extension:EmbedVideo|EmbedVideo extension]] was removed at some point. Consequently, pages such as [[Howto:Creating FlightGear Promo Videos]] are broken. At present, the best replacements seems to be [[mw:Extension:EmbedVideo_(fork)|a fork]] and [[mw:Extension:YouTube|Extension:YouTube]].&lt;br /&gt;
&lt;br /&gt;
—'''''[[User:Red Leader|&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Red Leader&amp;lt;/span&amp;gt;]]''''' ([[User talk:Red Leader|talk]], [[Special:Contributions/Red Leader|contribs]]) 19:21, 30 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Hi,&lt;br /&gt;
: Thanks for the report. It was introduced by today's update, but should be fixed now.&lt;br /&gt;
: [[User:Gijs|Gijs]] ([[User talk:Gijs|talk]]) 21:21, 30 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: Confirmed, thanks. And I’d completely forgotten about {{[[Template:Wikipedia|wikipedia]]}}. 😅&lt;br /&gt;
:: '''''[[User:Red Leader|&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Red Leader&amp;lt;/span&amp;gt;]]''''' ([[User talk:Red Leader|talk]], [[Special:Contributions/Red Leader|contribs]]) 21:57, 30 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Forum registration problem ==&lt;br /&gt;
&lt;br /&gt;
Hello,&lt;br /&gt;
I would like to register on the forum, but I tried several times without success. I sent an email to the administrator some time ago, but it seems to have been lost. I don't know what to do, is there somebody here who could help? Please tell me if you need additional information.&lt;br /&gt;
Thanks very much in advance. [[User:Kestrel|Kestrel]] ([[User talk:Kestrel|talk]]) 13:14, 25 March 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Hi,&lt;br /&gt;
: That's unfortunate! You can find my email address at https://forum.flightgear.org/contact.php Please try again if you've done that before, I'll actively monitor the address for any incoming messages, and let me know if you don't get a reply.&lt;br /&gt;
: [[User:Gijs|Gijs]] ([[User talk:Gijs|talk]]) 15:01, 25 March 2024 (UTC) (forum admin)&lt;br /&gt;
&lt;br /&gt;
== Sidebar link for &amp;quot;Build server&amp;quot; is broken ==&lt;br /&gt;
&lt;br /&gt;
Hello, &lt;br /&gt;
&lt;br /&gt;
Just wanted to bring to someones attention that the URL for &amp;quot;Build server&amp;quot; currently 404s. Not sure if this resource still exists or if its URL has changed.&lt;br /&gt;
&lt;br /&gt;
Cheers!&lt;br /&gt;
-Joshua&lt;br /&gt;
&lt;br /&gt;
: Hi Joshua,&lt;br /&gt;
: The URL is still correct, but the build server is temporarily down due to a server failure. It's being worked on, so should be back up &amp;quot;soon&amp;quot;.&lt;br /&gt;
: [[User:Gijs|Gijs]] ([[User talk:Gijs|talk]]) 12:29, 3 September 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
== FlightGear Wikipedia article image needs correctly sourced Flightgear wiki screenshot ==&lt;br /&gt;
https://en.wikipedia.org/wiki/FlightGear&lt;br /&gt;
&lt;br /&gt;
The image used for the Flightgear Wikipedia article appears to have been deleted, because it was sourced from the following Flightgear-wiki screenshot page:&lt;br /&gt;
&lt;br /&gt;
[[:File:Bo 105 over Sint Marteen.png]]&lt;br /&gt;
&lt;br /&gt;
which referred to an imgur link instead of the following thread, which gives a CC license based on a google search of the file name:&lt;br /&gt;
&lt;br /&gt;
https://forum.flightgear.org/viewtopic.php?f=88&amp;amp;t=32163&amp;amp;start=0&lt;br /&gt;
&lt;br /&gt;
Discussion on Wikipedia:&lt;br /&gt;
&lt;br /&gt;
https://en.wikipedia.org/wiki/Wikipedia:Files_for_discussion/2024_December_7#File:FlightGear_Flight_Sim_Bo_105_over_Sint_Marteen.png&lt;br /&gt;
&lt;br /&gt;
&amp;gt; ''Subsequent comments should be made on the appropriate discussion page (such as the file's talk page or in a [https://en.wikipedia.org/wiki/Wikipedia:Deletion_review deletion review]).''&lt;br /&gt;
&lt;br /&gt;
The person who uploaded it, or someone from the wiki, should ideally fix the FlightGear wiki page, and do a deletion review for the Wikipedia file. The file may have been used in multiple pages since screenshots are uncommon on Wikipedia due to proprietary apps. Feel free to remove this comment once it's taken care of. Good luck&lt;br /&gt;
&lt;br /&gt;
== Issues with three templates ==&lt;br /&gt;
&lt;br /&gt;
Hi,&lt;br /&gt;
&lt;br /&gt;
The [[Template:Fgmeta_commit|fgmeta commit]] template appears to be broken. It used to work in the first ''Note'' [[Scripted_Compilation_on_Linux_Debian/Ubuntu#For_the_curious:_the_SSH_way|here]] (see the URL).&lt;br /&gt;
&lt;br /&gt;
Also, I tried to use [[Template:Repo_link#Site:_Generic]] to create a link to the [https://gitlab.kitware.com/cmake/cmake.git CMake repo], but didn't manage: IIRC, the link text was empty.&lt;br /&gt;
&lt;br /&gt;
Finally, [[Template:Fgmeta_source]] doesn't seem to to what the doc. says for ''simplepath'': with&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;{{fgmeta source&lt;br /&gt;
| path = download_and_compile.sh&lt;br /&gt;
| simplepath = 1&lt;br /&gt;
}}&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the link text starts with a slash, so I used&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;{{fgmeta source&lt;br /&gt;
| path = download_and_compile.sh&lt;br /&gt;
| text = download_and_compile.sh&lt;br /&gt;
}}&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
which is of course more redundant.&lt;br /&gt;
&lt;br /&gt;
Thanks for considering! :-)&lt;br /&gt;
&lt;br /&gt;
[[User:Rominet|Rominet]] ([[User talk:Rominet|talk]])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
: Good catch.  I need to look into that one.  I may not have coded the commit part of GitLab into the master {{tl|repo_link}} template.&lt;br /&gt;
&lt;br /&gt;
: [[User:Bugman|Bugman]] ([[User talk:Bugman|talk]]) 15:41, 13 March 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: All fixed.  It was quite simple - the {{tl|fgmeta_source}} template was missing the &amp;lt;code&amp;gt;proj&amp;lt;/code&amp;gt; parameter.  I've also fixed {{tl|fgmeta_clone}}.&lt;br /&gt;
&lt;br /&gt;
:: [[User:Bugman|Bugman]] ([[User talk:Bugman|talk]]) 15:53, 13 March 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
::: Thanks for the reply and fixes, Bugman! (And sorry for the delay, I didn't see any notification...) I see the first item is indeed addressed. Regarding the second item, well, I see no place where I'd really want to use this now on the d&amp;amp;c page, so didn't test it. As for the third one, I still get &amp;lt;code&amp;gt;/download_and_compile.sh&amp;lt;/code&amp;gt; in the Preview when I try the above {{tl|fgmeta_source}} snippet with &amp;lt;code&amp;gt;simplepath = 1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
::: I looked at {{tl|fgmeta_clone}} too; it looks nice but seems to default to the &amp;lt;code&amp;gt;git://&amp;lt;/code&amp;gt; protocol. Would it be possible to make it default to using &amp;lt;code&amp;gt;https://&amp;lt;/code&amp;gt;? Thanks again. :-)&lt;br /&gt;
 &lt;br /&gt;
::: [[User:Rominet|Rominet]] ([[User talk:Rominet|talk]])&lt;br /&gt;
&lt;br /&gt;
:::: Not a problem.  For the &amp;lt;code&amp;gt;simplepath&amp;lt;/code&amp;gt; parameter, that is the designed behaviour in the {{tl|repo link}} template.  In most cases our repositories have complex directory structures and the desired output is the absolute file path, removing the protocol and URL parts of the path.  Do you wish to simply have the file name there?  No one had asked for that before, so I never added an option for that.  In the case of the source repositories, you often want to remove the first part of the absolute path so that for example in SimGear, {{simgear source|path=simgear/scene/util/QuadTreeBuilder.hxx|simplepath=1}} (&amp;lt;nowiki&amp;gt;{{simgear source|path=simgear/scene/util/QuadTreeBuilder.hxx|simplepath=1}}&amp;lt;/nowiki&amp;gt;) would be shown as {{simgear source|path=simgear/scene/util/QuadTreeBuilder.hxx|text=scene/util/QuadTreeBuilder.hxx}} (&amp;lt;nowiki&amp;gt;{{simgear source|path=simgear/scene/util/QuadTreeBuilder.hxx|text=scene/util/QuadTreeBuilder.hxx}}&amp;lt;/nowiki&amp;gt;.  This is not scriptable in MediaWiki so I left it all for the text parameter.&lt;br /&gt;
&lt;br /&gt;
:::: For the protocol, I have now added the &amp;lt;code&amp;gt;protocol&amp;lt;/code&amp;gt; parameter.  E.g. &amp;lt;nowiki&amp;gt;{{fgmeta clone | protocol = https}}&amp;lt;/nowiki&amp;gt;.  That will give &amp;lt;code&amp;gt;{{fgmeta clone | protocol = https}}&amp;lt;/code&amp;gt; (as of today generated as &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;git clone https://gitlab.com/flightgear/fgmeta.git&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
:::: [[User:Bugman|Bugman]] ([[User talk:Bugman|talk]]) 08:51, 24 March 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
::::: Thanks Bugman, I've updated the [[Scripted_Compilation_on_Linux_Debian/Ubuntu|download_and_compile.sh page]] to use &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{fgmeta clone | protocol = https}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; as you proposed; it works great. For the link to download_and_compile.sh, I can continue to use &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{fgmeta source | path = download_and_compile.sh | text = download_and_compile.sh}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, no problem.&lt;br /&gt;
&lt;br /&gt;
::::: As far as I'm concerned, everything is resolved here, so this thread/section can be deleted if someone wants to “clean up”.&lt;br /&gt;
&lt;br /&gt;
::::: ''Other subject:'' the only remaining thing is that I didn't receive any notification, neither for your replies here nor for the January changes by [[User:Jebba|Jebba]] to the [[Scripted_Compilation_on_Linux_Debian/Ubuntu|download_and_compile.sh page]] that is on my watchlist. I used to receive email notifications for these things years ago, haven't changed my preferences regarding this and don't see any setting that would explain why I don't receive these notifications anymore. Maybe email sending by the wiki software is not quite well configured according to current standards (SPF, DKIM, DMARC)?&lt;br /&gt;
&lt;br /&gt;
::::: [[User:Rominet|Rominet]] ([[User talk:Rominet|talk]])&lt;br /&gt;
&lt;br /&gt;
== Improve the 'simgear clone', 'flightgear clone' and 'fgdata clone' templates ==&lt;br /&gt;
&lt;br /&gt;
Hi,&lt;br /&gt;
&lt;br /&gt;
In order to improve [[Fedora_Packages_and_Compiling]], it would be nice to have the &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{simgear clone}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{flightgear clone}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{fgdata clone}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; templates on par with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{fgmeta clone}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (support for the &amp;lt;code&amp;gt;protocol&amp;lt;/code&amp;gt; parameter, etc.). I tried&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;{{simgear clone | protocol = https | opt = --single-branch --branch release/2024.1 | post = simgear}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
but it doesn't seem to work, as the preview shows this:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;git clone --single-branch --branch release/2024.1 git://gitlab.com simgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(ditto with &amp;lt;code&amp;gt;flightear clone&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;fgdata clone&amp;lt;/code&amp;gt;). Thanks in advance :-)&lt;br /&gt;
&lt;br /&gt;
[[User:Rominet|Rominet]] ([[User talk:Rominet|talk]])&lt;br /&gt;
&lt;br /&gt;
: I needed a while to work out the best strategy for these changes.  I've now gone through all of the {{tl|repo link}} cloning subtemplates listed on {{tl|repo link/doc related}} and added the &amp;lt;code&amp;gt;project&amp;lt;/code&amp;gt; parameter to the templates and the optional &amp;lt;code&amp;gt;protocol&amp;lt;/code&amp;gt; parameter.  These changes were required as the &amp;lt;code&amp;gt;gl&amp;lt;/code&amp;gt; section of the {{tl|repo_link}} template is constructed differently to the &amp;lt;code&amp;gt;sf&amp;lt;/code&amp;gt; section.  I've also updated the git cloning documentation {{tl|repo link/doc git clone}}.  I hope this covers everything you need.&lt;br /&gt;
&lt;br /&gt;
: [[User:Bugman|Bugman]] ([[User talk:Bugman|talk]]) 07:48, 1 April 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: Thanks a lot, Bugman, this works great! Your changes allowed me to perform [https://wiki.flightgear.org/w/index.php?title=Fedora_Packages_and_Compiling&amp;amp;type=revision&amp;amp;diff=141687&amp;amp;oldid=141513 this edit] in [[Fedora_Packages_and_Compiling]]. The only remaining &amp;lt;code&amp;gt;git clone&amp;lt;/code&amp;gt; command written in full on that page is for FG's fork of OpenSceneGraph at GitLab. I understand that choosing a proper name for an applicable &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{... clone}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; template probably requires some careful thinking... ;-)&lt;br /&gt;
&lt;br /&gt;
:: [[User:Rominet|Rominet]] ([[User talk:Rominet|talk]])&lt;br /&gt;
&lt;br /&gt;
== Default text in Template:Repo link ==&lt;br /&gt;
&lt;br /&gt;
Hi,&lt;br /&gt;
&lt;br /&gt;
The default ''text'' in {{tl|Repo link}} gives somewhat pleasant link texts such as&lt;br /&gt;
 flightgear/flightgear/src/Scripting/NasalSys.cxx&lt;br /&gt;
when the ''site'' is &amp;lt;code&amp;gt;sourceforge&amp;lt;/code&amp;gt;, however the result looks like a bug for other sites (though I understand this may be as intended). To be clear, the URLs are correct but the default link texts look weird because they start with the unqualified site name rather than the fully-qualified domain name. For instance,&lt;br /&gt;
 {{obr}}fgmeta source{{cbr}}&lt;br /&gt;
yields [https://gitlab.com/flightgear/fgmeta gitlab/flightgear/fgmeta/next] rather than [https://gitlab.com/flightgear/fgmeta gitlab.com/flightgear/fgmeta/next]. I suggest to replace &amp;lt;code&amp;gt;gitlab&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;gitlab.com&amp;lt;/code&amp;gt; in the default text (where the HTML comment says “Site advertising”) and do the same for &amp;lt;code&amp;gt;github&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Note: the Gitorious web site doesn't exist anymore, maybe that should be removed from the template?&lt;br /&gt;
&lt;br /&gt;
Thanks for considering; I can do the replacement if you wish.&lt;br /&gt;
&lt;br /&gt;
[[User:Rominet|Rominet]] ([[User talk:Rominet|talk]]) 10:38, 12 November 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Sounds sensible, so please go ahead!&lt;br /&gt;
: Regarding Gitorious, it may be nice to link to an archived version of the repos, such as https://archive.softwareheritage.org/browse/origin/directory/?origin_url=https://gitorious.org/flightgear/fgdata.git&amp;amp;visit_type=git Altough this only makes sense for repos or branches that are not part of our current GitLab...&lt;br /&gt;
: [[User:Gijs|Gijs]] ([[User talk:Gijs|talk]]) 13:58, 12 November 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: [https://wiki.flightgear.org/w/index.php?title=Template:Repo_link&amp;amp;action=history Done], thanks Gijs!&lt;br /&gt;
::&lt;br /&gt;
&lt;br /&gt;
:: One should be careful using this, though, because the resulting link ''texts'' may be non-existing URLs (after prepending the protocol) despite looking like valid ones, as shown by the first example in [[User:Rominet/Sandbox#FGMeta-Python repo templates]]!&lt;br /&gt;
&lt;br /&gt;
:: So, to avoid people getting trapped by this, maybe the default link text should start with something like &amp;lt;code&amp;gt;[GitLab]/...&amp;lt;/code&amp;gt; rather than the &amp;lt;code&amp;gt;gitlab.com/...&amp;lt;/code&amp;gt; I just put (to make it clear that such link texts are not supposed to be “Internet addresses”).&lt;br /&gt;
:: [[User:Rominet|Rominet]] ([[User talk:Rominet|talk]]) 16:20, 12 November 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
::: This is now implemented. For instance, &amp;lt;code&amp;gt;{{obr}}fgmeta-python source {{!}} path = pyproject.toml {{!}} tag  = 1.0.0b1 {{cbr}}&amp;lt;/code&amp;gt; results in {{fgmeta-python source | path = pyproject.toml | tag  = 1.0.0b1 }}. This also holds for GitHub and GitoriousIsNowClosed. SourceForge has no such prefix for now (it initially didn't, and editing its part of {{tl|Repo link}} requires a bit more temerity than what I have at the moment :-)).&lt;br /&gt;
::: [[User:Rominet|Rominet]] ([[User talk:Rominet|talk]]) 09:15, 14 November 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
: That's a good idea.  Note for Gitorious - I added this because there are a number of historical documents/pages that refer to developments that occurred on Gitorious which were not migrated to SourceForge.  I originally made the Gitorious links work by pointing to the archive by the Internet Archive (see [[Gitorious]]).  However that archive has been offline for a few years now.  The Internet Archive are storing all the data so it may return one day.&lt;br /&gt;
&lt;br /&gt;
: [[User:Bugman|Bugman]] ([[User talk:Bugman|talk]]) 22:06, 13 November 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Beware of shortened Git commit IDs ==&lt;br /&gt;
&lt;br /&gt;
While fixing broken links due to the {{tl|foo commit}} templates not specifying &amp;lt;code&amp;gt;proj=flightgear&amp;lt;/code&amp;gt; (this was implicit with &amp;lt;code&amp;gt;site=sf&amp;lt;/code&amp;gt; but isn't with &amp;lt;code&amp;gt;site=gl&amp;lt;/code&amp;gt;), I found that URLs at GitLab don't accept the same shortened Git commit IDs as those at SourceForge:&lt;br /&gt;
 https://sourceforge.net/p/flightgear/fgdata/ci/807062 - OK&lt;br /&gt;
 https://gitlab.com/flightgear/fgdata/-/commit/807062  - NOK&lt;br /&gt;
 https://gitlab.com/flightgear/fgdata/-/commit/807062d - OK&lt;br /&gt;
 https://gitlab.com/flightgear/fgdata/-/commit/807062d0b6f858885547f27325e829c2bf42a12b - OK&lt;br /&gt;
&lt;br /&gt;
As a consequence, there are probably a lot of broken links in the wiki due to shortened commit IDs. Better always use the long ones...&lt;br /&gt;
&lt;br /&gt;
{{Note|Commit ID 807062 in FGData is not ambiguous at the time of this writing.}}&lt;br /&gt;
[[User:Rominet|Rominet]] ([[User talk:Rominet|talk]]) 15:45, 3 December 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
: I have modified {{tl|Simgear_commit}}, {{tl|Flightgear_commit}}, {{tl|Fgdata_commit}}, etc. (12 templates!) to show a commit ID truncated to 7 characters in the automatically generated link text, so there is no excuse for not using the full commit IDs anymore when using these templates (see the result [[Howto:Building_FlightGear_without_HiDPI_support#Commits|here]] for instance). Thanks to [[User:Gijs|Gijs]] for installing [https://en.wikipedia.org/wiki/Module:Ustring Module:Ustring] which made this possible!&lt;br /&gt;
&lt;br /&gt;
: Note that manually provided ''text'' arguments are not truncated.&lt;br /&gt;
: {{tip|In case you feel like replacing shortened commit IDs with full ones in {{tl|foo commit}} template calls, the full commit IDs can be found like so:&lt;br /&gt;
 cd /path/to/repository&lt;br /&gt;
 git rev-parse ''shortened-id1'' ''shortened-id2'' ...&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
: [[User:Rominet|Rominet]] ([[User talk:Rominet|talk]]) 18:05, 25 December 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Nasal unit test assertion documentation ==&lt;br /&gt;
I just started an article about [[Nasal unit tests]] but could need some help improving the section about the tests.&lt;br /&gt;
&lt;br /&gt;
The only documentation I find is the {{flightgear source|path=src/Scripting/NasalUnitTesting.cxx|text=C++ source code}} and the existing test files (&amp;lt;code&amp;gt;test_*.nut&amp;lt;/code&amp;gt;) in {{fgdata source|path=Nasal|text=fgdata/Nasal}} (side note: it took me several days to figure out where the &amp;lt;code&amp;gt;nasal-test&amp;lt;/code&amp;gt; FGCommand was implemented).&lt;br /&gt;
&lt;br /&gt;
—[[User:Johan G|Johan G]] ([[User_talk:Johan_G|Talk]] | [[Special:Contributions/Johan_G|contribs]]) 12:36, 14 March 2026 (UTC)&lt;br /&gt;
&lt;br /&gt;
: In order to find the &amp;lt;code&amp;gt;nasal-test&amp;lt;/code&amp;gt; FGCommand, a simple approach is to run, in the three main repositories, &amp;lt;code&amp;gt;git grep -Fe nasal-test&amp;lt;/code&amp;gt; (or, more accurately but slower: &amp;lt;code&amp;gt;git grep -Ee '\bnasal-test\b'&amp;lt;/code&amp;gt;). This shows a few lines including&lt;br /&gt;
 globals-&amp;gt;get_commands()-&amp;gt;addCommand(&amp;quot;nasal-test&amp;quot;, &amp;amp;command_executeNasalTest);&lt;br /&gt;
: which indicates that the command is implemented by {{flightgear source | path=src/Scripting/NasalUnitTesting.cxx | line=148 | text=command_executeNasalTest()}}, which can be found using either IDE-like features (LSP server, etc.) or the same &amp;lt;code&amp;gt;git grep&amp;lt;/code&amp;gt; technique. :-)&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Talk:Nasal_unit_tests&amp;diff=144012</id>
		<title>Talk:Nasal unit tests</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Talk:Nasal_unit_tests&amp;diff=144012"/>
		<updated>2026-04-19T13:38:46Z</updated>

		<summary type="html">&lt;p&gt;Rominet: Nasal unit tests don't use the .nut extension anymore&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Nasal unit tests renamed from &amp;lt;code&amp;gt;&amp;lt;foo&amp;gt;.nut&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;test_&amp;lt;foo&amp;gt;.nas&amp;lt;/code&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
See https://gitlab.com/flightgear/flightgear/-/work_items/3127 and the corresponding commits:&lt;br /&gt;
* {{flightgear commit | 6488bff546d062c756a0cc13ba7572e2d5f5f50e}};&lt;br /&gt;
* {{fgdata commit | 8bd5c738e401a963ec7ecddc636fb86915cd1199}}.&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Scripted_Compilation_on_Linux_Debian/Ubuntu&amp;diff=144011</id>
		<title>Scripted Compilation on Linux Debian/Ubuntu</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Scripted_Compilation_on_Linux_Debian/Ubuntu&amp;diff=144011"/>
		<updated>2026-04-19T13:16:47Z</updated>

		<summary type="html">&lt;p&gt;Rominet: /* ccache */ Update the whole section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; is a Bash script that takes care of downloading and compiling FlightGear and related software from their source code repositories with just one command execution for both 32-bit and 64-bit [https://www.debian.org/ Debian]-based systems. Pre-existing versions (if any) of the software installed by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; are not touched at all since the script downloads, builds and installs everything under the directory in which it is launched. You can choose the particular components to download, build and install.&lt;br /&gt;
&lt;br /&gt;
Unless told not to do so, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; installs packages with &amp;lt;tt&amp;gt;apt-get&amp;lt;/tt&amp;gt;. For this reason, it is primarily useful on Debian-based distributions. However, if one disables package installation (using &amp;lt;code&amp;gt;-pn&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;--sudo=echo&amp;lt;/code&amp;gt;) and installs the corresponding dependencies oneself, it can be used on other Unix-like systems such as [https://fedoraproject.org/ Fedora Linux], [https://archlinux.org/ Arch Linux] or [https://www.openbsd.org/ OpenBSD].&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; is a [https://www.gnu.org/software/bash/ Bash] script written for [https://www.debian.org/ Debian]-derived distributions ([https://www.ubuntu.com/ Ubuntu], [https://devuan.org/ Devuan], [https://www.linuxmint.com/ Linux Mint], etc.). Its purpose is to automatically install dependencies using the package manager, then build and install FlightGear-related programs.&lt;br /&gt;
&lt;br /&gt;
By default, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; installs most dependencies with &amp;lt;tt&amp;gt;apt-get&amp;lt;/tt&amp;gt; run under &amp;lt;tt&amp;gt;sudo&amp;lt;/tt&amp;gt;.&amp;lt;ref name=&amp;quot;disabling-installation-of-dependencies-via-package-manager&amp;quot;&amp;gt;If you think you already have the dependencies, this installation can be disabled either by using option &amp;lt;code&amp;gt;-pn&amp;lt;/code&amp;gt; or by passing option &amp;lt;code&amp;gt;--sudo=echo&amp;lt;/code&amp;gt; (the latter results in printing the &amp;lt;tt&amp;gt;apt-get&amp;lt;/tt&amp;gt; command line without running it).&amp;lt;/ref&amp;gt; Other dependencies, either because they aren't available in the standard APT repositories, or because of non-option arguments passed to &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;, are downloaded and compiled on the fly (this can be the case for [[PLIB]], [[Simgear]] and [[OpenSceneGraph]], for instance—it all depends on the arguments passed to the script).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; works in the directory it is run from: apart from dependencies installed via the package manager, all programs built by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; are installed under the &amp;lt;tt&amp;gt;install&amp;lt;/tt&amp;gt; subdirectory of the directory from which the script was run. In other words, installation of programs by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; is clean, very easy to undo and doesn't interfere with other programs on the system.&lt;br /&gt;
&lt;br /&gt;
It is possible to manage several directory trees with &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;; as far as it is concerned, such directory trees are completely independent from each other. For instance, if you run &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; in &amp;lt;tt&amp;gt;dir1&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;dir2&amp;lt;/tt&amp;gt;, the programs installed under &amp;lt;tt&amp;gt;dir1&amp;lt;/tt&amp;gt; won't “see” those installed under &amp;lt;tt&amp;gt;dir2&amp;lt;/tt&amp;gt;, and vice versa.&lt;br /&gt;
&lt;br /&gt;
Apart from its main purpose, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; can be used to find hopefully up-to-date build-dependency information for FlightGear and related software. You would do so by inspecting {{fgmeta source&lt;br /&gt;
| path = download_and_compile.sh&lt;br /&gt;
| text = the script &lt;br /&gt;
}} at the point where it installs packages.&amp;lt;ref name=&amp;quot;note-inspecting-download-and-compile-sh-to-gather-build-dependency-information&amp;quot;&amp;gt;Look for strings such as &amp;lt;tt&amp;gt;zlib1g-dev&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;libglew-dev&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;qt5-default&amp;lt;/tt&amp;gt;.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
Before embarking on building your own FlightGear binaries, you need to install a few tools that &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; uses to retrieve and compile source code. These tools are found in the following packages on [https://www.debian.org/ Debian] systems (and presumably on most Debian derivatives too):&lt;br /&gt;
&lt;br /&gt;
* build-essential&lt;br /&gt;
* git&lt;br /&gt;
* cmake&lt;br /&gt;
&lt;br /&gt;
These packages can be installed by running a command such as:&lt;br /&gt;
 $ sudo apt-get install build-essential git cmake&lt;br /&gt;
Once this is done, the &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; script can be run. Unless told otherwise, it will install additional tools and libraries as it runs, depending on the chosen components (this will be explained in further sections).&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;disk-space-requirements-and-build-time&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; Disk space requirements and build time ==&lt;br /&gt;
&lt;br /&gt;
As of April 2019, building FlightGear requires about 12 [https://en.wikipedia.org/wiki/Gibibyte GiB] of disk space. Note that this includes downloaded source code for [[SimGear]] and FlightGear, generated build files and the large [[FGData]] repository (about 6 GiB for that one).&lt;br /&gt;
&lt;br /&gt;
With an Intel Core i7 860 CPU (2.80 GHz) purchased in 2009, compiling [[SimGear]] and FlightGear 2019.2 with option &amp;lt;code&amp;gt;-j8&amp;lt;/code&amp;gt; takes about 14 minutes. If you don't have a fast machine and build using only one core, it may require several hours.&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
&lt;br /&gt;
You can get &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; {{fgmeta source&lt;br /&gt;
| path = download_and_compile.sh&lt;br /&gt;
| text = from FGMeta &lt;br /&gt;
}}. It is contained in the [[FGMeta]] repository, which is maintained by the FlightGear developers. The script can be downloaded from the link given above, however, for easier updates and in order to have the command &amp;lt;code&amp;gt;download_and_compile.sh --version&amp;lt;/code&amp;gt; work as intended, it is recommended to get it as explained [[#getting-download-and-compile-sh-using-an-fgmeta-clone|below]].&lt;br /&gt;
&lt;br /&gt;
In case you build stable versions of FlightGear using either of the &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt; options of &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;, remember to update the script before trying to build a new version of FlightGear (see [[#updating-download-and-compile-sh-using-an-fgmeta-clone|Updating &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;]] below). Of course, you can update it more often in order to benefit from new features or bug fixes; this is especially useful if you are building ''next''—that is, the development branch of FlightGear.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;getting-started-with-download-and-compile-sh&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; Getting started with &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
=== For the impatient ===&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;-pn&amp;lt;/code&amp;gt; or something similar to disable installation of packages from your distribution, you'll be asked for your &amp;lt;tt&amp;gt;sudo&amp;lt;/tt&amp;gt; password during execution of the &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; command (&amp;lt;tt&amp;gt;sudo&amp;lt;/tt&amp;gt; is used by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; to run commands like &amp;lt;tt&amp;gt;apt-get&amp;lt;/tt&amp;gt;). So, here is your quick recipe for getting &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; and using it to build FlightGear:&lt;br /&gt;
 mkdir -p ~/flightgear/dnc-managed&lt;br /&gt;
 cd ~/flightgear&lt;br /&gt;
 {{fgmeta clone | protocol = https}}&lt;br /&gt;
 cd ~/flightgear/dnc-managed&lt;br /&gt;
 ~/flightgear/fgmeta/download_and_compile.sh -s -j$(nproc)&lt;br /&gt;
 ./run_fgfs.sh --launcher&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; option passed to &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; instructs it to build the latest stable release of FlightGear. Use option &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; instead if you want the latest Long Term Stable release (it may be older but possibly more stable), or &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt; for the previous LTS release. If you pass none of &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt;, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; will build the ''next'' suite, which contains the development version of FlightGear. For more details on these options, see [[#Release selection|Release selection]].&lt;br /&gt;
&lt;br /&gt;
The command &amp;lt;tt&amp;gt;run_fgfs.sh --launcher&amp;lt;/tt&amp;gt; starts the [[FlightGear Qt launcher|FlightGear built-in launcher]]. This is often convenient but not compulsory. Another way to start FlightGear could be &amp;lt;code&amp;gt;./run_fgfs.sh --airport=PHTO --aircraft=c172p&amp;lt;/code&amp;gt;. There are plenty of other options, which are listed by &amp;lt;code&amp;gt;./run_fgfs.sh --help --verbose&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
In some cases, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; 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, pass the &amp;lt;code&amp;gt;--non-interactive&amp;lt;/code&amp;gt; option to suppress them.&lt;br /&gt;
&lt;br /&gt;
More detailed instructions are given below. The following sections also explain how to update &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; and FlightGear.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;getting-started-with-download-and-compile-sh-notations&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; Notations ===&lt;br /&gt;
&lt;br /&gt;
When a command should be run as an unpriviledged user, it will be preceded by a dollar sign:&lt;br /&gt;
 $ whoami&lt;br /&gt;
 toto&lt;br /&gt;
In contrast, a hash sign (#) means that the command must be run with superuser privileges to achieve the desired effect:&lt;br /&gt;
 # whoami&lt;br /&gt;
 root&lt;br /&gt;
&lt;br /&gt;
In order to make instructions easy to understand, two directories (= folders) will be consistently used for the same purpose below:&lt;br /&gt;
* &amp;lt;tt&amp;gt;~/flightgear/fgmeta&amp;lt;/tt&amp;gt; will contain a clone of the [[FGMeta]] repository; therefore, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; will reside in that directory;&lt;br /&gt;
* &amp;lt;tt&amp;gt;~/flightgear/dnc-managed&amp;lt;/tt&amp;gt; will be the directory from which we run &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;. In other words, with this setup, a typical sequence of commands could be:&lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ ~/flightgear/fgmeta/download_and_compile.sh&lt;br /&gt;
or&lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ ~/flightgear/fgmeta/download_and_compile.sh CARES PLIB SIMGEAR FGFS DATA OSG&lt;br /&gt;
These are of course just examples. The aforementioned paths are not hardwired anywhere in the script; you are free to choose the directories you want for these purposes.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;getting-download-and-compile-sh-using-an-fgmeta-clone&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; Getting &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; the “right way” ===&lt;br /&gt;
&lt;br /&gt;
There are several ways to obtain {{fgmeta source&lt;br /&gt;
| path = download_and_compile.sh&lt;br /&gt;
| text = download_and_compile.sh&lt;br /&gt;
}}. The method described here makes it very easy to update the script and causes the command &amp;lt;code&amp;gt;download_and_compile.sh --version&amp;lt;/code&amp;gt; to work as intended.&lt;br /&gt;
&lt;br /&gt;
As explained in [[#getting-started-with-download-and-compile-sh-notations|Notations]], we want to clone the [[FGMeta]] repository in &amp;lt;tt&amp;gt;~/flightgear/fgmeta&amp;lt;/tt&amp;gt; and work with its ''next'' branch. Let's go:&lt;br /&gt;
 $ mkdir -p ~/flightgear&lt;br /&gt;
 $ cd ~/flightgear&lt;br /&gt;
 $ {{fgmeta clone | protocol = https}}&lt;br /&gt;
You now have a fresh FGMeta clone in &amp;lt;tt&amp;gt;~/flightgear/fgmeta&amp;lt;/tt&amp;gt; and your brand new &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; script is located in that directory. You can already try it to see the available options:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ~/flightgear/fgmeta/download_and_compile.sh --help&lt;br /&gt;
download_and_compile.sh [OPTION...] [--] [COMPONENT...]&lt;br /&gt;
Download and compile components belonging to the FlightGear ecosystem.&lt;br /&gt;
&lt;br /&gt;
Without any COMPONENT listed, or if ALL is specified, recompile all&lt;br /&gt;
components listed in the WHATTOBUILDALL variable. Each COMPONENT may&lt;br /&gt;
be one of the following words:&lt;br /&gt;
&lt;br /&gt;
  ALL, ATCPIE, CARES, CMAKE, DATA, FFGO, FGFS, FGRUN, FGX, OPENRADAR, OPENRTI, OSG, PLIB, SIMGEAR, TERRAGEAR, TERRAGEARGUI, ZLIB.&lt;br /&gt;
&lt;br /&gt;
Available options:&lt;br /&gt;
  -h, --help    show this help message and exit&lt;br /&gt;
      --version print version and license information, then exit&lt;br /&gt;
&lt;br /&gt;
(...)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;updating-download-and-compile-sh-using-an-fgmeta-clone&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; Updating &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Now that you have &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; from the [[FGMeta]] repository, it is very easy to update (this assumes you didn't modify anything yourself inside &amp;lt;tt&amp;gt;~/flightgear/fgmeta&amp;lt;/tt&amp;gt;!):&lt;br /&gt;
 $ cd ~/flightgear/fgmeta &amp;amp;&amp;amp; git pull&lt;br /&gt;
&lt;br /&gt;
If you want to keep updates as easy as we just showed, it is best not to modify &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; yourself. &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; has plenty of options that usually make it unnecessary to modify the script. Just run &amp;lt;code&amp;gt;download_and_compile.sh --help&amp;lt;/code&amp;gt; and learn about the available options when you feel the need to change something. Unless you have special needs that can only be accomodated by modifying &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;, you are invited to skip to the next section.&lt;br /&gt;
&lt;br /&gt;
If you really, ''really'' want to modify &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; while keeping updates easy, a good technique is to add your changes to your FGMeta clone in the form of one or more Git ''commits'' (no need to push them anywhere, commits can remain in your clone). How to do that is beyond the scope of this document, though; read Git tutorials if you want to learn it (there are plenty on the Internet). Once you have committed your changes to your FGMeta clone, make sure the repository is clean (use &amp;lt;code&amp;gt;git status&amp;lt;/code&amp;gt;), then update it with:&lt;br /&gt;
 $ cd ~/flightgear/fgmeta &amp;amp;&amp;amp; git pull --rebase&lt;br /&gt;
This will apply your commits on top of the latest commit of the branch that is currently checked out, which so far contained the official version of &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;. In case your changes conflict with the update, Git will tell you and you'll have to resolve the conflict manually (look for “Git resolve conflict” on your favorite search engine)... or start again from a pristine [[FGMeta]] clone.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;using-download-and-compile-sh-to-build-flightgear&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; Building FlightGear ===&lt;br /&gt;
&lt;br /&gt;
In what follows, we won't give the full path to &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; when showing commands to be run, but you should prepend it to &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; whenever you see a &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; command. For instance, if you used the same path as in [[#getting-started-with-download-and-compile-sh-notations|Notations]] and see the command:&lt;br /&gt;
 $ download_and_compile.sh --help&lt;br /&gt;
what you should actually run is:&lt;br /&gt;
 $ ~/flightgear/fgmeta/download_and_compile.sh --help&lt;br /&gt;
&lt;br /&gt;
Apart from this harmless command, ''do not'' run other &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; commands from an arbitrary directory, in particular ''don't'' run them from &amp;lt;tt&amp;gt;~/flightgear/fgmeta&amp;lt;/tt&amp;gt;. This is because '''most other &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; commands write to the current directory''' (&amp;lt;code&amp;gt;download_and_compile.sh --help&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;download_and_compile.sh --version&amp;lt;/code&amp;gt; are safe to run from any directory, though).&lt;br /&gt;
&lt;br /&gt;
Of course, it is always possible to make commands shorter by setting up aliases (see tips at the end of [https://sourceforge.net/p/flightgear/mailman/message/36634426/ this message]), by adding the directory containing &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; to your &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt; or by creating a symbolink link pointing to &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; in a directory that is part of your &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt;. This is not necessary, though; do it only if you feel the need (when enabled, persistent shell history is often enough to obviate the need to extend the &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
{{Note|The following commands should be run from an empty directory&amp;lt;ref name=&amp;quot;dedicated-directory-won-t-stay-empty-forever&amp;quot;&amp;gt;Well, empty before the first time; later, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; is going to populate it with plenty of FlightGear files and subdirectories, of course.&amp;lt;/ref&amp;gt; in a partition that has enough free space (see [[#disk-space-requirements-and-build-time | Disk space requirements and build time]]). As explained in [[#getting-started-with-download-and-compile-sh-notations|Notations]], we are going to choose the directory &amp;lt;tt&amp;gt;~/flightgear/dnc-managed&amp;lt;/tt&amp;gt; for this purpose, in order to express that the whole directory tree is managed by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;. This is just an example; feel free to choose another directory if you want.&lt;br /&gt;
&lt;br /&gt;
'''Don't run the commands from a non-dedicated directory,''' because it will be filled with files and directories created by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; 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.}}&lt;br /&gt;
&lt;br /&gt;
{{Tip|For some commands, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; may use &amp;lt;tt&amp;gt;sudo&amp;lt;/tt&amp;gt;. In case you want to run some other program instead of &amp;lt;tt&amp;gt;sudo&amp;lt;/tt&amp;gt;, this can be done with the &amp;lt;code&amp;gt;--sudo&amp;lt;/code&amp;gt; option of &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;. For instance, in order to see the commands that would be run with sudo without actually running them, you can pass &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;--sudo=echo&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; to &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;. Like all other options, &amp;lt;code&amp;gt;--sudo&amp;lt;/code&amp;gt; must be given ''before'' all arguments that are component names (such as &amp;lt;tt&amp;gt;SIMGEAR&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;FGFS&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;DATA&amp;lt;/tt&amp;gt;, etc.).}}&lt;br /&gt;
&lt;br /&gt;
The package manager used by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; by default is &amp;lt;tt&amp;gt;apt-get&amp;lt;/tt&amp;gt; (it won't be used if you pass &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; the &amp;lt;code&amp;gt;-pn&amp;lt;/code&amp;gt; option). You can use another one if you wish, as long as it supports the following calls:&lt;br /&gt;
 ''pkg-mgr'' update&lt;br /&gt;
 ''pkg-mgr'' install ''pkg1 pkg2'' ...&lt;br /&gt;
This is the case for &amp;lt;tt&amp;gt;aptitude&amp;lt;/tt&amp;gt; as well as &amp;lt;tt&amp;gt;apt&amp;lt;/tt&amp;gt;. If you want &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; to use &amp;lt;tt&amp;gt;aptitude&amp;lt;/tt&amp;gt;, give it the option &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;--package-manager=aptitude&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; before any of the ''COMPONENT'' arguments.&lt;br /&gt;
&lt;br /&gt;
All options of &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; can be seen by running the following command:&lt;br /&gt;
 $ download_and_compile.sh --help&lt;br /&gt;
&lt;br /&gt;
Now the instructions. '''You have chosen a dedicated directory''' where all the stuff that is downloaded and built by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; will be stored. This is &amp;lt;tt&amp;gt;~/flightgear/dnc-managed&amp;lt;/tt&amp;gt; if you followed the suggestions given in [[#getting-started-with-download-and-compile-sh-notations|Notations]], and should be empty before you run &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; for the first time. However, it is quite correct to start &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; from the same directory for subsequent runs, even when non-empty (otherwise, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; would automatically reclone the repositories every time you run it; that would be a sheer waste of time and bandwidth). All that remains to do is to run:&lt;br /&gt;
 $ mkdir -p ~/flightgear/dnc-managed&lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ download_and_compile.sh -s -j$(nproc)&lt;br /&gt;
The &amp;lt;code&amp;gt;-j$(nproc)&amp;lt;/code&amp;gt; option is not necessary, but is likely to save you a lot of time; with it, all available CPU cores will be used when compiling—see [[#Multicore acceleration| Multicore acceleration]].&lt;br /&gt;
&lt;br /&gt;
{{Note|Because of the &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; option, the above &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; command would build the latest stable release of FlightGear. If you want to build the latest Long Term Stable release, use &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; instead. For the previous LTS release, use &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt;. If you want to build the development version of FlightGear, use none of &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt;, but be warned: it may very well be unstable and unsuitable for flying. For more details on these options, see [[#Release selection|Release selection]].}}&lt;br /&gt;
&lt;br /&gt;
When you don't pass any non-option argument to &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; as done here, it takes care of the base components needed to run FlightGear in good conditions: &amp;lt;tt&amp;gt;CARES&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;PLIB&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;SIMGEAR&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;FGFS&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;DATA&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;OSG&amp;lt;/tt&amp;gt; (these are the component names used by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;, i.e., the final arguments one can optionally give in a &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; command; in normal speech, they correspond to the {{github source&lt;br /&gt;
| proj = c-ares&lt;br /&gt;
| repo = c-ares&lt;br /&gt;
| text = c-ares&lt;br /&gt;
}}, {{sourceforge source&lt;br /&gt;
| proj = libplib&lt;br /&gt;
| repo = code&lt;br /&gt;
| text = PLIB&lt;br /&gt;
}}, {{simgear source&lt;br /&gt;
| text = SimGear&lt;br /&gt;
}}, {{flightgear source&lt;br /&gt;
| text = FlightGear&lt;br /&gt;
}} and {{fgdata source&lt;br /&gt;
| text = FGData&lt;br /&gt;
}} repositories, as well as a suitable repository for [[OpenSceneGraph]]). Therefore, the above command is presently exactly equivalent to:&lt;br /&gt;
 $ download_and_compile.sh -s -j$(nproc) CARES PLIB SIMGEAR FGFS DATA OSG&lt;br /&gt;
&lt;br /&gt;
In case you want to build another component such as, say, CMAKE, you can add it to the command, like this:&lt;br /&gt;
 $ download_and_compile.sh -s -j$(nproc) CARES PLIB SIMGEAR FGFS DATA OSG CMAKE&lt;br /&gt;
&lt;br /&gt;
When the command terminates, you should have a script called &amp;lt;tt&amp;gt;run_fgfs.sh&amp;lt;/tt&amp;gt; in the directory from which you ran &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; (i.e., &amp;lt;tt&amp;gt;~/flightgear/dnc-managed&amp;lt;/tt&amp;gt; in the suggested setup). This will be your script to run FlightGear. For instance, in order to start the [[FlightGear Qt launcher|built-in launcher]], you can run the following commands:&amp;lt;ref name=&amp;quot;no-need-to-change-to-dnc-managed-dir-before-starting-generated-scripts&amp;quot;&amp;gt;We give these commands because they are easy to read, but the &amp;lt;code&amp;gt;cd&amp;lt;/code&amp;gt; command is not needed if you use the correct path, as in &amp;lt;code&amp;gt;~/flightgear/dnc-managed/run_fgfs.sh --launcher&amp;lt;/code&amp;gt;.&amp;lt;/ref&amp;gt;&lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ ./run_fgfs.sh --launcher&lt;br /&gt;
(You may omit the &amp;lt;code&amp;gt;--launcher&amp;lt;/code&amp;gt; option; this would simply start FlightGear without any launcher, at the default airport and with the default aircraft.)&amp;lt;br /&amp;gt;&lt;br /&gt;
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 &amp;lt;code&amp;gt;run_fgfs.sh --launcher&amp;lt;/code&amp;gt; is quite fine, be sure to try it first!&lt;br /&gt;
&lt;br /&gt;
{{Note|If you ran &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; from &amp;lt;tt&amp;gt;~/flightgear/dnc-managed&amp;lt;/tt&amp;gt; as proposed above, the full path of the &amp;lt;tt&amp;gt;~/flightgear/dnc-managed/install/flightgear/fgdata&amp;lt;/tt&amp;gt; directory is your [[$FG_ROOT]]. This is a very important path for FlightGear; knowing this may be useful for troubleshooting or doing “advanced things.”}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;using-download-and-compile-sh-to-update-flightgear&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; Updating FlightGear ===&lt;br /&gt;
&lt;br /&gt;
{{Note|If you built FlightGear with either of &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt;, you need to pass the ''same option'' to the &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; command given below that will update your FlightGear installation. Otherwise, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; will automatically build the ''next'' suite (bleeding-edge development version), which is probably not what you wish. Moreover, if you do want to switch from one suite to another (for instance from ''stable'' to ''next'', or from ''Long Term Stable'' to ''stable''), using the &amp;lt;code&amp;gt;--cleanup&amp;lt;/code&amp;gt; option of &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; is heartily recommended.}}&lt;br /&gt;
&lt;br /&gt;
Keeping the above note in mind, go to the directory from which you previously ran &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; (&amp;lt;tt&amp;gt;~/flightgear/dnc-managed&amp;lt;/tt&amp;gt; in the [[#Notations|suggested setup]]). This is the folder which, if you did a complete run of &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; as shown in the previous section, contains the &amp;lt;tt&amp;gt;run_fgfs.sh&amp;lt;/tt&amp;gt; script and a log file named &amp;lt;tt&amp;gt;compilation_log.txt&amp;lt;/tt&amp;gt; that records what &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; did in its last run. If you wish to update, say, {{simgear source&lt;br /&gt;
| text = SimGear&lt;br /&gt;
}}, {{flightgear source&lt;br /&gt;
| text = FlightGear&lt;br /&gt;
}}, {{fgdata source&lt;br /&gt;
| text = FGData&lt;br /&gt;
}} and [[OpenSceneGraph|OSG]], simply execute this:&lt;br /&gt;
 $ download_and_compile.sh -I -pn -j$(nproc) SIMGEAR FGFS DATA OSG&lt;br /&gt;
The &amp;lt;code&amp;gt;-I&amp;lt;/code&amp;gt; option tells &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; to ignore inter-component dependencies. If you don't use it, other components may be processed too due to these dependencies. The purpose of the behaviour without &amp;lt;code&amp;gt;-I&amp;lt;/code&amp;gt; is to help people who aren't necessarily aware of new requirements as time goes (e.g., SIMGEAR and FGFS started to require CARES by the end of 2024; a FlightGear fork of OSG is also required for FGFS ''next'' in 2025). However, it may be frustrating to specify a list of components and see additional ones being automatically added, hence the option.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;-j$(nproc)&amp;lt;/code&amp;gt; option is not necessary, but is likely to save you a lot of time; with it, all available CPU cores will be used when compiling—see [[#Multicore acceleration| Multicore acceleration]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;SIMGEAR&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;FGFS&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;DATA&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;OSG&amp;lt;/tt&amp;gt; are called ''components'' in &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; terminology. A component generally corresponds to a software repository, or something close.&lt;br /&gt;
&lt;br /&gt;
Now about the &amp;lt;code&amp;gt;-pn&amp;lt;/code&amp;gt;. It is equivalent to &amp;lt;code&amp;gt;-p n&amp;lt;/code&amp;gt; and means “don't try to install or update packages from my (Linux) distribution” (&amp;lt;code&amp;gt;y&amp;lt;/code&amp;gt; means ''yes, please install or update'', &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; means ''no, please don't''). In case you forgot that, simply run:&lt;br /&gt;
 $ download_and_compile.sh --help&lt;br /&gt;
What does it imply to pass &amp;lt;code&amp;gt;-pn&amp;lt;/code&amp;gt;? This tells &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; to completely skip the step where it checks for needed packages from your distribution and installs/updates them, by default using &amp;lt;tt&amp;gt;apt-get&amp;lt;/tt&amp;gt;. It thus goes straight to the following steps:&lt;br /&gt;
* update each repository corresponding to one of the selected components (&amp;lt;tt&amp;gt;SIMGEAR&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;FGFS&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;DATA&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;OSG&amp;lt;/tt&amp;gt; in our example);&lt;br /&gt;
* compile each selected component that requires compilation;&lt;br /&gt;
* install each selected component in the appropriate place (under &amp;lt;tt&amp;gt;~/flightgear/dnc-managed&amp;lt;/tt&amp;gt; according to our [[#getting-started-with-download-and-compile-sh-notations|Notations]]).&lt;br /&gt;
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 &amp;lt;code&amp;gt;-pn&amp;lt;/code&amp;gt; to &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;, you forbid it to install these dependencies for you. So, you can also very well update without passing the &amp;lt;code&amp;gt;-pn&amp;lt;/code&amp;gt; option, it will simply take a little longer (the time to check if all dependencies of the selected components are available with &amp;lt;tt&amp;gt;APT&amp;lt;/tt&amp;gt;). In fact, this is '''what you should do if the previous &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; run failed:''' first update &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; (see [[#getting-download-and-compile-sh-using-an-fgmeta-clone|above]]) then run it ''without'' &amp;lt;code&amp;gt;-pn&amp;lt;/code&amp;gt;&amp;lt;ref name=&amp;quot;passing-no-pn-option-equals-passing-py&amp;quot;&amp;gt;Which is the same as passing &amp;lt;code&amp;gt;-py&amp;lt;/code&amp;gt;.&amp;lt;/ref&amp;gt; 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. In this case, running &amp;lt;code&amp;gt;download_and_compile.sh --cleanup&amp;lt;/code&amp;gt; to restart the build from a clean state is probably a good idea (see [[#Cleaning built and installed files|Cleaning built and installed files]] for details on this option).&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
&lt;br /&gt;
Routine update:&lt;br /&gt;
 $ download_and_compile.sh -pn -j$(nproc) ''COMPONENT...''&lt;br /&gt;
(add &amp;lt;code&amp;gt;-I&amp;lt;/code&amp;gt; if you don't want inter-component dependencies to pull additional components). In case this fails, first update &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; (see [[#getting-download-and-compile-sh-using-an-fgmeta-clone|above]]), then run&lt;br /&gt;
 $ download_and_compile.sh --cleanup&lt;br /&gt;
 $ download_and_compile.sh -j$(nproc) ''COMPONENT...''&lt;br /&gt;
where ''COMPONENT...'' stands for the space-separated list of components you want &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; to process.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;examining-download-and-compile-sh-history&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; Examining the history of &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Looking at the latest commits that affected &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; is quite easy with your FGMeta clone:&lt;br /&gt;
 $ cd ~/flightgear/fgmeta&lt;br /&gt;
 $ git log -- download_and_compile.sh&lt;br /&gt;
(then quit by typing &amp;lt;tt&amp;gt;q&amp;lt;/tt&amp;gt;, assuming your &amp;lt;tt&amp;gt;$GIT_PAGER&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;less&amp;lt;/tt&amp;gt;)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to do the same, but also see the patch for each commit:&lt;br /&gt;
 $ cd ~/flightgear/fgmeta&lt;br /&gt;
 $ git log -p -- download_and_compile.sh&lt;br /&gt;
&lt;br /&gt;
=== For the curious: the SSH way ===&lt;br /&gt;
&lt;br /&gt;
{{Note|The method described below is not necessary anymore since {{fgmeta commit | 420034d5b51ff2d32fc0c3716b17a2d862841e0f}} (May 2020). Also, it was written at a time where the canonical location for [[FGData]] was at SourceForge; however, in 2025, the canonical location for FGData is {{fgdata source&lt;br /&gt;
| text = here&lt;br /&gt;
}}.}}&lt;br /&gt;
&lt;br /&gt;
The purpose of this section is to teach you how to clone [[FGData]] using SSH, then change the Git remote setup in your clone of that repository to retrieve further updates using https—which is convenient, as it does not require you to provide a password. This technique used to be necessary to securely retrieve FGData because of a problem in the [https://sourceforge.net/ SourceForge] infrastructure (namely, &amp;lt;code&amp;gt;git clone&amp;lt;/code&amp;gt; from SourceForge doesn't work for the big FGData repository using https). This is not needed anymore in 2025.&lt;br /&gt;
&lt;br /&gt;
Because the following method will make you connect to [https://sourceforge.net/ SourceForge] using the SSH protocol, you'll need an account on that site. 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''.&lt;br /&gt;
&lt;br /&gt;
{{Note|As explained in [[#getting-started-with-download-and-compile-sh-notations|Notations]], we assume that your Unix user name (login) is &amp;lt;tt&amp;gt;toto&amp;lt;/tt&amp;gt;. Don't confuse the &amp;lt;tt&amp;gt;sudo&amp;lt;/tt&amp;gt; password prompt (where you need to enter &amp;lt;tt&amp;gt;toto&amp;lt;/tt&amp;gt;'s password) with the password prompt for your SourceForge account! The former appears as&lt;br /&gt;
 [sudo] password for toto:&lt;br /&gt;
whereas the latter is just:&lt;br /&gt;
 Password:&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Tip|For some commands, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; may use &amp;lt;tt&amp;gt;sudo&amp;lt;/tt&amp;gt;. In case you want to run some other program instead of &amp;lt;tt&amp;gt;sudo&amp;lt;/tt&amp;gt;, this can be done with the &amp;lt;code&amp;gt;--sudo&amp;lt;/code&amp;gt; option of &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;. For instance, in order to see the commands that would be run with sudo without actually running them, you can pass &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;--sudo=echo&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; to &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;. Like all other options, &amp;lt;code&amp;gt;--sudo&amp;lt;/code&amp;gt; must be given ''before'' all arguments that are component names (such as &amp;lt;tt&amp;gt;SIMGEAR&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;FGFS&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;DATA&amp;lt;/tt&amp;gt;, etc.).}}&lt;br /&gt;
&lt;br /&gt;
{{Note|The commands given below will build the ''next'' suite, which contains the bleeding-edge development version of FlightGear. This is likely to be unstable, possibly unsuitable for flying. If you'd rather build the latest stable release or the latest Long Term Stable release, add option &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; to all &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; commands given below (or &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt; for the previous LTS release). You may add the chosen option right after the &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; command name (in any case, the option should come before non-option arguments such as SIMGEAR, FGFS, DATA, etc.). See [[#Release selection|Release selection]] for more explanations on options &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
Now the instructions. You have chosen a dedicated directory where all the stuff that is downloaded and built by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; will be stored. This is &amp;lt;tt&amp;gt;~/flightgear/dnc-managed&amp;lt;/tt&amp;gt; in our example, and should be empty before you run &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; for the first time. However, it is quite correct to start &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; from the same directory for subsequent runs, even when non-empty (otherwise, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; would automatically reclone the repositories every time you run it; that would be a sheer waste of time and bandwidth).&lt;br /&gt;
&lt;br /&gt;
Ready? Let's go!&lt;br /&gt;
&amp;lt;pre&amp;gt;$ mkdir -p ~/flightgear/dnc-managed&lt;br /&gt;
$ cd ~/flightgear/dnc-managed&lt;br /&gt;
$ download_and_compile.sh --git-clone-site-params SourceForge=ssh:SFusername DATA&lt;br /&gt;
**********************************************************************&lt;br /&gt;
*                                                                    *&lt;br /&gt;
* Warning: a typical SimGear + FlightGear + FGData build requires    *&lt;br /&gt;
* about 12 GiB of disk space. The compilation part may last from a   *&lt;br /&gt;
* few minutes to hours, depending on your computer.                  *&lt;br /&gt;
*                                                                    *&lt;br /&gt;
* Hint: use the -j option if your CPU has several cores, as in:      *&lt;br /&gt;
*                                                                    *&lt;br /&gt;
*         download_and_compile.sh -j$(nproc)                         *&lt;br /&gt;
*                                                                    *&lt;br /&gt;
**********************************************************************&lt;br /&gt;
Running 'apt-get update'...&lt;br /&gt;
[sudo] password for toto:&lt;br /&gt;
&lt;br /&gt;
(...)&lt;br /&gt;
&lt;br /&gt;
Considering a package alternative: libcurl4-openssl-dev libcurl4-gnutls-dev&lt;br /&gt;
Package alternative matched for libcurl4-openssl-dev&lt;br /&gt;
Running 'apt-get install build-essential git libcurl4-openssl-dev cmake'...&lt;br /&gt;
[sudo] password for toto:&lt;br /&gt;
&lt;br /&gt;
(...)&lt;br /&gt;
&lt;br /&gt;
****************************************&lt;br /&gt;
**************** DATA ******************&lt;br /&gt;
****************************************&lt;br /&gt;
Fetching DATA with 'git clone ssh://SFusername@git.code.sf.net/p/flightgear/fgdata'&lt;br /&gt;
Cloning into '.'...&lt;br /&gt;
The authenticity of host 'git.code.sf.net (216.105.38.16)' can't be established.&lt;br /&gt;
ECDSA key fingerprint is SHA256:FeVkoYYBjuQzb5QVAgm3BkmeN5TTgL2qfmqz9tCPRL4.&lt;br /&gt;
Are you sure you want to continue connecting (yes/no)?&lt;br /&gt;
Warning: Permanently added 'git.code.sf.net,216.105.38.16' (ECDSA) to the list of known hosts.&lt;br /&gt;
Connection closed by 216.105.38.16 port 22&lt;br /&gt;
fatal: Could not read from remote repository.&lt;br /&gt;
&lt;br /&gt;
Please make sure you have the correct access rights&lt;br /&gt;
and the repository exists.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above messages are perfectly normal but deserve a little explanation. Here, &amp;lt;tt&amp;gt;ssh&amp;lt;/tt&amp;gt; asked us to confirm that the fingerprint sent by the remote host is that of the real &amp;lt;tt&amp;gt;git.code.sf.net&amp;lt;/tt&amp;gt;, as opposed to that of some malicious server ''pretending'' to be &amp;lt;tt&amp;gt;git.code.sf.net&amp;lt;/tt&amp;gt;. This confirmation only has to be done once, after which it is remembered thanks to &amp;lt;tt&amp;gt;~/.ssh/known_hosts&amp;lt;/tt&amp;gt;. You should visit the [https://sourceforge.net/p/forge/documentation/SSH%20Key%20Fingerprints/#fingerprint-listing page that gives the host key fingerprint of every publically-accessible SSH server at SourceForge] and carefully check that the fingerprint appearing on your terminal is listed on that page for &amp;lt;tt&amp;gt;git.code.sf.net&amp;lt;/tt&amp;gt;, or some matching pattern such as &amp;lt;tt&amp;gt;*.code.sf.net&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If the fingerprint that is printed on your terminal is not listed on that page, answer &amp;lt;tt&amp;gt;no&amp;lt;/tt&amp;gt; to the question ''Are you sure you want to continue connecting (yes/no)?'' and copy/paste to flightgear-devel (see [[Mailing lists]]) the above message from &amp;lt;tt&amp;gt;ssh&amp;lt;/tt&amp;gt; that contains the fingerprint sent to you by the remote host which pretends to be &amp;lt;tt&amp;gt;git.code.sf.net&amp;lt;/tt&amp;gt;. If this happened, you should stop here and wait for answers from readers of flightgear-devel.&lt;br /&gt;
&lt;br /&gt;
From now on, we'll assume that the fingerprint you received was correct, and therefore that you have answered &amp;lt;tt&amp;gt;yes&amp;lt;/tt&amp;gt; to the ''Are you sure you want to continue connecting (yes/no)?'' question.&lt;br /&gt;
&lt;br /&gt;
In this example, it took us several minutes to verify the fingerprint of the &amp;lt;tt&amp;gt;git.code.sf.net&amp;lt;/tt&amp;gt; server and confirm it to &amp;lt;tt&amp;gt;ssh&amp;lt;/tt&amp;gt;. Because of this delay, &amp;lt;tt&amp;gt;git.code.sf.net&amp;lt;/tt&amp;gt; hung up on us and closed the connection. This is absolutely ''not a problem:'' we can just rerun the &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; command with the same arguments as the first time. Since we answered &amp;lt;tt&amp;gt;yes&amp;lt;/tt&amp;gt; to the ''Are you sure you want to continue connecting (yes/no)?'' prompt, the fingerprint of &amp;lt;tt&amp;gt;git.code.sf.net&amp;lt;/tt&amp;gt;'s key has been stored in &amp;lt;tt&amp;gt;~/.ssh/known_hosts&amp;lt;/tt&amp;gt;, therefore we won't get this prompt anymore. But if some server claiming to be &amp;lt;tt&amp;gt;git.code.sf.net&amp;lt;/tt&amp;gt; presents a host key that has a different fingerprint in the future, &amp;lt;tt&amp;gt;ssh&amp;lt;/tt&amp;gt; will print a big fat warning that the server may belong to an attacker trying to impersonate &amp;lt;tt&amp;gt;git.code.sf.net&amp;lt;/tt&amp;gt;. Therefore, this SSH host key verification is very useful to protect us from future attacks (which hopefully won't happen at all).&lt;br /&gt;
&lt;br /&gt;
As said, we just rerun the &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; command with the same arguments:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ download_and_compile.sh --git-clone-site-params SourceForge=ssh:SFusername DATA&lt;br /&gt;
**********************************************************************&lt;br /&gt;
*                                                                    *&lt;br /&gt;
* Warning: a typical SimGear + FlightGear + FGData build requires    *&lt;br /&gt;
* about 12 GiB of disk space. The compilation part may last from a   *&lt;br /&gt;
* few minutes to hours, depending on your computer.                  *&lt;br /&gt;
*                                                                    *&lt;br /&gt;
* Hint: use the -j option if your CPU has several cores, as in:      *&lt;br /&gt;
*                                                                    *&lt;br /&gt;
*         download_and_compile.sh -j$(nproc)                         *&lt;br /&gt;
*                                                                    *&lt;br /&gt;
**********************************************************************&lt;br /&gt;
Running 'apt-get update'...&lt;br /&gt;
[sudo] password for toto:&lt;br /&gt;
&lt;br /&gt;
(...)&lt;br /&gt;
&lt;br /&gt;
Considering a package alternative: libcurl4-openssl-dev libcurl4-gnutls-dev&lt;br /&gt;
Package alternative matched for libcurl4-openssl-dev&lt;br /&gt;
Running 'apt-get install build-essential git libcurl4-openssl-dev cmake'...&lt;br /&gt;
[sudo] password for toto:&lt;br /&gt;
&lt;br /&gt;
(...)&lt;br /&gt;
&lt;br /&gt;
****************************************&lt;br /&gt;
**************** DATA ******************&lt;br /&gt;
****************************************&lt;br /&gt;
Fetching DATA with 'git clone ssh://SFusername@git.code.sf.net/p/flightgear/fgdata'&lt;br /&gt;
Cloning into '.'...&lt;br /&gt;
Password:&amp;lt;/pre&amp;gt;&lt;br /&gt;
As explained above, the preceding prompt is for your SourceForge password (which you could guess from the &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;git clone ssh://SFusername@git.code.sf.net/p/flightgear/fgdata&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; command).&lt;br /&gt;
&amp;lt;pre&amp;gt;remote: Enumerating objects: 67011, done.&lt;br /&gt;
remote: Counting objects: 100% (67011/67011), done.&lt;br /&gt;
remote: Compressing objects: 100% (31342/31342), done.&lt;br /&gt;
remote: Total 67011 (delta 38776), reused 59640 (delta 33570)&lt;br /&gt;
Receiving objects: 100% (67011/67011), 2.60 GiB | 313.00 KiB/s, done.&lt;br /&gt;
Resolving deltas: 100% (38776/38776), done.&lt;br /&gt;
Checking out files: 100% (12959/12959), done.&lt;br /&gt;
Password:&amp;lt;/pre&amp;gt;&lt;br /&gt;
(It will take a fair amount of time to get there, because this is the complete download of [[FGData]].)&amp;lt;br /&amp;gt;&lt;br /&gt;
This is again a prompt for your SourceForge password, because &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; wants to run &amp;lt;code&amp;gt;git pull --rebase&amp;lt;/code&amp;gt; in the repository (admittedly, it's a bit dumb after a &amp;lt;tt&amp;gt;clone&amp;lt;/tt&amp;gt; operation—please forgive us). In case you were not monitoring the &amp;lt;tt&amp;gt;clone&amp;lt;/tt&amp;gt; operation, you probably saw the password prompt way after &amp;lt;tt&amp;gt;git.code.sf.net&amp;lt;/tt&amp;gt; got bored waiting for you and closed our second connection:&lt;br /&gt;
&amp;lt;pre&amp;gt;Connection closed by 216.105.38.16 port 22&lt;br /&gt;
fatal: Could not read from remote repository.&lt;br /&gt;
&lt;br /&gt;
Please make sure you have the correct access rights&lt;br /&gt;
and the repository exists.&amp;lt;/pre&amp;gt;&lt;br /&gt;
(if not, there should be no error message and you should have a clean FGData clone)&amp;lt;br /&amp;gt;&lt;br /&gt;
No worries. Just as before, simply rerun the command with the same arguments:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ download_and_compile.sh --git-clone-site-params SourceForge=ssh:SFusername DATA&lt;br /&gt;
**********************************************************************&lt;br /&gt;
*                                                                    *&lt;br /&gt;
* Warning: a typical SimGear + FlightGear + FGData build requires    *&lt;br /&gt;
* about 12 GiB of disk space. The compilation part may last from a   *&lt;br /&gt;
* few minutes to hours, depending on your computer.                  *&lt;br /&gt;
*                                                                    *&lt;br /&gt;
* Hint: use the -j option if your CPU has several cores, as in:      *&lt;br /&gt;
*                                                                    *&lt;br /&gt;
*         download_and_compile.sh -j$(nproc)                         *&lt;br /&gt;
*                                                                    *&lt;br /&gt;
**********************************************************************&lt;br /&gt;
Running 'apt-get update'...&lt;br /&gt;
[sudo] password for toto:&lt;br /&gt;
&lt;br /&gt;
(...)&lt;br /&gt;
&lt;br /&gt;
Considering a package alternative: libcurl4-openssl-dev libcurl4-gnutls-dev&lt;br /&gt;
Package alternative matched for libcurl4-openssl-dev&lt;br /&gt;
Running 'apt-get install build-essential git libcurl4-openssl-dev cmake'...&lt;br /&gt;
[sudo] password for toto:&lt;br /&gt;
&lt;br /&gt;
(...)&lt;br /&gt;
&lt;br /&gt;
****************************************&lt;br /&gt;
**************** DATA ******************&lt;br /&gt;
****************************************&lt;br /&gt;
DATA: the repository already exists&lt;br /&gt;
Password:&lt;br /&gt;
Already up to date.&lt;br /&gt;
Current branch next is up to date.&lt;br /&gt;
Already on 'next'&lt;br /&gt;
Your branch is up to date with 'origin/next'.&lt;br /&gt;
All optional package alternatives have found a matching package.&lt;br /&gt;
&lt;br /&gt;
download_and_compile.sh has finished to work.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
There we are! You now have a clean, up-to-date [[FGData]] clone in &amp;lt;tt&amp;gt;~/flightgear/dnc-managed/install/flightgear/fgdata&amp;lt;/tt&amp;gt; (remember: &amp;lt;tt&amp;gt;~/flightgear/dnc-managed&amp;lt;/tt&amp;gt; is the directory from which you ran &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;). Note this place: the full path of the &amp;lt;tt&amp;gt;~/flightgear/dnc-managed/install/flightgear/fgdata&amp;lt;/tt&amp;gt; directory is your [[$FG_ROOT]].&lt;br /&gt;
&lt;br /&gt;
Now, change the protocol to use for future updates of your FGData clone:&amp;lt;ref name=&amp;quot;changing-the-protocol-for-a-git-remote-manual-method&amp;quot;&amp;gt;Another way would be to manually change the relevant line starting with &amp;lt;code&amp;gt;url = &amp;lt;nowiki&amp;gt;ssh://SFusername@&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; for the &amp;lt;code&amp;gt;origin&amp;lt;/code&amp;gt; remote in the &amp;lt;tt&amp;gt;.git/config&amp;lt;/tt&amp;gt; file that lives inside your repository clone (i.e., &amp;lt;tt&amp;gt;~/flightgear/dnc-managed/install/flightgear/fgdata/.git/config&amp;lt;/tt&amp;gt; in our example).&amp;lt;/ref&amp;gt;&lt;br /&gt;
 (cd install/flightgear/fgdata &amp;amp;&amp;amp; \&lt;br /&gt;
 git remote set-url origin &amp;lt;nowiki&amp;gt;https://git.code.sf.net/p/flightgear/fgdata&amp;lt;/nowiki&amp;gt;)&lt;br /&gt;
(you can check at any time the protocol(s) in use with the command &amp;lt;code&amp;gt;git remote -v&amp;lt;/code&amp;gt; run inside a Git repository—in this case, inside the folder &amp;lt;tt&amp;gt;install/flightgear/fgdata&amp;lt;/tt&amp;gt;). As a consequence of this change, all future updates of your FGData clone will use the &amp;lt;tt&amp;gt;https&amp;lt;/tt&amp;gt; protocol, therefore you won't be prompted anymore for your SourceForge password.&lt;br /&gt;
&lt;br /&gt;
All that remains to do is to run, from the same directory as before (&amp;lt;tt&amp;gt;~/flightgear/dnc-managed&amp;lt;/tt&amp;gt; in our example):&lt;br /&gt;
 $ download_and_compile.sh -j$(nproc)&lt;br /&gt;
The &amp;lt;code&amp;gt;-j$(nproc)&amp;lt;/code&amp;gt; option is not necessary, but is likely to save you a lot of time; with it, all available CPU cores will be used when compiling—see [[#Multicore acceleration| Multicore acceleration]].&lt;br /&gt;
&lt;br /&gt;
Assuming the compilation was successful, you can now start the [[FlightGear Qt launcher|FlightGear built-in launcher]] using for instance:&lt;br /&gt;
 $ ./run_fgfs.sh --launcher&lt;br /&gt;
See [[#Building FlightGear|Building FlightGear]] for more details.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;list-of-available-components&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; List of available components ==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; script is able to download, compile (when applicable) and install the following components:&lt;br /&gt;
&lt;br /&gt;
* ATCPIE (for the [[ATC-pie]] air traffic control simulation program)&lt;br /&gt;
* CMAKE (for the [https://cmake.org/ CMake] build tool—this can be useful in case CMake is too old in your distribution)&lt;br /&gt;
* DATA (for [[FGData]], the main set of data files used by FlightGear)&lt;br /&gt;
* FGFS (for FlightGear itself)&lt;br /&gt;
* FFGO (for the [[FFGo]] FlightGear launcher)&lt;br /&gt;
* FGRUN (for the [[Fgrun|FGRun]] FlightGear launcher)&lt;br /&gt;
* FGX (for the [[FGX|FGx]] FlightGear launcher&amp;lt;ref name=&amp;quot;note-on-the-status-of-FGx-support-in-download-and-compile-sh&amp;quot;&amp;gt;Support for FGx in &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; would probably benefit from a code review.&amp;lt;/ref&amp;gt;)&lt;br /&gt;
* OPENRADAR (for the [[OpenRadar]] air traffic control simulation program)&lt;br /&gt;
* OPENRTI (for [[FlightGear HLA support (High Level Architecture)#OpenRTI | OpenRTI]]&amp;lt;ref name=&amp;quot;note-on-the-status-of-OpenRTI-support-in-FG&amp;quot;&amp;gt;Note that OpenRTI is just an optional dependency for [[FlightGear high-level architecture support | HLA support]]. For the time being, you should be just fine building without it. Eventually, the idea is for HLA to replace the existing MP system and even increasingly distribute the FlightGear architecture such that more and more components can be more easily run in separate threads or even separate processes, possibly even on different machines. So this is going to be an important feature for professional users, using several computers and screens to create a comprehensive and immersive simulation environment.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
At the moment, it is probably safe to say that HLA is only of interest to developers and people willing to play with experimental features.&amp;lt;/ref&amp;gt;)&lt;br /&gt;
* OSG (for the [[OpenSceneGraph]] library)&lt;br /&gt;
* PLIB (for the [[PLIB]] library)&lt;br /&gt;
* SIMGEAR (for the [[SimGear]] library—foundation for FlightGear and TerraGear)&lt;br /&gt;
* TERRAGEAR (for the [[TerraGear]] terrain building toolchain)&lt;br /&gt;
* TERRAGEARGUI (for [[TerraGear GUI]], a graphical interface for TerraGear)&lt;br /&gt;
* ZLIB (for the [http://www.zlib.net/ zlib] compression library)&lt;br /&gt;
&lt;br /&gt;
Each of the items listed above is a ''component'' in &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; terminology. Components are written in uppercase by convention.&lt;br /&gt;
&lt;br /&gt;
{{Note|The preceding list might not be up-to-date. The up-to-date list of components supported by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; can always be obtained by running &amp;lt;code&amp;gt;download_and_compile.sh --help&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
What is the point of knowing this? Because you may pass component names to &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; in order to tell it what you want to download, build and install. By default, only the components [[SimGear|SIMGEAR]], [[FlightGear|FGFS]], [[FGData|DATA]] and [[OpenSceneGraph|OSG]] are taken care of, which means that the command:&lt;br /&gt;
 $ download_and_compile.sh&lt;br /&gt;
is equivalent to:&lt;br /&gt;
 $ download_and_compile.sh SIMGEAR FGFS DATA OSG&lt;br /&gt;
&lt;br /&gt;
In case you'd like to do the same build with just [[PLIB]] added, you could use:&lt;br /&gt;
 $ download_and_compile.sh SIMGEAR FGFS DATA OSG PLIB&lt;br /&gt;
&lt;br /&gt;
You get the idea. When several components are passed on the same command line, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; chooses a reasonable order for processing, so don't worry about that.&lt;br /&gt;
&lt;br /&gt;
== When building ''next'', you may encounter problems ==&lt;br /&gt;
&lt;br /&gt;
Keeping in mind that this script compiles sometimes bleeding edge software, it can happen that what was successfully compiling last week, does not compile anymore today. Building the latest stable version (option &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt;) or the latest Long Term Stable release (option &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt;) should always work, unless there is a problem with the script (well, in some cases, there may be packages of your distribution that are too recent for &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt;; for instance, in July 2020, &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; didn't build with OpenSceneGraph 3.6, but simply passing the OSG component on the &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; command solved the problem, because at that time, option &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; selected OpenSceneGraph 3.4).&lt;br /&gt;
&lt;br /&gt;
That said, you may want to build the development version (called ''next''): this is the one developers use all the time, so kindly asking on the flightgear-devel [[Mailing_lists|mailing list]] in case a problem popped up&amp;lt;ref name=&amp;quot;what-to-provide-when-asking-for-help&amp;quot;&amp;gt;Don't forget in this case to precisely tell what you did and include the &amp;lt;tt&amp;gt;compilation_log.txt&amp;lt;/tt&amp;gt; file written by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;.&amp;lt;/ref&amp;gt; should allow you to find good advice and get the problem quickly fixed, if it's a new one.&lt;br /&gt;
&lt;br /&gt;
{{Warning|As of July 2020, heavy development will be done on ''next'', the development branch of FlightGear. It is expected to be rather unstable for several months. Unless you are really interested in FlightGear development or in providing feedback to the developers, you're probably better off building either the latest stable version (option &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt;) or the latest Long Term Stable release (option &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt;). In case you want something even older, the previous LTS release can be selected with option &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
== Task-specific instructions ==&lt;br /&gt;
&lt;br /&gt;
{{Note|In this section, we assume you've read and followed the advice given in [[#getting-started-with-download-and-compile-sh|Getting started with &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;]].}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;selecting-the-components-to-work-on&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; Selecting the components to build ===&lt;br /&gt;
&lt;br /&gt;
By default, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; downloads or updates, then compiles, [[SimGear]], FlightGear, [[FGData]] and [[OpenSceneGraph|OSG]] (more precisely, FGData is downloaded but not compiled—that wouldn't make sense). This is what happens when running:&lt;br /&gt;
 $ download_and_compile.sh&lt;br /&gt;
The preceding command is therefore equivalent to:&lt;br /&gt;
 $ download_and_compile.sh SIMGEAR FGFS DATA OSG&lt;br /&gt;
&lt;br /&gt;
To make &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; take care of other programs or libraries, use non-option arguments naming the ''components'' you want, for instance:&lt;br /&gt;
 $ download_and_compile.sh SIMGEAR FGFS DATA OSG CMAKE&lt;br /&gt;
SIMGEAR, FGFS, DATA, OSG and CMAKE are the component names respectively corresponding to [[SimGear]], FlightGear, [[FGData]], [[OpenSceneGraph]] and [https://cmake.org/ CMake] in &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;'s terminology.&lt;br /&gt;
&lt;br /&gt;
A [[#list-of-available-components|list of available components]] is provided on this page, but the fully up-to-date list can always be obtained by running &amp;lt;code&amp;gt;download_and_compile.sh --help&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Choosing between stable and development versions ===&lt;br /&gt;
&lt;br /&gt;
By default, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; fetches code and data from development branches of the source repositories (which sometimes causes compilation or runtime errors). However, it is possible to tell the script to download the latest “stable” version of each component, for some suitable definition of “stable”. This is by means of the &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt; options:&lt;br /&gt;
 $ download_and_compile.sh -s ''COMPONENT1 COMPONENT2...''&lt;br /&gt;
or&lt;br /&gt;
 $ download_and_compile.sh --lts ''COMPONENT1 COMPONENT2...''&lt;br /&gt;
or&lt;br /&gt;
 $ download_and_compile.sh --old-lts ''COMPONENT1 COMPONENT2...''&lt;br /&gt;
&lt;br /&gt;
How does it work?&lt;br /&gt;
* For [[SimGear]], FlightGear and [[FGData]], &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; uses the most recent stable release branch of the corresponding Git repository, &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; uses the most recent Long Term Stable release (LTS) and &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt; uses the previous LTS release.&lt;br /&gt;
* For other components, a known-stable version is selected by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;, which may be influenced by the use of &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
So, as far as the SIMGEAR, FGFS and DATA components are concerned, you can:&lt;br /&gt;
* build the latest stable release (&amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt;);&lt;br /&gt;
* build the latest Long Term Stable release (&amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt;);&lt;br /&gt;
* build the previous Long Term Stable release (&amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt;);&lt;br /&gt;
* build the current development version (bleeding edge), which lives in the {{flightgear source&lt;br /&gt;
| branch = next&lt;br /&gt;
| text = next&lt;br /&gt;
}} branch of the FlightGear repository.&lt;br /&gt;
The use of &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt; also influences the version of other components you may have selected (this can be overridden using &amp;lt;code&amp;gt;--component-branch&amp;lt;/code&amp;gt; for advanced users—see [[#Component-specific settings|Component-specific settings]]).&lt;br /&gt;
&lt;br /&gt;
{{Note|In a given folder where &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; is run, you should normally either always use the &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; option, or always use &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt;, or always use &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt;, or always none of these (in other words, stick to the same suite: latest stable, latest LTS, previous LTS or ''next'', consistently accross all components).}}&lt;br /&gt;
&lt;br /&gt;
Actually, it ''is'' possible to switch between suites but you have to use the &amp;lt;code&amp;gt;--cleanup&amp;lt;/code&amp;gt; option when doing the switch (see [[#Cleaning built and installed files|Cleaning built and installed files]] for information on this option). For instance:&lt;br /&gt;
* Build with &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; as many times as you want.&lt;br /&gt;
* Want to try ''next''? Okay, then build once with &amp;lt;code&amp;gt;--cleanup&amp;lt;/code&amp;gt; (no &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; option anymore).&lt;br /&gt;
* You can then perform as many builds of ''next'' as you want; no need to use &amp;lt;code&amp;gt;--cleanup&amp;lt;/code&amp;gt; unless something special went wrong.&lt;br /&gt;
* If you later decide to switch back to the stable release, build once with &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--cleanup&amp;lt;/code&amp;gt;, then only with &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; for further builds.&lt;br /&gt;
* etc.&lt;br /&gt;
&lt;br /&gt;
This way, ''you don't need to download the repositories again'' when trying the various suites. In particular, you can switch between ''next'', stable, LTS and old LTS without downloading nor having several copies of [[FGData]] on your hard drive. (This works because a Git repository may internally contain data for several branches, even if only one is “normally visible” in the filesystem at a given time.)&lt;br /&gt;
&lt;br /&gt;
==== Building the latest Long Term Stable release of FlightGear ====&lt;br /&gt;
&lt;br /&gt;
When executing &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;, use the &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; option to build the latest Long Term Stable release: &lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ download_and_compile.sh --lts&lt;br /&gt;
(In this example, the implicitly-selected components are SIMGEAR, FGFS and DATA, as explained [[#selecting-the-components-to-work-on | above]].)&lt;br /&gt;
&lt;br /&gt;
{{Note|If you decide to use the &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; option in a given directory tree, you should use it for all components in that directory tree (SIMGEAR, FGFS, DATA, etc.). Running &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; in a given directory with the &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; option for some components and not for others is not supported.}}&lt;br /&gt;
&lt;br /&gt;
==== Building the latest stable release of FlightGear ====&lt;br /&gt;
&lt;br /&gt;
When executing &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;, use the &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; option to build the latest stable release: &lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ download_and_compile.sh -s&lt;br /&gt;
&lt;br /&gt;
{{Note|If you decide to use the &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; option in a given directory tree, you should use it for all components in that directory tree (SIMGEAR, FGFS, DATA, etc.). Running &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; in a given directory with the &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; option for some components and not for others is not supported.}}&lt;br /&gt;
&lt;br /&gt;
==== Building the current FlightGear development version ====&lt;br /&gt;
&lt;br /&gt;
When executing &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; without any option, the development version of every selected component is built:&lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ download_and_compile.sh&lt;br /&gt;
&lt;br /&gt;
{{Note|The development version of FlightGear changes on an almost daily basis. It provides the latest features, but is not guaranteed to always work reliably. If you don't want to take the risk of finding new bugs when updating, you may prefer to use the latest stable release.}}&lt;br /&gt;
&lt;br /&gt;
==== Building the previous Long Term Stable release of FlightGear ====&lt;br /&gt;
&lt;br /&gt;
When executing &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;, use the &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt; option to build the previous Long Term Stable release (i.e., oldish code): &lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ download_and_compile.sh --old-lts&lt;br /&gt;
(In this example, the implicitly-selected components are SIMGEAR, FGFS and DATA, as explained [[#selecting-the-components-to-work-on | above]].)&lt;br /&gt;
&lt;br /&gt;
{{Note|If you decide to use the &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt; option in a given directory tree, you should use it for all components in that directory tree (SIMGEAR, FGFS, DATA, etc.). Running &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; in a given directory with the &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt; option for some components and not for others is not supported.}}&lt;br /&gt;
&lt;br /&gt;
=== Overriding the source repository or branch for a component ===&lt;br /&gt;
&lt;br /&gt;
This section shows how to override the location and/or branch from which a given component will be downloaded.&lt;br /&gt;
&lt;br /&gt;
{{Warning|The rest of this section is for people who know what they are doing. Don't use the following unless you trust the person who publishes the repository and have good reasons to believe that it has been kept up-to-date.}}&lt;br /&gt;
&lt;br /&gt;
==== A short example ====&lt;br /&gt;
&lt;br /&gt;
Let's start with an example to make it easier to understand to following paragraphs. Suppose we want to build the current stable release of FlightGear, linked against an [[OpenSceneGraph]] library whose source code is to be retrieved from branch &amp;lt;tt&amp;gt;fgfs-osg-36-2&amp;lt;/tt&amp;gt; of the Git repository located at [https://gitlab.com/flightgear/openscenegraph.git https://gitlab.com/flightgear/openscenegraph.git] (this is actually the default in September 2024). Since the default protocol used when &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; clones a repository is [https://en.wikipedia.org/wiki/HTTPS HTTPS], this can be done with&lt;br /&gt;
 download_and_compile.sh --cleanup -s \&lt;br /&gt;
 --override-repo OSG=GitLab:gitlab.com/flightgear/openscenegraph.git \&lt;br /&gt;
 --component-branch OSG=fgfs-osg-36-2 SIMGEAR FGFS DATA OSG&lt;br /&gt;
&lt;br /&gt;
==== The site name ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; uses case-insensitive short names such as &amp;lt;tt&amp;gt;GitLab&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;GitHub&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;SourceForge&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;gitlab.kitware.com&amp;lt;/tt&amp;gt; as keys in order to identify the settings describing where and how a given component will be initially fetched (these settings are effective at clone time; later updates simply use the settings recorded in the local repository). These names are referred to as ''site'' in the output of &amp;lt;code&amp;gt;download_and_compile.sh --help&amp;lt;/code&amp;gt;, in particular in the &amp;lt;tt&amp;gt;--git-clone-site-params&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;--override-repo&amp;lt;/tt&amp;gt; options we'll present below. These ''site'' keys are simply identifier strings; they are not used in the DNS queries.&lt;br /&gt;
&lt;br /&gt;
==== The protocol ====&lt;br /&gt;
&lt;br /&gt;
Current &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; (from December 2022) fetches the source code of most components from Git repositories (earlier versions used Subversion for some components); a few non-core components (currently [[FGo!]] and [[OpenRadar]]) are fetched using &amp;lt;tt&amp;gt;wget&amp;lt;/tt&amp;gt; and are out-of-scope for this section.&lt;br /&gt;
&lt;br /&gt;
The default protocol used by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; when cloning a Git repository is [https://en.wikipedia.org/wiki/HTTPS HTTPS]. This can be overridden using the &amp;lt;tt&amp;gt;--git-clone-default-proto&amp;lt;/tt&amp;gt; option. In other words, the default is &amp;lt;tt&amp;gt;--git-clone-default-proto=https&amp;lt;/tt&amp;gt; (the protocol name is case-insensitive). Other possibilities for the protocol are &amp;lt;tt&amp;gt;git&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;ssh&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Warning|The &amp;lt;tt&amp;gt;git&amp;lt;/tt&amp;gt; protocol doesn't protect against man-in-the-middle attacks; use at your own risk! Unfortunately, “clever” people often recommend it on the forum without mentioning its downsides.}}&lt;br /&gt;
&lt;br /&gt;
Using the &amp;lt;tt&amp;gt;ssh&amp;lt;/tt&amp;gt; protocol as the argument of &amp;lt;tt&amp;gt;--git-clone-default-proto&amp;lt;/tt&amp;gt; has little use, because in general you'll want to specify a particular username when using SSH and this username is likely not to be the same for all components you intend to clone via SSH (right, &amp;lt;tt&amp;gt;~/.ssh/config&amp;lt;/tt&amp;gt; can be used to automatically provide a site-dependent username). That is why &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; offers the &amp;lt;tt&amp;gt;--git-clone-site-params&amp;lt;/tt&amp;gt; option.&lt;br /&gt;
&lt;br /&gt;
==== Site-specific settings ====&lt;br /&gt;
&lt;br /&gt;
Using&lt;br /&gt;
 --git-clone-site-params ''SITE''=''PROTOCOL''[:''USERNAME'']&lt;br /&gt;
you can tell &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; that every component fetched from ''SITE'' should be cloned with the specified protocol and username (allowed protocols are &amp;lt;tt&amp;gt;https&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;ssh&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;git&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
{{Note|In case you have several repositories at a given site (say, GitHub) and need to use different SSH usernames for these repositories, you can use different site names:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--override-repo COMPONENT_A=GitHubA:ADDRESS_A&lt;br /&gt;
--git-clone-site-params GitHubA=ssh:userA&lt;br /&gt;
--override-repo COMPONENT_B=GitHubB:ADDRESS_B&lt;br /&gt;
--git-clone-site-params GitHubB=ssh:userB&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here, the site names are &amp;lt;tt&amp;gt;GitHubA&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;GitHubB&amp;lt;/tt&amp;gt;; the &amp;lt;tt&amp;gt;--override-repo&amp;lt;/tt&amp;gt; option will be presented below.&lt;br /&gt;
&lt;br /&gt;
By default, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; case-insensitively uses the &amp;lt;tt&amp;gt;GitLab&amp;lt;/tt&amp;gt; (resp. &amp;lt;tt&amp;gt;SourceForge&amp;lt;/tt&amp;gt;) site name to identify the settings used when cloning a repository from gitlab.com (resp. git.code.sf.net). Therefore, the settings for GitHubA and GitHubB in this example would only apply to components ''c'' for which --override-repo ''c''&amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt;GitHubA:... or --override-repo ''c''&amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt;GitHubB:... has been specified.}}&lt;br /&gt;
&lt;br /&gt;
==== Component-specific settings ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;--override-repo&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;--component-branch&amp;lt;/tt&amp;gt; options allow one to override the default settings used by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; for cloning the repository corresponding to the specified component (they only apply to components whose source code is retrieved with Git). The syntax of these options is&lt;br /&gt;
 --override-repo ''COMPONENT''=''SITE'':''ADDRESS''&lt;br /&gt;
and&lt;br /&gt;
 --component-branch ''COMPONENT''=''BRANCH''&lt;br /&gt;
In this syntax:&lt;br /&gt;
* ''COMPONENT'' represents the name of a component for &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; (e.g., &amp;lt;tt&amp;gt;SIMGEAR&amp;lt;/tt&amp;gt;—see [[#List of available components|List of available components]]);&lt;br /&gt;
* ''ADDRESS'' is something like &amp;lt;tt&amp;gt;gitlab.com/flightgear/simgear.git&amp;lt;/tt&amp;gt; (don't include any &amp;lt;tt&amp;gt;protocol://&amp;lt;/tt&amp;gt; part in ''ADDRESS'');&lt;br /&gt;
* ''BRANCH'' should be the name of an existing branch of the Git repository hosted at ''ADDRESS'';&lt;br /&gt;
* ''SITE'' is a string used as a key in a mapping; &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; uses it to find out how to connect to ''ADDRESS'' in order to clone the repository for ''COMPONENT'' (see [[#Site-specific settings|Site-specific settings]]).&lt;br /&gt;
See the [[#A short example|above example]] for a concrete example where these options are used.&lt;br /&gt;
&lt;br /&gt;
{{Note|The argument of any long option of &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; that takes an argument may be introduced immediately after the option name using an equal sign. However, in the above cases, I find this way a bit confusing because the option value ''also'' uses an equal sign as separator. Hence the above use of separate command arguments: one for the option name, one for its argument.}}&lt;br /&gt;
&lt;br /&gt;
=== Passing custom arguments to CMake ===&lt;br /&gt;
&lt;br /&gt;
Sometimes, when building a program, you may want to enable a feature that is not enabled by default, or disable a feature that is enabled by default. With recent versions of &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; (October 2020 or later), this can be done for SimGear and FlightGear using the &amp;lt;code&amp;gt;--sg-cmake-arg&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--fg-cmake-arg&amp;lt;/code&amp;gt; options (the environment variables &amp;lt;tt&amp;gt;SG_CMAKEARGS&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;FG_CMAKEARGS&amp;lt;/tt&amp;gt; are still supported, but they don't allow one to pass arguments containing spaces). For instance, in order to link SimGear with the system Expat library, you can do:&lt;br /&gt;
 $ download_and_compile.sh --sg-cmake-arg='-DSYSTEM_EXPAT=ON' SIMGEAR&lt;br /&gt;
Similarly, disabling HID-based input when building FlightGear can be achieved this way:&lt;br /&gt;
 $ download_and_compile.sh --fg-cmake-arg='-DENABLE_HID_INPUT=OFF' FGFS&lt;br /&gt;
&lt;br /&gt;
{{Note|Such options are typically defined in &amp;lt;tt&amp;gt;CMakeLists.txt&amp;lt;/tt&amp;gt; files, for example {{simgear source&lt;br /&gt;
| path = CMakeLists.txt&lt;br /&gt;
| text = here&lt;br /&gt;
}} for SimGear and {{flightgear source&lt;br /&gt;
| path = CMakeLists.txt&lt;br /&gt;
| text = here&lt;br /&gt;
}} for FlightGear.}}&lt;br /&gt;
&lt;br /&gt;
This can be useful, for instance, to work around bugs in a part of SimGear or FlightGear that you don't need, but causes a build or runtime failure (see {{forum link|t=35740|text=here}} for example). This is often convenient when using the development version of FlightGear, but doesn't mean such bugs shouldn't be reported!&lt;br /&gt;
&lt;br /&gt;
If you have several such options to pass, just use &amp;lt;code&amp;gt;--sg-cmake-arg&amp;lt;/code&amp;gt; and/or &amp;lt;code&amp;gt;--fg-cmake-arg&amp;lt;/code&amp;gt; several times:&lt;br /&gt;
 $ download_and_compile.sh --fg-cmake-arg='-DENABLE_SWIFT=ON' \&lt;br /&gt;
                           --fg-cmake-arg='-DENABLE_HID_INPUT=OFF' FGFS&lt;br /&gt;
It is even possible to pass arguments containing spaces to CMake, as in:&lt;br /&gt;
 $ download_and_compile.sh \&lt;br /&gt;
     --sg-cmake-arg='-DCMAKE_CXX_FLAGS=-Wno-deprecated-declarations -Wall' \&lt;br /&gt;
     SIMGEAR&lt;br /&gt;
(just a silly example to show a working syntax) or:&lt;br /&gt;
 $ download_and_compile.sh \&lt;br /&gt;
     --fg-cmake-arg=&amp;quot;-DCMAKE_CXX_FLAGS=$(pkg-config --cflags gl)&amp;quot; \&lt;br /&gt;
     FGFS&lt;br /&gt;
Note the use of double-quotes here to enable the &amp;lt;code&amp;gt;$(...)&amp;lt;/code&amp;gt; command substitution.&lt;br /&gt;
&lt;br /&gt;
Using the (half-deprecated) environment variables &amp;lt;tt&amp;gt;SG_CMAKEARGS&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;FG_CMAKEARGS&amp;lt;/tt&amp;gt;, it is also possible to define CMake arguments in a single place that are going to be used for both SimGear and FlightGear. However, this technique doesn't allow one to pass arguments containing spaces to CMake.&lt;br /&gt;
 $ export SG_CMAKEARGS='-DSYSTEM_EXPAT=ON'&lt;br /&gt;
 $ export FG_CMAKEARGS='-DENABLE_SWIFT=ON -DENABLE_HID_INPUT=OFF'&lt;br /&gt;
 $ download_and_compile.sh&lt;br /&gt;
&lt;br /&gt;
=== Seeing the compilation commands run by Make ===&lt;br /&gt;
&lt;br /&gt;
As a simple application of the previous section, the following options are often useful. When passed to &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;, these options cause the compilation commands run via Make to be printed on the terminal and recorded in the compilation_log.txt file:&lt;br /&gt;
  --sg-cmake-arg='-DCMAKE_VERBOSE_MAKEFILE=1' \&lt;br /&gt;
  --fg-cmake-arg='-DCMAKE_VERBOSE_MAKEFILE=1'&lt;br /&gt;
(the backslash is unneeded if you put both options on the same line). Passing the value 0 instead of 1 would explicitly request the default, non-verbose behavior.&lt;br /&gt;
&lt;br /&gt;
=== Launching FlightGear ===&lt;br /&gt;
&lt;br /&gt;
When using &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;, apart from those installed with the package manager, the FlightGear dependencies (which are typically libraries) are not installed system-wide but under the directory from which &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; was run. This makes it possible to easily use, for instance, different [[OpenSceneGraph]], [[SimGear]] and FlightGear versions on a single system—e.g., for testing purposes—but also to have separate build trees (optimized/debug). This is also why you either need to set LD_LIBRARY_PATH to run the built programs, or simply use the scripts created by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; in the directory where it is run, such as &amp;lt;tt&amp;gt;run_fgfs.sh&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;run_fgfs_debug.sh&amp;lt;/tt&amp;gt;: these scripts automatically set up the required environment variables according to your build settings before firing the desired program (e.g., &amp;lt;tt&amp;gt;fgfs&amp;lt;/tt&amp;gt;) with the arguments you provided. &lt;br /&gt;
&lt;br /&gt;
Therefore, the simplest way to run a FlightGear program built by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; is to launch the &amp;lt;tt&amp;gt;run_fgfs.sh&amp;lt;/tt&amp;gt; script that &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; created in the directory from which it was run, for example:&lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ ./run_fgfs.sh --launcher&lt;br /&gt;
&lt;br /&gt;
{{Note|&amp;lt;code&amp;gt;./run_fgfs.sh --launcher&amp;lt;/code&amp;gt; starts FlightGear with its built-in launcher. If you just do &amp;lt;code&amp;gt;./run_fgfs.sh&amp;lt;/code&amp;gt;, FlightGear will be started without any launcher, at the default airport and with the default aircraft.}}&lt;br /&gt;
&lt;br /&gt;
In order to start FlightGear without any launcher, at a given airport (say, [https://en.wikipedia.org/wiki/Paro_Airport Paro airport], whose ICAO code is VQPR) and with a chosen aircraft, you can do:&lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ ./run_fgfs.sh --airport=VQPR --aircraft=dhc6&lt;br /&gt;
Actually, the directory change is not needed, we only gave it here for readability. Therefore, the following single command does the same:&lt;br /&gt;
 $ ~/flightgear/dnc-managed/run_fgfs.sh --airport=VQPR --aircraft=dhc6&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;avoiding-multiple-downloads-of-fgdata&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; Avoiding multiple downloads of FGData ===&lt;br /&gt;
&lt;br /&gt;
Some people use &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; to maintain several directory trees such as the tree starting at &amp;lt;tt&amp;gt;~/flightgear/dnc-managed&amp;lt;/tt&amp;gt; in [[#getting-started-with-download-and-compile-sh|Getting started with &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;]] (this can be useful if you want to have one tree with programs compiled in Release mode and another tree where they are built in Debug mode, for instance). This can easily be done by running &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; in each of the directories. But since [[FGData]] is so large, it may be tempting to share a single instance of this repository among several trees. This is not officially supported, but apparently can be made to work with symbolic links.&lt;br /&gt;
&lt;br /&gt;
Let's show how this can be done on an example. Suppose your master copy of FGData is in &amp;lt;tt&amp;gt;~/flightgear/dnc-managed/install/flightgear/fgdata&amp;lt;/tt&amp;gt;. Then the following appears to work:&lt;br /&gt;
 $ mkdir -p ~/flightgear/other-dnc-managed-tree/install/flightgear&lt;br /&gt;
 $ cd ~/flightgear/other-dnc-managed-tree/install/flightgear&lt;br /&gt;
 $ ln -s ../../../dnc-managed/install/flightgear/fgdata&lt;br /&gt;
 $ cd ~/flightgear/other-dnc-managed-tree&lt;br /&gt;
 $ download_and_compile.sh&lt;br /&gt;
&lt;br /&gt;
The last of these commands will use and update the FGData repository present in &amp;lt;tt&amp;gt;~/flightgear/dnc-managed/install/flightgear/fgdata&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Warning|This can only work simply if all trees that share a given FGData repository are from the same release (e.g., current stable or development). Running a “stable“ FlightGear with FGData from the ''next'' branch or the other way round, a development version of FlightGear with FGData from a release branch, doesn't work—and FlightGear should tell you when you start it in such a situation.&lt;br /&gt;
&lt;br /&gt;
That said, people comfortable with Git can check out the correct FGData branch before building or starting FlightGear, for instance:&lt;br /&gt;
 $ cd /path/to/fgdata &amp;amp;&amp;amp; git checkout release/2019.1&lt;br /&gt;
or&lt;br /&gt;
 $ cd /path/to/fgdata &amp;amp;&amp;amp; git checkout next&lt;br /&gt;
So, this is possible but somewhat acrobatic. You've been warned.}}&lt;br /&gt;
&lt;br /&gt;
Note: there is a [[Avoiding multiple downloads of FGData on Linux|wiki article about this subject]], but it is severely outdated as of April 2019.&lt;br /&gt;
&lt;br /&gt;
== Additional programs ==&lt;br /&gt;
&lt;br /&gt;
{{Note|In this section, we assume you've read and followed the advice given in [[#getting-started-with-download-and-compile-sh|Getting started with &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;]].}}&lt;br /&gt;
&lt;br /&gt;
If you wish to get other programs (precisely: download, build and install them), you need to launch &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; with the desired component names as arguments. For instance:&lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ download_and_compile.sh SIMGEAR FGFS DATA OSG&lt;br /&gt;
&lt;br /&gt;
See [[#list-of-available-components|above]] for the list of available components.&lt;br /&gt;
&lt;br /&gt;
=== TerraGear ===&lt;br /&gt;
&lt;br /&gt;
Run &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; with the TERRAGEAR component in order to build and install the [[TerraGear]] terrain building toolchain:&lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ download_and_compile.sh TERRAGEAR&lt;br /&gt;
&lt;br /&gt;
This creates the following scripts in &amp;lt;tt&amp;gt;~/flightgear/dnc-managed&amp;lt;/tt&amp;gt;:&lt;br /&gt;
* &amp;lt;tt&amp;gt;run_genapts850.sh&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;run_ogr-decode.sh&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;run_tg-construct.sh&amp;lt;/tt&amp;gt;&lt;br /&gt;
These scripts themselves run the corresponding TerraGear tools, as expected.&lt;br /&gt;
&lt;br /&gt;
=== TerraGear GUI ===&lt;br /&gt;
&lt;br /&gt;
[[TerraGear GUI]] is a graphical interface for [[TerraGear]] written with the Qt toolkit (still Qt 4 in 2019, but it works). In order to install it, run &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; with the TERRAGEARGUI component:&lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ download_and_compile.sh TERRAGEARGUI&lt;br /&gt;
This will create a &amp;lt;tt&amp;gt;run_terrageargui.sh&amp;lt;/tt&amp;gt; script in &amp;lt;tt&amp;gt;~/flightgear/dnc-managed&amp;lt;/tt&amp;gt;, and also a default configuration file &amp;lt;tt&amp;gt;~/.config/TerraGear/TerraGearGUI.conf&amp;lt;/tt&amp;gt;, unless you already have one. This default configuration file contains paths to the TerraGear and [[$FG_ROOT]] directories, assuming you have installed the TERRAGEAR and DATA components.&lt;br /&gt;
&lt;br /&gt;
To run TerraGear GUI:&lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ ./run_terrageargui.sh&lt;br /&gt;
&lt;br /&gt;
=== FGCom ===&lt;br /&gt;
&lt;br /&gt;
{{Note|[[FGCom]] has been integrated into FlightGear long ago, therefore the following is not needed in general.}}&lt;br /&gt;
&lt;br /&gt;
[[FGCom]] is the system used by FlightGear to simulate radio communications between users. It is automatically built and installed when you tell &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; to take care of the FGFS component. You can launch the standalone FGCom program by using the &amp;lt;tt&amp;gt;run_fgcom.sh&amp;lt;/tt&amp;gt; script:&lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ ./run_fgcom.sh&lt;br /&gt;
&lt;br /&gt;
=== FGRun ===&lt;br /&gt;
&lt;br /&gt;
{{Note|As of 2019, FGRun has been superseded by the [[FlightGear Qt launcher|FlightGear built-in launcher]]. The built-in launcher is the most actively maintained launcher for FlightGear. Other launchers are [[FFGo]] and [[FGX|FGx]].}}&lt;br /&gt;
&lt;br /&gt;
[[File:fgrun-page2.jpg|thumb|right]]&lt;br /&gt;
Before FlightGear had its built-in launcher (the one you get with &amp;lt;code&amp;gt;run_fgfs.sh --launcher&amp;lt;/code&amp;gt;), many users found comfortable having FlightGear launched by the graphical utility [[Fgrun|FGRun]]. This program is built and installed when &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; is run with the FGRUN component. You then have to launch the &amp;lt;tt&amp;gt;run_fgrun.sh&amp;lt;/tt&amp;gt; command, for example:&lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ ./run_fgrun.sh&lt;br /&gt;
&lt;br /&gt;
FGRun will save its settings in &amp;lt;tt&amp;gt;~/.fltk/flightgear.org/fgrun.prefs&amp;lt;/tt&amp;gt;. You may want to save copies of the preferences customized for stable and next.&lt;br /&gt;
&lt;br /&gt;
=== FGo! ===&lt;br /&gt;
&lt;br /&gt;
{{Note|As of 2019, FGo! is not maintained anymore. You may want to try the built-in launcher (started with &amp;lt;code&amp;gt;run_fgfs.sh --launcher&amp;lt;/code&amp;gt;) or [[FFGo]].}}&lt;br /&gt;
&lt;br /&gt;
[[File:Fgo01.jpg|thumb|left]]&lt;br /&gt;
FGo! is a graphical utility written in [[python]]. It is downloaded and installed when &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; is run with the FGO component. You then have to launch the &amp;lt;tt&amp;gt;run_fgo.sh&amp;lt;/tt&amp;gt; command, for example:&lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ ./run_fgo.sh&lt;br /&gt;
&lt;br /&gt;
Remember that the first time you run it, you have to go to open the ''Preferences'' dialog and set the paths to the &amp;lt;tt&amp;gt;fgfs&amp;lt;/tt&amp;gt; executable and to FGData.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== Compilation errors ===&lt;br /&gt;
Here we are, no fear, if you wish to use programs from the cvs/svn/git repositories, you might face compilation errors that will prevent you to have a working copy of one or more of the programs provided by this script. What can be the causes that prevent us from successfully compiling? As far as I know those:&lt;br /&gt;
# Software developers introduce a new functionality with a new piece of code that prevents the compilation under your architecture, this can happen working with cvs/svn/git sources.&lt;br /&gt;
# The program refuses to compile because of a divergence in the libraries on which it depends. For example FlightGear might not compile because OSG has been modified, while OSG itself compiles fine, FG won't.&lt;br /&gt;
# One or more repositories are down and you can't get the library you need. (Both from cvs/svn/git or apt-get)&lt;br /&gt;
&lt;br /&gt;
There is a simple solution to the above errors: wait and relaunch the script after some time (hours or days), if software developers repair or synchronize their code with the newly updated libraries (which generally happens eventually), your FlightGear will compile fine as if the previous error never took place.&lt;br /&gt;
&lt;br /&gt;
Sometimes it happens that the script fails to compile only [[Fgrun|FGRun]], [[FGCom]] or atlas, if you then see the run_fgfs.sh file it means that FlightGear installation was successful and you can safely run it.&lt;br /&gt;
&lt;br /&gt;
=== OpenRTI undefined reference errors ===&lt;br /&gt;
&lt;br /&gt;
Sometimes, due to the way &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; builds projects, linking errors might occur. This is the case with the error “libRTI-NG.so: undefined reference to xxx”. You might want to patch the &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; script to clean OpenRTI with &amp;lt;code&amp;gt;rm -f CMakeCache.txt &amp;amp;&amp;amp; rm -rf CMakeFiles/&amp;lt;/code&amp;gt;, or just restart the build in a clean environment. Assuming you are in the base directory from which you ran &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;, you can run &amp;lt;code&amp;gt;download_and_compile.sh --cleanup&amp;lt;/code&amp;gt; (see [[#Cleaning built and installed files|Cleaning built and installed files]]). Alternatively, the following command could be used:&lt;br /&gt;
 $ rm -rf build/* install/simgear/ install/openrti/ install/flightgear/share/ install/flightgear/bin/&lt;br /&gt;
&lt;br /&gt;
See {{forum link|t=26244|text=this thread}} for more details. Note that &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; didn't have the &amp;lt;code&amp;gt;--cleanup&amp;lt;/code&amp;gt; option at that time!&lt;br /&gt;
&lt;br /&gt;
== Options ==&lt;br /&gt;
&lt;br /&gt;
=== Release selection ===&lt;br /&gt;
&lt;br /&gt;
* Build the latest stable release: &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt;&lt;br /&gt;
* Build the latest Long Term Stable release: &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt;&lt;br /&gt;
* Build the previous Long Term Stable release: &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Long Term Stable (&amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt;) is supposed to yield a more stable setup than what you would obtain with option &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt;, however it will generally be older. Both of these options are suitable for users.&lt;br /&gt;
&lt;br /&gt;
If you pass none of &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt; in a &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
=== Skipping most prompts ===&lt;br /&gt;
&lt;br /&gt;
For some important things, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; asks for confirmation in order to be sure that you are well informed about what will be done. When you have a good understanding of these informations, you may want to use the &amp;lt;code&amp;gt;--non-interactive&amp;lt;/code&amp;gt; option in order to suppress these prompts (technically, this causes the default answer to be automatically used).&lt;br /&gt;
&lt;br /&gt;
=== Cleaning built and installed files ===&lt;br /&gt;
&lt;br /&gt;
Option &amp;lt;code&amp;gt;--cleanup&amp;lt;/code&amp;gt; causes &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
If you use &amp;lt;code&amp;gt;--cleanup&amp;lt;/code&amp;gt; without specifying any component, only this removal will be done (nothing will be compiled nor installed). Otherwise, the usual rules concerning components apply.&lt;br /&gt;
&lt;br /&gt;
=== Multicore acceleration ===&lt;br /&gt;
&lt;br /&gt;
Passing option &amp;lt;code&amp;gt;-j x&amp;lt;/code&amp;gt; to &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; (where ''x'' is the number of your CPU cores you wish to assign to the job) will considerably speed up the compilation steps. Passing &amp;lt;code&amp;gt;-j$(nproc)&amp;lt;/code&amp;gt; is a convenient way to automatically use all available cores.&lt;br /&gt;
&lt;br /&gt;
=== Advanced options ===&lt;br /&gt;
&lt;br /&gt;
* Build a release version: &amp;lt;code&amp;gt;-b Release&amp;lt;/code&amp;gt;&lt;br /&gt;
* Build a version that should run as fast as a release build, yet has debug information that can be used to post backtraces: &amp;lt;code&amp;gt;-b RelWithDebInfo&amp;lt;/code&amp;gt; (this is the default)&lt;br /&gt;
* Build a full debug version for very complete bug reporting: &amp;lt;code&amp;gt;-b Debug&amp;lt;/code&amp;gt;&lt;br /&gt;
* Skip download of distro packages (i.e., by default: &amp;lt;tt&amp;gt;apt-get install ...&amp;lt;/tt&amp;gt;): &amp;lt;code&amp;gt;-p n&amp;lt;/code&amp;gt;&lt;br /&gt;
* Skip retrieving of component downloads and updates (which typically use Git or wget): &amp;lt;code&amp;gt;-d n&amp;lt;/code&amp;gt;&lt;br /&gt;
* Skip the configure step (like running [https://cmake.org/ CMake] or [https://www.gnu.org/software/autoconf/ autoconf]'s &amp;lt;tt&amp;gt;./configure&amp;lt;/tt&amp;gt;): &amp;lt;code&amp;gt;-r n&amp;lt;/code&amp;gt;&lt;br /&gt;
* Skip compilation of programs: &amp;lt;code&amp;gt;-c n&amp;lt;/code&amp;gt;&lt;br /&gt;
* Build with compositor: &amp;lt;code&amp;gt;--compositor&amp;lt;/code&amp;gt;&lt;br /&gt;
* Force the use of a particular branch for a given component: &amp;lt;code&amp;gt;--component-branch ''COMPONENT=BRANCH''&amp;lt;/code&amp;gt; (e.g., &amp;lt;code&amp;gt;--component-branch OSG=OpenSceneGraph-3.6&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;--component-branch FGFS=next&amp;lt;/code&amp;gt;, etc.—but remember that components FGFS, SIMGEAR and DATA must ''always'' be in sync). See [[#Component-specific settings|Component-specific settings]] for details.&lt;br /&gt;
* Override the repository from which a given component is initially fetched: &amp;lt;code&amp;gt;--override-repo ''COMPONENT''=''SITE'':''ADDRESS''&amp;lt;/code&amp;gt; (see [[#Component-specific settings|Component-specific settings]]).&lt;br /&gt;
* Generate build.ninja files and build using Ninja: &amp;lt;code&amp;gt;-G Ninja&amp;lt;/code&amp;gt;&lt;br /&gt;
* Run CMake in verbose mode: &amp;lt;code&amp;gt;--verbose&amp;lt;/code&amp;gt; (this shows compilation commands)&lt;br /&gt;
&lt;br /&gt;
For example, if you are a developer and wish to quickly recompile and reinstall only your own modifications for FlightGear, you can do this:&lt;br /&gt;
 $ download_and_compile.sh -j$(nproc) -p n -d n -r n FGFS&lt;br /&gt;
&lt;br /&gt;
Note that this is the same as:&lt;br /&gt;
 $ download_and_compile.sh -j$(nproc) -pn -dn -rn FGFS&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;-rn&amp;lt;/code&amp;gt; option may be necessary, though (this is the case in particular if you added or removed C++ files).&lt;br /&gt;
&lt;br /&gt;
=== ccache ===&lt;br /&gt;
[https://ccache.dev/ ccache] is a compiler cache that enormously speeds up subsequent recompilations (compilation times are often divided by a factor 6 or more). SimGear and FlightGear 2024.1 or later perform &amp;lt;tt&amp;gt;ccache&amp;lt;/tt&amp;gt;-enabled builds when &amp;lt;code&amp;gt;-DENABLE_CCACHE=ON&amp;lt;/code&amp;gt; is passed to [https://cmake.org/ CMake]. For &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; users, there are several ways to do this.&lt;br /&gt;
&lt;br /&gt;
The simplest way is to pass &amp;lt;code&amp;gt;--enable-ccache&amp;lt;/code&amp;gt; to &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;. This has an effect when processing components such as &amp;lt;tt&amp;gt;SIMGEAR&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;FGFS&amp;lt;/tt&amp;gt;; other components may support the option or ignore it. Using this option is equivalent to passing &amp;lt;code&amp;gt;--cmake-arg ALL=&amp;quot;-DENABLE_CCACHE=ON&amp;quot;&amp;lt;/code&amp;gt; to &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;. This causes the script to pass &amp;lt;code&amp;gt;-DENABLE_CCACHE=ON&amp;lt;/code&amp;gt; to all CMake-based components that are processed. For those that don't support this option, you'll see a harmless warning that you can safely ignore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CMake Warning:&lt;br /&gt;
  Manually-specified variables were not used by the project:&lt;br /&gt;
&lt;br /&gt;
    ENABLE_CCACHE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, if you prefer, you can pass &amp;lt;code&amp;gt;-DENABLE_CCACHE=ON&amp;lt;/code&amp;gt; to specific components using for instance&lt;br /&gt;
 --cmake-arg SIMGEAR=&amp;quot;-DENABLE_CCACHE=ON&amp;quot;&lt;br /&gt;
and/or&lt;br /&gt;
 --cmake-arg FGFS=&amp;quot;-DENABLE_CCACHE=ON&amp;quot;&lt;br /&gt;
This results in longer command lines than the previous methods but allows one to avoid the warning, if it bothers you.&lt;br /&gt;
&lt;br /&gt;
{{Note|&amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; automatically installs &amp;lt;tt&amp;gt;ccache&amp;lt;/tt&amp;gt; if its seems required and package installation hasn't been disabled. Otherwise, you can install it yourself using &amp;lt;code&amp;gt;apt install ccache&amp;lt;/code&amp;gt; before using &amp;lt;code&amp;gt;--enable-ccache&amp;lt;/code&amp;gt; or similar.}}&lt;br /&gt;
&lt;br /&gt;
== Optimus technology ==&lt;br /&gt;
If your computer has a GPU with Optimus technology, you need a dedicated script in order to make FlightGear run with the powerful GPU.&lt;br /&gt;
&lt;br /&gt;
After having installed required tools (Bumblebee) you just need to run this command line in your FlightGear installation directory (where you executed &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;):&lt;br /&gt;
 $ sed  's|\./fgfs|optirun ./fgfs|' run_fgfs.sh &amp;gt; run_fgfs_optirun.sh &amp;amp;&amp;amp; chmod +x run_fgfs_optirun.sh&lt;br /&gt;
Now you can run FlightGear with &amp;lt;code&amp;gt;./run_fgfs_optirun.sh&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The same can be done for the [[FlightGear_Launch_Control|FGRun]] launcher:&lt;br /&gt;
 $ sed  's|\./fgrun|optirun ./fgrun|' run_fgrun.sh &amp;gt; run_fgrun_optirun.sh &amp;amp;&amp;amp; chmod +x run_fgrun_optirun.sh&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* {{fgmeta source&lt;br /&gt;
| path = fg-from-scratch&lt;br /&gt;
| text = fg-from-scratch&lt;br /&gt;
}};&lt;br /&gt;
* [[Fedora Packages and Compiling]];&lt;br /&gt;
* [[Superbuild]];&lt;br /&gt;
* [http://geoffmclane.com/fg/fgfs-052.htm Another script] for building FlightGear and all its dependencies in an automated fashion. The page seems a bit oldish, though (as of 2019).&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Building from source]]&lt;br /&gt;
&lt;br /&gt;
[[fr:Script de compilation sous Linux Debian/Ubuntu]]&lt;br /&gt;
[[nl:Compileren met een Script op Linux Debian/Ubuntu]]&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Hangar_catalog&amp;diff=143958</id>
		<title>Hangar catalog</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Hangar_catalog&amp;diff=143958"/>
		<updated>2026-04-12T09:35:01Z</updated>

		<summary type="html">&lt;p&gt;Rominet: Refresh contents: fg-build-catalog, new locations for official catalog.xml files, etc.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Package Management}}&lt;br /&gt;
The default '''hangar catalog''', &amp;lt;code&amp;gt;catalog.xml&amp;lt;/code&amp;gt;, is used by the [[FlightGear Qt launcher | FlightGear built-in launcher]] to list all aircraft of the [[FGAddon|official FGAddon FlightGear hangar]].  [[Flightgear hangars#Third party sites|3rd party hangars]] can also provide a catalog URL via their own &amp;lt;code&amp;gt;catalog.xml&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
== Catalog generation ==&lt;br /&gt;
The &amp;lt;code&amp;gt;catalog.xml&amp;lt;/code&amp;gt; file can be generated using &amp;lt;tt&amp;gt;fg-build-catalog&amp;lt;/tt&amp;gt; from the [https://pypi.org/project/FlightGear/ &amp;lt;code&amp;gt;flightgear&amp;lt;/code&amp;gt; Python package] built from {{fgmeta-python source | text=fgmeta-python}} (the script was previously called &amp;lt;tt&amp;gt;update-catalog.py&amp;lt;/tt&amp;gt; and was located in [[FGMeta]]). Configuration files and templates for &amp;lt;tt&amp;gt;fg-build-catalog&amp;lt;/tt&amp;gt; that are used to generate the catalog for the [[FGAddon]] official hangar are contained in the {{fgmeta-python source | path = catalog | text = catalog}} directory.  To generate the FGAddon catalog, as an example, you need to install the &amp;lt;code&amp;gt;flightgear&amp;lt;/code&amp;gt; Python package according to the instructions in {{fgmeta-python source&lt;br /&gt;
| path   = README.md&lt;br /&gt;
| text = fgmeta-python's README.md file&lt;br /&gt;
}}, then run a command like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sh&amp;quot;&amp;gt;&lt;br /&gt;
fg-build-catalog --no-update fgaddon-trunk-catalog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You'll likely want to run this ''from a directory where you've copied and adjusted the configuration files.'' Output files will be written to the current directory by default, in particular to the &amp;lt;tt&amp;gt;output&amp;lt;/tt&amp;gt; subdirectory. See {{fgmeta-python source&lt;br /&gt;
| path   = catalog/README.md&lt;br /&gt;
| text = catalog/README.md&lt;br /&gt;
}} for more detailed instructions.&lt;br /&gt;
&lt;br /&gt;
The idea is to create a subdirectory tree for each catalog (&amp;lt;tt&amp;gt;fgaddon-trunk-catalog&amp;lt;/tt&amp;gt; in the above example).  This subdirectory can have any name; it contains the configuration and administrative files for maintaining the catalog.  The &amp;lt;tt&amp;gt;catalog.config.xml&amp;lt;/tt&amp;gt; config file inside the catalog directory will need to be adjusted for each new hangar.  The script builds the contents locally which then needs to be uploaded to an appropriate place on a server (&amp;lt;tt&amp;gt;fg-build-catalog&amp;lt;/tt&amp;gt; can perform the upload itself: see the {{fgmeta-python source&lt;br /&gt;
| path   = catalog/fgaddon-trunk-catalog/catalog.config.xml&lt;br /&gt;
| text = FGAddon trunk catalog configuration&lt;br /&gt;
}} for instance).&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
=== Wiki articles ===&lt;br /&gt;
* [[Aircraft Center]]&lt;br /&gt;
* [[Catalog metadata]]&lt;br /&gt;
* [[FlightGear hangars#Third party sites]] - List of third-party hangars, of which some have a &amp;lt;code&amp;gt;catalog.xml&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
=== Mailing list threads ===&lt;br /&gt;
* [https://sourceforge.net/p/flightgear/mailman/message/35488166/ &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;Flightgear-devel&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt; Testing changes to update_catalog.py] (November 2016)&lt;br /&gt;
&lt;br /&gt;
=== Source code ===&lt;br /&gt;
* {{fgmeta-python source | path = src/flightgear/meta/scripts/catalog/fg_build_catalog.py | text = Main source file for fg-build-catalog}}&lt;br /&gt;
* {{fgmeta-python source | path = catalog | text = Official catalog configuration and templates}}&lt;br /&gt;
&lt;br /&gt;
=== Default catalog ===&lt;br /&gt;
* Default location of the [http://mirrors.ibiblio.org/flightgear/ftp/Aircraft-trunk/catalog.xml FGAddon trunk catalog.xml file]&lt;br /&gt;
* Default location of the [http://mirrors.ibiblio.org/flightgear/ftp/Aircraft-2024/catalog.xml FGAddon 2024.1.* catalog.xml file]&lt;br /&gt;
&lt;br /&gt;
[[Category:Aircraft enhancement]]&lt;br /&gt;
[[Category:FlightGear]]&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Howto:Model_with_parameters&amp;diff=143751</id>
		<title>Howto:Model with parameters</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Howto:Model_with_parameters&amp;diff=143751"/>
		<updated>2026-03-19T19:28:13Z</updated>

		<summary type="html">&lt;p&gt;Rominet: Typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Using '''parameters in modeling''' makes it possible for example, to [[Howto: Animate models|animate]] each single propeller of an multi-engined [[aircraft]] without the need to copy the engine model. This reduces the overall filesize and makes it easier for the developer to update the engine animations (just one file to edit).&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
The parameters are set in the same file that is used to position the models. In the example below we have two engines.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;model&amp;gt;&lt;br /&gt;
  &amp;lt;path&amp;gt;Aircraft/747-400/Models/Engines/GE_CF6-80C2B1F.xml&amp;lt;/path&amp;gt; &lt;br /&gt;
  &amp;lt;overlay&amp;gt;&lt;br /&gt;
   &amp;lt;params&amp;gt;&lt;br /&gt;
    &amp;lt;n1&amp;gt;/engines/engine[0]/n1&amp;lt;/n1&amp;gt;&lt;br /&gt;
   &amp;lt;/params&amp;gt;&lt;br /&gt;
  &amp;lt;/overlay&amp;gt;&lt;br /&gt;
 &amp;lt;/model&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;model&amp;gt;&lt;br /&gt;
  &amp;lt;path&amp;gt;Aircraft/747-400/Models/Engines/GE_CF6-80C2B1F.xml&amp;lt;/path&amp;gt; &lt;br /&gt;
  &amp;lt;overlay&amp;gt;&lt;br /&gt;
   &amp;lt;params&amp;gt;&lt;br /&gt;
    &amp;lt;n1&amp;gt;/engines/engine[1]/n1&amp;lt;/n1&amp;gt;&lt;br /&gt;
   &amp;lt;/params&amp;gt;&lt;br /&gt;
  &amp;lt;/overlay&amp;gt;&lt;br /&gt;
 &amp;lt;/model&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the model's .xml file (&amp;lt;tt&amp;gt;GE_CF6-80C2B1F.xml&amp;lt;/tt&amp;gt; in the example above), we place the following parameter declaration and [[Howto: Animate models|animation]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;params&amp;gt;&lt;br /&gt;
  &amp;lt;n1&amp;gt;/engines/engine[0]/n1&amp;lt;/n1&amp;gt;&lt;br /&gt;
 &amp;lt;/params&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;animation&amp;gt;&lt;br /&gt;
  &amp;lt;type&amp;gt;spin&amp;lt;/type&amp;gt;&lt;br /&gt;
  &amp;lt;object-name&amp;gt;Blades&amp;lt;/object-name&amp;gt;&lt;br /&gt;
  &amp;lt;property alias=&amp;quot;../../params/n1&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;center&amp;gt;&lt;br /&gt;
   &amp;lt;x-m&amp;gt;0&amp;lt;/x-m&amp;gt;&lt;br /&gt;
   &amp;lt;y-m&amp;gt;0&amp;lt;/y-m&amp;gt;&lt;br /&gt;
   &amp;lt;z-m&amp;gt;0&amp;lt;/z-m&amp;gt;&lt;br /&gt;
  &amp;lt;/center&amp;gt;&lt;br /&gt;
  &amp;lt;axis&amp;gt;&lt;br /&gt;
   &amp;lt;x&amp;gt;-1.0&amp;lt;/x&amp;gt;&lt;br /&gt;
   &amp;lt;y&amp;gt;0&amp;lt;/y&amp;gt;&lt;br /&gt;
   &amp;lt;z&amp;gt;0&amp;lt;/z&amp;gt;&lt;br /&gt;
  &amp;lt;/axis&amp;gt;&lt;br /&gt;
 &amp;lt;/animation&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This spins the &amp;quot;Blades&amp;quot; object with the speed (rpm) of the n1 properties, as defined in the parameters .xml file. For one engine this is &amp;lt;tt&amp;gt;/engines/engine[0]/n1&amp;lt;/tt&amp;gt;, for the other &amp;lt;tt&amp;gt;/engines/engine[1]/n1&amp;lt;/tt&amp;gt;. The parameters declaration at the top of the code is not required, but it is good for parameter-documentation and gives a default value.&lt;br /&gt;
&lt;br /&gt;
Practically anything can be &amp;quot;aliased,&amp;quot; not just &amp;lt;tt&amp;gt;&amp;lt;property&amp;gt;&amp;lt;/tt&amp;gt; tags in animations. Some other examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;animation&amp;gt;&lt;br /&gt;
  &amp;lt;type&amp;gt;select&amp;lt;/type&amp;gt;&lt;br /&gt;
  &amp;lt;object-name&amp;gt;BladesBlur&amp;lt;/object-name&amp;gt;&lt;br /&gt;
  &amp;lt;condition&amp;gt;&lt;br /&gt;
   &amp;lt;greater-than&amp;gt;&lt;br /&gt;
    &amp;lt;property alias=&amp;quot;../../../../params/n1&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;value&amp;gt;20&amp;lt;/value&amp;gt;&lt;br /&gt;
   &amp;lt;/greater-than&amp;gt;&lt;br /&gt;
  &amp;lt;/condition&amp;gt;&lt;br /&gt;
 &amp;lt;/animation&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This selects the &amp;quot;BladesBlur&amp;quot; object if the n1 property is above 20. Notice that the number of &amp;quot;&amp;lt;tt&amp;gt;../&amp;lt;/tt&amp;gt;&amp;quot;s in the &amp;lt;tt&amp;gt;alias&amp;lt;/tt&amp;gt; attribute is different. This is because &amp;quot;&amp;lt;tt&amp;gt;../&amp;lt;/tt&amp;gt;&amp;quot; actually navigates &amp;quot;up&amp;quot; in the XML tree, much like one would type &amp;lt;tt&amp;gt;cd ..&amp;lt;/tt&amp;gt; in a command line to navigate &amp;quot;up&amp;quot; in a file directory tree. Since the aliased tag is further down in the tree, at /propertylist/animation/condition/greater-than/property, we need to add more &amp;quot;&amp;lt;tt&amp;gt;../&amp;lt;/tt&amp;gt;&amp;quot;s in the beginning to get back to the root. &lt;br /&gt;
&lt;br /&gt;
Other examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;animation&amp;gt;&lt;br /&gt;
  &amp;lt;type&amp;gt;material&amp;lt;/type&amp;gt;&lt;br /&gt;
  &amp;lt;object-name&amp;gt;InstrumentFrames&amp;lt;/object-name&amp;gt;&lt;br /&gt;
  &amp;lt;emission&amp;gt;&lt;br /&gt;
   &amp;lt;red&amp;gt;0.5&amp;lt;/red&amp;gt;&lt;br /&gt;
   &amp;lt;green&amp;gt;0.5&amp;lt;/green&amp;gt;&lt;br /&gt;
   &amp;lt;blue&amp;gt;0.5&amp;lt;/blue&amp;gt;&lt;br /&gt;
   &amp;lt;factor-prop alias=&amp;quot;../../../params/light-cmd-norm&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/emission&amp;gt;&lt;br /&gt;
 &amp;lt;/animation&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;animation&amp;gt;&lt;br /&gt;
  &amp;lt;type&amp;gt;select&amp;lt;/type&amp;gt;&lt;br /&gt;
  &amp;lt;object-name&amp;gt;FlapGauge&amp;lt;/object-name&amp;gt;&lt;br /&gt;
  &amp;lt;condition&amp;gt;&lt;br /&gt;
   &amp;lt;value alias=&amp;quot;../../../params/show-flap-gauge&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/condition&amp;gt;&lt;br /&gt;
 &amp;lt;/animation&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;animation&amp;gt;&lt;br /&gt;
  &amp;lt;type&amp;gt;pick&amp;lt;/type&amp;gt;&lt;br /&gt;
  &amp;lt;object-name&amp;gt;AdjustFreqBigUp&amp;lt;/object-name&amp;gt;&lt;br /&gt;
  &amp;lt;action&amp;gt;&lt;br /&gt;
   &amp;lt;button&amp;gt;0&amp;lt;/button&amp;gt;&lt;br /&gt;
   &amp;lt;binding&amp;gt;&lt;br /&gt;
    &amp;lt;command&amp;gt;property-adjust&amp;lt;/command&amp;gt;&lt;br /&gt;
    &amp;lt;property alias=&amp;quot;../../../../params/standby-mhz&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;value&amp;gt;1&amp;lt;/value&amp;gt;&lt;br /&gt;
   &amp;lt;/binding&amp;gt;&lt;br /&gt;
  &amp;lt;/action&amp;gt;&lt;br /&gt;
 &amp;lt;/animation&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Even [[Nasal]] scripts can be aliased!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;animation&amp;gt;&lt;br /&gt;
  &amp;lt;type&amp;gt;pick&amp;lt;/type&amp;gt;&lt;br /&gt;
  &amp;lt;object-name&amp;gt;BigRedButton&amp;lt;/object-name&amp;gt;&lt;br /&gt;
  &amp;lt;action&amp;gt;&lt;br /&gt;
   &amp;lt;button&amp;gt;0&amp;lt;/button&amp;gt;&lt;br /&gt;
   &amp;lt;binding&amp;gt;&lt;br /&gt;
    &amp;lt;command&amp;gt;nasal&amp;lt;/command&amp;gt;&lt;br /&gt;
    &amp;lt;script alias=&amp;quot;../../../../params/do-something-exciting-script&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;/binding&amp;gt;&lt;br /&gt;
  &amp;lt;/action&amp;gt;&lt;br /&gt;
 &amp;lt;/animation&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Aircraft enhancement|Model with parameters]]&lt;br /&gt;
[[Category:Howto|Model with parameters]]&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Scripted_Compilation_on_Linux_Debian/Ubuntu&amp;diff=143674</id>
		<title>Scripted Compilation on Linux Debian/Ubuntu</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Scripted_Compilation_on_Linux_Debian/Ubuntu&amp;diff=143674"/>
		<updated>2026-03-08T11:38:08Z</updated>

		<summary type="html">&lt;p&gt;Rominet: /* ccache */ Update section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; is a Bash script that takes care of downloading and compiling FlightGear and related software from their source code repositories with just one command execution for both 32-bit and 64-bit [https://www.debian.org/ Debian]-based systems. Pre-existing versions (if any) of the software installed by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; are not touched at all since the script downloads, builds and installs everything under the directory in which it is launched. You can choose the particular components to download, build and install.&lt;br /&gt;
&lt;br /&gt;
Unless told not to do so, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; installs packages with &amp;lt;tt&amp;gt;apt-get&amp;lt;/tt&amp;gt;. For this reason, it is primarily useful on Debian-based distributions. However, if one disables package installation (using &amp;lt;code&amp;gt;-pn&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;--sudo=echo&amp;lt;/code&amp;gt;) and installs the corresponding dependencies oneself, it can be used on other Unix-like systems such as [https://fedoraproject.org/ Fedora Linux], [https://archlinux.org/ Arch Linux] or [https://www.openbsd.org/ OpenBSD].&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; is a [https://www.gnu.org/software/bash/ Bash] script written for [https://www.debian.org/ Debian]-derived distributions ([https://www.ubuntu.com/ Ubuntu], [https://devuan.org/ Devuan], [https://www.linuxmint.com/ Linux Mint], etc.). Its purpose is to automatically install dependencies using the package manager, then build and install FlightGear-related programs.&lt;br /&gt;
&lt;br /&gt;
By default, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; installs most dependencies with &amp;lt;tt&amp;gt;apt-get&amp;lt;/tt&amp;gt; run under &amp;lt;tt&amp;gt;sudo&amp;lt;/tt&amp;gt;.&amp;lt;ref name=&amp;quot;disabling-installation-of-dependencies-via-package-manager&amp;quot;&amp;gt;If you think you already have the dependencies, this installation can be disabled either by using option &amp;lt;code&amp;gt;-pn&amp;lt;/code&amp;gt; or by passing option &amp;lt;code&amp;gt;--sudo=echo&amp;lt;/code&amp;gt; (the latter results in printing the &amp;lt;tt&amp;gt;apt-get&amp;lt;/tt&amp;gt; command line without running it).&amp;lt;/ref&amp;gt; Other dependencies, either because they aren't available in the standard APT repositories, or because of non-option arguments passed to &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;, are downloaded and compiled on the fly (this can be the case for [[PLIB]], [[Simgear]] and [[OpenSceneGraph]], for instance—it all depends on the arguments passed to the script).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; works in the directory it is run from: apart from dependencies installed via the package manager, all programs built by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; are installed under the &amp;lt;tt&amp;gt;install&amp;lt;/tt&amp;gt; subdirectory of the directory from which the script was run. In other words, installation of programs by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; is clean, very easy to undo and doesn't interfere with other programs on the system.&lt;br /&gt;
&lt;br /&gt;
It is possible to manage several directory trees with &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;; as far as it is concerned, such directory trees are completely independent from each other. For instance, if you run &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; in &amp;lt;tt&amp;gt;dir1&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;dir2&amp;lt;/tt&amp;gt;, the programs installed under &amp;lt;tt&amp;gt;dir1&amp;lt;/tt&amp;gt; won't “see” those installed under &amp;lt;tt&amp;gt;dir2&amp;lt;/tt&amp;gt;, and vice versa.&lt;br /&gt;
&lt;br /&gt;
Apart from its main purpose, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; can be used to find hopefully up-to-date build-dependency information for FlightGear and related software. You would do so by inspecting {{fgmeta source&lt;br /&gt;
| path = download_and_compile.sh&lt;br /&gt;
| text = the script &lt;br /&gt;
}} at the point where it installs packages.&amp;lt;ref name=&amp;quot;note-inspecting-download-and-compile-sh-to-gather-build-dependency-information&amp;quot;&amp;gt;Look for strings such as &amp;lt;tt&amp;gt;zlib1g-dev&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;libglew-dev&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;qt5-default&amp;lt;/tt&amp;gt;.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
Before embarking on building your own FlightGear binaries, you need to install a few tools that &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; uses to retrieve and compile source code. These tools are found in the following packages on [https://www.debian.org/ Debian] systems (and presumably on most Debian derivatives too):&lt;br /&gt;
&lt;br /&gt;
* build-essential&lt;br /&gt;
* git&lt;br /&gt;
* cmake&lt;br /&gt;
&lt;br /&gt;
These packages can be installed by running a command such as:&lt;br /&gt;
 $ sudo apt-get install build-essential git cmake&lt;br /&gt;
Once this is done, the &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; script can be run. Unless told otherwise, it will install additional tools and libraries as it runs, depending on the chosen components (this will be explained in further sections).&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;disk-space-requirements-and-build-time&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; Disk space requirements and build time ==&lt;br /&gt;
&lt;br /&gt;
As of April 2019, building FlightGear requires about 12 [https://en.wikipedia.org/wiki/Gibibyte GiB] of disk space. Note that this includes downloaded source code for [[SimGear]] and FlightGear, generated build files and the large [[FGData]] repository (about 6 GiB for that one).&lt;br /&gt;
&lt;br /&gt;
With an Intel Core i7 860 CPU (2.80 GHz) purchased in 2009, compiling [[SimGear]] and FlightGear 2019.2 with option &amp;lt;code&amp;gt;-j8&amp;lt;/code&amp;gt; takes about 14 minutes. If you don't have a fast machine and build using only one core, it may require several hours.&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
&lt;br /&gt;
You can get &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; {{fgmeta source&lt;br /&gt;
| path = download_and_compile.sh&lt;br /&gt;
| text = from FGMeta &lt;br /&gt;
}}. It is contained in the [[FGMeta]] repository, which is maintained by the FlightGear developers. The script can be downloaded from the link given above, however, for easier updates and in order to have the command &amp;lt;code&amp;gt;download_and_compile.sh --version&amp;lt;/code&amp;gt; work as intended, it is recommended to get it as explained [[#getting-download-and-compile-sh-using-an-fgmeta-clone|below]].&lt;br /&gt;
&lt;br /&gt;
In case you build stable versions of FlightGear using either of the &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt; options of &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;, remember to update the script before trying to build a new version of FlightGear (see [[#updating-download-and-compile-sh-using-an-fgmeta-clone|Updating &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;]] below). Of course, you can update it more often in order to benefit from new features or bug fixes; this is especially useful if you are building ''next''—that is, the development branch of FlightGear.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;getting-started-with-download-and-compile-sh&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; Getting started with &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
=== For the impatient ===&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;-pn&amp;lt;/code&amp;gt; or something similar to disable installation of packages from your distribution, you'll be asked for your &amp;lt;tt&amp;gt;sudo&amp;lt;/tt&amp;gt; password during execution of the &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; command (&amp;lt;tt&amp;gt;sudo&amp;lt;/tt&amp;gt; is used by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; to run commands like &amp;lt;tt&amp;gt;apt-get&amp;lt;/tt&amp;gt;). So, here is your quick recipe for getting &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; and using it to build FlightGear:&lt;br /&gt;
 mkdir -p ~/flightgear/dnc-managed&lt;br /&gt;
 cd ~/flightgear&lt;br /&gt;
 {{fgmeta clone | protocol = https}}&lt;br /&gt;
 cd ~/flightgear/dnc-managed&lt;br /&gt;
 ~/flightgear/fgmeta/download_and_compile.sh -s -j$(nproc)&lt;br /&gt;
 ./run_fgfs.sh --launcher&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; option passed to &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; instructs it to build the latest stable release of FlightGear. Use option &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; instead if you want the latest Long Term Stable release (it may be older but possibly more stable), or &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt; for the previous LTS release. If you pass none of &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt;, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; will build the ''next'' suite, which contains the development version of FlightGear. For more details on these options, see [[#Release selection|Release selection]].&lt;br /&gt;
&lt;br /&gt;
The command &amp;lt;tt&amp;gt;run_fgfs.sh --launcher&amp;lt;/tt&amp;gt; starts the [[FlightGear Qt launcher|FlightGear built-in launcher]]. This is often convenient but not compulsory. Another way to start FlightGear could be &amp;lt;code&amp;gt;./run_fgfs.sh --airport=PHTO --aircraft=c172p&amp;lt;/code&amp;gt;. There are plenty of other options, which are listed by &amp;lt;code&amp;gt;./run_fgfs.sh --help --verbose&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
In some cases, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; 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, pass the &amp;lt;code&amp;gt;--non-interactive&amp;lt;/code&amp;gt; option to suppress them.&lt;br /&gt;
&lt;br /&gt;
More detailed instructions are given below. The following sections also explain how to update &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; and FlightGear.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;getting-started-with-download-and-compile-sh-notations&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; Notations ===&lt;br /&gt;
&lt;br /&gt;
When a command should be run as an unpriviledged user, it will be preceded by a dollar sign:&lt;br /&gt;
 $ whoami&lt;br /&gt;
 toto&lt;br /&gt;
In contrast, a hash sign (#) means that the command must be run with superuser privileges to achieve the desired effect:&lt;br /&gt;
 # whoami&lt;br /&gt;
 root&lt;br /&gt;
&lt;br /&gt;
In order to make instructions easy to understand, two directories (= folders) will be consistently used for the same purpose below:&lt;br /&gt;
* &amp;lt;tt&amp;gt;~/flightgear/fgmeta&amp;lt;/tt&amp;gt; will contain a clone of the [[FGMeta]] repository; therefore, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; will reside in that directory;&lt;br /&gt;
* &amp;lt;tt&amp;gt;~/flightgear/dnc-managed&amp;lt;/tt&amp;gt; will be the directory from which we run &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;. In other words, with this setup, a typical sequence of commands could be:&lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ ~/flightgear/fgmeta/download_and_compile.sh&lt;br /&gt;
or&lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ ~/flightgear/fgmeta/download_and_compile.sh CARES PLIB SIMGEAR FGFS DATA OSG&lt;br /&gt;
These are of course just examples. The aforementioned paths are not hardwired anywhere in the script; you are free to choose the directories you want for these purposes.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;getting-download-and-compile-sh-using-an-fgmeta-clone&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; Getting &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; the “right way” ===&lt;br /&gt;
&lt;br /&gt;
There are several ways to obtain {{fgmeta source&lt;br /&gt;
| path = download_and_compile.sh&lt;br /&gt;
| text = download_and_compile.sh&lt;br /&gt;
}}. The method described here makes it very easy to update the script and causes the command &amp;lt;code&amp;gt;download_and_compile.sh --version&amp;lt;/code&amp;gt; to work as intended.&lt;br /&gt;
&lt;br /&gt;
As explained in [[#getting-started-with-download-and-compile-sh-notations|Notations]], we want to clone the [[FGMeta]] repository in &amp;lt;tt&amp;gt;~/flightgear/fgmeta&amp;lt;/tt&amp;gt; and work with its ''next'' branch. Let's go:&lt;br /&gt;
 $ mkdir -p ~/flightgear&lt;br /&gt;
 $ cd ~/flightgear&lt;br /&gt;
 $ {{fgmeta clone | protocol = https}}&lt;br /&gt;
You now have a fresh FGMeta clone in &amp;lt;tt&amp;gt;~/flightgear/fgmeta&amp;lt;/tt&amp;gt; and your brand new &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; script is located in that directory. You can already try it to see the available options:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ~/flightgear/fgmeta/download_and_compile.sh --help&lt;br /&gt;
download_and_compile.sh [OPTION...] [--] [COMPONENT...]&lt;br /&gt;
Download and compile components belonging to the FlightGear ecosystem.&lt;br /&gt;
&lt;br /&gt;
Without any COMPONENT listed, or if ALL is specified, recompile all&lt;br /&gt;
components listed in the WHATTOBUILDALL variable. Each COMPONENT may&lt;br /&gt;
be one of the following words:&lt;br /&gt;
&lt;br /&gt;
  ALL, ATCPIE, CARES, CMAKE, DATA, FFGO, FGFS, FGRUN, FGX, OPENRADAR, OPENRTI, OSG, PLIB, SIMGEAR, TERRAGEAR, TERRAGEARGUI, ZLIB.&lt;br /&gt;
&lt;br /&gt;
Available options:&lt;br /&gt;
  -h, --help    show this help message and exit&lt;br /&gt;
      --version print version and license information, then exit&lt;br /&gt;
&lt;br /&gt;
(...)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;updating-download-and-compile-sh-using-an-fgmeta-clone&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; Updating &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Now that you have &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; from the [[FGMeta]] repository, it is very easy to update (this assumes you didn't modify anything yourself inside &amp;lt;tt&amp;gt;~/flightgear/fgmeta&amp;lt;/tt&amp;gt;!):&lt;br /&gt;
 $ cd ~/flightgear/fgmeta &amp;amp;&amp;amp; git pull&lt;br /&gt;
&lt;br /&gt;
If you want to keep updates as easy as we just showed, it is best not to modify &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; yourself. &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; has plenty of options that usually make it unnecessary to modify the script. Just run &amp;lt;code&amp;gt;download_and_compile.sh --help&amp;lt;/code&amp;gt; and learn about the available options when you feel the need to change something. Unless you have special needs that can only be accomodated by modifying &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;, you are invited to skip to the next section.&lt;br /&gt;
&lt;br /&gt;
If you really, ''really'' want to modify &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; while keeping updates easy, a good technique is to add your changes to your FGMeta clone in the form of one or more Git ''commits'' (no need to push them anywhere, commits can remain in your clone). How to do that is beyond the scope of this document, though; read Git tutorials if you want to learn it (there are plenty on the Internet). Once you have committed your changes to your FGMeta clone, make sure the repository is clean (use &amp;lt;code&amp;gt;git status&amp;lt;/code&amp;gt;), then update it with:&lt;br /&gt;
 $ cd ~/flightgear/fgmeta &amp;amp;&amp;amp; git pull --rebase&lt;br /&gt;
This will apply your commits on top of the latest commit of the branch that is currently checked out, which so far contained the official version of &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;. In case your changes conflict with the update, Git will tell you and you'll have to resolve the conflict manually (look for “Git resolve conflict” on your favorite search engine)... or start again from a pristine [[FGMeta]] clone.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;using-download-and-compile-sh-to-build-flightgear&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; Building FlightGear ===&lt;br /&gt;
&lt;br /&gt;
In what follows, we won't give the full path to &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; when showing commands to be run, but you should prepend it to &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; whenever you see a &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; command. For instance, if you used the same path as in [[#getting-started-with-download-and-compile-sh-notations|Notations]] and see the command:&lt;br /&gt;
 $ download_and_compile.sh --help&lt;br /&gt;
what you should actually run is:&lt;br /&gt;
 $ ~/flightgear/fgmeta/download_and_compile.sh --help&lt;br /&gt;
&lt;br /&gt;
Apart from this harmless command, ''do not'' run other &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; commands from an arbitrary directory, in particular ''don't'' run them from &amp;lt;tt&amp;gt;~/flightgear/fgmeta&amp;lt;/tt&amp;gt;. This is because '''most other &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; commands write to the current directory''' (&amp;lt;code&amp;gt;download_and_compile.sh --help&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;download_and_compile.sh --version&amp;lt;/code&amp;gt; are safe to run from any directory, though).&lt;br /&gt;
&lt;br /&gt;
Of course, it is always possible to make commands shorter by setting up aliases (see tips at the end of [https://sourceforge.net/p/flightgear/mailman/message/36634426/ this message]), by adding the directory containing &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; to your &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt; or by creating a symbolink link pointing to &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; in a directory that is part of your &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt;. This is not necessary, though; do it only if you feel the need (when enabled, persistent shell history is often enough to obviate the need to extend the &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
{{Note|The following commands should be run from an empty directory&amp;lt;ref name=&amp;quot;dedicated-directory-won-t-stay-empty-forever&amp;quot;&amp;gt;Well, empty before the first time; later, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; is going to populate it with plenty of FlightGear files and subdirectories, of course.&amp;lt;/ref&amp;gt; in a partition that has enough free space (see [[#disk-space-requirements-and-build-time | Disk space requirements and build time]]). As explained in [[#getting-started-with-download-and-compile-sh-notations|Notations]], we are going to choose the directory &amp;lt;tt&amp;gt;~/flightgear/dnc-managed&amp;lt;/tt&amp;gt; for this purpose, in order to express that the whole directory tree is managed by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;. This is just an example; feel free to choose another directory if you want.&lt;br /&gt;
&lt;br /&gt;
'''Don't run the commands from a non-dedicated directory,''' because it will be filled with files and directories created by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; 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.}}&lt;br /&gt;
&lt;br /&gt;
{{Tip|For some commands, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; may use &amp;lt;tt&amp;gt;sudo&amp;lt;/tt&amp;gt;. In case you want to run some other program instead of &amp;lt;tt&amp;gt;sudo&amp;lt;/tt&amp;gt;, this can be done with the &amp;lt;code&amp;gt;--sudo&amp;lt;/code&amp;gt; option of &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;. For instance, in order to see the commands that would be run with sudo without actually running them, you can pass &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;--sudo=echo&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; to &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;. Like all other options, &amp;lt;code&amp;gt;--sudo&amp;lt;/code&amp;gt; must be given ''before'' all arguments that are component names (such as &amp;lt;tt&amp;gt;SIMGEAR&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;FGFS&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;DATA&amp;lt;/tt&amp;gt;, etc.).}}&lt;br /&gt;
&lt;br /&gt;
The package manager used by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; by default is &amp;lt;tt&amp;gt;apt-get&amp;lt;/tt&amp;gt; (it won't be used if you pass &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; the &amp;lt;code&amp;gt;-pn&amp;lt;/code&amp;gt; option). You can use another one if you wish, as long as it supports the following calls:&lt;br /&gt;
 ''pkg-mgr'' update&lt;br /&gt;
 ''pkg-mgr'' install ''pkg1 pkg2'' ...&lt;br /&gt;
This is the case for &amp;lt;tt&amp;gt;aptitude&amp;lt;/tt&amp;gt; as well as &amp;lt;tt&amp;gt;apt&amp;lt;/tt&amp;gt;. If you want &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; to use &amp;lt;tt&amp;gt;aptitude&amp;lt;/tt&amp;gt;, give it the option &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;--package-manager=aptitude&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; before any of the ''COMPONENT'' arguments.&lt;br /&gt;
&lt;br /&gt;
All options of &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; can be seen by running the following command:&lt;br /&gt;
 $ download_and_compile.sh --help&lt;br /&gt;
&lt;br /&gt;
Now the instructions. '''You have chosen a dedicated directory''' where all the stuff that is downloaded and built by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; will be stored. This is &amp;lt;tt&amp;gt;~/flightgear/dnc-managed&amp;lt;/tt&amp;gt; if you followed the suggestions given in [[#getting-started-with-download-and-compile-sh-notations|Notations]], and should be empty before you run &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; for the first time. However, it is quite correct to start &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; from the same directory for subsequent runs, even when non-empty (otherwise, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; would automatically reclone the repositories every time you run it; that would be a sheer waste of time and bandwidth). All that remains to do is to run:&lt;br /&gt;
 $ mkdir -p ~/flightgear/dnc-managed&lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ download_and_compile.sh -s -j$(nproc)&lt;br /&gt;
The &amp;lt;code&amp;gt;-j$(nproc)&amp;lt;/code&amp;gt; option is not necessary, but is likely to save you a lot of time; with it, all available CPU cores will be used when compiling—see [[#Multicore acceleration| Multicore acceleration]].&lt;br /&gt;
&lt;br /&gt;
{{Note|Because of the &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; option, the above &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; command would build the latest stable release of FlightGear. If you want to build the latest Long Term Stable release, use &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; instead. For the previous LTS release, use &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt;. If you want to build the development version of FlightGear, use none of &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt;, but be warned: it may very well be unstable and unsuitable for flying. For more details on these options, see [[#Release selection|Release selection]].}}&lt;br /&gt;
&lt;br /&gt;
When you don't pass any non-option argument to &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; as done here, it takes care of the base components needed to run FlightGear in good conditions: &amp;lt;tt&amp;gt;CARES&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;PLIB&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;SIMGEAR&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;FGFS&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;DATA&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;OSG&amp;lt;/tt&amp;gt; (these are the component names used by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;, i.e., the final arguments one can optionally give in a &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; command; in normal speech, they correspond to the {{github source&lt;br /&gt;
| proj = c-ares&lt;br /&gt;
| repo = c-ares&lt;br /&gt;
| text = c-ares&lt;br /&gt;
}}, {{sourceforge source&lt;br /&gt;
| proj = libplib&lt;br /&gt;
| repo = code&lt;br /&gt;
| text = PLIB&lt;br /&gt;
}}, {{simgear source&lt;br /&gt;
| text = SimGear&lt;br /&gt;
}}, {{flightgear source&lt;br /&gt;
| text = FlightGear&lt;br /&gt;
}} and {{fgdata source&lt;br /&gt;
| text = FGData&lt;br /&gt;
}} repositories, as well as a suitable repository for [[OpenSceneGraph]]). Therefore, the above command is presently exactly equivalent to:&lt;br /&gt;
 $ download_and_compile.sh -s -j$(nproc) CARES PLIB SIMGEAR FGFS DATA OSG&lt;br /&gt;
&lt;br /&gt;
In case you want to build another component such as, say, CMAKE, you can add it to the command, like this:&lt;br /&gt;
 $ download_and_compile.sh -s -j$(nproc) CARES PLIB SIMGEAR FGFS DATA OSG CMAKE&lt;br /&gt;
&lt;br /&gt;
When the command terminates, you should have a script called &amp;lt;tt&amp;gt;run_fgfs.sh&amp;lt;/tt&amp;gt; in the directory from which you ran &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; (i.e., &amp;lt;tt&amp;gt;~/flightgear/dnc-managed&amp;lt;/tt&amp;gt; in the suggested setup). This will be your script to run FlightGear. For instance, in order to start the [[FlightGear Qt launcher|built-in launcher]], you can run the following commands:&amp;lt;ref name=&amp;quot;no-need-to-change-to-dnc-managed-dir-before-starting-generated-scripts&amp;quot;&amp;gt;We give these commands because they are easy to read, but the &amp;lt;code&amp;gt;cd&amp;lt;/code&amp;gt; command is not needed if you use the correct path, as in &amp;lt;code&amp;gt;~/flightgear/dnc-managed/run_fgfs.sh --launcher&amp;lt;/code&amp;gt;.&amp;lt;/ref&amp;gt;&lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ ./run_fgfs.sh --launcher&lt;br /&gt;
(You may omit the &amp;lt;code&amp;gt;--launcher&amp;lt;/code&amp;gt; option; this would simply start FlightGear without any launcher, at the default airport and with the default aircraft.)&amp;lt;br /&amp;gt;&lt;br /&gt;
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 &amp;lt;code&amp;gt;run_fgfs.sh --launcher&amp;lt;/code&amp;gt; is quite fine, be sure to try it first!&lt;br /&gt;
&lt;br /&gt;
{{Note|If you ran &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; from &amp;lt;tt&amp;gt;~/flightgear/dnc-managed&amp;lt;/tt&amp;gt; as proposed above, the full path of the &amp;lt;tt&amp;gt;~/flightgear/dnc-managed/install/flightgear/fgdata&amp;lt;/tt&amp;gt; directory is your [[$FG_ROOT]]. This is a very important path for FlightGear; knowing this may be useful for troubleshooting or doing “advanced things.”}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;using-download-and-compile-sh-to-update-flightgear&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; Updating FlightGear ===&lt;br /&gt;
&lt;br /&gt;
{{Note|If you built FlightGear with either of &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt;, you need to pass the ''same option'' to the &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; command given below that will update your FlightGear installation. Otherwise, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; will automatically build the ''next'' suite (bleeding-edge development version), which is probably not what you wish. Moreover, if you do want to switch from one suite to another (for instance from ''stable'' to ''next'', or from ''Long Term Stable'' to ''stable''), using the &amp;lt;code&amp;gt;--cleanup&amp;lt;/code&amp;gt; option of &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; is heartily recommended.}}&lt;br /&gt;
&lt;br /&gt;
Keeping the above note in mind, go to the directory from which you previously ran &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; (&amp;lt;tt&amp;gt;~/flightgear/dnc-managed&amp;lt;/tt&amp;gt; in the [[#Notations|suggested setup]]). This is the folder which, if you did a complete run of &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; as shown in the previous section, contains the &amp;lt;tt&amp;gt;run_fgfs.sh&amp;lt;/tt&amp;gt; script and a log file named &amp;lt;tt&amp;gt;compilation_log.txt&amp;lt;/tt&amp;gt; that records what &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; did in its last run. If you wish to update, say, {{simgear source&lt;br /&gt;
| text = SimGear&lt;br /&gt;
}}, {{flightgear source&lt;br /&gt;
| text = FlightGear&lt;br /&gt;
}}, {{fgdata source&lt;br /&gt;
| text = FGData&lt;br /&gt;
}} and [[OpenSceneGraph|OSG]], simply execute this:&lt;br /&gt;
 $ download_and_compile.sh -I -pn -j$(nproc) SIMGEAR FGFS DATA OSG&lt;br /&gt;
The &amp;lt;code&amp;gt;-I&amp;lt;/code&amp;gt; option tells &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; to ignore inter-component dependencies. If you don't use it, other components may be processed too due to these dependencies. The purpose of the behaviour without &amp;lt;code&amp;gt;-I&amp;lt;/code&amp;gt; is to help people who aren't necessarily aware of new requirements as time goes (e.g., SIMGEAR and FGFS started to require CARES by the end of 2024; a FlightGear fork of OSG is also required for FGFS ''next'' in 2025). However, it may be frustrating to specify a list of components and see additional ones being automatically added, hence the option.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;-j$(nproc)&amp;lt;/code&amp;gt; option is not necessary, but is likely to save you a lot of time; with it, all available CPU cores will be used when compiling—see [[#Multicore acceleration| Multicore acceleration]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;SIMGEAR&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;FGFS&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;DATA&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;OSG&amp;lt;/tt&amp;gt; are called ''components'' in &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; terminology. A component generally corresponds to a software repository, or something close.&lt;br /&gt;
&lt;br /&gt;
Now about the &amp;lt;code&amp;gt;-pn&amp;lt;/code&amp;gt;. It is equivalent to &amp;lt;code&amp;gt;-p n&amp;lt;/code&amp;gt; and means “don't try to install or update packages from my (Linux) distribution” (&amp;lt;code&amp;gt;y&amp;lt;/code&amp;gt; means ''yes, please install or update'', &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; means ''no, please don't''). In case you forgot that, simply run:&lt;br /&gt;
 $ download_and_compile.sh --help&lt;br /&gt;
What does it imply to pass &amp;lt;code&amp;gt;-pn&amp;lt;/code&amp;gt;? This tells &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; to completely skip the step where it checks for needed packages from your distribution and installs/updates them, by default using &amp;lt;tt&amp;gt;apt-get&amp;lt;/tt&amp;gt;. It thus goes straight to the following steps:&lt;br /&gt;
* update each repository corresponding to one of the selected components (&amp;lt;tt&amp;gt;SIMGEAR&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;FGFS&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;DATA&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;OSG&amp;lt;/tt&amp;gt; in our example);&lt;br /&gt;
* compile each selected component that requires compilation;&lt;br /&gt;
* install each selected component in the appropriate place (under &amp;lt;tt&amp;gt;~/flightgear/dnc-managed&amp;lt;/tt&amp;gt; according to our [[#getting-started-with-download-and-compile-sh-notations|Notations]]).&lt;br /&gt;
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 &amp;lt;code&amp;gt;-pn&amp;lt;/code&amp;gt; to &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;, you forbid it to install these dependencies for you. So, you can also very well update without passing the &amp;lt;code&amp;gt;-pn&amp;lt;/code&amp;gt; option, it will simply take a little longer (the time to check if all dependencies of the selected components are available with &amp;lt;tt&amp;gt;APT&amp;lt;/tt&amp;gt;). In fact, this is '''what you should do if the previous &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; run failed:''' first update &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; (see [[#getting-download-and-compile-sh-using-an-fgmeta-clone|above]]) then run it ''without'' &amp;lt;code&amp;gt;-pn&amp;lt;/code&amp;gt;&amp;lt;ref name=&amp;quot;passing-no-pn-option-equals-passing-py&amp;quot;&amp;gt;Which is the same as passing &amp;lt;code&amp;gt;-py&amp;lt;/code&amp;gt;.&amp;lt;/ref&amp;gt; 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. In this case, running &amp;lt;code&amp;gt;download_and_compile.sh --cleanup&amp;lt;/code&amp;gt; to restart the build from a clean state is probably a good idea (see [[#Cleaning built and installed files|Cleaning built and installed files]] for details on this option).&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
&lt;br /&gt;
Routine update:&lt;br /&gt;
 $ download_and_compile.sh -pn -j$(nproc) ''COMPONENT...''&lt;br /&gt;
(add &amp;lt;code&amp;gt;-I&amp;lt;/code&amp;gt; if you don't want inter-component dependencies to pull additional components). In case this fails, first update &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; (see [[#getting-download-and-compile-sh-using-an-fgmeta-clone|above]]), then run&lt;br /&gt;
 $ download_and_compile.sh --cleanup&lt;br /&gt;
 $ download_and_compile.sh -j$(nproc) ''COMPONENT...''&lt;br /&gt;
where ''COMPONENT...'' stands for the space-separated list of components you want &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; to process.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;examining-download-and-compile-sh-history&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; Examining the history of &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Looking at the latest commits that affected &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; is quite easy with your FGMeta clone:&lt;br /&gt;
 $ cd ~/flightgear/fgmeta&lt;br /&gt;
 $ git log -- download_and_compile.sh&lt;br /&gt;
(then quit by typing &amp;lt;tt&amp;gt;q&amp;lt;/tt&amp;gt;, assuming your &amp;lt;tt&amp;gt;$GIT_PAGER&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;less&amp;lt;/tt&amp;gt;)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to do the same, but also see the patch for each commit:&lt;br /&gt;
 $ cd ~/flightgear/fgmeta&lt;br /&gt;
 $ git log -p -- download_and_compile.sh&lt;br /&gt;
&lt;br /&gt;
=== For the curious: the SSH way ===&lt;br /&gt;
&lt;br /&gt;
{{Note|The method described below is not necessary anymore since {{fgmeta commit | 420034d5b51ff2d32fc0c3716b17a2d862841e0f}} (May 2020). Also, it was written at a time where the canonical location for [[FGData]] was at SourceForge; however, in 2025, the canonical location for FGData is {{fgdata source&lt;br /&gt;
| text = here&lt;br /&gt;
}}.}}&lt;br /&gt;
&lt;br /&gt;
The purpose of this section is to teach you how to clone [[FGData]] using SSH, then change the Git remote setup in your clone of that repository to retrieve further updates using https—which is convenient, as it does not require you to provide a password. This technique used to be necessary to securely retrieve FGData because of a problem in the [https://sourceforge.net/ SourceForge] infrastructure (namely, &amp;lt;code&amp;gt;git clone&amp;lt;/code&amp;gt; from SourceForge doesn't work for the big FGData repository using https). This is not needed anymore in 2025.&lt;br /&gt;
&lt;br /&gt;
Because the following method will make you connect to [https://sourceforge.net/ SourceForge] using the SSH protocol, you'll need an account on that site. 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''.&lt;br /&gt;
&lt;br /&gt;
{{Note|As explained in [[#getting-started-with-download-and-compile-sh-notations|Notations]], we assume that your Unix user name (login) is &amp;lt;tt&amp;gt;toto&amp;lt;/tt&amp;gt;. Don't confuse the &amp;lt;tt&amp;gt;sudo&amp;lt;/tt&amp;gt; password prompt (where you need to enter &amp;lt;tt&amp;gt;toto&amp;lt;/tt&amp;gt;'s password) with the password prompt for your SourceForge account! The former appears as&lt;br /&gt;
 [sudo] password for toto:&lt;br /&gt;
whereas the latter is just:&lt;br /&gt;
 Password:&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Tip|For some commands, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; may use &amp;lt;tt&amp;gt;sudo&amp;lt;/tt&amp;gt;. In case you want to run some other program instead of &amp;lt;tt&amp;gt;sudo&amp;lt;/tt&amp;gt;, this can be done with the &amp;lt;code&amp;gt;--sudo&amp;lt;/code&amp;gt; option of &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;. For instance, in order to see the commands that would be run with sudo without actually running them, you can pass &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;--sudo=echo&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; to &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;. Like all other options, &amp;lt;code&amp;gt;--sudo&amp;lt;/code&amp;gt; must be given ''before'' all arguments that are component names (such as &amp;lt;tt&amp;gt;SIMGEAR&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;FGFS&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;DATA&amp;lt;/tt&amp;gt;, etc.).}}&lt;br /&gt;
&lt;br /&gt;
{{Note|The commands given below will build the ''next'' suite, which contains the bleeding-edge development version of FlightGear. This is likely to be unstable, possibly unsuitable for flying. If you'd rather build the latest stable release or the latest Long Term Stable release, add option &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; to all &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; commands given below (or &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt; for the previous LTS release). You may add the chosen option right after the &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; command name (in any case, the option should come before non-option arguments such as SIMGEAR, FGFS, DATA, etc.). See [[#Release selection|Release selection]] for more explanations on options &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
Now the instructions. You have chosen a dedicated directory where all the stuff that is downloaded and built by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; will be stored. This is &amp;lt;tt&amp;gt;~/flightgear/dnc-managed&amp;lt;/tt&amp;gt; in our example, and should be empty before you run &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; for the first time. However, it is quite correct to start &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; from the same directory for subsequent runs, even when non-empty (otherwise, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; would automatically reclone the repositories every time you run it; that would be a sheer waste of time and bandwidth).&lt;br /&gt;
&lt;br /&gt;
Ready? Let's go!&lt;br /&gt;
&amp;lt;pre&amp;gt;$ mkdir -p ~/flightgear/dnc-managed&lt;br /&gt;
$ cd ~/flightgear/dnc-managed&lt;br /&gt;
$ download_and_compile.sh --git-clone-site-params SourceForge=ssh:SFusername DATA&lt;br /&gt;
**********************************************************************&lt;br /&gt;
*                                                                    *&lt;br /&gt;
* Warning: a typical SimGear + FlightGear + FGData build requires    *&lt;br /&gt;
* about 12 GiB of disk space. The compilation part may last from a   *&lt;br /&gt;
* few minutes to hours, depending on your computer.                  *&lt;br /&gt;
*                                                                    *&lt;br /&gt;
* Hint: use the -j option if your CPU has several cores, as in:      *&lt;br /&gt;
*                                                                    *&lt;br /&gt;
*         download_and_compile.sh -j$(nproc)                         *&lt;br /&gt;
*                                                                    *&lt;br /&gt;
**********************************************************************&lt;br /&gt;
Running 'apt-get update'...&lt;br /&gt;
[sudo] password for toto:&lt;br /&gt;
&lt;br /&gt;
(...)&lt;br /&gt;
&lt;br /&gt;
Considering a package alternative: libcurl4-openssl-dev libcurl4-gnutls-dev&lt;br /&gt;
Package alternative matched for libcurl4-openssl-dev&lt;br /&gt;
Running 'apt-get install build-essential git libcurl4-openssl-dev cmake'...&lt;br /&gt;
[sudo] password for toto:&lt;br /&gt;
&lt;br /&gt;
(...)&lt;br /&gt;
&lt;br /&gt;
****************************************&lt;br /&gt;
**************** DATA ******************&lt;br /&gt;
****************************************&lt;br /&gt;
Fetching DATA with 'git clone ssh://SFusername@git.code.sf.net/p/flightgear/fgdata'&lt;br /&gt;
Cloning into '.'...&lt;br /&gt;
The authenticity of host 'git.code.sf.net (216.105.38.16)' can't be established.&lt;br /&gt;
ECDSA key fingerprint is SHA256:FeVkoYYBjuQzb5QVAgm3BkmeN5TTgL2qfmqz9tCPRL4.&lt;br /&gt;
Are you sure you want to continue connecting (yes/no)?&lt;br /&gt;
Warning: Permanently added 'git.code.sf.net,216.105.38.16' (ECDSA) to the list of known hosts.&lt;br /&gt;
Connection closed by 216.105.38.16 port 22&lt;br /&gt;
fatal: Could not read from remote repository.&lt;br /&gt;
&lt;br /&gt;
Please make sure you have the correct access rights&lt;br /&gt;
and the repository exists.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above messages are perfectly normal but deserve a little explanation. Here, &amp;lt;tt&amp;gt;ssh&amp;lt;/tt&amp;gt; asked us to confirm that the fingerprint sent by the remote host is that of the real &amp;lt;tt&amp;gt;git.code.sf.net&amp;lt;/tt&amp;gt;, as opposed to that of some malicious server ''pretending'' to be &amp;lt;tt&amp;gt;git.code.sf.net&amp;lt;/tt&amp;gt;. This confirmation only has to be done once, after which it is remembered thanks to &amp;lt;tt&amp;gt;~/.ssh/known_hosts&amp;lt;/tt&amp;gt;. You should visit the [https://sourceforge.net/p/forge/documentation/SSH%20Key%20Fingerprints/#fingerprint-listing page that gives the host key fingerprint of every publically-accessible SSH server at SourceForge] and carefully check that the fingerprint appearing on your terminal is listed on that page for &amp;lt;tt&amp;gt;git.code.sf.net&amp;lt;/tt&amp;gt;, or some matching pattern such as &amp;lt;tt&amp;gt;*.code.sf.net&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If the fingerprint that is printed on your terminal is not listed on that page, answer &amp;lt;tt&amp;gt;no&amp;lt;/tt&amp;gt; to the question ''Are you sure you want to continue connecting (yes/no)?'' and copy/paste to flightgear-devel (see [[Mailing lists]]) the above message from &amp;lt;tt&amp;gt;ssh&amp;lt;/tt&amp;gt; that contains the fingerprint sent to you by the remote host which pretends to be &amp;lt;tt&amp;gt;git.code.sf.net&amp;lt;/tt&amp;gt;. If this happened, you should stop here and wait for answers from readers of flightgear-devel.&lt;br /&gt;
&lt;br /&gt;
From now on, we'll assume that the fingerprint you received was correct, and therefore that you have answered &amp;lt;tt&amp;gt;yes&amp;lt;/tt&amp;gt; to the ''Are you sure you want to continue connecting (yes/no)?'' question.&lt;br /&gt;
&lt;br /&gt;
In this example, it took us several minutes to verify the fingerprint of the &amp;lt;tt&amp;gt;git.code.sf.net&amp;lt;/tt&amp;gt; server and confirm it to &amp;lt;tt&amp;gt;ssh&amp;lt;/tt&amp;gt;. Because of this delay, &amp;lt;tt&amp;gt;git.code.sf.net&amp;lt;/tt&amp;gt; hung up on us and closed the connection. This is absolutely ''not a problem:'' we can just rerun the &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; command with the same arguments as the first time. Since we answered &amp;lt;tt&amp;gt;yes&amp;lt;/tt&amp;gt; to the ''Are you sure you want to continue connecting (yes/no)?'' prompt, the fingerprint of &amp;lt;tt&amp;gt;git.code.sf.net&amp;lt;/tt&amp;gt;'s key has been stored in &amp;lt;tt&amp;gt;~/.ssh/known_hosts&amp;lt;/tt&amp;gt;, therefore we won't get this prompt anymore. But if some server claiming to be &amp;lt;tt&amp;gt;git.code.sf.net&amp;lt;/tt&amp;gt; presents a host key that has a different fingerprint in the future, &amp;lt;tt&amp;gt;ssh&amp;lt;/tt&amp;gt; will print a big fat warning that the server may belong to an attacker trying to impersonate &amp;lt;tt&amp;gt;git.code.sf.net&amp;lt;/tt&amp;gt;. Therefore, this SSH host key verification is very useful to protect us from future attacks (which hopefully won't happen at all).&lt;br /&gt;
&lt;br /&gt;
As said, we just rerun the &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; command with the same arguments:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ download_and_compile.sh --git-clone-site-params SourceForge=ssh:SFusername DATA&lt;br /&gt;
**********************************************************************&lt;br /&gt;
*                                                                    *&lt;br /&gt;
* Warning: a typical SimGear + FlightGear + FGData build requires    *&lt;br /&gt;
* about 12 GiB of disk space. The compilation part may last from a   *&lt;br /&gt;
* few minutes to hours, depending on your computer.                  *&lt;br /&gt;
*                                                                    *&lt;br /&gt;
* Hint: use the -j option if your CPU has several cores, as in:      *&lt;br /&gt;
*                                                                    *&lt;br /&gt;
*         download_and_compile.sh -j$(nproc)                         *&lt;br /&gt;
*                                                                    *&lt;br /&gt;
**********************************************************************&lt;br /&gt;
Running 'apt-get update'...&lt;br /&gt;
[sudo] password for toto:&lt;br /&gt;
&lt;br /&gt;
(...)&lt;br /&gt;
&lt;br /&gt;
Considering a package alternative: libcurl4-openssl-dev libcurl4-gnutls-dev&lt;br /&gt;
Package alternative matched for libcurl4-openssl-dev&lt;br /&gt;
Running 'apt-get install build-essential git libcurl4-openssl-dev cmake'...&lt;br /&gt;
[sudo] password for toto:&lt;br /&gt;
&lt;br /&gt;
(...)&lt;br /&gt;
&lt;br /&gt;
****************************************&lt;br /&gt;
**************** DATA ******************&lt;br /&gt;
****************************************&lt;br /&gt;
Fetching DATA with 'git clone ssh://SFusername@git.code.sf.net/p/flightgear/fgdata'&lt;br /&gt;
Cloning into '.'...&lt;br /&gt;
Password:&amp;lt;/pre&amp;gt;&lt;br /&gt;
As explained above, the preceding prompt is for your SourceForge password (which you could guess from the &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;git clone ssh://SFusername@git.code.sf.net/p/flightgear/fgdata&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; command).&lt;br /&gt;
&amp;lt;pre&amp;gt;remote: Enumerating objects: 67011, done.&lt;br /&gt;
remote: Counting objects: 100% (67011/67011), done.&lt;br /&gt;
remote: Compressing objects: 100% (31342/31342), done.&lt;br /&gt;
remote: Total 67011 (delta 38776), reused 59640 (delta 33570)&lt;br /&gt;
Receiving objects: 100% (67011/67011), 2.60 GiB | 313.00 KiB/s, done.&lt;br /&gt;
Resolving deltas: 100% (38776/38776), done.&lt;br /&gt;
Checking out files: 100% (12959/12959), done.&lt;br /&gt;
Password:&amp;lt;/pre&amp;gt;&lt;br /&gt;
(It will take a fair amount of time to get there, because this is the complete download of [[FGData]].)&amp;lt;br /&amp;gt;&lt;br /&gt;
This is again a prompt for your SourceForge password, because &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; wants to run &amp;lt;code&amp;gt;git pull --rebase&amp;lt;/code&amp;gt; in the repository (admittedly, it's a bit dumb after a &amp;lt;tt&amp;gt;clone&amp;lt;/tt&amp;gt; operation—please forgive us). In case you were not monitoring the &amp;lt;tt&amp;gt;clone&amp;lt;/tt&amp;gt; operation, you probably saw the password prompt way after &amp;lt;tt&amp;gt;git.code.sf.net&amp;lt;/tt&amp;gt; got bored waiting for you and closed our second connection:&lt;br /&gt;
&amp;lt;pre&amp;gt;Connection closed by 216.105.38.16 port 22&lt;br /&gt;
fatal: Could not read from remote repository.&lt;br /&gt;
&lt;br /&gt;
Please make sure you have the correct access rights&lt;br /&gt;
and the repository exists.&amp;lt;/pre&amp;gt;&lt;br /&gt;
(if not, there should be no error message and you should have a clean FGData clone)&amp;lt;br /&amp;gt;&lt;br /&gt;
No worries. Just as before, simply rerun the command with the same arguments:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ download_and_compile.sh --git-clone-site-params SourceForge=ssh:SFusername DATA&lt;br /&gt;
**********************************************************************&lt;br /&gt;
*                                                                    *&lt;br /&gt;
* Warning: a typical SimGear + FlightGear + FGData build requires    *&lt;br /&gt;
* about 12 GiB of disk space. The compilation part may last from a   *&lt;br /&gt;
* few minutes to hours, depending on your computer.                  *&lt;br /&gt;
*                                                                    *&lt;br /&gt;
* Hint: use the -j option if your CPU has several cores, as in:      *&lt;br /&gt;
*                                                                    *&lt;br /&gt;
*         download_and_compile.sh -j$(nproc)                         *&lt;br /&gt;
*                                                                    *&lt;br /&gt;
**********************************************************************&lt;br /&gt;
Running 'apt-get update'...&lt;br /&gt;
[sudo] password for toto:&lt;br /&gt;
&lt;br /&gt;
(...)&lt;br /&gt;
&lt;br /&gt;
Considering a package alternative: libcurl4-openssl-dev libcurl4-gnutls-dev&lt;br /&gt;
Package alternative matched for libcurl4-openssl-dev&lt;br /&gt;
Running 'apt-get install build-essential git libcurl4-openssl-dev cmake'...&lt;br /&gt;
[sudo] password for toto:&lt;br /&gt;
&lt;br /&gt;
(...)&lt;br /&gt;
&lt;br /&gt;
****************************************&lt;br /&gt;
**************** DATA ******************&lt;br /&gt;
****************************************&lt;br /&gt;
DATA: the repository already exists&lt;br /&gt;
Password:&lt;br /&gt;
Already up to date.&lt;br /&gt;
Current branch next is up to date.&lt;br /&gt;
Already on 'next'&lt;br /&gt;
Your branch is up to date with 'origin/next'.&lt;br /&gt;
All optional package alternatives have found a matching package.&lt;br /&gt;
&lt;br /&gt;
download_and_compile.sh has finished to work.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
There we are! You now have a clean, up-to-date [[FGData]] clone in &amp;lt;tt&amp;gt;~/flightgear/dnc-managed/install/flightgear/fgdata&amp;lt;/tt&amp;gt; (remember: &amp;lt;tt&amp;gt;~/flightgear/dnc-managed&amp;lt;/tt&amp;gt; is the directory from which you ran &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;). Note this place: the full path of the &amp;lt;tt&amp;gt;~/flightgear/dnc-managed/install/flightgear/fgdata&amp;lt;/tt&amp;gt; directory is your [[$FG_ROOT]].&lt;br /&gt;
&lt;br /&gt;
Now, change the protocol to use for future updates of your FGData clone:&amp;lt;ref name=&amp;quot;changing-the-protocol-for-a-git-remote-manual-method&amp;quot;&amp;gt;Another way would be to manually change the relevant line starting with &amp;lt;code&amp;gt;url = &amp;lt;nowiki&amp;gt;ssh://SFusername@&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; for the &amp;lt;code&amp;gt;origin&amp;lt;/code&amp;gt; remote in the &amp;lt;tt&amp;gt;.git/config&amp;lt;/tt&amp;gt; file that lives inside your repository clone (i.e., &amp;lt;tt&amp;gt;~/flightgear/dnc-managed/install/flightgear/fgdata/.git/config&amp;lt;/tt&amp;gt; in our example).&amp;lt;/ref&amp;gt;&lt;br /&gt;
 (cd install/flightgear/fgdata &amp;amp;&amp;amp; \&lt;br /&gt;
 git remote set-url origin &amp;lt;nowiki&amp;gt;https://git.code.sf.net/p/flightgear/fgdata&amp;lt;/nowiki&amp;gt;)&lt;br /&gt;
(you can check at any time the protocol(s) in use with the command &amp;lt;code&amp;gt;git remote -v&amp;lt;/code&amp;gt; run inside a Git repository—in this case, inside the folder &amp;lt;tt&amp;gt;install/flightgear/fgdata&amp;lt;/tt&amp;gt;). As a consequence of this change, all future updates of your FGData clone will use the &amp;lt;tt&amp;gt;https&amp;lt;/tt&amp;gt; protocol, therefore you won't be prompted anymore for your SourceForge password.&lt;br /&gt;
&lt;br /&gt;
All that remains to do is to run, from the same directory as before (&amp;lt;tt&amp;gt;~/flightgear/dnc-managed&amp;lt;/tt&amp;gt; in our example):&lt;br /&gt;
 $ download_and_compile.sh -j$(nproc)&lt;br /&gt;
The &amp;lt;code&amp;gt;-j$(nproc)&amp;lt;/code&amp;gt; option is not necessary, but is likely to save you a lot of time; with it, all available CPU cores will be used when compiling—see [[#Multicore acceleration| Multicore acceleration]].&lt;br /&gt;
&lt;br /&gt;
Assuming the compilation was successful, you can now start the [[FlightGear Qt launcher|FlightGear built-in launcher]] using for instance:&lt;br /&gt;
 $ ./run_fgfs.sh --launcher&lt;br /&gt;
See [[#Building FlightGear|Building FlightGear]] for more details.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;list-of-available-components&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; List of available components ==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; script is able to download, compile (when applicable) and install the following components:&lt;br /&gt;
&lt;br /&gt;
* ATCPIE (for the [[ATC-pie]] air traffic control simulation program)&lt;br /&gt;
* CMAKE (for the [https://cmake.org/ CMake] build tool—this can be useful in case CMake is too old in your distribution)&lt;br /&gt;
* DATA (for [[FGData]], the main set of data files used by FlightGear)&lt;br /&gt;
* FGFS (for FlightGear itself)&lt;br /&gt;
* FFGO (for the [[FFGo]] FlightGear launcher)&lt;br /&gt;
* FGRUN (for the [[Fgrun|FGRun]] FlightGear launcher)&lt;br /&gt;
* FGX (for the [[FGX|FGx]] FlightGear launcher&amp;lt;ref name=&amp;quot;note-on-the-status-of-FGx-support-in-download-and-compile-sh&amp;quot;&amp;gt;Support for FGx in &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; would probably benefit from a code review.&amp;lt;/ref&amp;gt;)&lt;br /&gt;
* OPENRADAR (for the [[OpenRadar]] air traffic control simulation program)&lt;br /&gt;
* OPENRTI (for [[FlightGear HLA support (High Level Architecture)#OpenRTI | OpenRTI]]&amp;lt;ref name=&amp;quot;note-on-the-status-of-OpenRTI-support-in-FG&amp;quot;&amp;gt;Note that OpenRTI is just an optional dependency for [[FlightGear high-level architecture support | HLA support]]. For the time being, you should be just fine building without it. Eventually, the idea is for HLA to replace the existing MP system and even increasingly distribute the FlightGear architecture such that more and more components can be more easily run in separate threads or even separate processes, possibly even on different machines. So this is going to be an important feature for professional users, using several computers and screens to create a comprehensive and immersive simulation environment.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
At the moment, it is probably safe to say that HLA is only of interest to developers and people willing to play with experimental features.&amp;lt;/ref&amp;gt;)&lt;br /&gt;
* OSG (for the [[OpenSceneGraph]] library)&lt;br /&gt;
* PLIB (for the [[PLIB]] library)&lt;br /&gt;
* SIMGEAR (for the [[SimGear]] library—foundation for FlightGear and TerraGear)&lt;br /&gt;
* TERRAGEAR (for the [[TerraGear]] terrain building toolchain)&lt;br /&gt;
* TERRAGEARGUI (for [[TerraGear GUI]], a graphical interface for TerraGear)&lt;br /&gt;
* ZLIB (for the [http://www.zlib.net/ zlib] compression library)&lt;br /&gt;
&lt;br /&gt;
Each of the items listed above is a ''component'' in &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; terminology. Components are written in uppercase by convention.&lt;br /&gt;
&lt;br /&gt;
{{Note|The preceding list might not be up-to-date. The up-to-date list of components supported by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; can always be obtained by running &amp;lt;code&amp;gt;download_and_compile.sh --help&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
What is the point of knowing this? Because you may pass component names to &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; in order to tell it what you want to download, build and install. By default, only the components [[SimGear|SIMGEAR]], [[FlightGear|FGFS]], [[FGData|DATA]] and [[OpenSceneGraph|OSG]] are taken care of, which means that the command:&lt;br /&gt;
 $ download_and_compile.sh&lt;br /&gt;
is equivalent to:&lt;br /&gt;
 $ download_and_compile.sh SIMGEAR FGFS DATA OSG&lt;br /&gt;
&lt;br /&gt;
In case you'd like to do the same build with just [[PLIB]] added, you could use:&lt;br /&gt;
 $ download_and_compile.sh SIMGEAR FGFS DATA OSG PLIB&lt;br /&gt;
&lt;br /&gt;
You get the idea. When several components are passed on the same command line, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; chooses a reasonable order for processing, so don't worry about that.&lt;br /&gt;
&lt;br /&gt;
== When building ''next'', you may encounter problems ==&lt;br /&gt;
&lt;br /&gt;
Keeping in mind that this script compiles sometimes bleeding edge software, it can happen that what was successfully compiling last week, does not compile anymore today. Building the latest stable version (option &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt;) or the latest Long Term Stable release (option &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt;) should always work, unless there is a problem with the script (well, in some cases, there may be packages of your distribution that are too recent for &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt;; for instance, in July 2020, &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; didn't build with OpenSceneGraph 3.6, but simply passing the OSG component on the &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; command solved the problem, because at that time, option &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; selected OpenSceneGraph 3.4).&lt;br /&gt;
&lt;br /&gt;
That said, you may want to build the development version (called ''next''): this is the one developers use all the time, so kindly asking on the flightgear-devel [[Mailing_lists|mailing list]] in case a problem popped up&amp;lt;ref name=&amp;quot;what-to-provide-when-asking-for-help&amp;quot;&amp;gt;Don't forget in this case to precisely tell what you did and include the &amp;lt;tt&amp;gt;compilation_log.txt&amp;lt;/tt&amp;gt; file written by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;.&amp;lt;/ref&amp;gt; should allow you to find good advice and get the problem quickly fixed, if it's a new one.&lt;br /&gt;
&lt;br /&gt;
{{Warning|As of July 2020, heavy development will be done on ''next'', the development branch of FlightGear. It is expected to be rather unstable for several months. Unless you are really interested in FlightGear development or in providing feedback to the developers, you're probably better off building either the latest stable version (option &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt;) or the latest Long Term Stable release (option &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt;). In case you want something even older, the previous LTS release can be selected with option &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
== Task-specific instructions ==&lt;br /&gt;
&lt;br /&gt;
{{Note|In this section, we assume you've read and followed the advice given in [[#getting-started-with-download-and-compile-sh|Getting started with &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;]].}}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;selecting-the-components-to-work-on&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; Selecting the components to build ===&lt;br /&gt;
&lt;br /&gt;
By default, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; downloads or updates, then compiles, [[SimGear]], FlightGear, [[FGData]] and [[OpenSceneGraph|OSG]] (more precisely, FGData is downloaded but not compiled—that wouldn't make sense). This is what happens when running:&lt;br /&gt;
 $ download_and_compile.sh&lt;br /&gt;
The preceding command is therefore equivalent to:&lt;br /&gt;
 $ download_and_compile.sh SIMGEAR FGFS DATA OSG&lt;br /&gt;
&lt;br /&gt;
To make &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; take care of other programs or libraries, use non-option arguments naming the ''components'' you want, for instance:&lt;br /&gt;
 $ download_and_compile.sh SIMGEAR FGFS DATA OSG CMAKE&lt;br /&gt;
SIMGEAR, FGFS, DATA, OSG and CMAKE are the component names respectively corresponding to [[SimGear]], FlightGear, [[FGData]], [[OpenSceneGraph]] and [https://cmake.org/ CMake] in &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;'s terminology.&lt;br /&gt;
&lt;br /&gt;
A [[#list-of-available-components|list of available components]] is provided on this page, but the fully up-to-date list can always be obtained by running &amp;lt;code&amp;gt;download_and_compile.sh --help&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Choosing between stable and development versions ===&lt;br /&gt;
&lt;br /&gt;
By default, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; fetches code and data from development branches of the source repositories (which sometimes causes compilation or runtime errors). However, it is possible to tell the script to download the latest “stable” version of each component, for some suitable definition of “stable”. This is by means of the &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt; options:&lt;br /&gt;
 $ download_and_compile.sh -s ''COMPONENT1 COMPONENT2...''&lt;br /&gt;
or&lt;br /&gt;
 $ download_and_compile.sh --lts ''COMPONENT1 COMPONENT2...''&lt;br /&gt;
or&lt;br /&gt;
 $ download_and_compile.sh --old-lts ''COMPONENT1 COMPONENT2...''&lt;br /&gt;
&lt;br /&gt;
How does it work?&lt;br /&gt;
* For [[SimGear]], FlightGear and [[FGData]], &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; uses the most recent stable release branch of the corresponding Git repository, &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; uses the most recent Long Term Stable release (LTS) and &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt; uses the previous LTS release.&lt;br /&gt;
* For other components, a known-stable version is selected by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;, which may be influenced by the use of &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
So, as far as the SIMGEAR, FGFS and DATA components are concerned, you can:&lt;br /&gt;
* build the latest stable release (&amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt;);&lt;br /&gt;
* build the latest Long Term Stable release (&amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt;);&lt;br /&gt;
* build the previous Long Term Stable release (&amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt;);&lt;br /&gt;
* build the current development version (bleeding edge), which lives in the {{flightgear source&lt;br /&gt;
| branch = next&lt;br /&gt;
| text = next&lt;br /&gt;
}} branch of the FlightGear repository.&lt;br /&gt;
The use of &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt; also influences the version of other components you may have selected (this can be overridden using &amp;lt;code&amp;gt;--component-branch&amp;lt;/code&amp;gt; for advanced users—see [[#Component-specific settings|Component-specific settings]]).&lt;br /&gt;
&lt;br /&gt;
{{Note|In a given folder where &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; is run, you should normally either always use the &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; option, or always use &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt;, or always use &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt;, or always none of these (in other words, stick to the same suite: latest stable, latest LTS, previous LTS or ''next'', consistently accross all components).}}&lt;br /&gt;
&lt;br /&gt;
Actually, it ''is'' possible to switch between suites but you have to use the &amp;lt;code&amp;gt;--cleanup&amp;lt;/code&amp;gt; option when doing the switch (see [[#Cleaning built and installed files|Cleaning built and installed files]] for information on this option). For instance:&lt;br /&gt;
* Build with &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; as many times as you want.&lt;br /&gt;
* Want to try ''next''? Okay, then build once with &amp;lt;code&amp;gt;--cleanup&amp;lt;/code&amp;gt; (no &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; option anymore).&lt;br /&gt;
* You can then perform as many builds of ''next'' as you want; no need to use &amp;lt;code&amp;gt;--cleanup&amp;lt;/code&amp;gt; unless something special went wrong.&lt;br /&gt;
* If you later decide to switch back to the stable release, build once with &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--cleanup&amp;lt;/code&amp;gt;, then only with &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; for further builds.&lt;br /&gt;
* etc.&lt;br /&gt;
&lt;br /&gt;
This way, ''you don't need to download the repositories again'' when trying the various suites. In particular, you can switch between ''next'', stable, LTS and old LTS without downloading nor having several copies of [[FGData]] on your hard drive. (This works because a Git repository may internally contain data for several branches, even if only one is “normally visible” in the filesystem at a given time.)&lt;br /&gt;
&lt;br /&gt;
==== Building the latest Long Term Stable release of FlightGear ====&lt;br /&gt;
&lt;br /&gt;
When executing &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;, use the &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; option to build the latest Long Term Stable release: &lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ download_and_compile.sh --lts&lt;br /&gt;
(In this example, the implicitly-selected components are SIMGEAR, FGFS and DATA, as explained [[#selecting-the-components-to-work-on | above]].)&lt;br /&gt;
&lt;br /&gt;
{{Note|If you decide to use the &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; option in a given directory tree, you should use it for all components in that directory tree (SIMGEAR, FGFS, DATA, etc.). Running &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; in a given directory with the &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; option for some components and not for others is not supported.}}&lt;br /&gt;
&lt;br /&gt;
==== Building the latest stable release of FlightGear ====&lt;br /&gt;
&lt;br /&gt;
When executing &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;, use the &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; option to build the latest stable release: &lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ download_and_compile.sh -s&lt;br /&gt;
&lt;br /&gt;
{{Note|If you decide to use the &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; option in a given directory tree, you should use it for all components in that directory tree (SIMGEAR, FGFS, DATA, etc.). Running &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; in a given directory with the &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; option for some components and not for others is not supported.}}&lt;br /&gt;
&lt;br /&gt;
==== Building the current FlightGear development version ====&lt;br /&gt;
&lt;br /&gt;
When executing &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; without any option, the development version of every selected component is built:&lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ download_and_compile.sh&lt;br /&gt;
&lt;br /&gt;
{{Note|The development version of FlightGear changes on an almost daily basis. It provides the latest features, but is not guaranteed to always work reliably. If you don't want to take the risk of finding new bugs when updating, you may prefer to use the latest stable release.}}&lt;br /&gt;
&lt;br /&gt;
==== Building the previous Long Term Stable release of FlightGear ====&lt;br /&gt;
&lt;br /&gt;
When executing &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;, use the &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt; option to build the previous Long Term Stable release (i.e., oldish code): &lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ download_and_compile.sh --old-lts&lt;br /&gt;
(In this example, the implicitly-selected components are SIMGEAR, FGFS and DATA, as explained [[#selecting-the-components-to-work-on | above]].)&lt;br /&gt;
&lt;br /&gt;
{{Note|If you decide to use the &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt; option in a given directory tree, you should use it for all components in that directory tree (SIMGEAR, FGFS, DATA, etc.). Running &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; in a given directory with the &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt; option for some components and not for others is not supported.}}&lt;br /&gt;
&lt;br /&gt;
=== Overriding the source repository or branch for a component ===&lt;br /&gt;
&lt;br /&gt;
This section shows how to override the location and/or branch from which a given component will be downloaded.&lt;br /&gt;
&lt;br /&gt;
{{Warning|The rest of this section is for people who know what they are doing. Don't use the following unless you trust the person who publishes the repository and have good reasons to believe that it has been kept up-to-date.}}&lt;br /&gt;
&lt;br /&gt;
==== A short example ====&lt;br /&gt;
&lt;br /&gt;
Let's start with an example to make it easier to understand to following paragraphs. Suppose we want to build the current stable release of FlightGear, linked against an [[OpenSceneGraph]] library whose source code is to be retrieved from branch &amp;lt;tt&amp;gt;fgfs-osg-36-2&amp;lt;/tt&amp;gt; of the Git repository located at [https://gitlab.com/flightgear/openscenegraph.git https://gitlab.com/flightgear/openscenegraph.git] (this is actually the default in September 2024). Since the default protocol used when &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; clones a repository is [https://en.wikipedia.org/wiki/HTTPS HTTPS], this can be done with&lt;br /&gt;
 download_and_compile.sh --cleanup -s \&lt;br /&gt;
 --override-repo OSG=GitLab:gitlab.com/flightgear/openscenegraph.git \&lt;br /&gt;
 --component-branch OSG=fgfs-osg-36-2 SIMGEAR FGFS DATA OSG&lt;br /&gt;
&lt;br /&gt;
==== The site name ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; uses case-insensitive short names such as &amp;lt;tt&amp;gt;GitLab&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;GitHub&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;SourceForge&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;gitlab.kitware.com&amp;lt;/tt&amp;gt; as keys in order to identify the settings describing where and how a given component will be initially fetched (these settings are effective at clone time; later updates simply use the settings recorded in the local repository). These names are referred to as ''site'' in the output of &amp;lt;code&amp;gt;download_and_compile.sh --help&amp;lt;/code&amp;gt;, in particular in the &amp;lt;tt&amp;gt;--git-clone-site-params&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;--override-repo&amp;lt;/tt&amp;gt; options we'll present below. These ''site'' keys are simply identifier strings; they are not used in the DNS queries.&lt;br /&gt;
&lt;br /&gt;
==== The protocol ====&lt;br /&gt;
&lt;br /&gt;
Current &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; (from December 2022) fetches the source code of most components from Git repositories (earlier versions used Subversion for some components); a few non-core components (currently [[FGo!]] and [[OpenRadar]]) are fetched using &amp;lt;tt&amp;gt;wget&amp;lt;/tt&amp;gt; and are out-of-scope for this section.&lt;br /&gt;
&lt;br /&gt;
The default protocol used by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; when cloning a Git repository is [https://en.wikipedia.org/wiki/HTTPS HTTPS]. This can be overridden using the &amp;lt;tt&amp;gt;--git-clone-default-proto&amp;lt;/tt&amp;gt; option. In other words, the default is &amp;lt;tt&amp;gt;--git-clone-default-proto=https&amp;lt;/tt&amp;gt; (the protocol name is case-insensitive). Other possibilities for the protocol are &amp;lt;tt&amp;gt;git&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;ssh&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Warning|The &amp;lt;tt&amp;gt;git&amp;lt;/tt&amp;gt; protocol doesn't protect against man-in-the-middle attacks; use at your own risk! Unfortunately, “clever” people often recommend it on the forum without mentioning its downsides.}}&lt;br /&gt;
&lt;br /&gt;
Using the &amp;lt;tt&amp;gt;ssh&amp;lt;/tt&amp;gt; protocol as the argument of &amp;lt;tt&amp;gt;--git-clone-default-proto&amp;lt;/tt&amp;gt; has little use, because in general you'll want to specify a particular username when using SSH and this username is likely not to be the same for all components you intend to clone via SSH (right, &amp;lt;tt&amp;gt;~/.ssh/config&amp;lt;/tt&amp;gt; can be used to automatically provide a site-dependent username). That is why &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; offers the &amp;lt;tt&amp;gt;--git-clone-site-params&amp;lt;/tt&amp;gt; option.&lt;br /&gt;
&lt;br /&gt;
==== Site-specific settings ====&lt;br /&gt;
&lt;br /&gt;
Using&lt;br /&gt;
 --git-clone-site-params ''SITE''=''PROTOCOL''[:''USERNAME'']&lt;br /&gt;
you can tell &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; that every component fetched from ''SITE'' should be cloned with the specified protocol and username (allowed protocols are &amp;lt;tt&amp;gt;https&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;ssh&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;git&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
{{Note|In case you have several repositories at a given site (say, GitHub) and need to use different SSH usernames for these repositories, you can use different site names:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--override-repo COMPONENT_A=GitHubA:ADDRESS_A&lt;br /&gt;
--git-clone-site-params GitHubA=ssh:userA&lt;br /&gt;
--override-repo COMPONENT_B=GitHubB:ADDRESS_B&lt;br /&gt;
--git-clone-site-params GitHubB=ssh:userB&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here, the site names are &amp;lt;tt&amp;gt;GitHubA&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;GitHubB&amp;lt;/tt&amp;gt;; the &amp;lt;tt&amp;gt;--override-repo&amp;lt;/tt&amp;gt; option will be presented below.&lt;br /&gt;
&lt;br /&gt;
By default, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; case-insensitively uses the &amp;lt;tt&amp;gt;GitLab&amp;lt;/tt&amp;gt; (resp. &amp;lt;tt&amp;gt;SourceForge&amp;lt;/tt&amp;gt;) site name to identify the settings used when cloning a repository from gitlab.com (resp. git.code.sf.net). Therefore, the settings for GitHubA and GitHubB in this example would only apply to components ''c'' for which --override-repo ''c''&amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt;GitHubA:... or --override-repo ''c''&amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt;GitHubB:... has been specified.}}&lt;br /&gt;
&lt;br /&gt;
==== Component-specific settings ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;--override-repo&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;--component-branch&amp;lt;/tt&amp;gt; options allow one to override the default settings used by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; for cloning the repository corresponding to the specified component (they only apply to components whose source code is retrieved with Git). The syntax of these options is&lt;br /&gt;
 --override-repo ''COMPONENT''=''SITE'':''ADDRESS''&lt;br /&gt;
and&lt;br /&gt;
 --component-branch ''COMPONENT''=''BRANCH''&lt;br /&gt;
In this syntax:&lt;br /&gt;
* ''COMPONENT'' represents the name of a component for &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; (e.g., &amp;lt;tt&amp;gt;SIMGEAR&amp;lt;/tt&amp;gt;—see [[#List of available components|List of available components]]);&lt;br /&gt;
* ''ADDRESS'' is something like &amp;lt;tt&amp;gt;gitlab.com/flightgear/simgear.git&amp;lt;/tt&amp;gt; (don't include any &amp;lt;tt&amp;gt;protocol://&amp;lt;/tt&amp;gt; part in ''ADDRESS'');&lt;br /&gt;
* ''BRANCH'' should be the name of an existing branch of the Git repository hosted at ''ADDRESS'';&lt;br /&gt;
* ''SITE'' is a string used as a key in a mapping; &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; uses it to find out how to connect to ''ADDRESS'' in order to clone the repository for ''COMPONENT'' (see [[#Site-specific settings|Site-specific settings]]).&lt;br /&gt;
See the [[#A short example|above example]] for a concrete example where these options are used.&lt;br /&gt;
&lt;br /&gt;
{{Note|The argument of any long option of &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; that takes an argument may be introduced immediately after the option name using an equal sign. However, in the above cases, I find this way a bit confusing because the option value ''also'' uses an equal sign as separator. Hence the above use of separate command arguments: one for the option name, one for its argument.}}&lt;br /&gt;
&lt;br /&gt;
=== Passing custom arguments to CMake ===&lt;br /&gt;
&lt;br /&gt;
Sometimes, when building a program, you may want to enable a feature that is not enabled by default, or disable a feature that is enabled by default. With recent versions of &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; (October 2020 or later), this can be done for SimGear and FlightGear using the &amp;lt;code&amp;gt;--sg-cmake-arg&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--fg-cmake-arg&amp;lt;/code&amp;gt; options (the environment variables &amp;lt;tt&amp;gt;SG_CMAKEARGS&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;FG_CMAKEARGS&amp;lt;/tt&amp;gt; are still supported, but they don't allow one to pass arguments containing spaces). For instance, in order to link SimGear with the system Expat library, you can do:&lt;br /&gt;
 $ download_and_compile.sh --sg-cmake-arg='-DSYSTEM_EXPAT=ON' SIMGEAR&lt;br /&gt;
Similarly, disabling HID-based input when building FlightGear can be achieved this way:&lt;br /&gt;
 $ download_and_compile.sh --fg-cmake-arg='-DENABLE_HID_INPUT=OFF' FGFS&lt;br /&gt;
&lt;br /&gt;
{{Note|Such options are typically defined in &amp;lt;tt&amp;gt;CMakeLists.txt&amp;lt;/tt&amp;gt; files, for example {{simgear source&lt;br /&gt;
| path = CMakeLists.txt&lt;br /&gt;
| text = here&lt;br /&gt;
}} for SimGear and {{flightgear source&lt;br /&gt;
| path = CMakeLists.txt&lt;br /&gt;
| text = here&lt;br /&gt;
}} for FlightGear.}}&lt;br /&gt;
&lt;br /&gt;
This can be useful, for instance, to work around bugs in a part of SimGear or FlightGear that you don't need, but causes a build or runtime failure (see {{forum link|t=35740|text=here}} for example). This is often convenient when using the development version of FlightGear, but doesn't mean such bugs shouldn't be reported!&lt;br /&gt;
&lt;br /&gt;
If you have several such options to pass, just use &amp;lt;code&amp;gt;--sg-cmake-arg&amp;lt;/code&amp;gt; and/or &amp;lt;code&amp;gt;--fg-cmake-arg&amp;lt;/code&amp;gt; several times:&lt;br /&gt;
 $ download_and_compile.sh --fg-cmake-arg='-DENABLE_SWIFT=ON' \&lt;br /&gt;
                           --fg-cmake-arg='-DENABLE_HID_INPUT=OFF' FGFS&lt;br /&gt;
It is even possible to pass arguments containing spaces to CMake, as in:&lt;br /&gt;
 $ download_and_compile.sh \&lt;br /&gt;
     --sg-cmake-arg='-DCMAKE_CXX_FLAGS=-Wno-deprecated-declarations -Wall' \&lt;br /&gt;
     SIMGEAR&lt;br /&gt;
(just a silly example to show a working syntax) or:&lt;br /&gt;
 $ download_and_compile.sh \&lt;br /&gt;
     --fg-cmake-arg=&amp;quot;-DCMAKE_CXX_FLAGS=$(pkg-config --cflags gl)&amp;quot; \&lt;br /&gt;
     FGFS&lt;br /&gt;
Note the use of double-quotes here to enable the &amp;lt;code&amp;gt;$(...)&amp;lt;/code&amp;gt; command substitution.&lt;br /&gt;
&lt;br /&gt;
Using the (half-deprecated) environment variables &amp;lt;tt&amp;gt;SG_CMAKEARGS&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;FG_CMAKEARGS&amp;lt;/tt&amp;gt;, it is also possible to define CMake arguments in a single place that are going to be used for both SimGear and FlightGear. However, this technique doesn't allow one to pass arguments containing spaces to CMake.&lt;br /&gt;
 $ export SG_CMAKEARGS='-DSYSTEM_EXPAT=ON'&lt;br /&gt;
 $ export FG_CMAKEARGS='-DENABLE_SWIFT=ON -DENABLE_HID_INPUT=OFF'&lt;br /&gt;
 $ download_and_compile.sh&lt;br /&gt;
&lt;br /&gt;
=== Seeing the compilation commands run by Make ===&lt;br /&gt;
&lt;br /&gt;
As a simple application of the previous section, the following options are often useful. When passed to &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;, these options cause the compilation commands run via Make to be printed on the terminal and recorded in the compilation_log.txt file:&lt;br /&gt;
  --sg-cmake-arg='-DCMAKE_VERBOSE_MAKEFILE=1' \&lt;br /&gt;
  --fg-cmake-arg='-DCMAKE_VERBOSE_MAKEFILE=1'&lt;br /&gt;
(the backslash is unneeded if you put both options on the same line). Passing the value 0 instead of 1 would explicitly request the default, non-verbose behavior.&lt;br /&gt;
&lt;br /&gt;
=== Launching FlightGear ===&lt;br /&gt;
&lt;br /&gt;
When using &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;, apart from those installed with the package manager, the FlightGear dependencies (which are typically libraries) are not installed system-wide but under the directory from which &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; was run. This makes it possible to easily use, for instance, different [[OpenSceneGraph]], [[SimGear]] and FlightGear versions on a single system—e.g., for testing purposes—but also to have separate build trees (optimized/debug). This is also why you either need to set LD_LIBRARY_PATH to run the built programs, or simply use the scripts created by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; in the directory where it is run, such as &amp;lt;tt&amp;gt;run_fgfs.sh&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;run_fgfs_debug.sh&amp;lt;/tt&amp;gt;: these scripts automatically set up the required environment variables according to your build settings before firing the desired program (e.g., &amp;lt;tt&amp;gt;fgfs&amp;lt;/tt&amp;gt;) with the arguments you provided. &lt;br /&gt;
&lt;br /&gt;
Therefore, the simplest way to run a FlightGear program built by &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; is to launch the &amp;lt;tt&amp;gt;run_fgfs.sh&amp;lt;/tt&amp;gt; script that &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; created in the directory from which it was run, for example:&lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ ./run_fgfs.sh --launcher&lt;br /&gt;
&lt;br /&gt;
{{Note|&amp;lt;code&amp;gt;./run_fgfs.sh --launcher&amp;lt;/code&amp;gt; starts FlightGear with its built-in launcher. If you just do &amp;lt;code&amp;gt;./run_fgfs.sh&amp;lt;/code&amp;gt;, FlightGear will be started without any launcher, at the default airport and with the default aircraft.}}&lt;br /&gt;
&lt;br /&gt;
In order to start FlightGear without any launcher, at a given airport (say, [https://en.wikipedia.org/wiki/Paro_Airport Paro airport], whose ICAO code is VQPR) and with a chosen aircraft, you can do:&lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ ./run_fgfs.sh --airport=VQPR --aircraft=dhc6&lt;br /&gt;
Actually, the directory change is not needed, we only gave it here for readability. Therefore, the following single command does the same:&lt;br /&gt;
 $ ~/flightgear/dnc-managed/run_fgfs.sh --airport=VQPR --aircraft=dhc6&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;avoiding-multiple-downloads-of-fgdata&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; Avoiding multiple downloads of FGData ===&lt;br /&gt;
&lt;br /&gt;
Some people use &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; to maintain several directory trees such as the tree starting at &amp;lt;tt&amp;gt;~/flightgear/dnc-managed&amp;lt;/tt&amp;gt; in [[#getting-started-with-download-and-compile-sh|Getting started with &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;]] (this can be useful if you want to have one tree with programs compiled in Release mode and another tree where they are built in Debug mode, for instance). This can easily be done by running &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; in each of the directories. But since [[FGData]] is so large, it may be tempting to share a single instance of this repository among several trees. This is not officially supported, but apparently can be made to work with symbolic links.&lt;br /&gt;
&lt;br /&gt;
Let's show how this can be done on an example. Suppose your master copy of FGData is in &amp;lt;tt&amp;gt;~/flightgear/dnc-managed/install/flightgear/fgdata&amp;lt;/tt&amp;gt;. Then the following appears to work:&lt;br /&gt;
 $ mkdir -p ~/flightgear/other-dnc-managed-tree/install/flightgear&lt;br /&gt;
 $ cd ~/flightgear/other-dnc-managed-tree/install/flightgear&lt;br /&gt;
 $ ln -s ../../../dnc-managed/install/flightgear/fgdata&lt;br /&gt;
 $ cd ~/flightgear/other-dnc-managed-tree&lt;br /&gt;
 $ download_and_compile.sh&lt;br /&gt;
&lt;br /&gt;
The last of these commands will use and update the FGData repository present in &amp;lt;tt&amp;gt;~/flightgear/dnc-managed/install/flightgear/fgdata&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Warning|This can only work simply if all trees that share a given FGData repository are from the same release (e.g., current stable or development). Running a “stable“ FlightGear with FGData from the ''next'' branch or the other way round, a development version of FlightGear with FGData from a release branch, doesn't work—and FlightGear should tell you when you start it in such a situation.&lt;br /&gt;
&lt;br /&gt;
That said, people comfortable with Git can check out the correct FGData branch before building or starting FlightGear, for instance:&lt;br /&gt;
 $ cd /path/to/fgdata &amp;amp;&amp;amp; git checkout release/2019.1&lt;br /&gt;
or&lt;br /&gt;
 $ cd /path/to/fgdata &amp;amp;&amp;amp; git checkout next&lt;br /&gt;
So, this is possible but somewhat acrobatic. You've been warned.}}&lt;br /&gt;
&lt;br /&gt;
Note: there is a [[Avoiding multiple downloads of FGData on Linux|wiki article about this subject]], but it is severely outdated as of April 2019.&lt;br /&gt;
&lt;br /&gt;
== Additional programs ==&lt;br /&gt;
&lt;br /&gt;
{{Note|In this section, we assume you've read and followed the advice given in [[#getting-started-with-download-and-compile-sh|Getting started with &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;]].}}&lt;br /&gt;
&lt;br /&gt;
If you wish to get other programs (precisely: download, build and install them), you need to launch &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; with the desired component names as arguments. For instance:&lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ download_and_compile.sh SIMGEAR FGFS DATA OSG&lt;br /&gt;
&lt;br /&gt;
See [[#list-of-available-components|above]] for the list of available components.&lt;br /&gt;
&lt;br /&gt;
=== TerraGear ===&lt;br /&gt;
&lt;br /&gt;
Run &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; with the TERRAGEAR component in order to build and install the [[TerraGear]] terrain building toolchain:&lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ download_and_compile.sh TERRAGEAR&lt;br /&gt;
&lt;br /&gt;
This creates the following scripts in &amp;lt;tt&amp;gt;~/flightgear/dnc-managed&amp;lt;/tt&amp;gt;:&lt;br /&gt;
* &amp;lt;tt&amp;gt;run_genapts850.sh&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;run_ogr-decode.sh&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;run_tg-construct.sh&amp;lt;/tt&amp;gt;&lt;br /&gt;
These scripts themselves run the corresponding TerraGear tools, as expected.&lt;br /&gt;
&lt;br /&gt;
=== TerraGear GUI ===&lt;br /&gt;
&lt;br /&gt;
[[TerraGear GUI]] is a graphical interface for [[TerraGear]] written with the Qt toolkit (still Qt 4 in 2019, but it works). In order to install it, run &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; with the TERRAGEARGUI component:&lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ download_and_compile.sh TERRAGEARGUI&lt;br /&gt;
This will create a &amp;lt;tt&amp;gt;run_terrageargui.sh&amp;lt;/tt&amp;gt; script in &amp;lt;tt&amp;gt;~/flightgear/dnc-managed&amp;lt;/tt&amp;gt;, and also a default configuration file &amp;lt;tt&amp;gt;~/.config/TerraGear/TerraGearGUI.conf&amp;lt;/tt&amp;gt;, unless you already have one. This default configuration file contains paths to the TerraGear and [[$FG_ROOT]] directories, assuming you have installed the TERRAGEAR and DATA components.&lt;br /&gt;
&lt;br /&gt;
To run TerraGear GUI:&lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ ./run_terrageargui.sh&lt;br /&gt;
&lt;br /&gt;
=== FGCom ===&lt;br /&gt;
&lt;br /&gt;
{{Note|[[FGCom]] has been integrated into FlightGear long ago, therefore the following is not needed in general.}}&lt;br /&gt;
&lt;br /&gt;
[[FGCom]] is the system used by FlightGear to simulate radio communications between users. It is automatically built and installed when you tell &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; to take care of the FGFS component. You can launch the standalone FGCom program by using the &amp;lt;tt&amp;gt;run_fgcom.sh&amp;lt;/tt&amp;gt; script:&lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ ./run_fgcom.sh&lt;br /&gt;
&lt;br /&gt;
=== FGRun ===&lt;br /&gt;
&lt;br /&gt;
{{Note|As of 2019, FGRun has been superseded by the [[FlightGear Qt launcher|FlightGear built-in launcher]]. The built-in launcher is the most actively maintained launcher for FlightGear. Other launchers are [[FFGo]] and [[FGX|FGx]].}}&lt;br /&gt;
&lt;br /&gt;
[[File:fgrun-page2.jpg|thumb|right]]&lt;br /&gt;
Before FlightGear had its built-in launcher (the one you get with &amp;lt;code&amp;gt;run_fgfs.sh --launcher&amp;lt;/code&amp;gt;), many users found comfortable having FlightGear launched by the graphical utility [[Fgrun|FGRun]]. This program is built and installed when &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; is run with the FGRUN component. You then have to launch the &amp;lt;tt&amp;gt;run_fgrun.sh&amp;lt;/tt&amp;gt; command, for example:&lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ ./run_fgrun.sh&lt;br /&gt;
&lt;br /&gt;
FGRun will save its settings in &amp;lt;tt&amp;gt;~/.fltk/flightgear.org/fgrun.prefs&amp;lt;/tt&amp;gt;. You may want to save copies of the preferences customized for stable and next.&lt;br /&gt;
&lt;br /&gt;
=== FGo! ===&lt;br /&gt;
&lt;br /&gt;
{{Note|As of 2019, FGo! is not maintained anymore. You may want to try the built-in launcher (started with &amp;lt;code&amp;gt;run_fgfs.sh --launcher&amp;lt;/code&amp;gt;) or [[FFGo]].}}&lt;br /&gt;
&lt;br /&gt;
[[File:Fgo01.jpg|thumb|left]]&lt;br /&gt;
FGo! is a graphical utility written in [[python]]. It is downloaded and installed when &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; is run with the FGO component. You then have to launch the &amp;lt;tt&amp;gt;run_fgo.sh&amp;lt;/tt&amp;gt; command, for example:&lt;br /&gt;
 $ cd ~/flightgear/dnc-managed&lt;br /&gt;
 $ ./run_fgo.sh&lt;br /&gt;
&lt;br /&gt;
Remember that the first time you run it, you have to go to open the ''Preferences'' dialog and set the paths to the &amp;lt;tt&amp;gt;fgfs&amp;lt;/tt&amp;gt; executable and to FGData.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== Compilation errors ===&lt;br /&gt;
Here we are, no fear, if you wish to use programs from the cvs/svn/git repositories, you might face compilation errors that will prevent you to have a working copy of one or more of the programs provided by this script. What can be the causes that prevent us from successfully compiling? As far as I know those:&lt;br /&gt;
# Software developers introduce a new functionality with a new piece of code that prevents the compilation under your architecture, this can happen working with cvs/svn/git sources.&lt;br /&gt;
# The program refuses to compile because of a divergence in the libraries on which it depends. For example FlightGear might not compile because OSG has been modified, while OSG itself compiles fine, FG won't.&lt;br /&gt;
# One or more repositories are down and you can't get the library you need. (Both from cvs/svn/git or apt-get)&lt;br /&gt;
&lt;br /&gt;
There is a simple solution to the above errors: wait and relaunch the script after some time (hours or days), if software developers repair or synchronize their code with the newly updated libraries (which generally happens eventually), your FlightGear will compile fine as if the previous error never took place.&lt;br /&gt;
&lt;br /&gt;
Sometimes it happens that the script fails to compile only [[Fgrun|FGRun]], [[FGCom]] or atlas, if you then see the run_fgfs.sh file it means that FlightGear installation was successful and you can safely run it.&lt;br /&gt;
&lt;br /&gt;
=== OpenRTI undefined reference errors ===&lt;br /&gt;
&lt;br /&gt;
Sometimes, due to the way &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; builds projects, linking errors might occur. This is the case with the error “libRTI-NG.so: undefined reference to xxx”. You might want to patch the &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; script to clean OpenRTI with &amp;lt;code&amp;gt;rm -f CMakeCache.txt &amp;amp;&amp;amp; rm -rf CMakeFiles/&amp;lt;/code&amp;gt;, or just restart the build in a clean environment. Assuming you are in the base directory from which you ran &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;, you can run &amp;lt;code&amp;gt;download_and_compile.sh --cleanup&amp;lt;/code&amp;gt; (see [[#Cleaning built and installed files|Cleaning built and installed files]]). Alternatively, the following command could be used:&lt;br /&gt;
 $ rm -rf build/* install/simgear/ install/openrti/ install/flightgear/share/ install/flightgear/bin/&lt;br /&gt;
&lt;br /&gt;
See {{forum link|t=26244|text=this thread}} for more details. Note that &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; didn't have the &amp;lt;code&amp;gt;--cleanup&amp;lt;/code&amp;gt; option at that time!&lt;br /&gt;
&lt;br /&gt;
== Options ==&lt;br /&gt;
&lt;br /&gt;
=== Release selection ===&lt;br /&gt;
&lt;br /&gt;
* Build the latest stable release: &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt;&lt;br /&gt;
* Build the latest Long Term Stable release: &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt;&lt;br /&gt;
* Build the previous Long Term Stable release: &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Long Term Stable (&amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt;) is supposed to yield a more stable setup than what you would obtain with option &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt;, however it will generally be older. Both of these options are suitable for users.&lt;br /&gt;
&lt;br /&gt;
If you pass none of &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;--lts&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--old-lts&amp;lt;/code&amp;gt; in a &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
=== Skipping most prompts ===&lt;br /&gt;
&lt;br /&gt;
For some important things, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; asks for confirmation in order to be sure that you are well informed about what will be done. When you have a good understanding of these informations, you may want to use the &amp;lt;code&amp;gt;--non-interactive&amp;lt;/code&amp;gt; option in order to suppress these prompts (technically, this causes the default answer to be automatically used).&lt;br /&gt;
&lt;br /&gt;
=== Cleaning built and installed files ===&lt;br /&gt;
&lt;br /&gt;
Option &amp;lt;code&amp;gt;--cleanup&amp;lt;/code&amp;gt; causes &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
If you use &amp;lt;code&amp;gt;--cleanup&amp;lt;/code&amp;gt; without specifying any component, only this removal will be done (nothing will be compiled nor installed). Otherwise, the usual rules concerning components apply.&lt;br /&gt;
&lt;br /&gt;
=== Multicore acceleration ===&lt;br /&gt;
&lt;br /&gt;
Passing option &amp;lt;code&amp;gt;-j x&amp;lt;/code&amp;gt; to &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; (where ''x'' is the number of your CPU cores you wish to assign to the job) will considerably speed up the compilation steps. Passing &amp;lt;code&amp;gt;-j$(nproc)&amp;lt;/code&amp;gt; is a convenient way to automatically use all available cores.&lt;br /&gt;
&lt;br /&gt;
=== Advanced options ===&lt;br /&gt;
&lt;br /&gt;
* Build a release version: &amp;lt;code&amp;gt;-b Release&amp;lt;/code&amp;gt;&lt;br /&gt;
* Build a version that should run as fast as a release build, yet has debug information that can be used to post backtraces: &amp;lt;code&amp;gt;-b RelWithDebInfo&amp;lt;/code&amp;gt; (this is the default)&lt;br /&gt;
* Build a full debug version for very complete bug reporting: &amp;lt;code&amp;gt;-b Debug&amp;lt;/code&amp;gt;&lt;br /&gt;
* Skip download of distro packages (i.e., by default: &amp;lt;tt&amp;gt;apt-get install ...&amp;lt;/tt&amp;gt;): &amp;lt;code&amp;gt;-p n&amp;lt;/code&amp;gt;&lt;br /&gt;
* Skip retrieving of component downloads and updates (which typically use Git or wget): &amp;lt;code&amp;gt;-d n&amp;lt;/code&amp;gt;&lt;br /&gt;
* Skip the configure step (like running [https://cmake.org/ CMake] or [https://www.gnu.org/software/autoconf/ autoconf]'s &amp;lt;tt&amp;gt;./configure&amp;lt;/tt&amp;gt;): &amp;lt;code&amp;gt;-r n&amp;lt;/code&amp;gt;&lt;br /&gt;
* Skip compilation of programs: &amp;lt;code&amp;gt;-c n&amp;lt;/code&amp;gt;&lt;br /&gt;
* Build with compositor: &amp;lt;code&amp;gt;--compositor&amp;lt;/code&amp;gt;&lt;br /&gt;
* Force the use of a particular branch for a given component: &amp;lt;code&amp;gt;--component-branch ''COMPONENT=BRANCH''&amp;lt;/code&amp;gt; (e.g., &amp;lt;code&amp;gt;--component-branch OSG=OpenSceneGraph-3.6&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;--component-branch FGFS=next&amp;lt;/code&amp;gt;, etc.—but remember that components FGFS, SIMGEAR and DATA must ''always'' be in sync). See [[#Component-specific settings|Component-specific settings]] for details.&lt;br /&gt;
* Override the repository from which a given component is initially fetched: &amp;lt;code&amp;gt;--override-repo ''COMPONENT''=''SITE'':''ADDRESS''&amp;lt;/code&amp;gt; (see [[#Component-specific settings|Component-specific settings]]).&lt;br /&gt;
* Generate build.ninja files and build using Ninja: &amp;lt;code&amp;gt;-G Ninja&amp;lt;/code&amp;gt;&lt;br /&gt;
* Run CMake in verbose mode: &amp;lt;code&amp;gt;--verbose&amp;lt;/code&amp;gt; (this shows compilation commands)&lt;br /&gt;
&lt;br /&gt;
For example, if you are a developer and wish to quickly recompile and reinstall only your own modifications for FlightGear, you can do this:&lt;br /&gt;
 $ download_and_compile.sh -j$(nproc) -p n -d n -r n FGFS&lt;br /&gt;
&lt;br /&gt;
Note that this is the same as:&lt;br /&gt;
 $ download_and_compile.sh -j$(nproc) -pn -dn -rn FGFS&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;-rn&amp;lt;/code&amp;gt; option may be necessary, though (this is the case in particular if you added or removed C++ files).&lt;br /&gt;
&lt;br /&gt;
=== ccache ===&lt;br /&gt;
[https://ccache.dev/ ccache] is a compiler cache that enormously speeds up subsequent recompilations (compilation times are often divided by a factor 6 or more). Even if &amp;lt;tt&amp;gt;ccache&amp;lt;/tt&amp;gt; is installed and in the &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; won't use it by default. To use it, you first need to install it, such as via &amp;lt;code&amp;gt;apt install ccache&amp;lt;/code&amp;gt;. Then enable it when building with &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; by one of the following methods.&lt;br /&gt;
&lt;br /&gt;
For FlightGear 2024.2 or later, you can pass &amp;lt;code&amp;gt;--cmake-arg ALL=&amp;quot;-DENABLE_CCACHE=ON&amp;quot;&amp;lt;/code&amp;gt; among the &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; options (&amp;lt;code&amp;gt;-DENABLE_CCACHE=ON&amp;lt;/code&amp;gt; disables precompiled headers which FlightGear 2024.2 or later uses by default; this is a safety measure).&lt;br /&gt;
&lt;br /&gt;
For FlightGear 2024.1 or earlier, you can set the following environment variables when compiling:&lt;br /&gt;
 export CMAKE_C_COMPILER_LAUNCHER=ccache&lt;br /&gt;
 export CMAKE_CXX_COMPILER_LAUNCHER=ccache&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can pass this option to &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; (all on a single line):&lt;br /&gt;
 --cmake-args ALL=&amp;quot;-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache&amp;quot;&lt;br /&gt;
&lt;br /&gt;
{{Note|&amp;lt;code&amp;gt;--cmake-arg&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--cmake-args&amp;lt;/code&amp;gt; are both valid, distinct &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt; options. The former can pass an option to CMake that may contain spaces; the latter can pass several options at once, but none of them may contain spaces because these are used to delimit the options to pass to CMake. Both options can be used several times on the same command line and for the same components anyway.}}&lt;br /&gt;
&lt;br /&gt;
== Optimus technology ==&lt;br /&gt;
If your computer has a GPU with Optimus technology, you need a dedicated script in order to make FlightGear run with the powerful GPU.&lt;br /&gt;
&lt;br /&gt;
After having installed required tools (Bumblebee) you just need to run this command line in your FlightGear installation directory (where you executed &amp;lt;tt&amp;gt;download_and_compile.sh&amp;lt;/tt&amp;gt;):&lt;br /&gt;
 $ sed  's|\./fgfs|optirun ./fgfs|' run_fgfs.sh &amp;gt; run_fgfs_optirun.sh &amp;amp;&amp;amp; chmod +x run_fgfs_optirun.sh&lt;br /&gt;
Now you can run FlightGear with &amp;lt;code&amp;gt;./run_fgfs_optirun.sh&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The same can be done for the [[FlightGear_Launch_Control|FGRun]] launcher:&lt;br /&gt;
 $ sed  's|\./fgrun|optirun ./fgrun|' run_fgrun.sh &amp;gt; run_fgrun_optirun.sh &amp;amp;&amp;amp; chmod +x run_fgrun_optirun.sh&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* {{fgmeta source&lt;br /&gt;
| path = fg-from-scratch&lt;br /&gt;
| text = fg-from-scratch&lt;br /&gt;
}};&lt;br /&gt;
* [[Fedora Packages and Compiling]];&lt;br /&gt;
* [[Superbuild]];&lt;br /&gt;
* [http://geoffmclane.com/fg/fgfs-052.htm Another script] for building FlightGear and all its dependencies in an automated fashion. The page seems a bit oldish, though (as of 2019).&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Building from source]]&lt;br /&gt;
&lt;br /&gt;
[[fr:Script de compilation sous Linux Debian/Ubuntu]]&lt;br /&gt;
[[nl:Compileren met een Script op Linux Debian/Ubuntu]]&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=TerraSync&amp;diff=143655</id>
		<title>TerraSync</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=TerraSync&amp;diff=143655"/>
		<updated>2026-02-26T13:47:56Z</updated>

		<summary type="html">&lt;p&gt;Rominet: /* FlightGear 3.0 and later */ Update info on default TS dir location for Windows&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;padding-left:20px;&amp;quot;&amp;gt;''Not to be confused with [[TerraGear]], a toolset to generate scenery.''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see the terrain below your [[aircraft]], you have to install the respective [[scenery]]. This can happen by downloading certain bits of scenery before flying as described in the article [[Howto: Install scenery|installing scenery]]. &lt;br /&gt;
&lt;br /&gt;
Alternatively, if you have a steady and reasonably fast internet connection, you can use '''TerraSync'''. It is a utility that automatically downloads the newest version of the needed [[FlightGear]] scenery while the simulator is running. TerraSync runs in the background (optionally as a separate process), monitors your position, and downloads (or updates) the latest scenery from the master scenery server &amp;quot;just in time&amp;quot;.&lt;br /&gt;
For some time now TerraSync has been integrated into the core FlightGear process, so there is no need to deal with TerraSync for the typical user.&lt;br /&gt;
&lt;br /&gt;
The master repository for TerraSync, i.e. the online resource from which TerraSync downloads its files, is synchronized with the [http://scenemodels.flightgear.org/ FlightGear Scenery Database] once a day. So when using TerraSync, you will always have &lt;br /&gt;
# the latest [[File Formats#.2A.stg|.stg-files]], which tell FlightGear where to place an object &lt;br /&gt;
# the latest '''static''' models for objects. (Static models define unique objects that exist in one place only, such as famous buildings or landmarks.) &lt;br /&gt;
# the latest '''shared''' models for objects. (Generic models used more than once in different places, each can represent many different objects, like generic houses or ships)&lt;br /&gt;
 &lt;br /&gt;
== Announcements ==&lt;br /&gt;
Also as a result from FSweekend, we are going to test some ideas how to distribute osm2city generated scenery with terrasync. As a first step I have just added a folder called Objects_1 containing the osm2city buildings for e005n46 up to e010n48 [http://flightgear.sourceforge.net/scenery/Objects_1/]. People using the fgfs integrated terrasync should not (yet) notice any difference. When using terrasync.py, you should notice download of files in those folders, however they do not (yet) show up in the scenery. We probably throw away some or all files in that directory without prior notice, so please don't rely on them or make backup copies. Torsten &amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
  |url    =  https://sourceforge.net/p/flightgear/mailman/message/35476181/ &lt;br /&gt;
  |title  =  &amp;lt;nowiki&amp;gt; [Flightgear-devel] ATTN: terrasync changes &amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  |author =  &amp;lt;nowiki&amp;gt; Torsten Dreyer &amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  |date   =  Nov 7th, 2016 &lt;br /&gt;
  |added  =  Nov 7th, 2016 &lt;br /&gt;
  |script_version = 0.40 &lt;br /&gt;
  }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== News ==&lt;br /&gt;
Terrasync started out as a standalone rsync-based utility. However, there doesn't appear to be any good/robust multi-platform librsync available for our use. We wanted to embed terrasync right into the core code so we could better coordinate downloading tiles and then loading them immediately into the sim (versus sometimes running into no tiles or partial tiles if an external tool was running rsync.)&amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
  |url    = https://sourceforge.net/p/flightgear/mailman/message/35061363/&lt;br /&gt;
  |title  = &amp;lt;nowiki&amp;gt;Re: [Flightgear-devel] The future of terrasync&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  |author = &amp;lt;nowiki&amp;gt;Curtis Olson&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  |date   = May 3rd, 2016&lt;br /&gt;
  |added  = May 4th, 2016&lt;br /&gt;
  |script_version = 0.31&lt;br /&gt;
  }}&lt;br /&gt;
&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
as some of you have probably noticed, some coding is currently happening in the terrasync corner, mostly by James and some parts by Torsten. The main intention is to get rid of the SVN protocol to distribute scenery but use easier to implement protocols. The idea is to use plain HTTP as the access method for files required by terrasync. This should make it much easier for hosts to set up a mirror, probably enables us to use a CDN for load balancing and also makes the client code slim. &lt;br /&gt;
&lt;br /&gt;
The intention is to migrate to a pure HTTP solution for TerraSync (instead of SVN) after 2016.1 is released, since this will give us many more mirroring and hosting options. The cache files are tiny and reflect the current revision of each file in the local copy; they’re analogous to the data a real SVN client stores in its ‘.svn’ directory in the root of the checkout. I expect the pure HTTP solution will need some very similar files to record the HTTP cache stamps of files it downloads - either one file at the root of the tree, or per-directory. (There’s advantages and disadvantages to both).&amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
  |url    = https://sourceforge.net/p/flightgear/mailman/message/34767003/&lt;br /&gt;
  |title  = &amp;lt;nowiki&amp;gt;Re: [Flightgear-devel] Launcher changes for 3.8&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  |author = &amp;lt;nowiki&amp;gt;James Turner&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  |date   = Jan 14th, 2016&lt;br /&gt;
  |added  = May 4th, 2016&lt;br /&gt;
  |script_version = 0.31&lt;br /&gt;
  }}&lt;br /&gt;
&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* supporting the various possible backends inside the code is a headache, so the intention is to support /only/ the HTTP method inside FlightGear directly, aka ‘built-in terrasync’ &lt;br /&gt;
* one of the major benefits of the HTTP system, is that is uses SHA1 hashes instead of SVN revisions, to identify files, and there is no base (server) URL stored inside the downloaded directories. This means you can prep a terrasync directory with files downloaded by any mechanism you like (DVD, BitTorrent, copying from another machine) and providing the SHA1 hashes match, the files will not be download again. Any files which are out of date will be refreshed, but only those files. This also means switching from SVN -&amp;gt; HTTP does /not/ download everything again. &lt;br /&gt;
&lt;br /&gt;
Switching servers, even within the same FG session, is also possible and again does not result in any re-downloads, unlike the SVN setup where the server URL is part of the repository structure. &lt;br /&gt;
* the terrasync /network protocol/ will remain, which means you can write (in a wide ranges of languages, including Python) your own external terrasync engine, using rsync or any other mechanism you like. My hope is this provides a good and maintainable extension point for very advanced users, while the built-in HTTP mechanism will be be simple and robust (thanks to be being hash-based) for 95% of users.&amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
  |url    = https://sourceforge.net/p/flightgear/mailman/message/35064352/&lt;br /&gt;
  |title  = &amp;lt;nowiki&amp;gt;Re: [Flightgear-devel] The future of terrasync&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  |author = &amp;lt;nowiki&amp;gt;James Turner&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  |date   = May 4th, 2016&lt;br /&gt;
  |added  = May 4th, 2016&lt;br /&gt;
  |script_version = 0.31&lt;br /&gt;
  }}&lt;br /&gt;
&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We already have three mirrors of the complete scenery online, one at sourceforge and two at privately owned servers. The sourceforge mirror receives daily updates from the main scenery export from http://scenery.flightgear.org/ and all other mirrors pull their data from the sourceforge server. We decided to drop the previous method of telling the client about it's nearest mirror by querying a web service ( http://scenery.flightgear.org/svn-server) in favour of using a more stable service provider of the internet: the domain name service (DNS) system. The fgfs client will query a fancy resource record (RR) type of NAPTR (network authority pointer, https://en.wikipedia.org/wiki/NAPTR_record) for the dns name terrasync.flightgear.org and analye the entries to find the best terrasync mirror. Those entries are already configured and can be examined here: https://toolbox.googleapps.com/apps/dig/#ANY/terrasync.flightgear.org This technique should enable us to provide different sets of scenery, eventually even for only parts of the world in a much easier fashion that it would have been the case with SVN. It also spares many gigabytes on the scenery mirror as they don't have to keep all the 50,000+ revisions we already carry around. I'll start adding the required code over the next couple of days to have it running hopefully for the 2016.2 release. I'll post a message to this list when I flip the final switch and enable the new terrasync. In the mean time, you might see some build failures on Jenkins or other hickups of the system. I promise to fix those as quick as possible. BTW: If you use terrafs, you already receive your data from the new http mirrors, although not use the DNS service resolver.&amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
  |url    = http://sourceforge.net/p/flightgear/mailman/message/35057670/&lt;br /&gt;
  |title  = &amp;lt;nowiki&amp;gt;[Flightgear-devel] The future of terrasync&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  |author = &amp;lt;nowiki&amp;gt;Torsten Dreyer&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  |date   = May 2nd, 2016&lt;br /&gt;
  |added  = May 2nd, 2016&lt;br /&gt;
  |script_version = 0.28&lt;br /&gt;
  }}&lt;br /&gt;
&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the http download method will function very much as before where only the changed files (if any) are downloaded. The svn method requires 2x the actual space because of the way svn works under the hood. Git typically requires that you download every version ever created to get the latest copy (there are work arounds if you just want the most recent version.) So the end result for the average user that just wants to download and use the scenery is that the http method will be lighter weight overall. It also simplifies the code inside FlightGear quite a bit and should make the synchroniation more robust. And as mentioned before, it should simplify the task of setting up a scenery mirror for those that wish to do that. As before, power users will have multiple options for updating scenery or mixing and matching from different sources if they choose. &amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
  |url    = https://sourceforge.net/p/flightgear/mailman/message/35061856/&lt;br /&gt;
  |title  = &amp;lt;nowiki&amp;gt;Re: [Flightgear-devel] The future of terrasync&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  |author = &amp;lt;nowiki&amp;gt;Curtis Olson&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  |date   = May 4th, 2016&lt;br /&gt;
  |added  = May 4th, 2016&lt;br /&gt;
  |script_version = 0.31&lt;br /&gt;
  }}&lt;br /&gt;
&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The technique of the http repository is much simpler than that of the svn repository and it will be pretty simple to create a local mirror or to download chunks of data. With a bit of to-be-developed scripting (python e.g.) there is no need to download existing data again. I don't know how terramaster works but I am sure it is easy to adapt to the new http access method. &amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
  |url    = https://sourceforge.net/p/flightgear/mailman/message/35062543/&lt;br /&gt;
  |title  = &amp;lt;nowiki&amp;gt;Re: [Flightgear-devel] The future of terrasync&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  |author = &amp;lt;nowiki&amp;gt;Torsten Dreyer&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  |date   = May 4th, 2016&lt;br /&gt;
  |added  = May 4th, 2016&lt;br /&gt;
  |script_version = 0.31&lt;br /&gt;
  }}&lt;br /&gt;
&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The goal is to completely remove SVN and only use the HTTP repository. I'd like to reach that goal better sooner than later as we currently have two single-points of failure for the SVN-service. The first is the http://scenery.flightgear.org/svn-service web service (runs on a private web server) and the second is the one-and-only svn-server available for public access, also hosted on a private server. If either on of those fails, the SVN-terrasync is dead. I have learned the hard way that not having a fallback is a bad idea.&amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
  |url    = https://sourceforge.net/p/flightgear/mailman/message/35062543/&lt;br /&gt;
  |title  = &amp;lt;nowiki&amp;gt;Re: [Flightgear-devel] The future of terrasync&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  |author = &amp;lt;nowiki&amp;gt;Torsten Dreyer&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  |date   = May 4th, 2016&lt;br /&gt;
  |added  = May 4th, 2016&lt;br /&gt;
  |script_version = 0.31&lt;br /&gt;
  }}&lt;br /&gt;
&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Torsten pushed a patch to SimGear and included a bunch of debug messages in the suspicious loop. (They only pop up with &amp;lt;code&amp;gt;--log-level=debug&amp;lt;/code&amp;gt; - also add &amp;lt;code&amp;gt;--log-class=terrasync&amp;lt;/code&amp;gt; to keep output sane)&amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
  |url    = https://sourceforge.net/p/flightgear/mailman/message/35063277/&lt;br /&gt;
  |title  = &amp;lt;nowiki&amp;gt;Re: [Flightgear-devel] FW: The future of terrasync&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  |author = &amp;lt;nowiki&amp;gt;Torsten Dreyer&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  |date   = May 4th, 2016&lt;br /&gt;
  |added  = May 4th, 2016&lt;br /&gt;
  |script_version = 0.31&lt;br /&gt;
  }}&lt;br /&gt;
&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
we now have C++ and Python reference examples, both hopefully easy to hack on. BTW, the C++ tool is here: https://sourceforge.net/p/flightgear/simgear/ci/next/tree/simgear/io/http_repo_sync.cxx Again, enhancements are welcome. &amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
  |url    = https://sourceforge.net/p/flightgear/mailman/message/35065868/&lt;br /&gt;
  |title  = &amp;lt;nowiki&amp;gt;Re: [Flightgear-devel] The future of terrasync&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  |author = &amp;lt;nowiki&amp;gt;James Turner&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  |date   = May 5th, 2016&lt;br /&gt;
  |added  = May 5th, 2016&lt;br /&gt;
  |script_version = 0.32&lt;br /&gt;
  }}&lt;br /&gt;
&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Appendix}}&lt;br /&gt;
&lt;br /&gt;
== terrasync.py ==&lt;br /&gt;
First of all, the script is now part of the {{fgmeta-python source | text = fgmeta-python}} repository&amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
  |url    =  https://gitlab.com/flightgear/flightgear/-/merge_requests/340&lt;br /&gt;
  |title  =  FlightGear merge request 340&lt;br /&gt;
  |author =  Florent Rougon&lt;br /&gt;
  |date   =  November 14th, 2025&lt;br /&gt;
  }}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
  |url    =  https://sourceforge.net/p/flightgear/mailman/message/59260673/&lt;br /&gt;
  |title  =  &amp;lt;nowiki&amp;gt;[Flightgear-devel] terrasync.py moved to fgmeta-python&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  |author =  Florent Rougon&lt;br /&gt;
  |date   =  November 17th, 2025&lt;br /&gt;
  }}&amp;lt;/ref&amp;gt; (this was necessary to share .dirindex processing code with other infrastructure tools, in particular for producing the ''base package''). Installation instructions can be found below the list of files, or more directly in {{fgmeta-python source | path = README.md | text = README.md}}.&lt;br /&gt;
&lt;br /&gt;
The script can provide a complete mirror of the scenery data, also known as TerraSync scenery or just TerraScenery.&lt;br /&gt;
&lt;br /&gt;
{{Caution|If you fully run this script for the first time, it will download more than 90 GB of data and more than 1,800,000 files in 40,000 folders to your hard disk. It will run for hours, probably days (depending on your Internet connection). Since someone has to pay for the bandwidth, please don't let it download large amounts of data unless you have a good reason to do so (like, you maintain a public scenery mirror); otherwise, the service could be discontinued. That being said, if you just want to see the script in action, you can run it for a few seconds and stop it with {{key press|Ctrl|C}}.}}&lt;br /&gt;
&lt;br /&gt;
If you already have at least a partial set of scenery data from the FlightGear built-in TerraSync or even a full TerraScenery, existing and up-to-date files will be reused and won't be downloaded a second time. &lt;br /&gt;
&lt;br /&gt;
=== How it works ===&lt;br /&gt;
&lt;br /&gt;
{{Note|The following is not completely up-to-date. In particular, current terrasync.py has a &amp;lt;code&amp;gt;check&amp;lt;/code&amp;gt; mode in addition to the default &amp;lt;code&amp;gt;sync&amp;lt;/code&amp;gt; mode. Run &amp;lt;code&amp;gt;terrasync.py --help&amp;lt;/code&amp;gt; for up-to-date usage information.}}&lt;br /&gt;
&lt;br /&gt;
The HTTP TerraScenery server holds all the well-know files required for scenery, organized in the also well-known directory structure (/Models, /Objects, /Terrain and /Airports) with all their subdirectories. The content of the /Models folder for example is here: http://flightgear.sourceforge.net/scenery/Models/ Each folder contains a (hidden) file called .dirindex (e.g. http://flightgear.sourceforge.net/scenery/Models/.dirindex) that describes the content of that folder by listing its files, subdirectories and checksums of the files and their subdirectories' .dirindex files. The terrasync.py script does the following (simplified): &lt;br /&gt;
* a) download the file at the root of the scenery-url (http://flightgear.sourceforge.net/scenery/.dirindex) &lt;br /&gt;
* b) walks into any subdirectory listed within the .dirindex &lt;br /&gt;
* c) compares the sha1sum of listed files with the local copy and downloads them on mismatch &lt;br /&gt;
* d) for listed subdirectories, calls recursively step b) &lt;br /&gt;
&lt;br /&gt;
Even if all scenery files exist on the server, there are initially still approx. 40,000 .dirindex files missing on your drive and downloading will take hours. To speed up the procedure once you have all .dirindex files locally, try running terrasync.py with the &amp;lt;code&amp;gt;--quick&amp;lt;/code&amp;gt; option. This will tell terrasync.py to compare the computed sha1sum of every .dirindex file on your disk with that published in the entry in the parent directory's .dirindex. If you have an up-to-date mirror, this will be ''very'' quick as only the root .dirindex needs to be downloaded. Subsequent updates with the &amp;lt;code&amp;gt;--quick&amp;lt;/code&amp;gt; option will also be very fast as only the updated files will be downloaded and also the .dirindex files of the parent folders up to the root directory. &lt;br /&gt;
&lt;br /&gt;
So far, we have just added files to your disk, what about files that have been removed on the server? The script usually does not touch them unless you add &amp;lt;code&amp;gt;--remove-orphan&amp;lt;/code&amp;gt; to the command-line. By doing so, you ask terrasync.py to remove all files (not directories) that exist in a subdirectory but are not listed in the corresponding .dirindex file. &lt;br /&gt;
&lt;br /&gt;
If you don't want to download everything into your current working directory, add &amp;lt;code&amp;gt;--target=/some/folder&amp;lt;/code&amp;gt; to your command line. This describes pretty much everything terrasync.py does. Here are some examples how to use it: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# fetch everything from the master repository server into /home/joe/fg/scenery, keep orphan files, (re-)download every .dirindex file &lt;br /&gt;
terrasync.py --target=/home/joe/fg/scenery &lt;br /&gt;
&lt;br /&gt;
# just pull in changes, quick and lean for subsequent updates &lt;br /&gt;
terrasync.py --target=/home/joe/fg/scenery --quick &lt;br /&gt;
&lt;br /&gt;
# run a mirror, only keep those files listed on the server &lt;br /&gt;
terrasync.py --target=/home/joe/fg/scenery --quick --remove-orphan &lt;br /&gt;
&lt;br /&gt;
# use another server to pull the data, not the sourceforge master &lt;br /&gt;
terrasync.py --target=/home/joe/fg/scenery --url=http://someserver.org/otherscenery &lt;br /&gt;
&lt;br /&gt;
# restrict the area (must be integers, not decimals)&lt;br /&gt;
terrasync.py --target=/home/joe/fg/scenery --top 50 --left 18 --bottom 49 --right 19&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enjoy, feedback welcome.&amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
  |url    =  https://sourceforge.net/p/flightgear/mailman/message/35081518/ &lt;br /&gt;
  |title  =  &amp;lt;nowiki&amp;gt; [Flightgear-devel] Clone the HTTP scenery data with terrasync.py &amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  |author =  &amp;lt;nowiki&amp;gt; Torsten Dreyer &amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  |date   =  May 11th, 2016 &lt;br /&gt;
  |added  =  May 11th, 2016 &lt;br /&gt;
  |script_version = 0.40 &lt;br /&gt;
  }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Enabling TerraSync ==&lt;br /&gt;
&lt;br /&gt;
=== FlightGear 3.0 and later ===&lt;br /&gt;
As of the FlightGear 3.0 release, TerraSync has changed significantly. By default, when enabled with &amp;lt;code&amp;gt;--enable-terrasync&amp;lt;/code&amp;gt;&amp;lt;ref name=&amp;quot;enabling-TerraSync-with-specific-launchers&amp;gt;In FGRun, this can be done via the appropriate checkbox on the last page. In FFGo, just uncomment the &amp;lt;code&amp;gt;--enable-terrasync&amp;lt;/code&amp;gt; option from the default configuration in the Options Window (the “big window” on the left, below the aircraft list).&amp;lt;/ref&amp;gt;, TerraSync now downloads to &amp;lt;i&amp;gt;download_dir&amp;lt;/i&amp;gt;/TerraSync, where &amp;lt;i&amp;gt;download_dir&amp;lt;/i&amp;gt; is FlightGear's download directory.&lt;br /&gt;
&lt;br /&gt;
FlightGear's download directory may be explicitly set using FlightGear's &amp;lt;code&amp;gt;--download-dir&amp;lt;/code&amp;gt; [[Command line options|command line option]], otherwise it defaults to:&lt;br /&gt;
*[[$FG_HOME]] on non-Windows systems;&lt;br /&gt;
* &amp;lt;tt&amp;gt;%USERPROFILE%\FlightGear\Downloads&amp;lt;/tt&amp;gt; on Windows (which may be located under &amp;lt;tt&amp;gt;C:\Users\&amp;lt;i&amp;gt;username&amp;lt;/i&amp;gt;\Documents&amp;lt;/tt&amp;gt;, however there are likely several possibilities depending on the Windows version and configuration).&lt;br /&gt;
&lt;br /&gt;
Optionally, the TerraSync directory may be explicitly set using FlightGear's &amp;lt;code&amp;gt;--terrasync-dir&amp;lt;/code&amp;gt; [[Command line options|command line option]], the launcher settings, or through the &amp;lt;tt&amp;gt;Advanced &amp;gt; General&amp;lt;/tt&amp;gt; dialog of FGRun. TerraSync will then download to that directory, regardless of FlightGear's download directory. The directory is automatically given top priority, unless specified otherwise in [[$FG_SCENERY]]. No other configuration is needed.&lt;br /&gt;
&lt;br /&gt;
If you neither pass &amp;lt;code&amp;gt;--terrasync-dir&amp;lt;/code&amp;gt; nor &amp;lt;code&amp;gt;--download-dir&amp;lt;/code&amp;gt; to FlightGear, then the '''default TerraSync directory''' is:&lt;br /&gt;
*&amp;lt;tt&amp;gt;[[$FG_HOME]]/TerraSync&amp;lt;/tt&amp;gt; on non-Windows systems;&lt;br /&gt;
* &amp;lt;tt&amp;gt;%USERPROFILE%\FlightGear\Downloads\TerraSync&amp;lt;/tt&amp;gt; on Windows (which is ''possibly'' under &amp;lt;tt&amp;gt;C:\Users\&amp;lt;i&amp;gt;username&amp;lt;/i&amp;gt;\Documents&amp;lt;/tt&amp;gt; but probably depends on the Windows version and configuration).&lt;br /&gt;
&lt;br /&gt;
=== FlightGear 2.4 up to and including 2.12 ===&lt;br /&gt;
As of FlightGear 2.4, TerraSync controls are integrated in the usual FlightGear menu, under &amp;lt;tt&amp;gt;Environment &amp;gt; Scenery Download&amp;lt;/tt&amp;gt;. You can also check the &amp;quot;Download scenery on the fly&amp;quot; in the setup GUI. Note that if you set your aircraft to start in a new area, where you have not yet downloaded any scenery, your aircraft may first appear to be in the water until sufficient scenery has downloaded. You can go to &amp;lt;tt&amp;gt;Environment &amp;gt; Scenery Download&amp;lt;/tt&amp;gt; and choose &amp;quot;Manual Refresh&amp;quot; to apply scenery updates.&lt;br /&gt;
&lt;br /&gt;
=== POSIX compliant [[command line]] shell ===&lt;br /&gt;
&lt;br /&gt;
Start TerraSync:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;% nice terrasync -p 5500 -S -d &amp;quot;$HOME/fgfsScenery&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The -S option tells terrasync to use the SVN protocol to fetch data. If you omit it terrasync will use the rsync program instead (which has to be installed on your system).&lt;br /&gt;
&lt;br /&gt;
Start FlightGear:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;% fgfs --atlas=socket,out,1,localhost,5500,udp --fg-scenery=&amp;quot;[[$FG_ROOT]]/Scenery/:$HOME/fgfsScenery&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The full documentation and source for TerraSync is located in the FlightGear source distribution (in &amp;lt;code&amp;gt;utils/TerraSync/&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== [[FGRun]] in FlightGear 2.2.0 ===&lt;br /&gt;
# After starting FGRun, make sure you are in the first screen where you can set up directories. One time &amp;quot;Back&amp;quot; from the aircraft selection page. You are now at the &amp;quot;Path&amp;quot; page.&lt;br /&gt;
# You can create a list of scenery directories next to &amp;quot;[[$FG_SCENERY|FG_SCENERY]]&amp;quot;. Select the line that TerraSync will be using and press the &amp;quot;TerraSync directory&amp;quot; button on the right. A small &amp;quot;T&amp;quot; will appear on the selected line, indicating that this one is set up as TerraSync direcotry.&lt;br /&gt;
#* The directories are being loaded from top to bottom, so make sure TerraSync is on top (unless you want to &amp;quot;surpass&amp;quot; terrasync and display scenery from another directory).  When two directories contain scenery for the same region, FlightGear will take the scenery from the directory higher in the list.&lt;br /&gt;
# Finally, go to the last screen. There you have to activate TerraSync as in the following screenshot. Now TerraSync should work.&amp;lt;br /&amp;gt;[[File:TerraSync 2.png|500px]]&lt;br /&gt;
&lt;br /&gt;
''Note: Expect your firewall to block it the first time you run it; just tell the firewall to allow TerraSync to use the port.''&lt;br /&gt;
&lt;br /&gt;
=== [[FGRun]] in FlightGear 1.9.1 ===&lt;br /&gt;
# After starting FGRun, make sure you are in the first screen where you can set up directories. One time &amp;quot;Back&amp;quot; from the aircraft selection page. You are now here:&amp;lt;br/&amp;gt;[[File:TerraSync 1.png|500px]]&lt;br /&gt;
# Select the destination folder for all files downloaded by terrasync. Usually the folder &amp;lt;code&amp;gt;[[$FG_ROOT]]\terrasync&amp;lt;/code&amp;gt; already exists and you only have to add it to the list (as in the above example). Insure that it is positioned '''above''' your standard scenery folder (here that is &amp;lt;code&amp;gt;FlightGear191\scenery&amp;lt;/code&amp;gt;) and all other directories over which the terrasync folder is supposed to have priority. When two directories contain information for the same region, FlightGear will take the information from the directory higher in the list. On Linux make sure the directory does not only to have a T, but also is the topmost folder.&lt;br /&gt;
# For TerraSync to know where to deposit the downloaded files, you have to tell the program which folder is the destination folder. In the above example, it is the 3&amp;lt;sup&amp;gt;rd&amp;lt;/sup&amp;gt; in the list.&lt;br /&gt;
# Finally, go to the last screen. There you have to activate TerraSync as in the following screenshot. Now TerraSync should work.&amp;lt;br /&amp;gt;[[File:TerraSync 2.png|500px]]&lt;br /&gt;
&lt;br /&gt;
''Note: Expect your firewall to block it the first time you run it; just tell the firewall to allow TerraSync to use the port.''&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== Corrupted and unreadable files or directories ===&lt;br /&gt;
If you get an error similar to the following in the command line console (black dialog):&lt;br /&gt;
&lt;br /&gt;
 Airports/L ... failed:&lt;br /&gt;
 Can't move 'C:\FlightGear\terrasync\Airports\L\E\.svn\tmp\entries' to 'C:\FlightGear\terrasync\Airports\L\E\.svn\entries': The file or directory is corrupted and unreadable.&lt;br /&gt;
&lt;br /&gt;
and possibly the following popup appears:&lt;br /&gt;
&lt;br /&gt;
[[File:TerraSync Taskbar Error.png]]&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
You can probably fix the error by upgrading to Windows 7 Home Premium Service Pack 1.&lt;br /&gt;
&lt;br /&gt;
=== Locked airport directories ===&lt;br /&gt;
You get an error indicating locked airport directories while TerraSync is running.&lt;br /&gt;
&lt;br /&gt;
 Working copy 'D:\Program Files\FlightGear 2.4.0\terrasync\Airports\K' locked&lt;br /&gt;
&lt;br /&gt;
While those directories often actually ''are'' updated, the error is annoying.&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
Search the TerraSync directory for files named &amp;lt;tt&amp;gt;lock&amp;lt;/tt&amp;gt; and delete them. They are supposed to be removed automatically when a TerraSync update is completed, but sometimes that fails.&lt;br /&gt;
&lt;br /&gt;
=== Failure to remove file ===&lt;br /&gt;
You get an error indicating that some files can not be removed.&lt;br /&gt;
&lt;br /&gt;
 file remove failed: (./.terrasync_cache)  reason: Permission denied&lt;br /&gt;
&lt;br /&gt;
TerraSync cache files can not be deleted. You will see errors in console like above. There is not much to do other then delete the &amp;lt;code&amp;gt;.terrasync_cache&amp;lt;/code&amp;gt; files manually and then run FlightGear again.&lt;br /&gt;
&lt;br /&gt;
==== Resolution ====&lt;br /&gt;
{{caution|Not recommended. Understand the consequences}}&lt;br /&gt;
&lt;br /&gt;
[http://forum.flightgear.org/viewtopic.php?f=17&amp;amp;t=28957&amp;amp;p=278275#p278275 Forum Post w/ PowerShell command is here]&lt;br /&gt;
&lt;br /&gt;
== Internals ==&lt;br /&gt;
The SHA1 hashes are what’s in the .dirindex files, both on the server and in the local tree. We do not synchronise time-stamps with the server copies because it complicates (makes much less efficient) mirroring on the server side. I am fairly confident hash clashes are not an issue, if the Git folks don’t think they are. We explicitly do not rely on any custom or particular HTTP headers, to maximise the chance of ‘just working’ with different HTTP providers and CDN options in the future. The structure of the .dirindex files is text based and hopefully trivial to anyone who cares to look at them; they are generated on the server side by some scripts Torsten wrote. The code uses basically identical logic to Git to avoid recalculating SHA hashes for the entire repository; if any of various stat() fields, most especially sie or mod-time, change, we re-compute the hash for that file on disk. Whenever a file’s hash on disk differs from the what the .dirindex file says it should have, we download the file. That’s pretty much a complete description of the synchronisation model. Hence, it’s safe to copy files into the tree using any tool, or modify then - this will cause the stat() data to change, which will cause the code to recompute the SHA hash, which will trigger a re-download to the server-side copy if the SHA does not match. Note there is no provision to have modified (dirty) files inside the tree; they will always be over-written when next checked. &amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
  |url    = https://sourceforge.net/p/flightgear/mailman/message/35064470/&lt;br /&gt;
  |title  = &amp;lt;nowiki&amp;gt;Re: [Flightgear-devel] The future of terrasync&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  |author = &amp;lt;nowiki&amp;gt;James Turner&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  |date   = May 4th, 2016&lt;br /&gt;
  |added  = May 4th, 2016&lt;br /&gt;
  |script_version = 0.32&lt;br /&gt;
  }}&lt;br /&gt;
&amp;lt;/ref&amp;gt;&lt;br /&gt;
== Related content ==&lt;br /&gt;
* [[Howto: Install scenery]]&lt;br /&gt;
* [[TerraMaster]]&lt;br /&gt;
&lt;br /&gt;
== Footnotes ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Scenery software]]&lt;br /&gt;
[[Category:FlightGear feature]]&lt;br /&gt;
&lt;br /&gt;
[[de:TerraSync]]&lt;br /&gt;
[[es:TerraSync]]&lt;br /&gt;
[[fr:TerraSync]]&lt;br /&gt;
[[nl:Terrasync]]&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Aircraft-set.xml&amp;diff=143439</id>
		<title>Aircraft-set.xml</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Aircraft-set.xml&amp;diff=143439"/>
		<updated>2026-01-09T13:28:08Z</updated>

		<summary type="html">&lt;p&gt;Rominet: /* -set.xml Sections */ check_aircraft.py has been packaged and renamed to fg-check-aircraft&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The '''aircraft-set.xml''' file (or rather ''name-of-aircraft''-set.xml) is the top level aircraft configuration file.  The aircraft-set.xml file should be in the aircraft's root directory, for example &amp;lt;code&amp;gt;[[$FG_ROOT]]/Aircraft/747-400/747-400-set.xml&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
When FlightGear loads an aircraft, the aircraft-set.xml file is the main source of information, about other files to load, such as the 3D model and FDM configuration.  It also contains meta data that is important when packaging the aircraft before a release of FlightGear, or when searching for aircraft in the UI (for example, the launcher).&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
The aircraft-set.xml file is an XML file which contains many recommended pieces.&lt;br /&gt;
&lt;br /&gt;
* A header with meta-data such as author information and a description&lt;br /&gt;
* [[Aircraft rating system|Aircraft ratings]] that can be used to select only the more well developed aircraft (or bad ones if you are looking for aircraft to improve)&lt;br /&gt;
* [[Howto:Reassign keyboard bindings|Keyboard bindings]]&lt;br /&gt;
* Paths to [[Nasal]] modules&lt;br /&gt;
* Paths to configuration files for the [[Flight Dynamics Model|flight dynamics model]] (FDMs), [[Howto:Animate models|3D models and their animations]], [[Autopilot configuration reference|autopilot]], [[Howto:Add sound effects to aircraft|sound]] etc.&lt;br /&gt;
&lt;br /&gt;
FlightGear allows a great deal of flexibility when it comes to how to configure an aircraft.&lt;br /&gt;
&lt;br /&gt;
To help provide a more consistent experience for end users, aircraft developers are encouraged to use [[Release:Aircraft Selection Criteria]] as a guide when preparing an aircraft for inclusion in the [[FGAddon]] aircraft repository, especially if you are hoping for your aircraft to become part of the default distribution, such as the c172p for example.&lt;br /&gt;
&lt;br /&gt;
== The aircraft-set.xml file name ==&lt;br /&gt;
The ''name-of-aircraft'' portion of ''name-of-aircraft''-set.xml is the name of the aircraft that is used for example when starting FlightGear from the command line (using the &amp;lt;code&amp;gt;--aircraft=''name-of-aircraft''&amp;lt;/code&amp;gt; option).  For example, if the file name is&lt;br /&gt;
&lt;br /&gt;
   fkdr1-set.xml&lt;br /&gt;
&lt;br /&gt;
Then the command line to start with that aircraft is something like:&lt;br /&gt;
&lt;br /&gt;
   fgfs.exe --aircraft=fkdr1&lt;br /&gt;
&lt;br /&gt;
=== Multiple aircraft-set.xml files ===&lt;br /&gt;
This naming convention gives you the opportunity to create two (or more) aircraft within the aircraft package root directory.  For instance one could create two versions of an aircraft using different FDMs, but sharing many or most other features (and .xml files/models), using the following file names:&lt;br /&gt;
&lt;br /&gt;
  fkdr1-yasim-set.xml&lt;br /&gt;
  fkdr1-uiuc-set.xml&lt;br /&gt;
&lt;br /&gt;
When creating multiple aircraft this way, it's very common to put shared XML data into a -common.xml file which is included by both of the -set.xml files. It's important that your common file does ''not'' end in -set.xml, otherwise some systems will erroneously consider the file as another aircraft. Typically the name might be &amp;lt;code&amp;gt;fkdr1-common-sounds.xml&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;fokker-shared.xml&amp;lt;/code&amp;gt; - but anything is fine so long as it doesn't end in &amp;lt;code&amp;gt;-set.xml&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{note|When defining multiple versions of an aircraft, it's important to use some additional tags to link the aircraft together correctly - this improves the user experience by telling various places which -set.xml is the most important one. See below for the &amp;lt;code&amp;gt;&amp;amp;lt;variant-of&amp;amp;gt;&amp;lt;/code&amp;gt;  and &amp;lt;code&amp;gt;&amp;amp;lt;primary-set&amp;amp;gt;&amp;lt;/code&amp;gt;  tags.}}&lt;br /&gt;
&lt;br /&gt;
=== Multiplayer aircraft ===&lt;br /&gt;
In Flightgear version 2020.3.1 and later, the aircraft-set.xml file is also used when showing [[Howto:Multiplayer|multiplayer]] aircraft, as part of the implementation of [[Changelog 2020.1#Multiplayer|Multiplayer Views]]. For historical reasons multiplayer packets contain only the path to the aircraft model (in essence the string in the &amp;lt;code&amp;gt;/sim/model/path&amp;lt;/code&amp;gt; [[Property tree|property]]), not the -set.xml file. Internally Flightgear use a heuristic to find a corresponding -set.xml file.&lt;br /&gt;
&lt;br /&gt;
There is also a feature that will load an AI aircraft model if it shares the same path, in essence from&lt;br /&gt;
&lt;br /&gt;
 [[$FG_ROOT]]/'''AI'''/Aircraft/''Aircraft-name''/Models/''Model-and-animation-configuration''.xml&lt;br /&gt;
&lt;br /&gt;
instead of&lt;br /&gt;
&lt;br /&gt;
 $FG_ROOT/Aircraft/''Aircraft-name''/Models/''Model-and-animation-configuration''.xml&lt;br /&gt;
&lt;br /&gt;
Note that the AI aircraft model need not be an XML file with a model and animation configuration, but can also be a plain .ac (AC3D) file with a 3D model.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, as this feature have been rather unknown and possibly undocumented for many years, few aircraft developers have provided such a model with their aircraft.&lt;br /&gt;
&lt;br /&gt;
Needless to say, aircraft developers are highly encouraged to provide such a model with the aircraft.&lt;br /&gt;
&lt;br /&gt;
== The property tree ==&lt;br /&gt;
{{main article|Property tree}}&lt;br /&gt;
&lt;br /&gt;
The property tree contain a tree-like representation of various key-value pair properties that are used for configuration of and communication between different parts of FlightGear.&lt;br /&gt;
&lt;br /&gt;
Most of the properties can be set using various configuration files and can be manipulated while FlightGear is running.  Some of them are manipulated by FlightGear itself, some by the FDM, some by aircraft systems and [[Nasal]] scripts.  Properties can also be manipulated manually when FlightGear is running using the [[property browser]].&lt;br /&gt;
&lt;br /&gt;
== -set.xml Sections ==&lt;br /&gt;
The aircraft-set.xml file is a [[PropertyList XML files|PropertyList XML file]] that will configure properties in the property tree when an aircraft is loaded.  When you view the property tree via the in-sim inspector, the properties you see are those defined in your -set.xml, combined with all the properties defined at runtime by the FDM, instruments, renderer and so on.&lt;br /&gt;
&lt;br /&gt;
Since the -set.xml can grow to become very large, it's common to break it into several pieces. This is especially important when using multiple -set.xml files to avoid code duplication, but it can be very helpful in all cases to keep the main -set.xml file clear and readable. Splitting the file up is done via the PropertyList &amp;lt;code&amp;gt;include&amp;lt;/code&amp;gt; syntax. &lt;br /&gt;
&lt;br /&gt;
{{note|Most of these tags are optional.}}&lt;br /&gt;
&lt;br /&gt;
{{note|The [https://pypi.org/project/FlightGear/ &amp;lt;code&amp;gt;flightgear&amp;lt;/code&amp;gt; Python package] built from [[FGMeta-Python]] contains a script called &amp;lt;code&amp;gt;fg-check-aircraft&amp;lt;/code&amp;gt; that can validate &amp;lt;tt&amp;gt;-set.xml&amp;lt;/tt&amp;gt; files and report potential problems. Installation instructions for this package are given in {{fgmeta-python source | path = README.md | text = FGMeta-Python's README.md}}. Then run &amp;lt;code&amp;gt;fg-check-aircraft --help&amp;lt;/code&amp;gt; for script usage (basically, you need to specify suitable &amp;lt;code&amp;gt;--include&amp;lt;/code&amp;gt; options and tell which directories you want to check).}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
 &amp;lt;sim&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
XML file header and opening &amp;lt;code&amp;gt;&amp;amp;lt;PropertyList&amp;amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;amp;lt;sim&amp;amp;gt;&amp;lt;/code&amp;gt; tags&lt;br /&gt;
&lt;br /&gt;
==== Name &amp;amp; Description ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;description&amp;gt;&amp;lt;!-- Short description of the aircraft --&amp;gt;&amp;lt;/description&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The name that will be shown in the aircraft selection dialog of [[FGRun]] and other GUIs. It's called '''description''' but consider it the human-readable name for the aircraft. It's the primary thing users will see of your aircraft in UIs, so try to make it as informative as possible without being too long. Many authors include the manufacturer in the name, but this is not always necessary: e.e there's no need to call an aircraft 'Mikoyan-Gurevich MiG 27 ML (Flogger)'. In this case 'MiG 27ML' or 'Mikoyan MiG-27ML' is likely fine. Nickname such as the NATO reporting name here are good to include in the longer description (see next next section) since this is also searchable in the UI.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;long-description&amp;gt;The Cessna 172 is the most popular general aviation aircraft in the world, with &lt;br /&gt;
over 40,000 examples built. The aircraft evolved from the earlier Cessna 170, and is available with&lt;br /&gt;
a huge range of instruments and engines. This examples features the a Lycoming IO-360 engine&lt;br /&gt;
and traditional mechanical flight instruments, typical of a new aircraft from 1986.&lt;br /&gt;
&amp;lt;/long-description&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A brief description of the aircraft, typically a few sentences or paragraphs. Do not including formatting in this text since it will be re-formatted by the UI. (Line breaks to separate paragraphs are ok). Since this text is also searchable, this is a good place to include nick-names or other information (eg, historical manufacturer names) to aid in discovery.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;aircraft-version&amp;gt;&amp;lt;!-- Version --&amp;gt;&amp;lt;/aircraft-version&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Version of the aircraft.  Often the date of the last change or a version number.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;minimum-fg-version&amp;gt;4.0.0&amp;lt;/minimum-fg-version&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{Main article|FlightGear Version Check}}&lt;br /&gt;
&lt;br /&gt;
Minimum FlightGear version required for this aircraft [http://forum.flightgear.org/viewtopic.php?f=4&amp;amp;t=28010&amp;amp;p=264797#p264788], note that this is a &amp;quot;soft&amp;quot; requirement - i.e. it will not terminate fg or trigger an error, but only show a warning in the console/fg window using a Nasal script that checks if the property is set. This is intended to make compatibility issues more obvious, i.e. end-users downloading new aircraft and wanting to use them in conjunction with an old version of FlightGear, which is causing quite a bit of workload on the support forum.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Minimum FlightGear version ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;minimum-fg-version&amp;gt;&amp;lt;!-- The minimal version of FlightGear the aircraft can be expected to fully work with. --&amp;gt;&amp;lt;/minimum-fg-version&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will make FlightGear show a warning dialog stating that the aircraft might not work as expected or at all if the FlightGear version loading it is too old.&lt;br /&gt;
&lt;br /&gt;
This is useful of you know that you are using features not available for older versions of FlightGear.&lt;br /&gt;
&lt;br /&gt;
==== Expected aircraft folder name ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;expected-aircraft-dir-name&amp;gt;&amp;lt;!-- The expected name of the aircraft folder. --&amp;gt;&amp;lt;/expected-aircraft-dir-name&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will make FlightGear show a warning dialog if the aircraft do not have the expected folder name, suggesting that the user rename the aircraft to the aircraft name given above.&lt;br /&gt;
&lt;br /&gt;
This is useful if you expect users to download your aircraft from for example GitHub, which will add a hyphen and a branch name to the folder name, most often &amp;lt;code&amp;gt;-master&amp;lt;/code&amp;gt;. This will usually break a lot of things, for example showing the blue and yellow &amp;quot;infamous glider&amp;quot; instead of the aircraft model, as FlightGear do not find the aircraft model.&lt;br /&gt;
&lt;br /&gt;
==== Ratings ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;rating&amp;gt;&lt;br /&gt;
   &amp;lt;FDM type=&amp;quot;int&amp;quot;&amp;gt;&amp;lt;!-- 1..5 --&amp;gt;&amp;lt;/FDM&amp;gt;&lt;br /&gt;
   &amp;lt;systems type=&amp;quot;int&amp;quot;&amp;gt;&amp;lt;!-- 1..5 --&amp;gt;&amp;lt;/systems&amp;gt;&lt;br /&gt;
   &amp;lt;cockpit type=&amp;quot;int&amp;quot;&amp;gt;&amp;lt;!-- 1..5 --&amp;gt;&amp;lt;/cockpit&amp;gt;&lt;br /&gt;
   &amp;lt;model type=&amp;quot;int&amp;quot;&amp;gt;&amp;lt;!-- 1..5 --&amp;gt;&amp;lt;/model&amp;gt;&lt;br /&gt;
  &amp;lt;/rating&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The aircraft rating, using the criteria outlined in the article [[Aircraft rating system]], gives a (reasonably) objective rating based on the availability and quality of various aspects of the aircraft.&lt;br /&gt;
&lt;br /&gt;
==== Authors &amp;amp; Maintainers ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;!-- old / simple style --&amp;gt;&lt;br /&gt;
  &amp;lt;author&amp;gt;&amp;lt;!-- Name of author (development area), Name of author (development area), etc. --&amp;gt;&amp;lt;/author&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- new in FlightGear 2018.3.0 style --&amp;gt;&lt;br /&gt;
  &amp;lt;authors&amp;gt;&lt;br /&gt;
    &amp;lt;author n=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;name&amp;gt;Wilbur Wirght&amp;lt;/name&amp;gt;&lt;br /&gt;
      &amp;lt;description&amp;gt;FDM, systems&amp;lt;/description&amp;gt;&lt;br /&gt;
      &amp;lt;nick&amp;gt;wwright&amp;lt;/nick&amp;gt;&lt;br /&gt;
    &amp;lt;/author&amp;gt;&lt;br /&gt;
    &amp;lt;author n=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;name&amp;gt;Orville Wirght&amp;lt;/name&amp;gt;&lt;br /&gt;
      &amp;lt;description&amp;gt;model and sounds&amp;lt;/description&amp;gt;&lt;br /&gt;
      &amp;lt;email&amp;gt;orville@gmail.com&amp;lt;/email&amp;gt;&lt;br /&gt;
    &amp;lt;/author&amp;gt;&lt;br /&gt;
  &amp;lt;/authors&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Previously, aircraft could define a single &amp;lt;author&amp;gt; tag with a string listing the authors of the aircraft. This often ended up containing other information, and for complex aircraft, could become very long and unreadable in some places, such as the splash screen.&lt;br /&gt;
&lt;br /&gt;
For FlightGear 2018.3.0 onwards there is a replacement system, based around a structured list of authors. For each author their name can be supplied, and optionally other data if desired: nickname, email and a description of what they contributed. (The strucutre of this XML deliberately matches that used for add-ons)&lt;br /&gt;
&lt;br /&gt;
Both the old and and new data can co-exist to allow aircraft compatability with older versions of FlightGear.&lt;br /&gt;
&lt;br /&gt;
To distinguish contributions and previous authors from active maintainers, there is a seperate maintainers section which can be provided. The syntax is the same as for the authors, but the contact email is more important. In the future this might potentially be used to contact / notify all maintainers of aircraft. (Nickname and description are not used for maintainers)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;maintainers&amp;gt;&lt;br /&gt;
   &amp;lt;maintainer n=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;name&amp;gt;Wilbur Wirght&amp;lt;/name&amp;gt;&lt;br /&gt;
       &amp;lt;email&amp;gt;ww@wright-brothers.com&amp;lt;/email&amp;gt;&lt;br /&gt;
    &amp;lt;/maintainer&amp;gt;&lt;br /&gt;
 &amp;lt;/maintainers &amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Variants ====&lt;br /&gt;
&lt;br /&gt;
When you have multiple -set.xml files in an aircraft directory, one of them should be indicated as the default or primary, and other -set.xmls should be marked as variants of this. This is important so the packaging system knows which -set.xml best describes the whole directory. It's usually quite clear what the main or principle -set.xml should be, but sometimes an arbitrary decision is needed. (For example, with the 777, should the -200 or -300 be the primary aircraft? In practice it doesn't matter)&lt;br /&gt;
&lt;br /&gt;
In the main -set.xml, add the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;primary-set type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/primary-set&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In each variant -set.xml, add the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;variant-of&amp;gt;....mainAircraftName....&amp;lt;/variant-of&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example if the main aircraft -set.xml is 'dc3-set.xml', and the variants are 'c47-set.xml' and 'dst-set.xml', you would add:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;variant-of&amp;gt;dc3&amp;lt;/variant-of&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in both c47-set.xml and dst-set.xml. This ensures the information from dc3-set.xml will be used when describing the entire package. In this example it's clear the DC-3 should be the primary aircraft because that is the most commonly recognised version - the C-47 and Douglas Sleeper Transport are both useful variants that might exist, but DC-3 is the most generic name / variant.&lt;br /&gt;
&lt;br /&gt;
==== Tags ====&lt;br /&gt;
&lt;br /&gt;
The [[Catalog metadata|tag system]] allows systems to categorise aircraft, for example allowing more advanced searches in the future. Tags allow better feedback to the user when interacting with your aircraft - for&lt;br /&gt;
example if the aircraft is tagged as towable, a glider, or a helicopter, the startup behaviour can be customised.&lt;br /&gt;
&lt;br /&gt;
Most importantly, set the following tags if appropriate:&lt;br /&gt;
&lt;br /&gt;
    * glider&lt;br /&gt;
    * helicopter&lt;br /&gt;
    * floats&lt;br /&gt;
    * skis&lt;br /&gt;
    * seaplane&lt;br /&gt;
    * airship&lt;br /&gt;
    * amphibious&lt;br /&gt;
    * vtol&lt;br /&gt;
&lt;br /&gt;
These tags are the most helpful in customising the start-up experience based on the type of aircraft. (Especially, which starting locations are offered / preferred when searching)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tags&amp;gt;&lt;br /&gt;
    &amp;lt;tag n=&amp;quot;0&amp;quot;&amp;gt;boeing&amp;lt;/tag&amp;gt;&lt;br /&gt;
    &amp;lt;tag n=&amp;quot;1&amp;quot;&amp;gt;vtol&amp;lt;/tag&amp;gt;&lt;br /&gt;
    &amp;lt;tag n=&amp;quot;2&amp;quot;&amp;gt;glider&amp;lt;/tag&amp;gt;&lt;br /&gt;
&amp;lt;/tags&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Urls ====&lt;br /&gt;
&lt;br /&gt;
Beginning with FlightGear 2018.3.0, aircraft can list significant URLs, such as their home page, support forum or code repository. Again the format matches that uses for add-ons:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;urls&amp;gt;&lt;br /&gt;
  &amp;lt;home-page&amp;gt;http://wiki.flightgear.org/UFO_from_the_%27White_Project%27_of_the_UNESCO&amp;lt;/home-page&amp;gt;&lt;br /&gt;
  &amp;lt;support&amp;gt;http://forum.flightgear.org&amp;lt;/support&amp;gt;&lt;br /&gt;
  &amp;lt;wikipedia&amp;gt;https://en.wikipedia.org/wiki/Unidentified_flying_object&amp;lt;/wikipedia&amp;gt;&lt;br /&gt;
  &amp;lt;code-repository&amp;gt;https://sourceforge.net/p/flightgear/fgdata/ci/next/tree/Aircraft/ufo/&amp;lt;/code-repository&amp;gt;&lt;br /&gt;
&amp;lt;/urls&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The support URL is perhaps the most important, to direct users to a forum or bug-tracker where they can ask questions or report issues with the particular aircraft. Note that while multiple URLs of each type are in theory permitted, at the moment only the first one of each type will be used in the UI. (This may change in the future)&lt;br /&gt;
&lt;br /&gt;
==== Previews ====&lt;br /&gt;
&lt;br /&gt;
The preview system allows UI to show a visual preview of the aircraft during startup, on the website, and in the launcher. Several images can be provided, showing the aircraft exterior and interior. These are also used to provide an improved splash-screen experience, replacing the older system described below.  Images should be 1024x768 with no text (as that is added dynamically) and minimal post-processing.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;previews&amp;gt;&lt;br /&gt;
  &amp;lt;preview&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;exterior&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;splash type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/splash&amp;gt;&lt;br /&gt;
    &amp;lt;path&amp;gt;Previews/exterior-1.png&amp;lt;/path&amp;gt;&lt;br /&gt;
  &amp;lt;/preview&amp;gt;&lt;br /&gt;
  &amp;lt;preview&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;exterior&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;splash type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/splash&amp;gt;&lt;br /&gt;
    &amp;lt;path&amp;gt;Previews/exterior-f16a-2.png&amp;lt;/path&amp;gt;&lt;br /&gt;
  &amp;lt;/preview&amp;gt;&lt;br /&gt;
  &amp;lt;preview&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;panel&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;splash type=&amp;quot;bool&amp;quot;&amp;gt;false&amp;lt;/splash&amp;gt;&lt;br /&gt;
    &amp;lt;path&amp;gt;Previews/cockpit.png&amp;lt;/path&amp;gt;&lt;br /&gt;
  &amp;lt;/preview&amp;gt;&lt;br /&gt;
&amp;lt;/previews&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Previews are tagged to allow automatic selection for certain use cases. It's recommended to include at least one exterior, daytime shot of the aircraft, and one interior shot fo the main instrument panel from the pilot's viewpoint. Beyond this any image of the aircraft is acceptable. Avoid including logo, badge or text elements in preview images since this gives poor quality results and restricts how the images can be used - different uses of the images will composite their own elements on top.&lt;br /&gt;
&lt;br /&gt;
Preview file paths are relative to the -set.xml file. Permitted types at present are &amp;lt;code&amp;gt;exterior&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;panel&amp;lt;/code&amp;gt; - the type can also be committed. By default all previews are considered for random selection as the splash screen - to prevent a particular preview being used as the splash screen, set the &amp;lt;code&amp;gt;splash&amp;lt;/code&amp;gt; tag to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Flight-model (FDM) ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;flight-model&amp;gt;&amp;lt;!-- FDM --&amp;gt;&amp;lt;/flight-model&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The FDM the aircraft is using.  Use &amp;lt;code&amp;gt;yasim&amp;lt;/code&amp;gt; for [[YASim]] and &amp;lt;code&amp;gt;jsb&amp;lt;/code&amp;gt; for [[JSBSim]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;aero&amp;gt;&amp;lt;!-- Truncated file path --&amp;gt;&amp;lt;/aero&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The filename of the FDM file, without &amp;lt;code&amp;gt;.xml&amp;lt;/code&amp;gt;.  For instance, if your FDM file is sopwithCamel1F1.xml, the aero section would look like &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;aero&amp;gt;sopwithCamel1F1&amp;lt;/aero&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Startup ====&lt;br /&gt;
&lt;br /&gt;
The startup section contains information used to show the splash screen for your aircraft. The recommend approach is to use the previews system described above, optionally marking some previews as suitable or unsuitable for use as a splash screen. When using the previews system to provide a splash screen, you can optionally provide a logo image. This replaces the default text (containing the aircraft name) with a presumably partially-transaprent overlay,&lt;br /&gt;
allowing more interesting graphics to be displayed on the splash screen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;sim&amp;gt;&lt;br /&gt;
    &amp;lt;startup&amp;gt;&lt;br /&gt;
      &amp;lt;splash-logo-image&amp;gt;beechcraft-logo.png&amp;lt;/splash-logo-image&amp;gt;&lt;br /&gt;
    &amp;lt;/startup&amp;gt;&lt;br /&gt;
  &amp;lt;/sim&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When using a logo image, it should be a PNG with an alpha channel enabled, and will be blended over the selected preview image automatically. At present the placement is hard-coded, but this could be extended- if you'd like this added please ask on the developer mailing list.&lt;br /&gt;
&lt;br /&gt;
The legacy splash screen system does not use previews, but instead uses the following syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;sim&amp;gt;&lt;br /&gt;
    &amp;lt;startup&amp;gt;&lt;br /&gt;
      &amp;lt;splash-texture n=&amp;quot;0&amp;quot;&amp;gt;&amp;lt;!-- File path --&amp;gt;&amp;lt;/splash-texture&amp;gt;&lt;br /&gt;
      &amp;lt;splash-texture n=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;!-- File path --&amp;gt;&amp;lt;/splash-texture&amp;gt;&lt;br /&gt;
    &amp;lt;/startup&amp;gt;&lt;br /&gt;
  &amp;lt;/sim&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Because old splash screens typically included text and logo elements, the splash screen appearance is different in this case, to ensure all text is legible. (Information added by FlightGear such as version and startup progress, is moved to avoid overlapping, and the scaling behaviour is different)&lt;br /&gt;
&lt;br /&gt;
==== Visual aircraft model ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;model&amp;gt;&lt;br /&gt;
    &amp;lt;path&amp;gt;&amp;lt;!-- File path --&amp;gt;&amp;lt;/path&amp;gt;&lt;br /&gt;
    &amp;lt;fallback-model-index&amp;gt;&amp;lt;!-- Fallback model ID --&amp;gt;&amp;lt;/fallback-model-index&amp;gt;&lt;br /&gt;
  &amp;lt;/model&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file path to either a plain .ac (AC3D) 3D model or a model and animation configuration XML file. This path is also used when loading multiplayer aircraft and needs to be in the long form &amp;lt;code&amp;gt;Aircraft/&amp;lt;aircraft folder&amp;gt;/Models/&amp;lt;model file&amp;gt;&amp;lt;/code&amp;gt; so FlightGear can find it for multiplayer aircraft.  The &amp;lt;code&amp;gt;fallback-model-index&amp;lt;/code&amp;gt; is used to set what aircraft model be used to render their aircraft over multiplayer if a user does not have their aircraft installed or if the aircraft is outside the [[Level Of Detail (LOD) Ranges#AI/MP ranges|level of detail range]]. See [[MP Fallback models]] for more details.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;sound&amp;gt;&lt;br /&gt;
    &amp;lt;path&amp;gt;&amp;lt;!-- File path --&amp;gt;&amp;lt;/path&amp;gt;&lt;br /&gt;
  &amp;lt;/sound&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The path to a [[Howto:Add sound effects to aircraft|sound configuration XML file]].  If for example you find a nice WAV file of the jet engine you're using, you can fix it up with your favorite sound editor so it loops nicely and include that into your model (I've noticed a few models where it can get quite annoying when the loop length is so small you can really notice it) so make it smooth.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;panel&amp;gt;&lt;br /&gt;
    &amp;lt;path&amp;gt;&amp;lt;!-- File path --&amp;gt;&amp;lt;/path&amp;gt;&lt;br /&gt;
  &amp;lt;/panel&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
File path to the 2D panel configuration XML file.  We prefer 3D cockpits, which are linked in the model .xml file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;autopilot&amp;gt;&lt;br /&gt;
    &amp;lt;path&amp;gt;&amp;lt;!-- File path --&amp;gt;&amp;lt;/path&amp;gt;&lt;br /&gt;
  &amp;lt;/autopilot&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
File path to the autopilot configuration XML file.  For details, see for example [[Autopilot configuration reference]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;checklists include=&amp;quot;&amp;quot;/&amp;gt;  &amp;lt;!-- File name --&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Configuration XML file defining a [[Aircraft Checklists|checklist]] (available since version 3.0).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;variant-of&amp;gt;&amp;lt;!-- Aircraft --&amp;gt;&amp;lt;/variant-of&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since 3.6, there is a new &amp;lt;code&amp;gt;&amp;amp;lt;variant-of&amp;amp;gt;&amp;lt;/code&amp;gt; tag that can be added. This is used by the [[Integrated Qt5 Launcher|integrated Qt5 launcher]] to easily select a variant of an aircraft. For example, the [[British Aerospace Sea Harrier|BAe Sea Harrier FA2]] is a variant of the BAe Sea Harrier, and the ''Cessna 172P - Canvas Demo'' is a variant of the [[Cessna 172P]]. Additionally, this could be used for different [[Talk:Aircraft_Checklists#In-air_startups_.26_supporting_Startup_Situations|startup situations]] too.&lt;br /&gt;
&lt;br /&gt;
Example from the {{fgaddon aircraft source|777|777-200ER-set.xml|l=11|text=777-200ER-set.xml}}: &amp;lt;code&amp;gt;&amp;amp;lt;variant-of&amp;amp;gt;777-200&amp;amp;lt;/variant-of&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;/sim&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Performance and Flight-planning ====&lt;br /&gt;
&lt;br /&gt;
From FlightGear 2018.3.0 onwards, it's possible to include additional data to improve user feedback and flight-plan creation. Note this information lives under the top-level &amp;lt;code&amp;gt;aircraft&amp;lt;/code&amp;gt; tag, and '''not''' under &amp;lt;code&amp;gt;sim&amp;lt;/code&amp;gt; as all the content above does.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;aircraft&amp;gt;&lt;br /&gt;
  &amp;lt;icao&amp;gt;&lt;br /&gt;
    &amp;lt;wake-turbulence-category&amp;gt;M&amp;lt;/wake-turbulence-category&amp;gt;   &amp;lt;!-- L = light, M = medium, H = heavy, J = jumbo --&amp;gt;&lt;br /&gt;
    &amp;lt;type type=&amp;quot;string&amp;quot;&amp;gt;B738&amp;lt;/type&amp;gt;  &amp;lt;!-- eg B738, C172, BE9L --&amp;gt;&lt;br /&gt;
    &amp;lt;!-- ICAO equipment string  --&amp;gt;&lt;br /&gt;
    &amp;lt;equipment type=&amp;quot;string&amp;quot;&amp;gt;SDFGY&amp;lt;/equipment&amp;gt;&lt;br /&gt;
    &amp;lt;!-- ICAO surveillance string  --&amp;gt;&lt;br /&gt;
    &amp;lt;surveillance type=&amp;quot;string&amp;quot;&amp;gt;S&amp;lt;/surveillance&amp;gt; &amp;lt;!-- mode-S transponder --&amp;gt;&lt;br /&gt;
  &amp;lt;/icao&amp;gt;&lt;br /&gt;
&amp;lt;/aircraft&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This information is useful in pre-filling an ICAO standard flight-plan based on the aircraft and equipment. In the future it may be reported automatically to ATC clients / networks. To find out the officially registered ICAO type string for an aircraft, ICAO provides [http://www.icao.int/publications/DOC8643/Pages/Search.aspx a lookup service]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;aircraft&amp;gt;&lt;br /&gt;
  &amp;lt;performance&amp;gt;&lt;br /&gt;
    &amp;lt;minimum&amp;gt;&lt;br /&gt;
      &amp;lt;takeoff-length-ft type=&amp;quot;int&amp;quot;&amp;gt;6000&amp;lt;/takeoff-length-ft&amp;gt;&lt;br /&gt;
      &amp;lt;landing-length-ft type=&amp;quot;int&amp;quot;&amp;gt;4000&amp;lt;/landing-length-ft&amp;gt;&lt;br /&gt;
    &amp;lt;/minimum&amp;gt;&lt;br /&gt;
    &amp;lt;climb&amp;gt;&lt;br /&gt;
      &amp;lt;!-- potential for climb data in the future &lt;br /&gt;
      &amp;lt;airspeed-knots type=&amp;quot;int&amp;quot;&amp;gt;280&amp;lt;/airspeed-knots&amp;gt;&lt;br /&gt;
      &amp;lt;vertical-speed-fpm type=&amp;quot;int&amp;quot;&amp;gt;2000&amp;lt;/vertical-speed-fpm&amp;gt;&lt;br /&gt;
      --&amp;gt;&lt;br /&gt;
    &amp;lt;/climb&amp;gt;&lt;br /&gt;
    &amp;lt;cruise&amp;gt;&lt;br /&gt;
      &amp;lt;airspeed-knots type=&amp;quot;int&amp;quot;&amp;gt;400&amp;lt;/airspeed-knots&amp;gt;&lt;br /&gt;
      &amp;lt;!--  &amp;lt;mach type=&amp;quot;double&amp;quot;&amp;gt;0.875&amp;lt;/mach&amp;gt; --&amp;gt;&lt;br /&gt;
      &amp;lt;altitude-ft type=&amp;quot;int&amp;quot;&amp;gt;4500&amp;lt;/altitude-ft&amp;gt;&lt;br /&gt;
      &amp;lt;!-- &amp;lt;flight-level type=&amp;quot;int&amp;quot;&amp;gt;330&amp;lt;/flight-level&amp;gt; --&amp;gt;&lt;br /&gt;
    &amp;lt;/cruise&amp;gt;&lt;br /&gt;
    &amp;lt;descent&amp;gt;&lt;br /&gt;
      &amp;lt;!-- potential for descent data in the future &lt;br /&gt;
      &amp;lt;airspeed-knots type=&amp;quot;int&amp;quot;&amp;gt;330&amp;lt;/airspeed-knots&amp;gt;&lt;br /&gt;
      &amp;lt;vertical-speed-fpm type=&amp;quot;int&amp;quot;&amp;gt;-1200&amp;lt;/vertical-speed-fpm&amp;gt;&lt;br /&gt;
      --&amp;gt;&lt;br /&gt;
    &amp;lt;/descent&amp;gt;&lt;br /&gt;
    &amp;lt;approach&amp;gt;&lt;br /&gt;
      &amp;lt;airspeed-knots type=&amp;quot;int&amp;quot;&amp;gt;120&amp;lt;/airspeed-knots&amp;gt;&lt;br /&gt;
    &amp;lt;/approach&amp;gt;&lt;br /&gt;
    &amp;lt;maximum&amp;gt;&lt;br /&gt;
      &amp;lt;altitude-ft type=&amp;quot;int&amp;quot;&amp;gt;21000&amp;lt;/altitude-ft&amp;gt; &amp;lt;!-- service ceiling --&amp;gt;&lt;br /&gt;
      &amp;lt;mach type=&amp;quot;double&amp;quot;&amp;gt;0.875&amp;lt;/mach&amp;gt;&lt;br /&gt;
      &amp;lt;airspeed-knots type=&amp;quot;int&amp;quot;&amp;gt;180&amp;lt;/airspeed-knots&amp;gt; &amp;lt;!-- VNe or similar airframe structural limit --&amp;gt;&lt;br /&gt;
    &amp;lt;/maximum&amp;gt;&lt;br /&gt;
  &amp;lt;/performance &amp;gt;&lt;br /&gt;
&amp;lt;/aircraft&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Performance data is optional, and advisory : it does not influence the system or FDM simulation in any way. Its purpose is to inform flight-planning and user experience, especially to provide reasonable default values when the user selects starting on approach or in the air. The cruise information is valuable in generating a plausible route between two airports (for example, if Victor or Jet airways should be used), and making a crude estimate of the time enroute based on typical cruising speeds.&lt;br /&gt;
&lt;br /&gt;
The minimum runway length information is helpful in preferring certain airfields when searching locations - for example when using the 777 there is little point in considering a 600ft grass strip. &lt;br /&gt;
&lt;br /&gt;
Information on aircraft maximums is valuable in the UI to give feedback when the user requests values which exceed aircraft capabilities: for example starting the C172 at 50000ft altitude or 800kts. (Since we're dealing with a flight-simulation situation, we still permit such uses, but it's beneficial to be able to warn the user they are doing something which will likely not work well)&lt;br /&gt;
&lt;br /&gt;
At present climb and descent information is not included, but future version of FlightGear might support this, to plan realistic climb and descent profiles for the aircraft.&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
* [[Aircraft Generation Wizard]] (stalled as of 12/2013)&lt;br /&gt;
* [[Aircraft rating system]]&lt;br /&gt;
* [[Catalog metadata]]&lt;br /&gt;
* [[Howto:3D Aircraft Models]]&lt;br /&gt;
* [[Howto:Add sound effects to aircraft]]&lt;br /&gt;
* [[Howto:Animate models]]&lt;br /&gt;
* [[MP Fallback models]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Aircraft enhancement]]&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Howto:Translate_FlightGear&amp;diff=143436</id>
		<title>Howto:Translate FlightGear</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Howto:Translate_FlightGear&amp;diff=143436"/>
		<updated>2026-01-09T09:00:12Z</updated>

		<summary type="html">&lt;p&gt;Rominet: /* How to translate */ More complement&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;FlightGear supports localization, that is, showing the user interface in the user's native language rather than in English. &lt;br /&gt;
&lt;br /&gt;
This page will help you translate FlightGear to a new language or improve the existing translations.&lt;br /&gt;
&lt;br /&gt;
== What can be translated ==&lt;br /&gt;
The following parts of the simulator can be translated:&lt;br /&gt;
* the menus, splash screens, startup tips and the text shown when the &amp;lt;code&amp;gt;--help&amp;lt;/code&amp;gt; command-line option is used (FlightGear 2.7.0 and later)&lt;br /&gt;
* the shortcut file on Linux systems (FlightGear 2017.1 and later)&lt;br /&gt;
* the man pages (FlightGear 2017.3 and later)&lt;br /&gt;
* the built-in launcher (FlightGear 2018.3 and later)&lt;br /&gt;
&lt;br /&gt;
== How to translate ==&lt;br /&gt;
# Determine the two letter ISO 639-1 language code for the language you want to translate FlightGear to. A list can be found on the [https://www.loc.gov/standards/iso639-2/php/code_list.php Library of Congress Web site].&lt;br /&gt;
# Check whether your language already has a subdirectory below [https://gitlab.com/flightgear/fgdata/-/tree/next/Translations?ref_type=heads the Translations directory]. If it does not, ask on the development mailing for the empty translation files to be created for you. (It's better to do this than to copy an existing translation, as this will avoid you accidentally including unwanted data; besides, rules for plural forms must be added {{fgmeta-python source| path = src/flightgear/meta/i18n/__init__.py | text = in FGMeta-Python}} and {{flightgear source| path = src/Translations/LanguageInfo.cxx | text = in FlightGear}}).&lt;br /&gt;
# Open the .XLF files in the subdirectory of your language and translate the English strings in them. You can edit the .XLF files in a text editor (such as Notepad++ or GEdit) but you can also use translation tools such as Qt Linguist or any XLIFF editor. Using a structured tool is recommended because it can track the translation state (flagging untranslated strings) and most tools include helpers to partially automate the translation process. &lt;br /&gt;
# Start FlightGear to test your translation (for the -Qt.xlf file, you won't see any change unless you rebuild FlightGear with the file in the expected place). By default, the simulator will select the locale of your operating system as the language to use; you can explicitly select a language using the command-line option &amp;lt;code&amp;gt;--language=&amp;lt;i&amp;gt;language code&amp;lt;/i&amp;gt;&amp;lt;/code&amp;gt; (alternatively, on Unix-like systems, you can set the &amp;lt;code&amp;gt;LANG&amp;lt;/code&amp;gt; environment variable as in &amp;lt;code&amp;gt;LANG=fr_FR.UTF-8 fgfs ...&amp;lt;/code&amp;gt;).&lt;br /&gt;
# Submit your updated .XLF files for inclusion via the development mailing list or a GitLab merge request.&lt;br /&gt;
&lt;br /&gt;
There are two XLF files in each language subdirectory : FlightGear-nonQt.xlf is for the core simulator strings (startup messages, in-sim menus, command line options help, tips, weather scenarios...), and FlightGear-Qt.xlf is for the built-in launcher. &lt;br /&gt;
&lt;br /&gt;
Note that the user interface might have not full Unicode support (some special/accented characters might not be shown): should you encounter such a location, please write to the flightgear-devel mailing list at {{Mailing list e-mail address|flightgear-devel}}.&lt;br /&gt;
&lt;br /&gt;
== How to translate the shortcut file ==&lt;br /&gt;
Open [{{flightgear url|path=package/org.flightgear.FlightGear.desktop}} the FlightGear &amp;lt;code&amp;gt;.desktop&amp;lt;/code&amp;gt; file] and translate the ''GenericName'', ''Comment'' and ''Keywords'' keys (add the ''GenericName[xx]'', ''Comment[xx]'' and ''Keywords[xx]'' keys, where ''xx'' is the two letter ISO 639-1 code of the language).&lt;br /&gt;
&lt;br /&gt;
== How to translate the man pages ==&lt;br /&gt;
# Determine the two letter ISO 639-1 language code for the language you want to translate the man pages to.&lt;br /&gt;
# Check whether your language already has a subdirectory below [{{flightgear url|path=man}} the man pages directory]. If it does not, create an empty directory in it named after the language code, then copy &amp;lt;code&amp;gt;man1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;man5&amp;lt;/code&amp;gt; from the man pages directory to the directory of your language.&lt;br /&gt;
# Edit [{{flightgear url|path=man/CMakeLists.txt}} man/CMakeLists.txt] and add the instruction &amp;lt;code&amp;gt;add_subdirectory(xx)&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;if(NOT WIN32)&amp;lt;/code&amp;gt; block (where ''xx'' is the language code).&lt;br /&gt;
# Edit &amp;lt;code&amp;gt;man/xx/man1/CMakeLists.txt&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;man/xx/man5/CMakeLists.txt&amp;lt;/code&amp;gt;: on the last row, set the installation directory (&amp;lt;code&amp;gt;DESTINATION&amp;lt;/code&amp;gt;), respectively, to &amp;lt;code&amp;gt;${CMAKE_INSTALL_MANDIR}/xx/man1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;${CMAKE_INSTALL_MANDIR}/xx/man5&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Open the man pages in the subdirectory of your language and translate them.&lt;br /&gt;
&lt;br /&gt;
== Using QtLinguist to translate XLF Files ==&lt;br /&gt;
&lt;br /&gt;
One can use QtLinguist (application from the QT package) to translate XLIFF files. Install QT package from the Qt home page (https://www.qt.io/download). Opening QtLinguist will show default translation environment. Open XLF file and start translating. The interface is divided into four main sections:&lt;br /&gt;
&lt;br /&gt;
* Context - this is a grouping of the strings to translate. Defined by the developer. Icon beside the group show translation status. Everything should be in the end with the green check sign.&lt;br /&gt;
* Strings - strings in the selected group. Select string to translate it&lt;br /&gt;
* Sources and Forms - additional information about location of the translated string in the source code (not always visible and with correct information)&lt;br /&gt;
* Source text - the main place where translation occurs. Translate here selected strings.&lt;br /&gt;
&lt;br /&gt;
One have to translate the original strings into the target language. Icon beside the original text in the 'Strings' section will show status. Green check mark when everything is correct. Yellow question mark, when the translation is in place but it it not marked as &amp;quot;verified&amp;quot;. Untranslated strings are marked with the grey question mark. Sometimes QtLinguist displays exclamation mark - this shows that the translated text does not conform to the original text e.g. original text ends with the punctuation but the translated text not. Buttons (and keyboard shortcuts) on the main toolbar area helps with the strings matching. When the text is translated and you're comfortable with the style/meaning etc. you select green check mark button. It marks the translation as translated-verified. So this is the expected end state for this.&lt;br /&gt;
&lt;br /&gt;
[[File:Qt Linquist.png|700px|frameless]]&lt;br /&gt;
&lt;br /&gt;
Reference:&lt;br /&gt;
* [https://doc.qt.io/qt-5/qtlinguist-index.html Qt Linguist manual]&lt;br /&gt;
* [https://doc.qt.io/qt-5/linguist-translators.html Qt Linguist for translators guide] &lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
* [[Howto: Translate FlightGear Launch Control‎‎]]&lt;br /&gt;
* [[Translation requests]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Howto|Translate FlightGear]]&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Howto:Translate_FlightGear&amp;diff=143435</id>
		<title>Howto:Translate FlightGear</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Howto:Translate_FlightGear&amp;diff=143435"/>
		<updated>2026-01-09T08:45:14Z</updated>

		<summary type="html">&lt;p&gt;Rominet: /* How to translate */ Little complements&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;FlightGear supports localization, that is, showing the user interface in the user's native language rather than in English. &lt;br /&gt;
&lt;br /&gt;
This page will help you translate FlightGear to a new language or improve the existing translations.&lt;br /&gt;
&lt;br /&gt;
== What can be translated ==&lt;br /&gt;
The following parts of the simulator can be translated:&lt;br /&gt;
* the menus, splash screens, startup tips and the text shown when the &amp;lt;code&amp;gt;--help&amp;lt;/code&amp;gt; command-line option is used (FlightGear 2.7.0 and later)&lt;br /&gt;
* the shortcut file on Linux systems (FlightGear 2017.1 and later)&lt;br /&gt;
* the man pages (FlightGear 2017.3 and later)&lt;br /&gt;
* the built-in launcher (FlightGear 2018.3 and later)&lt;br /&gt;
&lt;br /&gt;
== How to translate ==&lt;br /&gt;
# Determine the two letter ISO 639-1 language code for the language you want to translate FlightGear to. A list can be found on the [https://www.loc.gov/standards/iso639-2/php/code_list.php Library of Congress Web site].&lt;br /&gt;
# Check whether your language already has a subdirectory below [https://gitlab.com/flightgear/fgdata/-/tree/next/Translations?ref_type=heads the Translations directory]. If it does not, ask on the development mailing for the empty translation files to be created for you. (It's better to do this than to copy an existing translation, as this will avoid you accidentally including unwanted data; besides, rules for plural forms must be added {{fgmeta-python source| path = src/flightgear/meta/i18n/__init__.py | text = in FGMeta-Python}} and {{flightgear source| path = src/Translations/LanguageInfo.cxx | text = in FlightGear}}).&lt;br /&gt;
# Open the .XLF files in the subdirectory of your language and translate the English strings in them. You can edit the .XLF files in a text editor (such as Notepad++ or GEdit) but you can also use translation tools such as Qt Linguist or any XLIFF editor. Using a structured tool is recommended because it can track the translation state (flagging untranslated strings) and most tools include helpers to partially automate the translation process. &lt;br /&gt;
# Start FlightGear to test your translation (for the -Qt.xlf file, you won't see any change unless you rebuild FlightGear with the file in the expected place). By default, the simulator will select the locale of your operating system as the language to use; you can explicitly select a language using the command-line option &amp;lt;code&amp;gt;--language=&amp;lt;i&amp;gt;language code&amp;lt;/i&amp;gt;&amp;lt;/code&amp;gt; (alternatively, on Unix-like systems, you can set the &amp;lt;code&amp;gt;LANG&amp;lt;/code&amp;gt; environment variable as in &amp;lt;code&amp;gt;LANG=fr_FR.UTF-8 fgfs ...&amp;lt;/code&amp;gt;).&lt;br /&gt;
# Submit your updated .XLF files for inclusion via the development mailing list or a GitLab merge request.&lt;br /&gt;
&lt;br /&gt;
There are two XLF files in each language subdirectory : one for the core simulator strings (startup messages, command line arg help, hints) and one for the launcher. &lt;br /&gt;
&lt;br /&gt;
Note that the user interface might have not full Unicode support (some special/accented characters might not be shown): should you encounter such a location, please write to the flightgear-devel mailing list at {{Mailing list e-mail address|flightgear-devel}}.&lt;br /&gt;
&lt;br /&gt;
== How to translate the shortcut file ==&lt;br /&gt;
Open [{{flightgear url|path=package/org.flightgear.FlightGear.desktop}} the FlightGear &amp;lt;code&amp;gt;.desktop&amp;lt;/code&amp;gt; file] and translate the ''GenericName'', ''Comment'' and ''Keywords'' keys (add the ''GenericName[xx]'', ''Comment[xx]'' and ''Keywords[xx]'' keys, where ''xx'' is the two letter ISO 639-1 code of the language).&lt;br /&gt;
&lt;br /&gt;
== How to translate the man pages ==&lt;br /&gt;
# Determine the two letter ISO 639-1 language code for the language you want to translate the man pages to.&lt;br /&gt;
# Check whether your language already has a subdirectory below [{{flightgear url|path=man}} the man pages directory]. If it does not, create an empty directory in it named after the language code, then copy &amp;lt;code&amp;gt;man1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;man5&amp;lt;/code&amp;gt; from the man pages directory to the directory of your language.&lt;br /&gt;
# Edit [{{flightgear url|path=man/CMakeLists.txt}} man/CMakeLists.txt] and add the instruction &amp;lt;code&amp;gt;add_subdirectory(xx)&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;if(NOT WIN32)&amp;lt;/code&amp;gt; block (where ''xx'' is the language code).&lt;br /&gt;
# Edit &amp;lt;code&amp;gt;man/xx/man1/CMakeLists.txt&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;man/xx/man5/CMakeLists.txt&amp;lt;/code&amp;gt;: on the last row, set the installation directory (&amp;lt;code&amp;gt;DESTINATION&amp;lt;/code&amp;gt;), respectively, to &amp;lt;code&amp;gt;${CMAKE_INSTALL_MANDIR}/xx/man1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;${CMAKE_INSTALL_MANDIR}/xx/man5&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Open the man pages in the subdirectory of your language and translate them.&lt;br /&gt;
&lt;br /&gt;
== Using QtLinguist to translate XLF Files ==&lt;br /&gt;
&lt;br /&gt;
One can use QtLinguist (application from the QT package) to translate XLIFF files. Install QT package from the Qt home page (https://www.qt.io/download). Opening QtLinguist will show default translation environment. Open XLF file and start translating. The interface is divided into four main sections:&lt;br /&gt;
&lt;br /&gt;
* Context - this is a grouping of the strings to translate. Defined by the developer. Icon beside the group show translation status. Everything should be in the end with the green check sign.&lt;br /&gt;
* Strings - strings in the selected group. Select string to translate it&lt;br /&gt;
* Sources and Forms - additional information about location of the translated string in the source code (not always visible and with correct information)&lt;br /&gt;
* Source text - the main place where translation occurs. Translate here selected strings.&lt;br /&gt;
&lt;br /&gt;
One have to translate the original strings into the target language. Icon beside the original text in the 'Strings' section will show status. Green check mark when everything is correct. Yellow question mark, when the translation is in place but it it not marked as &amp;quot;verified&amp;quot;. Untranslated strings are marked with the grey question mark. Sometimes QtLinguist displays exclamation mark - this shows that the translated text does not conform to the original text e.g. original text ends with the punctuation but the translated text not. Buttons (and keyboard shortcuts) on the main toolbar area helps with the strings matching. When the text is translated and you're comfortable with the style/meaning etc. you select green check mark button. It marks the translation as translated-verified. So this is the expected end state for this.&lt;br /&gt;
&lt;br /&gt;
[[File:Qt Linquist.png|700px|frameless]]&lt;br /&gt;
&lt;br /&gt;
Reference:&lt;br /&gt;
* [https://doc.qt.io/qt-5/qtlinguist-index.html Qt Linguist manual]&lt;br /&gt;
* [https://doc.qt.io/qt-5/linguist-translators.html Qt Linguist for translators guide] &lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
* [[Howto: Translate FlightGear Launch Control‎‎]]&lt;br /&gt;
* [[Translation requests]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Howto|Translate FlightGear]]&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Howto:Translate_FlightGear&amp;diff=143434</id>
		<title>Howto:Translate FlightGear</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Howto:Translate_FlightGear&amp;diff=143434"/>
		<updated>2026-01-09T08:29:11Z</updated>

		<summary type="html">&lt;p&gt;Rominet: /* How to translate */ Add other reasons for asking on the ML when a new language is to be added&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;FlightGear supports localization, that is, showing the user interface in the user's native language rather than in English. &lt;br /&gt;
&lt;br /&gt;
This page will help you translate FlightGear to a new language or improve the existing translations.&lt;br /&gt;
&lt;br /&gt;
== What can be translated ==&lt;br /&gt;
The following parts of the simulator can be translated:&lt;br /&gt;
* the menus, splash screens, startup tips and the text shown when the &amp;lt;code&amp;gt;--help&amp;lt;/code&amp;gt; command-line option is used (FlightGear 2.7.0 and later)&lt;br /&gt;
* the shortcut file on Linux systems (FlightGear 2017.1 and later)&lt;br /&gt;
* the man pages (FlightGear 2017.3 and later)&lt;br /&gt;
* the built-in launcher (FlightGear 2018.3 and later)&lt;br /&gt;
&lt;br /&gt;
== How to translate ==&lt;br /&gt;
# Determine the two letter ISO 639-1 language code for the language you want to translate FlightGear to. A list can be found on the [https://www.loc.gov/standards/iso639-2/php/code_list.php Library of Congress Web site].&lt;br /&gt;
# Check whether your language already has a subdirectory below [https://gitlab.com/flightgear/fgdata/-/tree/next/Translations?ref_type=heads the Translations directory]. If it does not, ask on the development mailing for the empty translation files to be created for you. (It's better to do this than to copy an existing translation, as this will avoid you accidentally including unwanted data; besides, rules for plural forms must be added {{fgmeta-python source| path = src/flightgear/meta/i18n/__init__.py | text = in FGMeta-Python}} and {{flightgear source| path = src/Translations/LanguageInfo.cxx | text = in FlightGear}}).&lt;br /&gt;
# Open the .XLF files in the subdirectory of your language and translate the English strings in them. You can edit the .XLF files in a text editor (such as Notepad++ or GEdit) but you can also use translation tools such as Qt Linguist or any XLIFF editor. Using a structured tool is recommended because it can track the translation state (flagging untranslated strings) and most tools include helpers to partially automate the translation process. &lt;br /&gt;
# Start FlightGear to test your translation. By default, the simulator will select the locale of your operating system as the language to use; you can explicitly select a language using the command-line option &amp;lt;code&amp;gt;--language=&amp;lt;i&amp;gt;language code&amp;lt;/i&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Submit your updated .XLF files for inclusion via the development mailing list or a GitLab merge request&lt;br /&gt;
&lt;br /&gt;
There are two XLF files in each language subdirectory : one for the core simulator strings (startup messages, command line arg help, hints) and one for the launcher. &lt;br /&gt;
&lt;br /&gt;
Note that the user interface might have not full Unicode support (some special/accented characters might not be shown): should you encounter such a location, please write to the flightgear-devel mailing list at {{Mailing list e-mail address|flightgear-devel}}.&lt;br /&gt;
&lt;br /&gt;
== How to translate the shortcut file ==&lt;br /&gt;
Open [{{flightgear url|path=package/org.flightgear.FlightGear.desktop}} the FlightGear &amp;lt;code&amp;gt;.desktop&amp;lt;/code&amp;gt; file] and translate the ''GenericName'', ''Comment'' and ''Keywords'' keys (add the ''GenericName[xx]'', ''Comment[xx]'' and ''Keywords[xx]'' keys, where ''xx'' is the two letter ISO 639-1 code of the language).&lt;br /&gt;
&lt;br /&gt;
== How to translate the man pages ==&lt;br /&gt;
# Determine the two letter ISO 639-1 language code for the language you want to translate the man pages to.&lt;br /&gt;
# Check whether your language already has a subdirectory below [{{flightgear url|path=man}} the man pages directory]. If it does not, create an empty directory in it named after the language code, then copy &amp;lt;code&amp;gt;man1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;man5&amp;lt;/code&amp;gt; from the man pages directory to the directory of your language.&lt;br /&gt;
# Edit [{{flightgear url|path=man/CMakeLists.txt}} man/CMakeLists.txt] and add the instruction &amp;lt;code&amp;gt;add_subdirectory(xx)&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;if(NOT WIN32)&amp;lt;/code&amp;gt; block (where ''xx'' is the language code).&lt;br /&gt;
# Edit &amp;lt;code&amp;gt;man/xx/man1/CMakeLists.txt&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;man/xx/man5/CMakeLists.txt&amp;lt;/code&amp;gt;: on the last row, set the installation directory (&amp;lt;code&amp;gt;DESTINATION&amp;lt;/code&amp;gt;), respectively, to &amp;lt;code&amp;gt;${CMAKE_INSTALL_MANDIR}/xx/man1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;${CMAKE_INSTALL_MANDIR}/xx/man5&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Open the man pages in the subdirectory of your language and translate them.&lt;br /&gt;
&lt;br /&gt;
== Using QtLinguist to translate XLF Files ==&lt;br /&gt;
&lt;br /&gt;
One can use QtLinguist (application from the QT package) to translate XLIFF files. Install QT package from the Qt home page (https://www.qt.io/download). Opening QtLinguist will show default translation environment. Open XLF file and start translating. The interface is divided into four main sections:&lt;br /&gt;
&lt;br /&gt;
* Context - this is a grouping of the strings to translate. Defined by the developer. Icon beside the group show translation status. Everything should be in the end with the green check sign.&lt;br /&gt;
* Strings - strings in the selected group. Select string to translate it&lt;br /&gt;
* Sources and Forms - additional information about location of the translated string in the source code (not always visible and with correct information)&lt;br /&gt;
* Source text - the main place where translation occurs. Translate here selected strings.&lt;br /&gt;
&lt;br /&gt;
One have to translate the original strings into the target language. Icon beside the original text in the 'Strings' section will show status. Green check mark when everything is correct. Yellow question mark, when the translation is in place but it it not marked as &amp;quot;verified&amp;quot;. Untranslated strings are marked with the grey question mark. Sometimes QtLinguist displays exclamation mark - this shows that the translated text does not conform to the original text e.g. original text ends with the punctuation but the translated text not. Buttons (and keyboard shortcuts) on the main toolbar area helps with the strings matching. When the text is translated and you're comfortable with the style/meaning etc. you select green check mark button. It marks the translation as translated-verified. So this is the expected end state for this.&lt;br /&gt;
&lt;br /&gt;
[[File:Qt Linquist.png|700px|frameless]]&lt;br /&gt;
&lt;br /&gt;
Reference:&lt;br /&gt;
* [https://doc.qt.io/qt-5/qtlinguist-index.html Qt Linguist manual]&lt;br /&gt;
* [https://doc.qt.io/qt-5/linguist-translators.html Qt Linguist for translators guide] &lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
* [[Howto: Translate FlightGear Launch Control‎‎]]&lt;br /&gt;
* [[Translation requests]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Howto|Translate FlightGear]]&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Howto:Translate_FlightGear&amp;diff=143433</id>
		<title>Howto:Translate FlightGear</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Howto:Translate_FlightGear&amp;diff=143433"/>
		<updated>2026-01-08T21:52:11Z</updated>

		<summary type="html">&lt;p&gt;Rominet: /* How to translate */ GitLab rather than SourceForge nowadays&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;FlightGear supports localization, that is, showing the user interface in the user's native language rather than in English. &lt;br /&gt;
&lt;br /&gt;
This page will help you translate FlightGear to a new language or improve the existing translations.&lt;br /&gt;
&lt;br /&gt;
== What can be translated ==&lt;br /&gt;
The following parts of the simulator can be translated:&lt;br /&gt;
* the menus, splash screens, startup tips and the text shown when the &amp;lt;code&amp;gt;--help&amp;lt;/code&amp;gt; command-line option is used (FlightGear 2.7.0 and later)&lt;br /&gt;
* the shortcut file on Linux systems (FlightGear 2017.1 and later)&lt;br /&gt;
* the man pages (FlightGear 2017.3 and later)&lt;br /&gt;
* the built-in launcher (FlightGear 2018.3 and later)&lt;br /&gt;
&lt;br /&gt;
== How to translate ==&lt;br /&gt;
# Determine the two letter ISO 639-1 language code for the language you want to translate FlightGear to. A list can be found on the [https://www.loc.gov/standards/iso639-2/php/code_list.php Library of Congress Web site].&lt;br /&gt;
# Check whether your language already has a subdirectory below [https://gitlab.com/flightgear/fgdata/-/tree/next/Translations?ref_type=heads the Translations directory]. If it does not, ask on the development mailing for the empty translation files to be created for you. (It's better to do this than copying an existing translation, because of data that will be accidentally included otherwise)&lt;br /&gt;
# Open the .XLF files in the subdirectory of your language and translate the English strings in them. You can edit the .XLF files in a text editor (such as Notepad++ or GEdit) but you can also use translation tools such as Qt Linguist or any XLIFF editor. Using a structured tool is recommended because it can track the translation state (flagging untranslated strings) and most tools include helpers to partially automate the translation process. &lt;br /&gt;
# Start FlightGear to test your translation. By default, the simulator will select the locale of your operating system as the language to use; you can explicitly select a language using the command-line option &amp;lt;code&amp;gt;--language=&amp;lt;i&amp;gt;language code&amp;lt;/i&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Submit your updated .XLF files for inclusion via the development mailing list or a GitLab merge request&lt;br /&gt;
&lt;br /&gt;
There are two XLF files in each language subdirectory : one for the core simulator strings (startup messages, command line arg help, hints) and one for the launcher. &lt;br /&gt;
&lt;br /&gt;
Note that the user interface might have not full Unicode support (some special/accented characters might not be shown): should you encounter such a location, please write to the flightgear-devel mailing list at {{Mailing list e-mail address|flightgear-devel}}.&lt;br /&gt;
&lt;br /&gt;
== How to translate the shortcut file ==&lt;br /&gt;
Open [{{flightgear url|path=package/org.flightgear.FlightGear.desktop}} the FlightGear &amp;lt;code&amp;gt;.desktop&amp;lt;/code&amp;gt; file] and translate the ''GenericName'', ''Comment'' and ''Keywords'' keys (add the ''GenericName[xx]'', ''Comment[xx]'' and ''Keywords[xx]'' keys, where ''xx'' is the two letter ISO 639-1 code of the language).&lt;br /&gt;
&lt;br /&gt;
== How to translate the man pages ==&lt;br /&gt;
# Determine the two letter ISO 639-1 language code for the language you want to translate the man pages to.&lt;br /&gt;
# Check whether your language already has a subdirectory below [{{flightgear url|path=man}} the man pages directory]. If it does not, create an empty directory in it named after the language code, then copy &amp;lt;code&amp;gt;man1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;man5&amp;lt;/code&amp;gt; from the man pages directory to the directory of your language.&lt;br /&gt;
# Edit [{{flightgear url|path=man/CMakeLists.txt}} man/CMakeLists.txt] and add the instruction &amp;lt;code&amp;gt;add_subdirectory(xx)&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;if(NOT WIN32)&amp;lt;/code&amp;gt; block (where ''xx'' is the language code).&lt;br /&gt;
# Edit &amp;lt;code&amp;gt;man/xx/man1/CMakeLists.txt&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;man/xx/man5/CMakeLists.txt&amp;lt;/code&amp;gt;: on the last row, set the installation directory (&amp;lt;code&amp;gt;DESTINATION&amp;lt;/code&amp;gt;), respectively, to &amp;lt;code&amp;gt;${CMAKE_INSTALL_MANDIR}/xx/man1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;${CMAKE_INSTALL_MANDIR}/xx/man5&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Open the man pages in the subdirectory of your language and translate them.&lt;br /&gt;
&lt;br /&gt;
== Using QtLinguist to translate XLF Files ==&lt;br /&gt;
&lt;br /&gt;
One can use QtLinguist (application from the QT package) to translate XLIFF files. Install QT package from the Qt home page (https://www.qt.io/download). Opening QtLinguist will show default translation environment. Open XLF file and start translating. The interface is divided into four main sections:&lt;br /&gt;
&lt;br /&gt;
* Context - this is a grouping of the strings to translate. Defined by the developer. Icon beside the group show translation status. Everything should be in the end with the green check sign.&lt;br /&gt;
* Strings - strings in the selected group. Select string to translate it&lt;br /&gt;
* Sources and Forms - additional information about location of the translated string in the source code (not always visible and with correct information)&lt;br /&gt;
* Source text - the main place where translation occurs. Translate here selected strings.&lt;br /&gt;
&lt;br /&gt;
One have to translate the original strings into the target language. Icon beside the original text in the 'Strings' section will show status. Green check mark when everything is correct. Yellow question mark, when the translation is in place but it it not marked as &amp;quot;verified&amp;quot;. Untranslated strings are marked with the grey question mark. Sometimes QtLinguist displays exclamation mark - this shows that the translated text does not conform to the original text e.g. original text ends with the punctuation but the translated text not. Buttons (and keyboard shortcuts) on the main toolbar area helps with the strings matching. When the text is translated and you're comfortable with the style/meaning etc. you select green check mark button. It marks the translation as translated-verified. So this is the expected end state for this.&lt;br /&gt;
&lt;br /&gt;
[[File:Qt Linquist.png|700px|frameless]]&lt;br /&gt;
&lt;br /&gt;
Reference:&lt;br /&gt;
* [https://doc.qt.io/qt-5/qtlinguist-index.html Qt Linguist manual]&lt;br /&gt;
* [https://doc.qt.io/qt-5/linguist-translators.html Qt Linguist for translators guide] &lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
* [[Howto: Translate FlightGear Launch Control‎‎]]&lt;br /&gt;
* [[Translation requests]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Howto|Translate FlightGear]]&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=FGAddon&amp;diff=143432</id>
		<title>FGAddon</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=FGAddon&amp;diff=143432"/>
		<updated>2026-01-08T13:36:43Z</updated>

		<summary type="html">&lt;p&gt;Rominet: /* Command line */ Update releases to something more current&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:FGAddon logo.png|270px|right]]&lt;br /&gt;
&lt;br /&gt;
The official '''FGAddon''' [[aircraft]] hangar is a version control repository, hosted on [[FlightGear|FlightGear's]] [[SourceForge]] infrastructure, and used for the day-to-day development of FlightGear aircraft.  FGAddon is an {{wikipedia|Apache Subversion}} version control repository.  These are aircraft that are not part of the base package (the aircraft that are included in the base package — the [[Cessna 172P]] and the [[UFO]] — are kept in the [[FGData]] repository), but are tagged with each stable release.&lt;br /&gt;
&lt;br /&gt;
The FGAddon aircraft development repository should be considered unstable.  When using a stable FlightGear release, it is best to obtain aircraft directly in the launcher.  However, as stable releases from FlightGear version 3.4 onwards are tagged and present within the FGAddon repository, the Subversion tools can be a convenient way to obtain individual aircraft or the entire official hangar of approximately 500 aircraft.  Also, if using the [[FlightGear build server|lastest nightly releases]] or a [[Building FlightGear|self-compiled version of FlightGear]] from FlightGear's [https://gitlab.com/flightgear Git version control repositories], using FGAddon allows the aircraft to be updated to the latest development versions.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
[[File:Image103.gif|thumb|Original Win95 icon]]&lt;br /&gt;
&lt;br /&gt;
The FlightGear project was conceived on April 8, 1996 by David Murr who proposed a new flight simulator to be developed by volunteers&amp;lt;ref&amp;gt;David Murr (Apr 9, 1996).  FlightGear proposal 1.0: [https://groups.google.com/forum/#!msg/rec.aviation.simulators/ny8HFBE5_T8/OdtIiGNGJc8J &amp;quot;A PROPOSAL FOR A NEW FLIGHT SIMULATOR - home built!@&amp;quot;].  Published on the rec.aviation.simulators newsgroup.&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;David Murr (1996).  FlightGear proposal 2.0: [http://www.flightgear.org/proposal-2.0 FLIGHT GEAR &amp;quot;This truly is as real as it gets!&amp;quot; - a proposal for a new flight simulator - REVISION 2.0].&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;David Murr (Oct 29, 1996).  FlightGear proposal 3.0: [http://www.flightgear.org/proposal-3.0 FLIGHT GEAR FLIGHT SIMULATOR, revision 3.0 - Wednesday, 10.30.96, &amp;quot;The future of flight simulation is here&amp;quot;].  Published on the [http://ftp.igh.cnrs.fr/pub/flightgear/www/old-stuff/flight-gear.9610 flight-gear@infoplane.com mailing list].&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;David Murr (Sep 11, 1998).  FlightGear proposal 3.0.1: [http://www.flightgear.org/proposal-3.0.1 FLIGHT GEAR FLIGHT SIMULATOR, revision 3.0.1 - Friday, Sep.11.98, &amp;quot;The future of flight simulation is here&amp;quot;].&amp;lt;/ref&amp;gt;.  Part of the initial goals were to develop 2D and 3D graphics routines for the simulator.  However this was a huge task that came to an unfinished halt at the start of 1997 as the main developer,  Eric Korpela, was finishing his thesis.  Therefore starting on May 16, 1997, Curtis Olson relaunched development with a new project based on the OpenGL libraries, allowing a functional flight simulator to be put together in a short period of time&amp;lt;ref&amp;gt;Curtis Olson (Sep 28, 2015).  [http://forum.flightgear.org/viewtopic.php?f=42&amp;amp;t=27558&amp;amp;p=259048#p259021 Re: A PROPOSAL FOR A NEW FLIGHT SIMULATOR - home built!@].  Published on the FlightGear forum.&amp;lt;/ref&amp;gt;.  The first commits were to the original [[FlightGear CVS|flightgear and simgear CVS version control repositories]].&lt;br /&gt;
&lt;br /&gt;
As the project grew, so did the size, quantity, and quality of the FlightGear assets.  These assets were not organised and were scattered across different parts of the internet.  Therefore it was decided that much of this FlightGear content would be assembled and stored together in a new centralised CVS repository called fgdata, which was created on October 22, 2000.  To allow for the legal redistribution of these assets as part of the FlightGear distribution, a GPLv2 only policy was adopted.&lt;br /&gt;
&lt;br /&gt;
In May 2010, development was interrupted by the infamous ''&amp;quot;coffee incident&amp;quot;'' which resulted in the loss of Curtis' home server hosting all of the FlightGear repositories&amp;lt;ref&amp;gt;James Turner (May 20, 2010). [http://thread.gmane.org/gmane.games.flightgear.devel/60340/focus=60341 &amp;lt;nowiki&amp;gt;[Flightgear-devel]&amp;lt;/nowiki&amp;gt; Re: Flightgear git repositories (was Re: GIT or CVS - Confusion)] Published on the flightgear-devel mailing list.&amp;lt;/ref&amp;gt;.  These events resulted in a [[FlightGear CVS|mass migration of all the CVS repositories to Git repositories]].  Due to bandwidth issues, it was decided that the new repositories would be hosted on the Gitorious open source infrastructure.&lt;br /&gt;
&lt;br /&gt;
With time as the project grew, the size and scope of the fgdata repository mushroomed, mainly due to the growing number of aircraft stored in [[$FG_ROOT]]/Aircraft, so that a split was inevitable.  A first splitting attempt was organised by Gijs de Rooy and announced on October 18, 2011&amp;lt;ref&amp;gt;Cedric Sodhi (Oct 18, 2011) [http://thread.gmane.org/gmane.games.flightgear.devel/66846 &amp;lt;nowiki&amp;gt;[Flightgear-devel]&amp;lt;/nowiki&amp;gt; FGData Split Completed - a.k.a Life after the Split] Published on the flightgear-devel mailing list.&amp;lt;/ref&amp;gt;.  Each aircraft was placed in its own Git repository and all aircraft linked back to fgdata using a Git submodule approach.  However this attempt failed and was abandoned.  From this date until the end of 2014, the design of the fgdata split was discussed on the development mailing list and summarised in the [[FlightGear Git: splitting fgdata]] wiki article.  In the planning stages, the repositories were known as fgdata-old splitting into [[FGData]] (a.k.a. fgdata-new) and FGAddon (a.k.a. flightgear-aircraft and fgaircraft).  After half a decade of planning, it was decided that the best solution for FlightGear aircraft development would be a single centralized Subversion repository.  This would facilitate community management and maintenance of the aircraft while at the same time providing modularity and smaller downloads and smaller local repository sizes.&lt;br /&gt;
&lt;br /&gt;
In late 2014, Gitorious, the provider of the open source infrastructure for the FlightGear source code and data repositories announced that it would shut its services down by May 2015 due to its acquisition by GitLab.  This catalysed the split of fgdata-old and a switch to the SourceForge open source infrastructure for the hosting of the VC repositories.  Other parts of the FlightGear infrastructure were already hosted by SourceForge, making the move a natural one.  Sealing the deal, SourceForge agreed in writing to host the huge FlightGear aircraft collection, the size of which is unrivaled in open source circles.  Today, the FGAddon SVN repository is hosted on SourceForge.&lt;br /&gt;
&lt;br /&gt;
In August 2015, a new FlightGear policy document was written to codify the unwritten standards of the project&amp;lt;ref&amp;gt;[http://www.flightgear.org/flightgear-policy-document/ FlightGear Policy Document and Roadmap], draft document.&amp;lt;/ref&amp;gt;.  With this document, the licensing policy for the FlightGear aircraft hosted on FGAddon has been updated from being GPLv2-only to now being GPLv2+. To combat licence proliferation, avoid complications using work from one aircraft in another, and for the integrity and good of the FlightGear project, it is strongly recommended that all original content (whether hosted in FGAddon or elsewhere) be GPLv2+ licensed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= The short summary is that we already were maintaining a well established presence on sourceforge. So after quite a bit of discussion, we decided to consolidate there. In addition, we had a perpetual complaint that the fgdata git repository was far too big for most people to initially download (1Gb+). Thus we split off most of the aircraft (expecting unbounded future growth potential) into an svn repository called fgaddon. Sourceforge supports both git and svn repositories. This puts a dependency on a central svn server for our fgaddon aircraft repository, but lightens the weight for anyone wanting to checkout a copy of everything (you don't need a copy of the entire development history, and a copy of every version ever created of every aircraft if you just want to have the latest versions.) Plus svn allows checking out subtrees (without needing the whole repository) so this can also serve as a potential JIT single aircraft service provider. Of course there are always multiple ways to solve every problem and of course every engineering decision has trade offs. Github is a nice provider, no doubt. I have been using them for a number of my own personal repositories. Git of course has ways to address many of the issues we have addressed, but of course everything has strengths and weaknesses.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://sourceforge.net/p/flightgear/mailman/message/35054405/&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: [Flightgear-devel] FlightGear and GitHub&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;Curtis Olson&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Apr 30th, 2016&lt;br /&gt;
  | added   = Apr 30th, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Obtaining aircraft ==&lt;br /&gt;
&lt;br /&gt;
{{tip|If you are interested in obtaining aircraft for stable FlightGear releases and you are unaware of what version control is, you should visit the [[FlightGear_hangars|FlightGear hangars]] for downloading aircraft.}}&lt;br /&gt;
{{caution|If the FlightGear and FGAddon aircraft versions do not match, strange bugs should be expected and the version-mismatch combination will not be supported by the FlightGear community.}}&lt;br /&gt;
&lt;br /&gt;
With access to the Subversion (SVN) tools, the FGAddon version control repository can be a convenient way for obtaining aircraft for using within a specific FlightGear version directly from the official source.  When using the [[FlightGear Build Server|nightly builds]] or a [[Building FlightGear|version controlled copy of FlightGear]], the most up to date in-development versions of the aircraft should be used so the versions match.  The following describes how to use the official repository to obtain aircraft from the perspective of a FlightGear user.&lt;br /&gt;
&lt;br /&gt;
=== Preparation ===&lt;br /&gt;
To use the FGAddon repository, the Subversion tools need to be installed:&lt;br /&gt;
* '''MS Windows''': Install one of the [https://subversion.apache.org/packages.html#windows many Subversion clients].  For example [https://sliksvn.com/download/ SlikSVN] is one of the best command line versions and the best for aircraft development, and [http://tortoisesvn.net/ TortoiseSVN] provides a user friendly graphical user interface (GUI) by integrating into Windows Explorer.&lt;br /&gt;
* '''Mac OS X''': Install the [https://subversion.apache.org/packages.html#osx official Subversion client].&lt;br /&gt;
* '''GNU/Linux''': Install the Subversion client via the package manager.  This will usually be in a package called &amp;lt;code&amp;gt;subversion-*.{rpm,deb}&amp;lt;/code&amp;gt;.&lt;br /&gt;
** This command should work for the Raspberry Pi platform: &amp;lt;code&amp;gt;sudo apt-get install subversion&amp;lt;/code&amp;gt;. It also contains a client.&lt;br /&gt;
&lt;br /&gt;
=== FGAddon directory layout ===&lt;br /&gt;
To know how to use the FGAddon repository, an understanding of the repository directory layout is essential.&lt;br /&gt;
* &amp;lt;code&amp;gt;/trunk&amp;lt;/code&amp;gt;:  This base directory is where the in-development versions of the aircraft are located.&lt;br /&gt;
* &amp;lt;code&amp;gt;/branches/release-x.y.z/&amp;lt;/code&amp;gt;:  These directories correspond to the specific stable FlightGear releases.&lt;br /&gt;
&lt;br /&gt;
The [https://sourceforge.net/p/flightgear/fgaddon/HEAD/tree/ web interface for the FGAddon repository] allows all of the aircraft to be browsed.&lt;br /&gt;
&lt;br /&gt;
=== Download ===&lt;br /&gt;
[[File:V22Osprey.jpg|thumb|200px|Aircraft to be downloaded]]&lt;br /&gt;
Firstly, choose an aircraft to download.  The [[Bell Boeing V-22 Osprey]] will be used in this example.&lt;br /&gt;
&lt;br /&gt;
==== Command line ====&lt;br /&gt;
&lt;br /&gt;
To download the aircraft for FlightGear 2024.1, simply type:&lt;br /&gt;
{{#tag:syntaxhighlight|&lt;br /&gt;
{{fgaddon co|branch=branches/release-2024.1|path=Aircraft/V22-Osprey|post=}}&lt;br /&gt;
| lang = &amp;quot;sh&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
To obtain the in-development version, type:&lt;br /&gt;
{{#tag:syntaxhighlight|&lt;br /&gt;
{{fgaddon co|path=Aircraft/V22-Osprey|post=}}&lt;br /&gt;
| lang = &amp;quot;sh&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
If all of the ~500 aircraft from the repository are desired - beware that this will be a huge download of over 6 GB - use the following command:&lt;br /&gt;
{{#tag:syntaxhighlight|&lt;br /&gt;
{{fgaddon co|post=flightgear-fgaddon}}&lt;br /&gt;
| lang = &amp;quot;sh&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
When using a stable FlightGear release, for example FlightGear 2020.3, to obtain all of the FGAddon aircraft to match the installed FlightGear version, use:&lt;br /&gt;
{{#tag:syntaxhighlight|&lt;br /&gt;
{{fgaddon co|branch=branches/release-2020.3|post=flightgear-fgaddon}}&lt;br /&gt;
| lang = &amp;quot;sh&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== GUI clients and TortoiseSVN ====&lt;br /&gt;
&lt;br /&gt;
When using one of the Subversion GUIs (graphical user interfaces), simply copy one of the above &amp;lt;code&amp;gt;https://&amp;lt;/code&amp;gt; URLs and use that in the GUI (each GUI is different, so see the relevant documentation for help).  For the unique TortoiseSVN tool, simply:&lt;br /&gt;
&lt;br /&gt;
* In Windows Explorer, create a new empty folder for the aircraft (or aircraft collection).&lt;br /&gt;
* In the new folder, right click and select &amp;lt;code&amp;gt;SVN Checkout...&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Copy and paste the URL, for example {{fgaddon source|path=Aircraft/V22-Osprey|type=svn|full=1}}, leave all other settings as they are, and import by clicking on &amp;lt;code&amp;gt;OK&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For more details, see the [http://tortoisesvn.net/support.html TortoiseSVN documentation].  Note that there is an option to install the command line tools when installing TortoiseSVN.&lt;br /&gt;
&lt;br /&gt;
=== Flying ===&lt;br /&gt;
&lt;br /&gt;
To use the newly downloaded aircraft, please see the [[Howto:Install aircraft]] article, skipping the instructions for downloading and unzipping the aircraft.&lt;br /&gt;
&lt;br /&gt;
=== Updates ===&lt;br /&gt;
With a checked out copy of the &amp;lt;code&amp;gt;/trunk&amp;lt;/code&amp;gt; in-development version, the aircraft can be updated to the latest version using the command:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn up&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Aircraft development ==&lt;br /&gt;
&lt;br /&gt;
{{tip|The FlightGear community encourages aircraft development directly within FGAddon.}}&lt;br /&gt;
&lt;br /&gt;
=== Contact the original aircraft authors ===&lt;br /&gt;
&lt;br /&gt;
The first step for developing and advancing the aircraft of the official FlightGear hangar, or from one of the [[Flightgear_hangars#Aircraft_hangars|private hangars]] for that matter, is to make contact with the original aircraft author(s).  Their names can be found within the &amp;lt;code&amp;gt;*-set.xml&amp;lt;/code&amp;gt; file, within the &amp;lt;code&amp;gt;&amp;lt;authors&amp;gt;&amp;lt;/code&amp;gt; XML tag.  Often the contact email address will be listed in a README file or some other text file in the base aircraft directory.  If not, contact can sometimes be established via the [https://lists.sourceforge.net/lists/listinfo/flightgear-devel FlightGear development mailing list].  Contacting the original authors is important to see if the aircraft is currently being actively developed, and if you can join in as part of the development team.&lt;br /&gt;
&lt;br /&gt;
=== SourceForge account ===&lt;br /&gt;
&lt;br /&gt;
To work on the official aircraft collection, a [https://sourceforge.net/user/registration/ SourceForge account] should first be set up.  This will allow to either directly commit to the FGAddon repository, if commit access has been been granted, or to work in as part of a SourceForge development team.  The registration process is lightning quick and the SourceForge developer infrastructure and developer services will be accessible in under a minute.&lt;br /&gt;
&lt;br /&gt;
=== Commit access ===&lt;br /&gt;
&lt;br /&gt;
Before obtaining commit access, an all-out effort to contact the original author(s) should be made to determine if the aircraft is actively being developed.  If this is unsuccessful, sign up for the [https://lists.sourceforge.net/lists/listinfo/flightgear-devel FlightGear development mailing list] and ask for help there.  If the aircraft has a current maintainer, you will be directed as to how to proceed with development.  Otherwise ask if someone could volunteer to mentor you in the process of becoming an aircraft developer with full commit access.&lt;br /&gt;
&lt;br /&gt;
To obtain commit access, you will first need:&lt;br /&gt;
# To demonstrate your capabilities and development skills.&lt;br /&gt;
# To show that you understand the [http://www.flightgear.org/flightgear-policy-document/ FlightGear policy document]. &lt;br /&gt;
# To show an understanding of the GPL licensing issues, and that you can be trusted not to use copyrighted, non-GPL material.&lt;br /&gt;
# To earn the trust of the FlightGear community.&lt;br /&gt;
&lt;br /&gt;
These easy to jump over hurdles are simply designed to protect against repository corruption or pollution of the repository with illegal content.&lt;br /&gt;
&lt;br /&gt;
To have your changes committed into the FGAddon repository, you should discuss and coordinate with the original aircraft author, or your mentor, for the best way to proceed.  Depending on the [[#Development_scenarios|development scenario]], this maybe by merge request, file transfer, the primitive patch system, or any other convenient way.  Once you believe you have proven your capabilities and you are knowledgeable about GPL licensing issues, you should write a mail to the development mailing list asking if you can be granted commit access, providing your SourceForge username.&lt;br /&gt;
&lt;br /&gt;
=== FGAddon commitlog mailing list ===&lt;br /&gt;
&lt;br /&gt;
To follow all changes which occur in the FGAddon repository, subscribe to the dedicated [https://lists.sourceforge.net/lists/listinfo/flightgear-fgaddon-commitlogs Flightgear FGAddon commitlogs mailing list].  One email is sent per commit, as the commit is made.&lt;br /&gt;
&lt;br /&gt;
== Version control tools ==&lt;br /&gt;
&lt;br /&gt;
To access FGAddon and use it for aircraft development, the Subversion or SVN version control tools are needed.  Alternatively git-svn provides an interface for those who prefer the git version control tools.&lt;br /&gt;
&lt;br /&gt;
=== Subversion ===&lt;br /&gt;
&lt;br /&gt;
==== Set up ====&lt;br /&gt;
The FGAddon aircraft hangar is stored in a remote Subversion repository located on the SourceForge infrastructure, and therefore it is simplest to use the SVN tools for aircraft development and will cause the least problems.  See the [[#Preparation|Subversion installation section]] for setting up the tool chain.&lt;br /&gt;
&lt;br /&gt;
==== Repository checkout ====&lt;br /&gt;
The first step is to 'checkout' a copy of either the repository trunk or one of the aircraft in the trunk:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co &amp;lt;url&amp;gt; &amp;lt;dir&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the relevant URL to use, you must chose one of the [[#Development_scenarios|development scenarios]] and find the URL in that section.  This command will create a local subversion repository copy in the given &amp;lt;code&amp;gt;&amp;lt;dir&amp;gt;&amp;lt;/code&amp;gt; directory.  Note that this will only contain the part of the FGAddon repository specified in the URL.  This means that Subversion allows you to checkout either a single file all the way to the entire remote repository.&lt;br /&gt;
&lt;br /&gt;
==== Information and history ====&lt;br /&gt;
At any point to see information about the local repository, type:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn info&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see the history of the checked out copy of the repository, type one of:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn log&lt;br /&gt;
svn log | less&lt;br /&gt;
svn log -v | less&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Daily usage ====&lt;br /&gt;
The main Subversion command you will be using is:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn add &amp;lt;path&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will register the file or directory &amp;lt;code&amp;gt;&amp;lt;path&amp;gt;&amp;lt;/code&amp;gt; within the local repository to allow it to later be 'committed' and sent to the remote repository.  To move or rename a file or directory, use:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn mv &amp;lt;path1&amp;gt; &amp;lt;path2&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This should be used rather than normal file moving/renaming so that the change is tracked in the local repository.  To remove a file from the local repository, type:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn rm &amp;lt;path&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see the current status of the local repository, type:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn st&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To update the local repository with changes in the remote repository, type:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn up&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Committing changes ====&lt;br /&gt;
All of the above operations only occur on the local repository copy - the remote FGAddon repository at SourceForge will know nothing of these changes.  To send all your changes to FGAddon, you need to commit the changes:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn ci&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will open up an editor to allow you to write an informative commit log message.  When committing, it is best to make small modular commits so that each commit corresponds to a single purpose.  Note that you can only commit to FGAddon if you have [[#Commit access|commit access]].&lt;br /&gt;
&lt;br /&gt;
==== Branching ====&lt;br /&gt;
The concept of Subversion branching is currently only used in the FlightGear project for tagging the stable releases.  However if you are curious about branching, see the [http://svnbook.red-bean.com/en/1.7/svn.branchmerge.html Branching and Merging chapter of the Subversion manual], and the [https://www.orcaware.com/svn/wiki/Svnmerge.py svnmerge.py script] which can greatly simplify the process.&lt;br /&gt;
&lt;br /&gt;
=== Git-svn ===&lt;br /&gt;
&lt;br /&gt;
The git-svn tool is useful for those who are already familiar with using git repositories, or those who wish to have their own private aircraft development playground.  Git-svn provides a bridge between the remote FGAddon Subversion repository and a local git repository.  For those unfamiliar with git, the git-svn bridge together with the git repository is far more complicated to use than the native [[#Subversion|Subversion tools]].  For more information on using git, see [[Howto:Start using git]]. The following will assume that only a single aircraft will be stored in the local git repository.&lt;br /&gt;
&lt;br /&gt;
==== Set up ====&lt;br /&gt;
The git distributed version control system needs to first be [https://git-scm.com/downloads installed].&lt;br /&gt;
&lt;br /&gt;
==== Cloning a single aircraft ====&lt;br /&gt;
The first step is to 'clone' a copy of one of the aircraft in the remote Subversion trunk:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git svn clone &amp;lt;aircraft_url&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the relevant aircraft URL to use, you must chose one of the [[#Development_scenarios|development scenarios]] and find the URL in that section.  The URL depends on your [[#Commit access|FGAddon commit access status]].  The clone command will create a local git repository containing solely the aircraft of interest, and initialise the git-svn bridge.&lt;br /&gt;
&lt;br /&gt;
==== Information and history ====&lt;br /&gt;
At any point to see information about the local repository, type:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git svn info&lt;br /&gt;
git branch -vva&lt;br /&gt;
git remote -v&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see the history of the checked out copy of the repository, type:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git log&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Daily usage ====&lt;br /&gt;
The main git command you will be using is:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git add &amp;lt;path&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will register the file or directory &amp;lt;code&amp;gt;&amp;lt;path&amp;gt;&amp;lt;/code&amp;gt; within the local repository to allow it to later be 'committed' to the local git repository.  To move or rename a file or directory, use:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git mv &amp;lt;path1&amp;gt; &amp;lt;path2&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However note that git history is not as robust as svn history.  See the [[#Moving_or_renaming_files|git-svn file moving/renaming deficiency section]] for how to better perform this operation.  To remove a file from the local repository, type:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git rm &amp;lt;path&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see the current status of the local repository, type:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git status&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Committing changes ====&lt;br /&gt;
As git is a distributed version control system, changes are committed to the local git repository.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git commit&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will open up an editor to allow you to write an informative commit log message.  The commit is local and will not be sent to FGAddon.&lt;br /&gt;
&lt;br /&gt;
==== Dedicated FGAddon branch ====&lt;br /&gt;
In the examples above, only a single branch was assumed in the repository.  If interaction with a remote git repository or branching within the local git repository is desired, then a different strategy is required.  The reason being that the branch that synchronises with FGAddon must [https://git-scm.com/book/en/v1/Git-and-Other-Systems-Git-and-Subversion#git-svn preserve a linear history].  This means only cherry-picking of the desired changes into that branch is allowed.&lt;br /&gt;
&lt;br /&gt;
In this example, two branches will be set up in the local git repository:&lt;br /&gt;
* &amp;lt;code&amp;gt;fgaddon&amp;lt;/code&amp;gt;:  This branch will be dedicated for FGAddon synchronisation and will preserve a linear history.&lt;br /&gt;
* &amp;lt;code&amp;gt;master&amp;lt;/code&amp;gt;:  A master branch for aircraft development, allowing for mergers and other non-linear history operations.&lt;br /&gt;
&lt;br /&gt;
Assuming a [[#Cloning_a_single_aircraft|newly cloned repository]], create the &amp;lt;code&amp;gt;fgaddon&amp;lt;/code&amp;gt; branch with:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git branch fgaddon&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And switch to that branch:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git checkout fgaddon&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The FGAddon synchronisation can then be performed on this branch.  To pull in the developments from the master branch, use cherry-picking to apply a sequentially ordered list of commit hashes:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git cherry-pick &amp;lt;commit hash 1&amp;gt;&lt;br /&gt;
git cherry-pick &amp;lt;commit hash 2&amp;gt;&lt;br /&gt;
git cherry-pick &amp;lt;commit hash 3&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see the list of commits to be sent to FGAddon prior to dcommitting, type:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git log git-svn..HEAD&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And to see the changes as a single diff:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git diff git-svn..HEAD&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Synchronising ====&lt;br /&gt;
To send the changes to the remote FGAddon repository, firstly change to the dedicated &amp;lt;code&amp;gt;fgaddon&amp;lt;/code&amp;gt; branch:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git checkout fgaddon&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure the local git-svn repository is up to date with all changes that have occurred in FGAddon:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git svn rebase&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then push or dcommit the changes to FGAddon with:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git svn dcommit&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Deficiencies of git-svn ===&lt;br /&gt;
&lt;br /&gt;
{{warning|Performing a &amp;lt;code&amp;gt;git-svn clone&amp;lt;/code&amp;gt; of the &amp;lt;code&amp;gt;/trunk/&amp;lt;/code&amp;gt; or entire repository is not recommended, as the entire repository history will be downloaded, resulting in a huge local repository, as well as putting a large strain on the FlightGear open source infrastructure.}}&lt;br /&gt;
&lt;br /&gt;
It is important to understand that there are a number of operations in which git-svn is deficient.  In many cases, the svn tools should be used instead.&lt;br /&gt;
&lt;br /&gt;
==== Copying files between aircraft ====&lt;br /&gt;
&lt;br /&gt;
{{caution|Git-svn does not maintain the file copying history normally present in a Subversion repository.}}&lt;br /&gt;
&lt;br /&gt;
The most important of these is the copying of content from other FGAddon aircraft.  In this case you will need FGAddon commit access and a local svn copy of the repository.  Firstly synchronise the repositories by dcommitting all changes back to FGAddon:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git svn dcommit&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then in the local svn repository, copy the file:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn cp Aircraft/&amp;lt;aircraft1&amp;gt;/&amp;lt;file_path1&amp;gt; Aircraft/&amp;lt;aircraft2&amp;gt;/&amp;lt;file_path2&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And commit the change:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn ci&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Back in the local git-svn repository, pull in the new files:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git svn rebase&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the subversion tools avoids the FGAddon repository backend from significantly increasing in size, as [http://svnbook.red-bean.com/en/1.7/svn.branchmerge.using.html#svn.branchmerge.using.create svn copies are cheap].&lt;br /&gt;
&lt;br /&gt;
==== Moving or renaming files ====&lt;br /&gt;
&lt;br /&gt;
{{caution|Git-svn does not always maintain the file moving or renaming history normally present in a Subversion repository.}}&lt;br /&gt;
&lt;br /&gt;
This problem stems from the fact that svn history is more robust than that of git.  The &amp;lt;code&amp;gt;svn mv&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;git mv&amp;lt;/code&amp;gt; commands are not equivalent.  The subversion command stores the move history directly in the repository whereas git does not (git instead uses heuristic methods to try to detect history, after the commit).  The result of using git-svn is that often the move will not be detected and the FGAddon history will show one file or directory being deleted and another added.  This also causes the repository backend to increase in size, whereas &amp;lt;code&amp;gt;svn mv&amp;lt;/code&amp;gt; will not cause any significant size increase.  If you wish to have a better historical record in the FGAddon repository and be considerate to the repository backend, it is recommended that you temporarily switch to the subversion tools.  Firstly, synchronise the repositories:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git svn dcommit&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then in the local svn repository, move or rename the file:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn mv Aircraft/&amp;lt;aircraft&amp;gt;/&amp;lt;file_path1&amp;gt; Aircraft/&amp;lt;aircraft&amp;gt;/&amp;lt;file_path2&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And commit the change:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn ci&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Back in the local git-svn repository, pull in the changes with:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git svn rebase&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Copying files within one aircraft ====&lt;br /&gt;
&lt;br /&gt;
Just as the &amp;lt;code&amp;gt;svn mv&amp;lt;/code&amp;gt; command stores the move information directly within the repository, so does &amp;lt;code&amp;gt;svn cp&amp;lt;/code&amp;gt; store the copy information.  Therefore if you would like to duplicate a text file and modify it, using the native Subversion tools instead of git-svn for this operation allows for the file history to be permanently preserved in the FGAddon repository.&lt;br /&gt;
&lt;br /&gt;
==== Subversion properties ====&lt;br /&gt;
&lt;br /&gt;
{{caution|Git-svn currently only supports the &amp;lt;code&amp;gt;svn:executable&amp;lt;/code&amp;gt; property, all other properties are ignored and cannot be added, changed, or removed in a git-svn clone of the aircraft.}}&lt;br /&gt;
&lt;br /&gt;
Internally, Subversion identifies binary files using the &amp;lt;code&amp;gt;svn:mime-type&amp;lt;/code&amp;gt; repository property.  However as git-svn cannot set this property when using the &amp;lt;code&amp;gt;git add&amp;lt;/code&amp;gt; command, the result is that binary files will be treated as text.  Binary diffs will be seen when using &amp;lt;code&amp;gt;svn diff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;git diff&amp;lt;/code&amp;gt;, and a binary diff will be shown in the [[#FGAddon commitlog mailing list|FGAddon commitlog mailing list]] messages.  As this issue is not unique to git-svn, to work around this issue please see the [[#Binary diffs|binary diffs]] section.&lt;br /&gt;
&lt;br /&gt;
==== Protocols other than svn+ssh ====&lt;br /&gt;
&lt;br /&gt;
The command &amp;lt;code&amp;gt;git svn init&amp;lt;/code&amp;gt; replicates the entire history of an aircraft into a local repository.  As part of this process, it generates a git commit ID or hash for every Subversion revision. The problem is that the git commit ID depends on the protocol used to read from the Subversion repository (likely a git bug).   Hence:&lt;br /&gt;
&lt;br /&gt;
{{#tag:syntaxhighlight|&lt;br /&gt;
{{fgaddon source|cmd=git svn init|protocol=svn+ssh|login=&amp;lt;username&amp;gt;|type=svn|path=Aircraft/&amp;lt;aircraft&amp;gt;|full=1}}&lt;br /&gt;
| lang = &amp;quot;sh&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
{{#tag:syntaxhighlight|&lt;br /&gt;
{{fgaddon source|cmd=git svn init|protocol=https|type=svn|path=Aircraft/&amp;lt;aircraft&amp;gt;|full=1}}&lt;br /&gt;
| lang = &amp;quot;sh&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
will result in two different and incompatible git repositories, even though they contain the same data. The incompatibility is not immediately apparent but it will bite later. Suppose someone with read-only access to FGAddon uses the https method, then asks a FGAddon gatekeeper to commit their changes. The gatekeeper, naturally, uses svn+ssh, as this is the only protocol granting write permissions. When the gatekeeper tries to merge the contributor's https clone into their own svn+ssh clone, git will complain that the two repositories have no history in common, and flag every change as a conflict.&lt;br /&gt;
&lt;br /&gt;
Therefore, if you are planning to make any changes to an aircraft, be sure to use svn+ssh even if you do not yet have commit permissions on FGAddon. svn+ssh does not require write permissions, it only requires a SourceForge user ID.&lt;br /&gt;
&lt;br /&gt;
== FGAddon development concepts ==&lt;br /&gt;
&lt;br /&gt;
=== New aircraft ===&lt;br /&gt;
&lt;br /&gt;
To add a new aircraft to the FGAddon repository, the SVN tools are required.  If you encounter &amp;lt;code&amp;gt;svn:mime-type&amp;lt;/code&amp;gt; property problems when adding a new aircraft, see the [[#Mime-type problems|mime-type problems section]] for how to resolve the issue.  Or if you have a &amp;lt;code&amp;gt;svn:executable&amp;lt;/code&amp;gt; property problem, see the [[#Executable flag|executable flag problem section]].&lt;br /&gt;
&lt;br /&gt;
==== svn import ====&lt;br /&gt;
&lt;br /&gt;
{{warning|The &amp;lt;code&amp;gt;svn import&amp;lt;/code&amp;gt; command described herein will send all contents of the specified directory directly into FGAddon without warning and without a way to cancel the operation.  Therefore special care must be taken when specifying the directory to upload into FGAddon, as well as the target FGAddon directory.  See the [[#svn add|svn add]] section below for a safer way to add a new aircraft.}}&lt;br /&gt;
&lt;br /&gt;
The [http://svnbook.red-bean.com/en/1.7/svn.tour.importing.html#svn.tour.importing.import svn import] command is the easiest method to use and does not require a local copy of the repository to be checked out.  To start:&lt;br /&gt;
&lt;br /&gt;
# Create an empty local aircraft directory.&lt;br /&gt;
# Copy the aircraft files into this directory.&lt;br /&gt;
# Carefully check all files to make sure there are no hidden or temporary files that should not be uploaded to FGAddon.&lt;br /&gt;
&lt;br /&gt;
Assuming the Dead Simple Human Powered Airplane (DaSH PA or &amp;quot;DaSH&amp;quot;) aircraft as an example, located in the &amp;lt;code&amp;gt;DaSH/&amp;lt;/code&amp;gt; directory, on the command line run:&lt;br /&gt;
{{#tag:syntaxhighlight|&lt;br /&gt;
{{fgaddon source&lt;br /&gt;
| cmd      = svn import DaSH/&lt;br /&gt;
| protocol = svn+ssh&lt;br /&gt;
| login    = &amp;lt;username&amp;gt;&lt;br /&gt;
| type     = svn&lt;br /&gt;
| path     = Aircraft/DaSH/&lt;br /&gt;
| post     = -m \&lt;br /&gt;
| full     = 1&lt;br /&gt;
}}&lt;br /&gt;
    &amp;quot;Initial import of the DaSH human powered aircraft.\n\nFor details see the forum thread at http://forum.flightgear.org/viewtopic.php?f=4&amp;amp;t=24495 .&amp;quot;&lt;br /&gt;
| lang = &amp;quot;sh&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;code&amp;gt;&amp;lt;username&amp;gt;&amp;lt;/code&amp;gt; is the SourceForge user name.  This will add all the files into FGAddon with commit log message with the summary line &amp;lt;code&amp;gt;Initial import of the DaSH human powered aircraft.&amp;lt;/code&amp;gt;, followed by a blank line, and then a detailed description pointing to the original location or discussion of the aircraft.  To see if the aircraft has been successfully added to the repository:&lt;br /&gt;
{{#tag:syntaxhighlight|&lt;br /&gt;
{{fgaddon source&lt;br /&gt;
| cmd      = svn list&lt;br /&gt;
| protocol = svn+ssh&lt;br /&gt;
| login    = &amp;lt;username&amp;gt;&lt;br /&gt;
| type     = svn&lt;br /&gt;
| path     = Aircraft/DaSH/&lt;br /&gt;
| full     = 1&lt;br /&gt;
}}&lt;br /&gt;
| lang = &amp;quot;sh&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Or visit the {{fgaddon source|path=Aircraft|text=FGAddon web interface}}.  The aircraft can then be checked out as described in the [[#Development scenarios|Development scenarios section]].&lt;br /&gt;
&lt;br /&gt;
==== svn add ====&lt;br /&gt;
&lt;br /&gt;
If a local copy of the FGAddon trunk is present, then the &amp;lt;code&amp;gt;svn add&amp;lt;/code&amp;gt; command can be used instead.  This is far safer than the &amp;lt;code&amp;gt;svn import&amp;lt;/code&amp;gt; command, as the change can be double checked before committing.  In the &amp;lt;code&amp;gt;Aircraft/&amp;lt;/code&amp;gt; directory of the local repository, create the &amp;lt;code&amp;gt;DaSH/&amp;lt;/code&amp;gt; directory.  This can either be empty or contain all files of the initial aircraft.  Then on the command line, add the aircraft to the local repository:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn add DaSH/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then double check the changes prior to committing:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn st&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And send the changes to FGAddon with:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn ci&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An editor, often vi&amp;lt;ref&amp;gt;[http://www.vim.org/docs.php Vim documentation]&amp;lt;/ref&amp;gt;, will open and the commit message can be composed.  Alternatively the commit log message can be specified on the command line with:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn ci -m &amp;quot;&amp;lt;subject_line&amp;gt;\n\n&amp;lt;detailed_description&amp;gt;&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Commit blocking by pre-commit hooks ===&lt;br /&gt;
&lt;br /&gt;
Sometimes when committing to FGAddon, the commit will be blocked the following will be printed out:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn: E165001: Commit failed (details follow):&lt;br /&gt;
svn: E165001: Commit blocked by pre-commit hook (exit code 1) with output:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is due to the presence of two repository pre-commit hook scripts which check the quality of the commit, blocking it if a text file is set to a binary file mime-type or if the executable flag is set.  These scripts are simply to protect the repository and to keep it clean.&lt;br /&gt;
&lt;br /&gt;
==== Mime-type problems ====&lt;br /&gt;
&lt;br /&gt;
Sometimes when attempting to commit files to FGAddon using the SVN tools, the commit will be blocked with the following message:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Sending        dash-set.xml&lt;br /&gt;
svn: E165001: Commit failed (details follow):&lt;br /&gt;
svn: E165001: Commit blocked by pre-commit hook (exit code 1) with output:&lt;br /&gt;
&lt;br /&gt;
Aborting the commit, the svn:mime-type property is labelling the following text&lt;br /&gt;
files as binary:&lt;br /&gt;
&lt;br /&gt;
  dash-set.xml:  svn:mime-type=application/xml&lt;br /&gt;
&lt;br /&gt;
Before committing, please remove this property by typing 'svn propdel svn:mime-&lt;br /&gt;
type file_name' for all affected files.  This will allow the text files to be&lt;br /&gt;
treated as text within the FGAddon repository.&lt;br /&gt;
&lt;br /&gt;
To avoid the svn:mime-type property being incorrectly set by your subversion&lt;br /&gt;
client, the subversion configuration file at $HOME/.subversion/config or&lt;br /&gt;
%appdata%\roaming\subversion\config should be edited and a new entry added to&lt;br /&gt;
[auto-props] for each affected file type.  In most cases, the problem is with&lt;br /&gt;
XML files being labelled as &amp;quot;application/xml&amp;quot; by a library called libmagic.  To&lt;br /&gt;
override this, add the following to the svn config file:&lt;br /&gt;
&lt;br /&gt;
*.xml = svn:mime-type=text/xml&lt;br /&gt;
&lt;br /&gt;
svn: E165001: Your commit message was left in a temporary file:&lt;br /&gt;
svn: E165001:    '/flightgear/repo_testing/svn-commit.tmp'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Despite messages about adding or sending files, no change will have occurred in the FGAddon repository.  This message is created by a repository pre-commit hook script which checks if the Subversion &amp;lt;code&amp;gt;svn:mime-type&amp;lt;/code&amp;gt; property is set on a list of known text files and, if the mime-type is set to a binary format, the commit is blocked.  The reason for this block is to protect the repository.  Newer SVN clients rely on a 3rd party library known as libmagic which will detect the aircraft XML files as the binary mime-type of &amp;lt;code&amp;gt;application/xml&amp;lt;/code&amp;gt;.  The result is that the XML files are treated as binary files in the repository.  This behaviour is completely undesirable, as changes cannot be followed on the [[#FGAddon commitlog mailing list|flightgear-fgaddon-commitlogs mailing list]] or in the repository history, and the size of the commits become orders of magnitude larger.  Therefore this buggy behaviour has been blocked for the protection of the FlightGear project.  To remove the problem, follow the instructions in the message and, using the command line tools, type:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn propdel svn:mime-type &amp;lt;file_name&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Repeat this for each text file listed in the error message.  Then commit again, using the commit message saved in the &amp;lt;code&amp;gt;svn-commit.tmp&amp;lt;/code&amp;gt; file.  The message file name will be reported in the commit failure message, but check its contents first:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cat svn-commit.tmp&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reperform the commit:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn ci -F svn-commit.tmp&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Subversion config file =====&lt;br /&gt;
&lt;br /&gt;
The automatic property setting of &amp;lt;code&amp;gt;svn:mime-type&amp;lt;/code&amp;gt; can be controlled by modifying the Subversion &amp;lt;code&amp;gt;config&amp;lt;/code&amp;gt; file.  Firstly in the &amp;lt;code&amp;gt;[miscellany]&amp;lt;/code&amp;gt; section, make sure that the auto-properties are turned on:&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
enable-auto-props = yes&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then in the &amp;lt;code&amp;gt;[auto-props]&amp;lt;/code&amp;gt; section, add:&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
*.ac = svn:mime-type=text/plain&lt;br /&gt;
*.eff = svn:mime-type=text/xml&lt;br /&gt;
*.frag = svn:mime-type=text/plain&lt;br /&gt;
*.nas = svn:mime-type=text/plain&lt;br /&gt;
*.osgx = svn:mime-type=text/xml&lt;br /&gt;
*.svg = svn:mime-type=text/svg+xml&lt;br /&gt;
*.txt = svn:mime-type=text/plain&lt;br /&gt;
*.vert = svn:mime-type=text/plain&lt;br /&gt;
*.xhtml = svn:mime-type=text/xml&lt;br /&gt;
*.xml = svn:mime-type=text/xml&lt;br /&gt;
*.xsl = svn:mime-type=text/xml&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These are all the text files that the hook script will check that the mime-type is set to a text format, though new text files will likely be added in the future.  These additions can either be to the user configuration file located at &amp;lt;code&amp;gt;~/.subversion/config&amp;lt;/code&amp;gt; (or &amp;lt;code&amp;gt;%USERPROFILE%\AppData\Roaming\Subversion\config&amp;lt;/code&amp;gt; in Windows) or, if a user configuration file is not set, to the global configuration file at &amp;lt;code&amp;gt;/etc/subversion/config&amp;lt;/code&amp;gt; (or &amp;lt;code&amp;gt;%APPDATA%\Subversion\config&amp;lt;/code&amp;gt; in Windows).&lt;br /&gt;
&lt;br /&gt;
==== Executable flag ====&lt;br /&gt;
&lt;br /&gt;
Another blocking message when attempting to commit files to FGAddon using the SVN tools is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Adding         dash-set.xml&lt;br /&gt;
Transmitting file data .svn: E165001: Commit failed (details follow):&lt;br /&gt;
svn: E165001: Commit blocked by pre-commit hook (exit code 1) with output:&lt;br /&gt;
&lt;br /&gt;
The svn:executable property is set on the files ['dash-set.xml'], aborting the&lt;br /&gt;
commit.&lt;br /&gt;
&lt;br /&gt;
The current policy is that no executable files are allowed in FGAddon.  Before&lt;br /&gt;
committing, please remove this property by typing 'svn propdel svn:executable&lt;br /&gt;
file_name' for all affected files.  Or to remove it recursively from all files&lt;br /&gt;
to be committed, in your aircraft directory type 'svn propdel svn:executable&lt;br /&gt;
-R'.&lt;br /&gt;
&lt;br /&gt;
To avoid the svn:executable property being set by your subversion client, on&lt;br /&gt;
GNU/Linux and Mac OS X systems simply make sure that the file's execute bit is&lt;br /&gt;
not set before adding the file to be committed.&lt;br /&gt;
&lt;br /&gt;
svn: E165001: Your commit message was left in a temporary file:&lt;br /&gt;
svn: E165001:    '/flightgear/repo_testing/svn-commit.tmp'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will probably only be seen on Mac OS X and GNU/Linux systems.  This message is printed by a pre-commit repository hook script that checks if the Subversion &amp;lt;code&amp;gt;svn:executable&amp;lt;/code&amp;gt; property is set and, if so, the commit is blocked.  This is a security measure, as no aircraft files should be executable.  To remove the problem, follow the instructions in the message and, using the command line tools, type:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn propdel svn:executable -R&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then commit again, using the commit message saved in the &amp;lt;code&amp;gt;svn-commit.tmp&amp;lt;/code&amp;gt; file.  The message file name will be reported in the commit failure message, but check its contents first:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cat svn-commit.tmp&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the reperform the commit:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn ci -F svn-commit.tmp&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Binary diffs ===&lt;br /&gt;
&lt;br /&gt;
{{warning|The incorrect setting or absence of the mime-type property on a binary file will result in a binary diff.}}&lt;br /&gt;
&lt;br /&gt;
When looking at the output of &amp;lt;code&amp;gt;svn diff&amp;lt;/code&amp;gt; (or &amp;lt;code&amp;gt;git diff&amp;lt;/code&amp;gt; if you are using git-svn) as well as when reading messages from the [[#FGAddon commitlog mailing list|FGAddon commitlog mailing list]], you may see a large number of unrecognisable characters.  This is the result of what is known as a binary diff, showing the binary file differences as if it were text.  Although this is not a issue for the operation of the repository, the situation is an aesthetic problem which makes it more difficult to perform a review of the changes.&lt;br /&gt;
&lt;br /&gt;
To fix the problem, firstly the binary files with the &amp;lt;code&amp;gt;svn:mime-type&amp;lt;/code&amp;gt; property missing need to be identified.  The following subversion command can be used:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn propget svn:mime-type &amp;lt;file_name&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As it can be tedious checking each file individually, the following Python script simplifies and automates the process to identify all binary files with a mime-type issue:&lt;br /&gt;
&lt;br /&gt;
{{collapsible script&lt;br /&gt;
| type   = Python 2/3 script&lt;br /&gt;
| title  = Find binary files with no &amp;lt;code&amp;gt;svn:mime-type&amp;lt;/code&amp;gt; property set.&lt;br /&gt;
| intro  = The following script is based on blacklisting text files.  Hence false positives are to be expected, and the blacklists can be expanded as needed.&lt;br /&gt;
| lang   = python&lt;br /&gt;
| script =&lt;br /&gt;
#! /usr/bin/env python&lt;br /&gt;
&lt;br /&gt;
from os import getcwd, walk&lt;br /&gt;
from os.path import join, splitext&lt;br /&gt;
from re import search&lt;br /&gt;
from subprocess import PIPE, Popen&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
skip_txt_file_seg = [&lt;br /&gt;
    'authors',&lt;br /&gt;
    'copying',&lt;br /&gt;
    'licen',&lt;br /&gt;
    'readme'&lt;br /&gt;
]&lt;br /&gt;
&lt;br /&gt;
skip_txt_ext = [&lt;br /&gt;
    'ac',&lt;br /&gt;
    'css',&lt;br /&gt;
    'dat',&lt;br /&gt;
    'eff',&lt;br /&gt;
    'frag',&lt;br /&gt;
    'html',&lt;br /&gt;
    'json',&lt;br /&gt;
    'log',&lt;br /&gt;
    'nas',&lt;br /&gt;
    'osgx',&lt;br /&gt;
    'svg',&lt;br /&gt;
    'tex',&lt;br /&gt;
    'txt',&lt;br /&gt;
    'vert',&lt;br /&gt;
    'xhtml',&lt;br /&gt;
    'xml',&lt;br /&gt;
    'xsl'&lt;br /&gt;
]&lt;br /&gt;
&lt;br /&gt;
skip_bin_prop = [&lt;br /&gt;
    'application/octet-stream',&lt;br /&gt;
    'application/pdf',&lt;br /&gt;
    'application/postscript',&lt;br /&gt;
    'application/x-dosexec',&lt;br /&gt;
    'application/x-gzip',&lt;br /&gt;
    'application/zip',&lt;br /&gt;
    'audio/x-wav',&lt;br /&gt;
    'image/gif',&lt;br /&gt;
    'image/jpeg',&lt;br /&gt;
    'image/png',&lt;br /&gt;
    'image/vnd.adobe.photoshop',&lt;br /&gt;
    'image/tiff',&lt;br /&gt;
    'image/x-ms-bmp',&lt;br /&gt;
    'image/x-xcf',&lt;br /&gt;
]&lt;br /&gt;
&lt;br /&gt;
# Walk through the directories.&lt;br /&gt;
for root, dirs, files in walk(getcwd()):&lt;br /&gt;
    # Loop over the files in the current directory.&lt;br /&gt;
    for file in files:&lt;br /&gt;
        # Skip known text files.&lt;br /&gt;
        skip = False&lt;br /&gt;
        for i in range(len(skip_txt_file_seg)):&lt;br /&gt;
            if search(skip_txt_file_seg[i], file.lower()):&lt;br /&gt;
                skip = True&lt;br /&gt;
        if skip:&lt;br /&gt;
            continue&lt;br /&gt;
&lt;br /&gt;
        # The file extension.&lt;br /&gt;
        file_path, ext = splitext(file)&lt;br /&gt;
        ext = ext[1:].lower()&lt;br /&gt;
&lt;br /&gt;
        # Skip known text file extensions.&lt;br /&gt;
        if ext in skip_txt_ext:&lt;br /&gt;
            continue&lt;br /&gt;
&lt;br /&gt;
        # The full file path.&lt;br /&gt;
        path = join(root, file)&lt;br /&gt;
&lt;br /&gt;
        # Query the file for svn:mime-type.&lt;br /&gt;
        cmd = 'svn propget svn:mime-type \&amp;quot;%s\&amp;quot;' % path&lt;br /&gt;
        pipe = Popen(cmd, shell=True, stdin=PIPE, stdout=PIPE, stderr=PIPE, close_fds=False)&lt;br /&gt;
        props = []&lt;br /&gt;
        for line in pipe.stdout.readlines():&lt;br /&gt;
            props.append(line.strip())&lt;br /&gt;
&lt;br /&gt;
        # Byte array conversion (Python3).&lt;br /&gt;
        for i in range(len(props)):&lt;br /&gt;
            if hasattr(props[i], 'decode'):&lt;br /&gt;
                props[i] = props[i].decode()&lt;br /&gt;
&lt;br /&gt;
        # Skip binary svn:mime-type values.&lt;br /&gt;
        if len(props) and props[0] in skip_bin_prop:&lt;br /&gt;
            continue&lt;br /&gt;
&lt;br /&gt;
        # Printout.&lt;br /&gt;
        if not len(props):&lt;br /&gt;
            print(&amp;quot;%s&amp;quot; % path)&lt;br /&gt;
        else:&lt;br /&gt;
            print(&amp;quot;%s    svn:mime-type=%s&amp;quot; % (path, props[0]))&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== Fixing the problem ====&lt;br /&gt;
&lt;br /&gt;
As [[#Subversion_properties|git-svn cannot set or change]] the &amp;lt;code&amp;gt;svn:mime-type&amp;lt;/code&amp;gt; property, a [[#Repository_checkout|svn checkout copy]] of the aircraft is required.  The property can then be set to the default Subversion binary mime-type with:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn propset svn:mime-type &amp;quot;application/octet-stream&amp;quot; &amp;lt;file_name&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, the following set of shell commands can be used to automate the process:&lt;br /&gt;
{{collapsible script&lt;br /&gt;
| type   = Shell commands&lt;br /&gt;
| title  = Set specific &amp;lt;code&amp;gt;svn:mime-type&amp;lt;/code&amp;gt; values on a set of known binary files.&lt;br /&gt;
| intro = These shell commands will work on GNU/Linux or Mac OS X systems (or on Windows if using cygwin, or if a find command line tool is installed).  The list of file types here are those most commonly found in FGAddon.  To set the property on a list of binary files, type (or copy and paste):&lt;br /&gt;
| lang   = bash&lt;br /&gt;
| script =&lt;br /&gt;
find -iname &amp;quot;*.wav&amp;quot; -exec svn propset svn:mime-type &amp;quot;audio/x-wav&amp;quot; {} \;&lt;br /&gt;
find -iname &amp;quot;*.bmp*&amp;quot; -exec svn propset svn:mime-type &amp;quot;image/x-ms-bmp&amp;quot; {} \;&lt;br /&gt;
find -iname &amp;quot;*.gif&amp;quot; -exec svn propset svn:mime-type &amp;quot;image/gif&amp;quot; {} \;&lt;br /&gt;
find -iname &amp;quot;*.jpg&amp;quot; -exec svn propset svn:mime-type &amp;quot;image/jpeg&amp;quot; {} \;&lt;br /&gt;
find -iname &amp;quot;*.png*&amp;quot; -exec svn propset svn:mime-type &amp;quot;image/png&amp;quot; {} \;&lt;br /&gt;
find -iname &amp;quot;*.psd&amp;quot; -exec svn propset svn:mime-type &amp;quot;image/vnd.adobe.photoshop&amp;quot; {} \;&lt;br /&gt;
find -iname &amp;quot;*.tif&amp;quot; -exec svn propset svn:mime-type &amp;quot;image/tiff&amp;quot; {} \;&lt;br /&gt;
find -iname &amp;quot;*.xcf&amp;quot; -exec svn propset svn:mime-type &amp;quot;image/x-xcf&amp;quot; {} \;&lt;br /&gt;
find -iname &amp;quot;*.rgb*&amp;quot; -exec svn propset svn:mime-type &amp;quot;application/octet-stream&amp;quot; {} \;&lt;br /&gt;
find -iname &amp;quot;*.au&amp;quot; -exec svn propset svn:mime-type &amp;quot;application/octet-stream&amp;quot; {} \;&lt;br /&gt;
find -iname &amp;quot;*.*af&amp;quot; -exec svn propset svn:mime-type &amp;quot;application/octet-stream&amp;quot; {} \;&lt;br /&gt;
find -iname &amp;quot;*.3ds&amp;quot; -exec svn propset svn:mime-type &amp;quot;application/octet-stream&amp;quot; {} \;&lt;br /&gt;
find -iname &amp;quot;*.blend*&amp;quot; -exec svn propset svn:mime-type &amp;quot;application/octet-stream&amp;quot; {} \;&lt;br /&gt;
find -iname &amp;quot;*.dds&amp;quot; -exec svn propset svn:mime-type &amp;quot;application/octet-stream&amp;quot; {} \;&lt;br /&gt;
find -iname &amp;quot;*.od[gst]&amp;quot; -exec svn propset svn:mime-type &amp;quot;application/octet-stream&amp;quot; {} \;&lt;br /&gt;
find -iname &amp;quot;*.onetoc2&amp;quot; -exec svn propset svn:mime-type &amp;quot;application/octet-stream&amp;quot; {} \;&lt;br /&gt;
find -iname &amp;quot;*.xlsx&amp;quot; -exec svn propset svn:mime-type &amp;quot;application/octet-stream&amp;quot; {} \;&lt;br /&gt;
find -iname &amp;quot;*.pdf&amp;quot; -exec svn propset svn:mime-type &amp;quot;application/pdf&amp;quot; {} \;&lt;br /&gt;
find -iname &amp;quot;*.ps&amp;quot; -exec svn propset svn:mime-type &amp;quot;application/postscript&amp;quot; {} \;&lt;br /&gt;
find -iname &amp;quot;*.gz&amp;quot; -exec svn propset svn:mime-type &amp;quot;application/x-gzip&amp;quot; {} \;&lt;br /&gt;
find -iname &amp;quot;*.mdl&amp;quot; -exec svn propset svn:mime-type &amp;quot;application/x-dosexec&amp;quot; {} \;&lt;br /&gt;
find -iname &amp;quot;*.zip&amp;quot; -exec svn propset svn:mime-type &amp;quot;application/zip&amp;quot; {} \;&lt;br /&gt;
| conc = Other binary files can safely be set to &amp;lt;code&amp;gt;&amp;quot;application/octet-stream&amp;quot;&amp;lt;/code&amp;gt;, the Subversion default for binary files.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== SourceForge developer services ==&lt;br /&gt;
&lt;br /&gt;
The FlightGear project is hosted on the SourceForge open source infrastructure.  This developer services section will highlight some of the useful tools you can take advantage of.  SourceForge consists of two categories of services:&lt;br /&gt;
; Project infrastructure : The FlightGear project uses the project services of SourceForge.  These services are for standalone software projects.&lt;br /&gt;
; Developer infrastructure : These are services available to anyone with a SourceForge account, and are available via your SourceForge homepage and accessible to all.  This includes being able to create multiple version control repositories (svn, git, hg), wikis, forums, development teams, blogs, and ticket trackers (for bugs, support requests, tasks, etc.).&lt;br /&gt;
&lt;br /&gt;
Rather than creating a new project, any development for the FlightGear project should be based on the developer infrastructure.&lt;br /&gt;
&lt;br /&gt;
=== Developer git repository ===&lt;br /&gt;
&lt;br /&gt;
To set up your own remote git repository, here for developing the FGAddon fkdr1 aircraft:&lt;br /&gt;
* On your profile page at &amp;lt;span style=&amp;quot;color: blue&amp;quot;&amp;gt;&amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;https://sourceforge.net/u/&amp;lt;username&amp;gt;/profile/&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&amp;lt;/span&amp;gt;, go to &amp;lt;code&amp;gt;Admin&amp;lt;/code&amp;gt; -&amp;gt; &amp;lt;code&amp;gt;Add New&amp;lt;/code&amp;gt; -&amp;gt; &amp;lt;code&amp;gt;Git&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Set label to &amp;lt;code&amp;gt;fkdr1 FGAddon git-svn repository&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Set the code path to &amp;lt;code&amp;gt;code-fkdr1&amp;lt;/code&amp;gt;.  The &amp;lt;code&amp;gt;code-*&amp;lt;/code&amp;gt; prefix is to differentiate this from the &amp;lt;code&amp;gt;forum-*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;wiki-*&amp;lt;/code&amp;gt;, and other directories.&lt;br /&gt;
&lt;br /&gt;
The repository will be located at &amp;lt;span style=&amp;quot;color: blue&amp;quot;&amp;gt;&amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;https://sourceforge.net/u/&amp;lt;username&amp;gt;/code-fkdr1/ci/master/tree/&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Development teams ===&lt;br /&gt;
&lt;br /&gt;
If you and a group of friends would like to privately develop one of the FGAddon aircraft as a team, assuming that the you have contacted the original aircraft authors and the aircraft is not actively being developed, then you should create a SourceForge development team.  A team leader should be appointed to set this up under their SourceForge account.  Assuming you wish to develop the &amp;quot;ornithopter&amp;quot; aircraft, the steps are:&lt;br /&gt;
&lt;br /&gt;
* Go to &amp;lt;code&amp;gt;Personal tools&amp;lt;/code&amp;gt; -&amp;gt; &amp;lt;code&amp;gt;Admin&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Click on &amp;lt;code&amp;gt;User Permissions&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Click on &amp;lt;code&amp;gt;Add a new group&amp;lt;/code&amp;gt; at the bottom.&lt;br /&gt;
* Set the name to &amp;lt;code&amp;gt;ornithopter&amp;lt;/code&amp;gt;, and save.&lt;br /&gt;
* Click on &amp;lt;code&amp;gt;Add&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ornithopter&amp;lt;/code&amp;gt; group and add the SourceForge names of all your team members.&lt;br /&gt;
&lt;br /&gt;
After setting up a private repository in the team leader's account, as described below, then the development team should be set up for the repository.&lt;br /&gt;
&lt;br /&gt;
* Go to the repository under your SourceForge account.&lt;br /&gt;
* Click on &amp;lt;code&amp;gt;Admin - &amp;lt;repository name&amp;gt;&amp;lt;/code&amp;gt;, then select &amp;lt;code&amp;gt;Permissions&amp;lt;/code&amp;gt;.&lt;br /&gt;
* In the &amp;lt;code&amp;gt;Write&amp;lt;/code&amp;gt; section, remove &amp;lt;code&amp;gt;Developer&amp;lt;/code&amp;gt; and add &amp;lt;code&amp;gt;ornithopter&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Click on &amp;lt;code&amp;gt;Save&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The development team will then have commit access to the private repository.&lt;br /&gt;
&lt;br /&gt;
=== Team communications ===&lt;br /&gt;
&lt;br /&gt;
To help with team development, the SourceForge infrastructure allows for multiple [https://sourceforge.net/p/forge/documentation/Discussion/ dedicated discussion forums] to be created.  This can either be within a SourceForge project or under a SourceForge users homepage.  This allows the team leader to create a forum dedicated solely to the development of the aircraft of interest.  Continuing with the &amp;lt;code&amp;gt;ornithopter&amp;lt;/code&amp;gt; example, the steps for the team leader are simple:&lt;br /&gt;
&lt;br /&gt;
* On your profile page at &amp;lt;span style=&amp;quot;color: blue&amp;quot;&amp;gt;&amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;https://sourceforge.net/u/&amp;lt;username&amp;gt;/profile/&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&amp;lt;/span&amp;gt;, go to &amp;lt;code&amp;gt;Personal tools&amp;lt;/code&amp;gt; -&amp;gt; &amp;lt;code&amp;gt;Admin&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Click on the &amp;lt;code&amp;gt;Tools&amp;lt;/code&amp;gt; option in the left hand menu.&lt;br /&gt;
* Click on &amp;lt;code&amp;gt;Discussion&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Click to install&amp;lt;/code&amp;gt; section.&lt;br /&gt;
* Change the label to &amp;lt;code&amp;gt;Ornithopter forum&amp;lt;/code&amp;gt;, and the path to &amp;lt;code&amp;gt;forum-ornithopter&amp;lt;/code&amp;gt;, for example.  The &amp;lt;code&amp;gt;forum-*&amp;lt;/code&amp;gt; prefix is to differentiate this from the &amp;lt;code&amp;gt;code-*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;wiki-*&amp;lt;/code&amp;gt;, and other directories.&lt;br /&gt;
* Click on &amp;lt;code&amp;gt;Save&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
More details are given on the [https://sourceforge.net/p/forge/documentation/Discussion/ SourceForge Discussion documentation].&lt;br /&gt;
&lt;br /&gt;
== Development scenarios ==&lt;br /&gt;
&lt;br /&gt;
=== Individual developer ===&lt;br /&gt;
&lt;br /&gt;
{{Note|Development scenario:  You are an individual developer and will use the native Subversion tools.}}&lt;br /&gt;
&lt;br /&gt;
This is by far the simplest development scenario and should be used in most cases.  If you are using the command line Subversion client, you can checkout an individual aircraft with:&lt;br /&gt;
{{#tag:syntaxhighlight|&lt;br /&gt;
{{fgaddon co&lt;br /&gt;
| login    = &amp;lt;username&amp;gt;&lt;br /&gt;
| path     = Aircraft/wrightFlyer1903&lt;br /&gt;
| post     = &lt;br /&gt;
}}&lt;br /&gt;
| lang = &amp;quot;sh&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;code&amp;gt;&amp;lt;username&amp;gt;&amp;lt;/code&amp;gt; is your SourceForge user name.  Alternatively you can checkout all aircraft with:&lt;br /&gt;
{{#tag:syntaxhighlight|&lt;br /&gt;
{{fgaddon co&lt;br /&gt;
| login    = &amp;lt;username&amp;gt;&lt;br /&gt;
| post     = flightgear-fgaddon&lt;br /&gt;
}}&lt;br /&gt;
| lang = &amp;quot;sh&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
If you do not have commit access, type one of:&lt;br /&gt;
{{#tag:syntaxhighlight|&lt;br /&gt;
{{fgaddon co&lt;br /&gt;
| path     = Aircraft/wrightFlyer1903&lt;br /&gt;
| post     = &lt;br /&gt;
}}&lt;br /&gt;
{{fgaddon co&lt;br /&gt;
| post     = flightgear-fgaddon&lt;br /&gt;
}}&lt;br /&gt;
| lang = &amp;quot;sh&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
To use the new local svn repository, see the [[#Subversion|subversion instructions]].&lt;br /&gt;
&lt;br /&gt;
=== Individual developer (git-svn) ===&lt;br /&gt;
&lt;br /&gt;
{{Note|Development scenario:  You are an individual developer and will use the git-svn tools.}}&lt;br /&gt;
&lt;br /&gt;
This is more complicated than using the native SVN tools, but can be useful without having FGAddon commit access, as multiple local commits can be made to be sent to the original aircraft authors or to the development mailing list/forum.  To clone the aircraft of choice into a new git repository, type:&lt;br /&gt;
{{#tag:syntaxhighlight|&lt;br /&gt;
{{fgaddon source|cmd=git svn clone|protocol=svn+ssh|login=&amp;lt;username&amp;gt;|type=svn|path=Aircraft/&amp;lt;aircraft&amp;gt;|full=1}}&lt;br /&gt;
| lang = &amp;quot;sh&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;code&amp;gt;&amp;lt;username&amp;gt;&amp;lt;/code&amp;gt; is your infrastructure user name and &amp;lt;code&amp;gt;&amp;lt;aircraft&amp;gt;&amp;lt;/code&amp;gt; is the directory name in the FGAddon repository. This is valid whether or not you have commit permissions.&lt;br /&gt;
&lt;br /&gt;
To use the new local git repository, see the [[#Git-svn|git-svn instructions]] and [[#Deficiencies_of_git-svn|its deficiencies]].&lt;br /&gt;
&lt;br /&gt;
==== Upload to Sourceforge ====&lt;br /&gt;
&lt;br /&gt;
To share the local developments, the changes can be uploaded to a remote git repository on the SourceForge infrastructure.  For this, a [[#Developer_git_repository|developer git repository]] should first be set up under your SourceForge profile.  Then add this as a remote:&lt;br /&gt;
{{#tag:syntaxhighlight|&lt;br /&gt;
{{sourceforge url|cmd=git remote add|opt=origin|protocol=ssh|login=&amp;lt;username&amp;gt;|user=&amp;lt;username&amp;gt;|type=git|repo=code-&amp;lt;aircraft&amp;gt;}}&lt;br /&gt;
| lang = &amp;quot;sh&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
And send the master branch where developments are located with:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git push --set-upstream origin master&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The changes in the new repository will be visible via the web interface at {{#tag:span|{{#tag:tt|{{#tag:nowiki|{{sourceforge url|user=&amp;lt;username&amp;gt;|repo=code-&amp;lt;aircraft&amp;gt;|branch=master}}}}}}| style=&amp;quot;color: blue&amp;quot;}}.&lt;br /&gt;
&lt;br /&gt;
=== Sending external git repository changes into FGAddon ===&lt;br /&gt;
&lt;br /&gt;
{{Note|Development scenario:  You are an individual developer with FGAddon commit access and wish to transfer the commits in a remote git repository into FGAddon using a temporary local git repository.}}&lt;br /&gt;
&lt;br /&gt;
Firstly clone the FGAddon aircraft into a local git-svn repository with:&lt;br /&gt;
{{#tag:syntaxhighlight|&lt;br /&gt;
{{fgaddon source|cmd=git svn clone|protocol=svn+ssh|login=&amp;lt;username&amp;gt;|type=svn|path=Aircraft/&amp;lt;aircraft&amp;gt;|full=1}}&lt;br /&gt;
| lang = &amp;quot;sh&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This will create a new local git repository linked to FGAddon via git-svn.  If the aircraft is new and not present in FGAddon, see the [[#New_aircraft|instructions for adding a new aircraft to FGAddon]].  Next, set up the remote git repository as a remote, and fetch it:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git remote add &amp;lt;name&amp;gt; &amp;lt;url&amp;gt;&lt;br /&gt;
git fetch&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;code&amp;gt;&amp;lt;url&amp;gt;&amp;lt;/code&amp;gt; is the URL of the remote git repository.  Finally make an ordered list of all hashes of the commits to be sent into FGAddon, from earliest to latest, and cherry-pick them into the git-svn master branch:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git cherry-pick &amp;lt;commit hash 1&amp;gt;&lt;br /&gt;
git cherry-pick &amp;lt;commit hash 2&amp;gt;&lt;br /&gt;
git cherry-pick &amp;lt;commit hash 3&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the git-svn local repository should only have a single &amp;lt;code&amp;gt;master&amp;lt;/code&amp;gt; branch and only consist of cherry-picking.  To see the changes queued for sending to FGAddon:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git log git-svn..HEAD&lt;br /&gt;
git diff git-svn..HEAD&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then to send the changes to FGAddon, firstly pull in any remote changes, and send the commits:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git svn rebase&lt;br /&gt;
git svn dcommit&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The temporary local repository can then be deleted.&lt;br /&gt;
&lt;br /&gt;
=== Connecting an existing git repository to FGAddon ===&lt;br /&gt;
&lt;br /&gt;
{{Note|Development scenario:  You are an individual developer or team leader with FGAddon commit access and wish to connect a pre-existing remote git repository with FGAddon to send all changes back to FGAddon.}}&lt;br /&gt;
&lt;br /&gt;
If a remote git repository containing a developed aircraft already exists, it is possible to connect it to the remote FGAddon repository using the git-svn tools.  The following uses the [[#Dedicated_FGAddon_branch|dedicated FGAddon branch technique]].  Firstly, set up the bridge to FGAddon using git-svn in the per-aircraft repository:&lt;br /&gt;
{{#tag:syntaxhighlight|&lt;br /&gt;
{{fgaddon source|cmd=git svn init|protocol=svn+ssh|login=&amp;lt;username&amp;gt;|type=svn|path=Aircraft/&amp;lt;aircraft&amp;gt;|full=1}}&lt;br /&gt;
| lang = &amp;quot;sh&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;code&amp;gt;&amp;lt;aircraft&amp;gt;&amp;lt;/code&amp;gt; is the aircraft directory name in FGAddon.  Note that this step can be performed without commit access to FGAddon by using a read-only SVN URL instead, but then changes cannot be pushed back to FGAddon ([[#Synchronising|dcommitting]], as it is known in the git-svn terminology).  However, this allows upstream FGAddon changes to be integrated into the remote git repository, thus making it easy to prepare changes for submission for FGAddon inclusion using patches sent to the mailing list or sent via other channels.&lt;br /&gt;
&lt;br /&gt;
Now fetch the current state from the remote FGAddon repository:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git svn fetch&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The downloaded SVN history is in the remote branch &amp;lt;code&amp;gt;remotes/git-svn&amp;lt;/code&amp;gt;.  To commit changes to SVN you need a local branch that tracks this remote branch.  Create a local &amp;lt;code&amp;gt;fgaddon&amp;lt;/code&amp;gt; branch that you will use to commit updates:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git branch fgaddon remotes/git-svn&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After committing new stuff to the &amp;lt;code&amp;gt;master&amp;lt;/code&amp;gt; branch, to push to FGAddon checkout the &amp;lt;code&amp;gt;fgaddon&amp;lt;/code&amp;gt; branch and update it from SVN in case someone else has touched the aircraft in the remote FGAddon repository:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git checkout fgaddon&lt;br /&gt;
git svn rebase&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cherry-pick the new commits from &amp;lt;code&amp;gt;master&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;fgaddon&amp;lt;/code&amp;gt; to preserve a linear history:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git cherry-pick &amp;lt;commit hash 1&amp;gt;&lt;br /&gt;
git cherry-pick &amp;lt;commit hash 2&amp;gt;&lt;br /&gt;
git cherry-pick &amp;lt;commit hash 3&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see the changes queued for sending to FGAddon as either commits or a diff, type:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git log git-svn..HEAD&lt;br /&gt;
git diff git-svn..HEAD&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If everything looks ok, dcommit the local commits on the &amp;lt;code&amp;gt;fgaddon&amp;lt;/code&amp;gt; branch to send them to the remote FGAddon SVN repository:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git svn dcommit&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Switch back to the master branch for local development:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git checkout master&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get changes from upstream you can either just download them with&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git svn fetch&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or download them and rebase your &amp;lt;code&amp;gt;fgaddon&amp;lt;/code&amp;gt; branch onto them:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git checkout fgaddon&lt;br /&gt;
git svn rebase&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Team development ===&lt;br /&gt;
&lt;br /&gt;
{{Note|Development scenario:  All members of the team are acting as gatekeepers, and all commits are made directly to FGAddon, either using svn or git-svn.}}&lt;br /&gt;
&lt;br /&gt;
The simplest way to work as a team is for each developer to either have a [[#Individual developer|svn copy of FGAddon]] or a [[#Individual developer (git-svn)|git-svn copy of FGAddon]], and everyone commits directly to FGAddon.  Communication and coordination between the team members can be performed using a [[#Team_communications|team leader organised SourceForge forum]] or using the [http://forum.flightgear.org/ FlightGear forum].  In this scenario, the team needs to take the initiative and everyone apply for FGAddon commit access.&lt;br /&gt;
&lt;br /&gt;
=== Private team development (git-svn) ===&lt;br /&gt;
&lt;br /&gt;
{{Note|Development scenario:  One team leader is acting as the gatekeeper on a private git repository hosted on the in-house SourceForge infrastructure, using git-svn to push a fgaddon branch to FGAddon, with team members committing directly to the private git repository or making merge requests from their fork of the private repository.}}&lt;br /&gt;
&lt;br /&gt;
To keep everything in-house, the entire operation will be based on the official infrastructure and remote repositories under each user's SourceForge (SF) profile.  Note to the team leader - you must [https://git-scm.com/book/en/v1/Git-and-Other-Systems-Git-and-Subversion#git-svn keep your git-svn history linear] (meaning that a [[#Dedicated_FGAddon_branch|dedicated FGAddon branch]] should be created and changes manually cherry-picked into this branch).  In the following, the &amp;lt;code&amp;gt;ornithopter&amp;lt;/code&amp;gt; aircraft will be used as an example.&lt;br /&gt;
&lt;br /&gt;
==== The team ====&lt;br /&gt;
&lt;br /&gt;
Firstly, the entire team should sign up for [[#SourceForge account|SourceForge accounts]].&lt;br /&gt;
&lt;br /&gt;
==== Team leader ====&lt;br /&gt;
&lt;br /&gt;
===== Private repository set up =====&lt;br /&gt;
&lt;br /&gt;
These steps are to be taken by the team leader.  In your SourceForge user profile, set up a [[#Developer_git_repository| git repository]] with the label &amp;lt;code&amp;gt;Ornithopter FGAddon git-svn repository&amp;lt;/code&amp;gt; and code path &amp;lt;code&amp;gt;code-ornithopter&amp;lt;/code&amp;gt;.  Then create a empty local git repository:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir ornithopter&lt;br /&gt;
$ cd ornithopter&lt;br /&gt;
$ git init&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Link the empty repository to the &amp;lt;code&amp;gt;ornithopter&amp;lt;/code&amp;gt; aircraft directory in the remote FGAddon repository and pull it in with:&lt;br /&gt;
{{#tag:syntaxhighlight|&lt;br /&gt;
$ {{fgaddon source|cmd=git svn init|protocol=svn+ssh|login=&amp;lt;username&amp;gt;|type=svn|path=Aircraft/ornithopter|full=1}}&lt;br /&gt;
$ git svn fetch&lt;br /&gt;
| lang = &amp;quot;sh&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Replace &amp;lt;code&amp;gt;&amp;lt;username&amp;gt;&amp;lt;/code&amp;gt; with your SF user name.  Set up a special git-svn branch for FGAddon gatekeeping and dcommitting changes back to the repository:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ git branch fgaddon remotes/git-svn&lt;br /&gt;
$ git checkout fgaddon&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And pull in the &amp;lt;code&amp;gt;ornithopter&amp;lt;/code&amp;gt; from FGAddon:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ git svn rebase&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see the current local git-svn repository setup, type:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ git branch -vva&lt;br /&gt;
$ git remote -v&lt;br /&gt;
$ git svn info &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then return to the master branch:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout master&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, set up the remote git repository as a remote:&lt;br /&gt;
{{#tag:syntaxhighlight|&lt;br /&gt;
$ {{sourceforge url|cmd=git remote add|opt=origin|protocol=ssh|login=&amp;lt;username&amp;gt;|user=&amp;lt;username&amp;gt;|type=git|repo=code-ornithopter}}&lt;br /&gt;
| lang = &amp;quot;sh&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
And send the master branch to the remote git repository:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ git push -u origin master&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see the new set up:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ git branch -vva&lt;br /&gt;
$ git remote -v&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The repository will be located at {{#tag:span|{{#tag:tt|{{#tag:nowiki|{{sourceforge url|user=&amp;lt;username&amp;gt;|repo=code-ornithopter|branch=master}}}}}}| style=&amp;quot;color: blue&amp;quot;}}.  Note that the git-svn information stored in the &amp;lt;code&amp;gt;.git/svn&amp;lt;/code&amp;gt; directory will not be pushed to remote SoureForge repository, and therefore the link back to FGAddon will only be present in the local copy of the team leader.  The git-svn link can be re-established at a later point if necessary.&lt;br /&gt;
&lt;br /&gt;
===== Team setup =====&lt;br /&gt;
&lt;br /&gt;
Set up a [[#Development teams|dedicated development team and grant them access to the git-svn repository]].&lt;br /&gt;
&lt;br /&gt;
===== Pushing to FGAddon =====&lt;br /&gt;
&lt;br /&gt;
Committing to FGAddon is for the local git repository of the team leader.  History must be linear in the fgaddon branch, so cherry-picking is the way to go.  This is from the [[#Individual developer (git-svn)|Individual developer (git-svn)]] section.  In the local git repository, switch to the &amp;lt;code&amp;gt;fgaddon&amp;lt;/code&amp;gt; branch:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git checkout fgaddon&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Pull in any changes which have occurred in FGAddon:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git svn rebase&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see the commits in the &amp;lt;code&amp;gt;master&amp;lt;/code&amp;gt; branch which are not in the &amp;lt;code&amp;gt;fgaddon&amp;lt;/code&amp;gt; branch, type one of:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git log HEAD..master&lt;br /&gt;
git log HEAD..master --pretty=oneline&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Manually select the commits to be sent to FGAddon and cherry-pick them:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git cherry-pick &amp;lt;commit hash 1&amp;gt;&lt;br /&gt;
git cherry-pick &amp;lt;commit hash 2&amp;gt;&lt;br /&gt;
git cherry-pick &amp;lt;commit hash 3&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or to cherry-pick a range of commits:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git cherry-pick &amp;lt;commit hash 1&amp;gt;^..&amp;lt;commit hash 8&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then check what is to be sent:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git log git-svn..HEAD&lt;br /&gt;
git diff git-svn..HEAD&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Send the changes to FGAddon, send the git &amp;lt;code&amp;gt;fgaddon&amp;lt;/code&amp;gt; branch changes to the remote git repository, and switch back to the master branch:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git svn dcommit&lt;br /&gt;
git push&lt;br /&gt;
git checkout master&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally merge in the git svn commits with their new hashes from the &amp;lt;code&amp;gt;fgaddon&amp;lt;/code&amp;gt; branch, and send it to the remote git repository:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git merge fgaddon&lt;br /&gt;
git push&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Team members ====&lt;br /&gt;
&lt;br /&gt;
===== Working with the repository =====&lt;br /&gt;
&lt;br /&gt;
Each team member should make a clone of the private git repository:&lt;br /&gt;
{{#tag:syntaxhighlight|&lt;br /&gt;
$ {{sourceforge source|cmd=git clone|protocol=ssh|login=&amp;lt;username&amp;gt;|user=&amp;lt;username_leader&amp;gt;|type=git|repo=code-ornithopter|post=ornithopter|full=1}}&lt;br /&gt;
| lang = &amp;quot;sh&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Replace &amp;lt;code&amp;gt;&amp;lt;username&amp;gt;&amp;lt;/code&amp;gt; with your SourceForge user name, and &amp;lt;code&amp;gt;&amp;lt;username_leader&amp;gt;&amp;lt;/code&amp;gt; is the SourceForge user name of the team leader.&lt;br /&gt;
&lt;br /&gt;
===== Forking and merge requests =====&lt;br /&gt;
&lt;br /&gt;
Alternatively, each team member can fork the git repository under your SourceForge account:&lt;br /&gt;
* Go to {{#tag:span|{{#tag:tt|{{#tag:nowiki|{{sourceforge source|user=&amp;lt;username&amp;gt;|repo=code-ornithopter|branch=master|full=1}}}}}}| style=&amp;quot;color: blue&amp;quot;}}, where &amp;lt;code&amp;gt;&amp;lt;username&amp;gt;&amp;lt;/code&amp;gt; is the SourceForge user name of the team leader.&lt;br /&gt;
* Click on &amp;lt;code&amp;gt;Fork&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Set the mount point to &amp;lt;code&amp;gt;code-ornithopter&amp;lt;/code&amp;gt; and change the label as you wish.&lt;br /&gt;
&lt;br /&gt;
Develop and push to your fork, then make merge requests by clicking on the &amp;lt;code&amp;gt;Request Merge&amp;lt;/code&amp;gt; button.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:FlightGear]]&lt;br /&gt;
[[ca:FGAddon]]&lt;br /&gt;
[[de:FGAddon]]&lt;br /&gt;
[[fr:FGAddon]]&lt;br /&gt;
[[nl:FGAddon]]&lt;br /&gt;
[[pl:FGAddon]]&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=FlightGear_wiki:Village_pump&amp;diff=143321</id>
		<title>FlightGear wiki:Village pump</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=FlightGear_wiki:Village_pump&amp;diff=143321"/>
		<updated>2025-12-25T18:06:16Z</updated>

		<summary type="html">&lt;p&gt;Rominet: /* Beware of shortened Git commit IDs */ Add Git command for finding full commit IDs corresponding to shortened ones&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NEWSECTIONLINK__&lt;br /&gt;
{{Archives|[[/Archive 2012|2012]]|[[/Archive 2013|2013]]|[[/Archive 2014|2014]]|[[/Archive 2015|2015]]|[[/Archive 2016|2016]]|[[/Archive 2017|2017]]|[[/Archive 2018|2018]]|[[/Archive 2019|2019]]|[[/Archive 2020|2020]]|[[/Archive 2021|2021]]|[[/Archive 2022|2022]]}}&lt;br /&gt;
{{shortcut|FGW:VP}}&lt;br /&gt;
&lt;br /&gt;
Welcome to the '''Village Pump'''. This page is used to discuss the technical issues, operations and guidelines of the [[FlightGear wiki]].&lt;br /&gt;
&lt;br /&gt;
Please &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[{{fullurl:{{FULLPAGENAME}}|action=edit&amp;amp;section=new}} add new topics]&amp;lt;/span&amp;gt; to the '''bottom''' of this page.&lt;br /&gt;
&lt;br /&gt;
Old discussions should be moved to a [[FlightGear wiki:Village pump/Archive YEAR]]. These discussions can then be moved to a relevant talk page if appropriate.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== MediaWiki updated to 1.39.6 ==&lt;br /&gt;
&lt;br /&gt;
We have updated MediaWiki to its latest LTS version 1.39.6 today. Although we've tested the update, chances are that we've missed certain scenarios or features. Please report any issues that you may encounter.&lt;br /&gt;
&lt;br /&gt;
[[User:Gijs|Gijs]] ([[User talk:Gijs|talk]]) 09:31, 30 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Embedded YouTube videos broken ==&lt;br /&gt;
&lt;br /&gt;
It seems that the [[mw:Extension:EmbedVideo|EmbedVideo extension]] was removed at some point. Consequently, pages such as [[Howto:Creating FlightGear Promo Videos]] are broken. At present, the best replacements seems to be [[mw:Extension:EmbedVideo_(fork)|a fork]] and [[mw:Extension:YouTube|Extension:YouTube]].&lt;br /&gt;
&lt;br /&gt;
—'''''[[User:Red Leader|&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Red Leader&amp;lt;/span&amp;gt;]]''''' ([[User talk:Red Leader|talk]], [[Special:Contributions/Red Leader|contribs]]) 19:21, 30 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Hi,&lt;br /&gt;
: Thanks for the report. It was introduced by today's update, but should be fixed now.&lt;br /&gt;
: [[User:Gijs|Gijs]] ([[User talk:Gijs|talk]]) 21:21, 30 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: Confirmed, thanks. And I’d completely forgotten about {{[[Template:Wikipedia|wikipedia]]}}. 😅&lt;br /&gt;
:: '''''[[User:Red Leader|&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Red Leader&amp;lt;/span&amp;gt;]]''''' ([[User talk:Red Leader|talk]], [[Special:Contributions/Red Leader|contribs]]) 21:57, 30 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Forum registration problem ==&lt;br /&gt;
&lt;br /&gt;
Hello,&lt;br /&gt;
I would like to register on the forum, but I tried several times without success. I sent an email to the administrator some time ago, but it seems to have been lost. I don't know what to do, is there somebody here who could help? Please tell me if you need additional information.&lt;br /&gt;
Thanks very much in advance. [[User:Kestrel|Kestrel]] ([[User talk:Kestrel|talk]]) 13:14, 25 March 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Hi,&lt;br /&gt;
: That's unfortunate! You can find my email address at https://forum.flightgear.org/contact.php Please try again if you've done that before, I'll actively monitor the address for any incoming messages, and let me know if you don't get a reply.&lt;br /&gt;
: [[User:Gijs|Gijs]] ([[User talk:Gijs|talk]]) 15:01, 25 March 2024 (UTC) (forum admin)&lt;br /&gt;
&lt;br /&gt;
== Sidebar link for &amp;quot;Build server&amp;quot; is broken ==&lt;br /&gt;
&lt;br /&gt;
Hello, &lt;br /&gt;
&lt;br /&gt;
Just wanted to bring to someones attention that the URL for &amp;quot;Build server&amp;quot; currently 404s. Not sure if this resource still exists or if its URL has changed.&lt;br /&gt;
&lt;br /&gt;
Cheers!&lt;br /&gt;
-Joshua&lt;br /&gt;
&lt;br /&gt;
: Hi Joshua,&lt;br /&gt;
: The URL is still correct, but the build server is temporarily down due to a server failure. It's being worked on, so should be back up &amp;quot;soon&amp;quot;.&lt;br /&gt;
: [[User:Gijs|Gijs]] ([[User talk:Gijs|talk]]) 12:29, 3 September 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
== FlightGear Wikipedia article image needs correctly sourced Flightgear wiki screenshot ==&lt;br /&gt;
https://en.wikipedia.org/wiki/FlightGear&lt;br /&gt;
&lt;br /&gt;
The image used for the Flightgear Wikipedia article appears to have been deleted, because it was sourced from the following Flightgear-wiki screenshot page:&lt;br /&gt;
&lt;br /&gt;
[[:File:Bo 105 over Sint Marteen.png]]&lt;br /&gt;
&lt;br /&gt;
which referred to an imgur link instead of the following thread, which gives a CC license based on a google search of the file name:&lt;br /&gt;
&lt;br /&gt;
https://forum.flightgear.org/viewtopic.php?f=88&amp;amp;t=32163&amp;amp;start=0&lt;br /&gt;
&lt;br /&gt;
Discussion on Wikipedia:&lt;br /&gt;
&lt;br /&gt;
https://en.wikipedia.org/wiki/Wikipedia:Files_for_discussion/2024_December_7#File:FlightGear_Flight_Sim_Bo_105_over_Sint_Marteen.png&lt;br /&gt;
&lt;br /&gt;
&amp;gt; ''Subsequent comments should be made on the appropriate discussion page (such as the file's talk page or in a [https://en.wikipedia.org/wiki/Wikipedia:Deletion_review deletion review]).''&lt;br /&gt;
&lt;br /&gt;
The person who uploaded it, or someone from the wiki, should ideally fix the FlightGear wiki page, and do a deletion review for the Wikipedia file. The file may have been used in multiple pages since screenshots are uncommon on Wikipedia due to proprietary apps. Feel free to remove this comment once it's taken care of. Good luck&lt;br /&gt;
&lt;br /&gt;
== Issues with three templates ==&lt;br /&gt;
&lt;br /&gt;
Hi,&lt;br /&gt;
&lt;br /&gt;
The [[Template:Fgmeta_commit|fgmeta commit]] template appears to be broken. It used to work in the first ''Note'' [[Scripted_Compilation_on_Linux_Debian/Ubuntu#For_the_curious:_the_SSH_way|here]] (see the URL).&lt;br /&gt;
&lt;br /&gt;
Also, I tried to use [[Template:Repo_link#Site:_Generic]] to create a link to the [https://gitlab.kitware.com/cmake/cmake.git CMake repo], but didn't manage: IIRC, the link text was empty.&lt;br /&gt;
&lt;br /&gt;
Finally, [[Template:Fgmeta_source]] doesn't seem to to what the doc. says for ''simplepath'': with&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;{{fgmeta source&lt;br /&gt;
| path = download_and_compile.sh&lt;br /&gt;
| simplepath = 1&lt;br /&gt;
}}&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the link text starts with a slash, so I used&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;{{fgmeta source&lt;br /&gt;
| path = download_and_compile.sh&lt;br /&gt;
| text = download_and_compile.sh&lt;br /&gt;
}}&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
which is of course more redundant.&lt;br /&gt;
&lt;br /&gt;
Thanks for considering! :-)&lt;br /&gt;
&lt;br /&gt;
[[User:Rominet|Rominet]] ([[User talk:Rominet|talk]])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
: Good catch.  I need to look into that one.  I may not have coded the commit part of GitLab into the master {{tl|repo_link}} template.&lt;br /&gt;
&lt;br /&gt;
: [[User:Bugman|Bugman]] ([[User talk:Bugman|talk]]) 15:41, 13 March 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: All fixed.  It was quite simple - the {{tl|fgmeta_source}} template was missing the &amp;lt;code&amp;gt;proj&amp;lt;/code&amp;gt; parameter.  I've also fixed {{tl|fgmeta_clone}}.&lt;br /&gt;
&lt;br /&gt;
:: [[User:Bugman|Bugman]] ([[User talk:Bugman|talk]]) 15:53, 13 March 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
::: Thanks for the reply and fixes, Bugman! (And sorry for the delay, I didn't see any notification...) I see the first item is indeed addressed. Regarding the second item, well, I see no place where I'd really want to use this now on the d&amp;amp;c page, so didn't test it. As for the third one, I still get &amp;lt;code&amp;gt;/download_and_compile.sh&amp;lt;/code&amp;gt; in the Preview when I try the above {{tl|fgmeta_source}} snippet with &amp;lt;code&amp;gt;simplepath = 1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
::: I looked at {{tl|fgmeta_clone}} too; it looks nice but seems to default to the &amp;lt;code&amp;gt;git://&amp;lt;/code&amp;gt; protocol. Would it be possible to make it default to using &amp;lt;code&amp;gt;https://&amp;lt;/code&amp;gt;? Thanks again. :-)&lt;br /&gt;
 &lt;br /&gt;
::: [[User:Rominet|Rominet]] ([[User talk:Rominet|talk]])&lt;br /&gt;
&lt;br /&gt;
:::: Not a problem.  For the &amp;lt;code&amp;gt;simplepath&amp;lt;/code&amp;gt; parameter, that is the designed behaviour in the {{tl|repo link}} template.  In most cases our repositories have complex directory structures and the desired output is the absolute file path, removing the protocol and URL parts of the path.  Do you wish to simply have the file name there?  No one had asked for that before, so I never added an option for that.  In the case of the source repositories, you often want to remove the first part of the absolute path so that for example in SimGear, {{simgear source|path=simgear/scene/util/QuadTreeBuilder.hxx|simplepath=1}} (&amp;lt;nowiki&amp;gt;{{simgear source|path=simgear/scene/util/QuadTreeBuilder.hxx|simplepath=1}}&amp;lt;/nowiki&amp;gt;) would be shown as {{simgear source|path=simgear/scene/util/QuadTreeBuilder.hxx|text=scene/util/QuadTreeBuilder.hxx}} (&amp;lt;nowiki&amp;gt;{{simgear source|path=simgear/scene/util/QuadTreeBuilder.hxx|text=scene/util/QuadTreeBuilder.hxx}}&amp;lt;/nowiki&amp;gt;.  This is not scriptable in MediaWiki so I left it all for the text parameter.&lt;br /&gt;
&lt;br /&gt;
:::: For the protocol, I have now added the &amp;lt;code&amp;gt;protocol&amp;lt;/code&amp;gt; parameter.  E.g. &amp;lt;nowiki&amp;gt;{{fgmeta clone | protocol = https}}&amp;lt;/nowiki&amp;gt;.  That will give &amp;lt;code&amp;gt;{{fgmeta clone | protocol = https}}&amp;lt;/code&amp;gt; (as of today generated as &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;git clone https://gitlab.com/flightgear/fgmeta.git&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
:::: [[User:Bugman|Bugman]] ([[User talk:Bugman|talk]]) 08:51, 24 March 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
::::: Thanks Bugman, I've updated the [[Scripted_Compilation_on_Linux_Debian/Ubuntu|download_and_compile.sh page]] to use &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{fgmeta clone | protocol = https}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; as you proposed; it works great. For the link to download_and_compile.sh, I can continue to use &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{fgmeta source | path = download_and_compile.sh | text = download_and_compile.sh}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, no problem.&lt;br /&gt;
&lt;br /&gt;
::::: As far as I'm concerned, everything is resolved here, so this thread/section can be deleted if someone wants to “clean up”.&lt;br /&gt;
&lt;br /&gt;
::::: ''Other subject:'' the only remaining thing is that I didn't receive any notification, neither for your replies here nor for the January changes by [[User:Jebba|Jebba]] to the [[Scripted_Compilation_on_Linux_Debian/Ubuntu|download_and_compile.sh page]] that is on my watchlist. I used to receive email notifications for these things years ago, haven't changed my preferences regarding this and don't see any setting that would explain why I don't receive these notifications anymore. Maybe email sending by the wiki software is not quite well configured according to current standards (SPF, DKIM, DMARC)?&lt;br /&gt;
&lt;br /&gt;
::::: [[User:Rominet|Rominet]] ([[User talk:Rominet|talk]])&lt;br /&gt;
&lt;br /&gt;
== Improve the 'simgear clone', 'flightgear clone' and 'fgdata clone' templates ==&lt;br /&gt;
&lt;br /&gt;
Hi,&lt;br /&gt;
&lt;br /&gt;
In order to improve [[Fedora_Packages_and_Compiling]], it would be nice to have the &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{simgear clone}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{flightgear clone}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{fgdata clone}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; templates on par with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{fgmeta clone}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (support for the &amp;lt;code&amp;gt;protocol&amp;lt;/code&amp;gt; parameter, etc.). I tried&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;{{simgear clone | protocol = https | opt = --single-branch --branch release/2024.1 | post = simgear}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
but it doesn't seem to work, as the preview shows this:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;git clone --single-branch --branch release/2024.1 git://gitlab.com simgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(ditto with &amp;lt;code&amp;gt;flightear clone&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;fgdata clone&amp;lt;/code&amp;gt;). Thanks in advance :-)&lt;br /&gt;
&lt;br /&gt;
[[User:Rominet|Rominet]] ([[User talk:Rominet|talk]])&lt;br /&gt;
&lt;br /&gt;
: I needed a while to work out the best strategy for these changes.  I've now gone through all of the {{tl|repo link}} cloning subtemplates listed on {{tl|repo link/doc related}} and added the &amp;lt;code&amp;gt;project&amp;lt;/code&amp;gt; parameter to the templates and the optional &amp;lt;code&amp;gt;protocol&amp;lt;/code&amp;gt; parameter.  These changes were required as the &amp;lt;code&amp;gt;gl&amp;lt;/code&amp;gt; section of the {{tl|repo_link}} template is constructed differently to the &amp;lt;code&amp;gt;sf&amp;lt;/code&amp;gt; section.  I've also updated the git cloning documentation {{tl|repo link/doc git clone}}.  I hope this covers everything you need.&lt;br /&gt;
&lt;br /&gt;
: [[User:Bugman|Bugman]] ([[User talk:Bugman|talk]]) 07:48, 1 April 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: Thanks a lot, Bugman, this works great! Your changes allowed me to perform [https://wiki.flightgear.org/w/index.php?title=Fedora_Packages_and_Compiling&amp;amp;type=revision&amp;amp;diff=141687&amp;amp;oldid=141513 this edit] in [[Fedora_Packages_and_Compiling]]. The only remaining &amp;lt;code&amp;gt;git clone&amp;lt;/code&amp;gt; command written in full on that page is for FG's fork of OpenSceneGraph at GitLab. I understand that choosing a proper name for an applicable &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{... clone}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; template probably requires some careful thinking... ;-)&lt;br /&gt;
&lt;br /&gt;
:: [[User:Rominet|Rominet]] ([[User talk:Rominet|talk]])&lt;br /&gt;
&lt;br /&gt;
== Default text in Template:Repo link ==&lt;br /&gt;
&lt;br /&gt;
Hi,&lt;br /&gt;
&lt;br /&gt;
The default ''text'' in {{tl|Repo link}} gives somewhat pleasant link texts such as&lt;br /&gt;
 flightgear/flightgear/src/Scripting/NasalSys.cxx&lt;br /&gt;
when the ''site'' is &amp;lt;code&amp;gt;sourceforge&amp;lt;/code&amp;gt;, however the result looks like a bug for other sites (though I understand this may be as intended). To be clear, the URLs are correct but the default link texts look weird because they start with the unqualified site name rather than the fully-qualified domain name. For instance,&lt;br /&gt;
 {{obr}}fgmeta source{{cbr}}&lt;br /&gt;
yields [https://gitlab.com/flightgear/fgmeta gitlab/flightgear/fgmeta/next] rather than [https://gitlab.com/flightgear/fgmeta gitlab.com/flightgear/fgmeta/next]. I suggest to replace &amp;lt;code&amp;gt;gitlab&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;gitlab.com&amp;lt;/code&amp;gt; in the default text (where the HTML comment says “Site advertising”) and do the same for &amp;lt;code&amp;gt;github&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Note: the Gitorious web site doesn't exist anymore, maybe that should be removed from the template?&lt;br /&gt;
&lt;br /&gt;
Thanks for considering; I can do the replacement if you wish.&lt;br /&gt;
&lt;br /&gt;
[[User:Rominet|Rominet]] ([[User talk:Rominet|talk]]) 10:38, 12 November 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Sounds sensible, so please go ahead!&lt;br /&gt;
: Regarding Gitorious, it may be nice to link to an archived version of the repos, such as https://archive.softwareheritage.org/browse/origin/directory/?origin_url=https://gitorious.org/flightgear/fgdata.git&amp;amp;visit_type=git Altough this only makes sense for repos or branches that are not part of our current GitLab...&lt;br /&gt;
: [[User:Gijs|Gijs]] ([[User talk:Gijs|talk]]) 13:58, 12 November 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: [https://wiki.flightgear.org/w/index.php?title=Template:Repo_link&amp;amp;action=history Done], thanks Gijs!&lt;br /&gt;
::&lt;br /&gt;
&lt;br /&gt;
:: One should be careful using this, though, because the resulting link ''texts'' may be non-existing URLs (after prepending the protocol) despite looking like valid ones, as shown by the first example in [[User:Rominet/Sandbox#FGMeta-Python repo templates]]!&lt;br /&gt;
&lt;br /&gt;
:: So, to avoid people getting trapped by this, maybe the default link text should start with something like &amp;lt;code&amp;gt;[GitLab]/...&amp;lt;/code&amp;gt; rather than the &amp;lt;code&amp;gt;gitlab.com/...&amp;lt;/code&amp;gt; I just put (to make it clear that such link texts are not supposed to be “Internet addresses”).&lt;br /&gt;
:: [[User:Rominet|Rominet]] ([[User talk:Rominet|talk]]) 16:20, 12 November 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
::: This is now implemented. For instance, &amp;lt;code&amp;gt;{{obr}}fgmeta-python source {{!}} path = pyproject.toml {{!}} tag  = 1.0.0b1 {{cbr}}&amp;lt;/code&amp;gt; results in {{fgmeta-python source | path = pyproject.toml | tag  = 1.0.0b1 }}. This also holds for GitHub and GitoriousIsNowClosed. SourceForge has no such prefix for now (it initially didn't, and editing its part of {{tl|Repo link}} requires a bit more temerity than what I have at the moment :-)).&lt;br /&gt;
::: [[User:Rominet|Rominet]] ([[User talk:Rominet|talk]]) 09:15, 14 November 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
: That's a good idea.  Note for Gitorious - I added this because there are a number of historical documents/pages that refer to developments that occurred on Gitorious which were not migrated to SourceForge.  I originally made the Gitorious links work by pointing to the archive by the Internet Archive (see [[Gitorious]]).  However that archive has been offline for a few years now.  The Internet Archive are storing all the data so it may return one day.&lt;br /&gt;
&lt;br /&gt;
: [[User:Bugman|Bugman]] ([[User talk:Bugman|talk]]) 22:06, 13 November 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Beware of shortened Git commit IDs ==&lt;br /&gt;
&lt;br /&gt;
While fixing broken links due to the {{tl|foo commit}} templates not specifying &amp;lt;code&amp;gt;proj=flightgear&amp;lt;/code&amp;gt; (this was implicit with &amp;lt;code&amp;gt;site=sf&amp;lt;/code&amp;gt; but isn't with &amp;lt;code&amp;gt;site=gl&amp;lt;/code&amp;gt;), I found that URLs at GitLab don't accept the same shortened Git commit IDs as those at SourceForge:&lt;br /&gt;
 https://sourceforge.net/p/flightgear/fgdata/ci/807062 - OK&lt;br /&gt;
 https://gitlab.com/flightgear/fgdata/-/commit/807062  - NOK&lt;br /&gt;
 https://gitlab.com/flightgear/fgdata/-/commit/807062d - OK&lt;br /&gt;
 https://gitlab.com/flightgear/fgdata/-/commit/807062d0b6f858885547f27325e829c2bf42a12b - OK&lt;br /&gt;
&lt;br /&gt;
As a consequence, there are probably a lot of broken links in the wiki due to shortened commit IDs. Better always use the long ones...&lt;br /&gt;
&lt;br /&gt;
{{Note|Commit ID 807062 in FGData is not ambiguous at the time of this writing.}}&lt;br /&gt;
[[User:Rominet|Rominet]] ([[User talk:Rominet|talk]]) 15:45, 3 December 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
: I have modified {{tl|Simgear_commit}}, {{tl|Flightgear_commit}}, {{tl|Fgdata_commit}}, etc. (12 templates!) to show a commit ID truncated to 7 characters in the automatically generated link text, so there is no excuse for not using the full commit IDs anymore when using these templates (see the result [[Howto:Building_FlightGear_without_HiDPI_support#Commits|here]] for instance). Thanks to [[User:Gijs|Gijs]] for installing [https://en.wikipedia.org/wiki/Module:Ustring Module:Ustring] which made this possible!&lt;br /&gt;
&lt;br /&gt;
: Note that manually provided ''text'' arguments are not truncated.&lt;br /&gt;
: {{tip|In case you feel like replacing shortened commit IDs with full ones in {{tl|foo commit}} template calls, the full commit IDs can be found like so:&lt;br /&gt;
 cd /path/to/repository&lt;br /&gt;
 git rev-parse ''shortened-id1'' ''shortened-id2'' ...&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
: [[User:Rominet|Rominet]] ([[User talk:Rominet|talk]]) 18:05, 25 December 2025 (UTC)&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=FlightGear_wiki:Village_pump&amp;diff=143320</id>
		<title>FlightGear wiki:Village pump</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=FlightGear_wiki:Village_pump&amp;diff=143320"/>
		<updated>2025-12-25T11:08:50Z</updated>

		<summary type="html">&lt;p&gt;Rominet: /* Beware of shortened Git commit IDs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NEWSECTIONLINK__&lt;br /&gt;
{{Archives|[[/Archive 2012|2012]]|[[/Archive 2013|2013]]|[[/Archive 2014|2014]]|[[/Archive 2015|2015]]|[[/Archive 2016|2016]]|[[/Archive 2017|2017]]|[[/Archive 2018|2018]]|[[/Archive 2019|2019]]|[[/Archive 2020|2020]]|[[/Archive 2021|2021]]|[[/Archive 2022|2022]]}}&lt;br /&gt;
{{shortcut|FGW:VP}}&lt;br /&gt;
&lt;br /&gt;
Welcome to the '''Village Pump'''. This page is used to discuss the technical issues, operations and guidelines of the [[FlightGear wiki]].&lt;br /&gt;
&lt;br /&gt;
Please &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[{{fullurl:{{FULLPAGENAME}}|action=edit&amp;amp;section=new}} add new topics]&amp;lt;/span&amp;gt; to the '''bottom''' of this page.&lt;br /&gt;
&lt;br /&gt;
Old discussions should be moved to a [[FlightGear wiki:Village pump/Archive YEAR]]. These discussions can then be moved to a relevant talk page if appropriate.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== MediaWiki updated to 1.39.6 ==&lt;br /&gt;
&lt;br /&gt;
We have updated MediaWiki to its latest LTS version 1.39.6 today. Although we've tested the update, chances are that we've missed certain scenarios or features. Please report any issues that you may encounter.&lt;br /&gt;
&lt;br /&gt;
[[User:Gijs|Gijs]] ([[User talk:Gijs|talk]]) 09:31, 30 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Embedded YouTube videos broken ==&lt;br /&gt;
&lt;br /&gt;
It seems that the [[mw:Extension:EmbedVideo|EmbedVideo extension]] was removed at some point. Consequently, pages such as [[Howto:Creating FlightGear Promo Videos]] are broken. At present, the best replacements seems to be [[mw:Extension:EmbedVideo_(fork)|a fork]] and [[mw:Extension:YouTube|Extension:YouTube]].&lt;br /&gt;
&lt;br /&gt;
—'''''[[User:Red Leader|&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Red Leader&amp;lt;/span&amp;gt;]]''''' ([[User talk:Red Leader|talk]], [[Special:Contributions/Red Leader|contribs]]) 19:21, 30 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Hi,&lt;br /&gt;
: Thanks for the report. It was introduced by today's update, but should be fixed now.&lt;br /&gt;
: [[User:Gijs|Gijs]] ([[User talk:Gijs|talk]]) 21:21, 30 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: Confirmed, thanks. And I’d completely forgotten about {{[[Template:Wikipedia|wikipedia]]}}. 😅&lt;br /&gt;
:: '''''[[User:Red Leader|&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Red Leader&amp;lt;/span&amp;gt;]]''''' ([[User talk:Red Leader|talk]], [[Special:Contributions/Red Leader|contribs]]) 21:57, 30 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Forum registration problem ==&lt;br /&gt;
&lt;br /&gt;
Hello,&lt;br /&gt;
I would like to register on the forum, but I tried several times without success. I sent an email to the administrator some time ago, but it seems to have been lost. I don't know what to do, is there somebody here who could help? Please tell me if you need additional information.&lt;br /&gt;
Thanks very much in advance. [[User:Kestrel|Kestrel]] ([[User talk:Kestrel|talk]]) 13:14, 25 March 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Hi,&lt;br /&gt;
: That's unfortunate! You can find my email address at https://forum.flightgear.org/contact.php Please try again if you've done that before, I'll actively monitor the address for any incoming messages, and let me know if you don't get a reply.&lt;br /&gt;
: [[User:Gijs|Gijs]] ([[User talk:Gijs|talk]]) 15:01, 25 March 2024 (UTC) (forum admin)&lt;br /&gt;
&lt;br /&gt;
== Sidebar link for &amp;quot;Build server&amp;quot; is broken ==&lt;br /&gt;
&lt;br /&gt;
Hello, &lt;br /&gt;
&lt;br /&gt;
Just wanted to bring to someones attention that the URL for &amp;quot;Build server&amp;quot; currently 404s. Not sure if this resource still exists or if its URL has changed.&lt;br /&gt;
&lt;br /&gt;
Cheers!&lt;br /&gt;
-Joshua&lt;br /&gt;
&lt;br /&gt;
: Hi Joshua,&lt;br /&gt;
: The URL is still correct, but the build server is temporarily down due to a server failure. It's being worked on, so should be back up &amp;quot;soon&amp;quot;.&lt;br /&gt;
: [[User:Gijs|Gijs]] ([[User talk:Gijs|talk]]) 12:29, 3 September 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
== FlightGear Wikipedia article image needs correctly sourced Flightgear wiki screenshot ==&lt;br /&gt;
https://en.wikipedia.org/wiki/FlightGear&lt;br /&gt;
&lt;br /&gt;
The image used for the Flightgear Wikipedia article appears to have been deleted, because it was sourced from the following Flightgear-wiki screenshot page:&lt;br /&gt;
&lt;br /&gt;
[[:File:Bo 105 over Sint Marteen.png]]&lt;br /&gt;
&lt;br /&gt;
which referred to an imgur link instead of the following thread, which gives a CC license based on a google search of the file name:&lt;br /&gt;
&lt;br /&gt;
https://forum.flightgear.org/viewtopic.php?f=88&amp;amp;t=32163&amp;amp;start=0&lt;br /&gt;
&lt;br /&gt;
Discussion on Wikipedia:&lt;br /&gt;
&lt;br /&gt;
https://en.wikipedia.org/wiki/Wikipedia:Files_for_discussion/2024_December_7#File:FlightGear_Flight_Sim_Bo_105_over_Sint_Marteen.png&lt;br /&gt;
&lt;br /&gt;
&amp;gt; ''Subsequent comments should be made on the appropriate discussion page (such as the file's talk page or in a [https://en.wikipedia.org/wiki/Wikipedia:Deletion_review deletion review]).''&lt;br /&gt;
&lt;br /&gt;
The person who uploaded it, or someone from the wiki, should ideally fix the FlightGear wiki page, and do a deletion review for the Wikipedia file. The file may have been used in multiple pages since screenshots are uncommon on Wikipedia due to proprietary apps. Feel free to remove this comment once it's taken care of. Good luck&lt;br /&gt;
&lt;br /&gt;
== Issues with three templates ==&lt;br /&gt;
&lt;br /&gt;
Hi,&lt;br /&gt;
&lt;br /&gt;
The [[Template:Fgmeta_commit|fgmeta commit]] template appears to be broken. It used to work in the first ''Note'' [[Scripted_Compilation_on_Linux_Debian/Ubuntu#For_the_curious:_the_SSH_way|here]] (see the URL).&lt;br /&gt;
&lt;br /&gt;
Also, I tried to use [[Template:Repo_link#Site:_Generic]] to create a link to the [https://gitlab.kitware.com/cmake/cmake.git CMake repo], but didn't manage: IIRC, the link text was empty.&lt;br /&gt;
&lt;br /&gt;
Finally, [[Template:Fgmeta_source]] doesn't seem to to what the doc. says for ''simplepath'': with&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;{{fgmeta source&lt;br /&gt;
| path = download_and_compile.sh&lt;br /&gt;
| simplepath = 1&lt;br /&gt;
}}&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the link text starts with a slash, so I used&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;{{fgmeta source&lt;br /&gt;
| path = download_and_compile.sh&lt;br /&gt;
| text = download_and_compile.sh&lt;br /&gt;
}}&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
which is of course more redundant.&lt;br /&gt;
&lt;br /&gt;
Thanks for considering! :-)&lt;br /&gt;
&lt;br /&gt;
[[User:Rominet|Rominet]] ([[User talk:Rominet|talk]])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
: Good catch.  I need to look into that one.  I may not have coded the commit part of GitLab into the master {{tl|repo_link}} template.&lt;br /&gt;
&lt;br /&gt;
: [[User:Bugman|Bugman]] ([[User talk:Bugman|talk]]) 15:41, 13 March 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: All fixed.  It was quite simple - the {{tl|fgmeta_source}} template was missing the &amp;lt;code&amp;gt;proj&amp;lt;/code&amp;gt; parameter.  I've also fixed {{tl|fgmeta_clone}}.&lt;br /&gt;
&lt;br /&gt;
:: [[User:Bugman|Bugman]] ([[User talk:Bugman|talk]]) 15:53, 13 March 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
::: Thanks for the reply and fixes, Bugman! (And sorry for the delay, I didn't see any notification...) I see the first item is indeed addressed. Regarding the second item, well, I see no place where I'd really want to use this now on the d&amp;amp;c page, so didn't test it. As for the third one, I still get &amp;lt;code&amp;gt;/download_and_compile.sh&amp;lt;/code&amp;gt; in the Preview when I try the above {{tl|fgmeta_source}} snippet with &amp;lt;code&amp;gt;simplepath = 1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
::: I looked at {{tl|fgmeta_clone}} too; it looks nice but seems to default to the &amp;lt;code&amp;gt;git://&amp;lt;/code&amp;gt; protocol. Would it be possible to make it default to using &amp;lt;code&amp;gt;https://&amp;lt;/code&amp;gt;? Thanks again. :-)&lt;br /&gt;
 &lt;br /&gt;
::: [[User:Rominet|Rominet]] ([[User talk:Rominet|talk]])&lt;br /&gt;
&lt;br /&gt;
:::: Not a problem.  For the &amp;lt;code&amp;gt;simplepath&amp;lt;/code&amp;gt; parameter, that is the designed behaviour in the {{tl|repo link}} template.  In most cases our repositories have complex directory structures and the desired output is the absolute file path, removing the protocol and URL parts of the path.  Do you wish to simply have the file name there?  No one had asked for that before, so I never added an option for that.  In the case of the source repositories, you often want to remove the first part of the absolute path so that for example in SimGear, {{simgear source|path=simgear/scene/util/QuadTreeBuilder.hxx|simplepath=1}} (&amp;lt;nowiki&amp;gt;{{simgear source|path=simgear/scene/util/QuadTreeBuilder.hxx|simplepath=1}}&amp;lt;/nowiki&amp;gt;) would be shown as {{simgear source|path=simgear/scene/util/QuadTreeBuilder.hxx|text=scene/util/QuadTreeBuilder.hxx}} (&amp;lt;nowiki&amp;gt;{{simgear source|path=simgear/scene/util/QuadTreeBuilder.hxx|text=scene/util/QuadTreeBuilder.hxx}}&amp;lt;/nowiki&amp;gt;.  This is not scriptable in MediaWiki so I left it all for the text parameter.&lt;br /&gt;
&lt;br /&gt;
:::: For the protocol, I have now added the &amp;lt;code&amp;gt;protocol&amp;lt;/code&amp;gt; parameter.  E.g. &amp;lt;nowiki&amp;gt;{{fgmeta clone | protocol = https}}&amp;lt;/nowiki&amp;gt;.  That will give &amp;lt;code&amp;gt;{{fgmeta clone | protocol = https}}&amp;lt;/code&amp;gt; (as of today generated as &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;git clone https://gitlab.com/flightgear/fgmeta.git&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
:::: [[User:Bugman|Bugman]] ([[User talk:Bugman|talk]]) 08:51, 24 March 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
::::: Thanks Bugman, I've updated the [[Scripted_Compilation_on_Linux_Debian/Ubuntu|download_and_compile.sh page]] to use &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{fgmeta clone | protocol = https}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; as you proposed; it works great. For the link to download_and_compile.sh, I can continue to use &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{fgmeta source | path = download_and_compile.sh | text = download_and_compile.sh}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, no problem.&lt;br /&gt;
&lt;br /&gt;
::::: As far as I'm concerned, everything is resolved here, so this thread/section can be deleted if someone wants to “clean up”.&lt;br /&gt;
&lt;br /&gt;
::::: ''Other subject:'' the only remaining thing is that I didn't receive any notification, neither for your replies here nor for the January changes by [[User:Jebba|Jebba]] to the [[Scripted_Compilation_on_Linux_Debian/Ubuntu|download_and_compile.sh page]] that is on my watchlist. I used to receive email notifications for these things years ago, haven't changed my preferences regarding this and don't see any setting that would explain why I don't receive these notifications anymore. Maybe email sending by the wiki software is not quite well configured according to current standards (SPF, DKIM, DMARC)?&lt;br /&gt;
&lt;br /&gt;
::::: [[User:Rominet|Rominet]] ([[User talk:Rominet|talk]])&lt;br /&gt;
&lt;br /&gt;
== Improve the 'simgear clone', 'flightgear clone' and 'fgdata clone' templates ==&lt;br /&gt;
&lt;br /&gt;
Hi,&lt;br /&gt;
&lt;br /&gt;
In order to improve [[Fedora_Packages_and_Compiling]], it would be nice to have the &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{simgear clone}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{flightgear clone}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{fgdata clone}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; templates on par with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{fgmeta clone}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (support for the &amp;lt;code&amp;gt;protocol&amp;lt;/code&amp;gt; parameter, etc.). I tried&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;{{simgear clone | protocol = https | opt = --single-branch --branch release/2024.1 | post = simgear}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
but it doesn't seem to work, as the preview shows this:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;git clone --single-branch --branch release/2024.1 git://gitlab.com simgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(ditto with &amp;lt;code&amp;gt;flightear clone&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;fgdata clone&amp;lt;/code&amp;gt;). Thanks in advance :-)&lt;br /&gt;
&lt;br /&gt;
[[User:Rominet|Rominet]] ([[User talk:Rominet|talk]])&lt;br /&gt;
&lt;br /&gt;
: I needed a while to work out the best strategy for these changes.  I've now gone through all of the {{tl|repo link}} cloning subtemplates listed on {{tl|repo link/doc related}} and added the &amp;lt;code&amp;gt;project&amp;lt;/code&amp;gt; parameter to the templates and the optional &amp;lt;code&amp;gt;protocol&amp;lt;/code&amp;gt; parameter.  These changes were required as the &amp;lt;code&amp;gt;gl&amp;lt;/code&amp;gt; section of the {{tl|repo_link}} template is constructed differently to the &amp;lt;code&amp;gt;sf&amp;lt;/code&amp;gt; section.  I've also updated the git cloning documentation {{tl|repo link/doc git clone}}.  I hope this covers everything you need.&lt;br /&gt;
&lt;br /&gt;
: [[User:Bugman|Bugman]] ([[User talk:Bugman|talk]]) 07:48, 1 April 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: Thanks a lot, Bugman, this works great! Your changes allowed me to perform [https://wiki.flightgear.org/w/index.php?title=Fedora_Packages_and_Compiling&amp;amp;type=revision&amp;amp;diff=141687&amp;amp;oldid=141513 this edit] in [[Fedora_Packages_and_Compiling]]. The only remaining &amp;lt;code&amp;gt;git clone&amp;lt;/code&amp;gt; command written in full on that page is for FG's fork of OpenSceneGraph at GitLab. I understand that choosing a proper name for an applicable &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{... clone}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; template probably requires some careful thinking... ;-)&lt;br /&gt;
&lt;br /&gt;
:: [[User:Rominet|Rominet]] ([[User talk:Rominet|talk]])&lt;br /&gt;
&lt;br /&gt;
== Default text in Template:Repo link ==&lt;br /&gt;
&lt;br /&gt;
Hi,&lt;br /&gt;
&lt;br /&gt;
The default ''text'' in {{tl|Repo link}} gives somewhat pleasant link texts such as&lt;br /&gt;
 flightgear/flightgear/src/Scripting/NasalSys.cxx&lt;br /&gt;
when the ''site'' is &amp;lt;code&amp;gt;sourceforge&amp;lt;/code&amp;gt;, however the result looks like a bug for other sites (though I understand this may be as intended). To be clear, the URLs are correct but the default link texts look weird because they start with the unqualified site name rather than the fully-qualified domain name. For instance,&lt;br /&gt;
 {{obr}}fgmeta source{{cbr}}&lt;br /&gt;
yields [https://gitlab.com/flightgear/fgmeta gitlab/flightgear/fgmeta/next] rather than [https://gitlab.com/flightgear/fgmeta gitlab.com/flightgear/fgmeta/next]. I suggest to replace &amp;lt;code&amp;gt;gitlab&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;gitlab.com&amp;lt;/code&amp;gt; in the default text (where the HTML comment says “Site advertising”) and do the same for &amp;lt;code&amp;gt;github&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Note: the Gitorious web site doesn't exist anymore, maybe that should be removed from the template?&lt;br /&gt;
&lt;br /&gt;
Thanks for considering; I can do the replacement if you wish.&lt;br /&gt;
&lt;br /&gt;
[[User:Rominet|Rominet]] ([[User talk:Rominet|talk]]) 10:38, 12 November 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Sounds sensible, so please go ahead!&lt;br /&gt;
: Regarding Gitorious, it may be nice to link to an archived version of the repos, such as https://archive.softwareheritage.org/browse/origin/directory/?origin_url=https://gitorious.org/flightgear/fgdata.git&amp;amp;visit_type=git Altough this only makes sense for repos or branches that are not part of our current GitLab...&lt;br /&gt;
: [[User:Gijs|Gijs]] ([[User talk:Gijs|talk]]) 13:58, 12 November 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: [https://wiki.flightgear.org/w/index.php?title=Template:Repo_link&amp;amp;action=history Done], thanks Gijs!&lt;br /&gt;
::&lt;br /&gt;
&lt;br /&gt;
:: One should be careful using this, though, because the resulting link ''texts'' may be non-existing URLs (after prepending the protocol) despite looking like valid ones, as shown by the first example in [[User:Rominet/Sandbox#FGMeta-Python repo templates]]!&lt;br /&gt;
&lt;br /&gt;
:: So, to avoid people getting trapped by this, maybe the default link text should start with something like &amp;lt;code&amp;gt;[GitLab]/...&amp;lt;/code&amp;gt; rather than the &amp;lt;code&amp;gt;gitlab.com/...&amp;lt;/code&amp;gt; I just put (to make it clear that such link texts are not supposed to be “Internet addresses”).&lt;br /&gt;
:: [[User:Rominet|Rominet]] ([[User talk:Rominet|talk]]) 16:20, 12 November 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
::: This is now implemented. For instance, &amp;lt;code&amp;gt;{{obr}}fgmeta-python source {{!}} path = pyproject.toml {{!}} tag  = 1.0.0b1 {{cbr}}&amp;lt;/code&amp;gt; results in {{fgmeta-python source | path = pyproject.toml | tag  = 1.0.0b1 }}. This also holds for GitHub and GitoriousIsNowClosed. SourceForge has no such prefix for now (it initially didn't, and editing its part of {{tl|Repo link}} requires a bit more temerity than what I have at the moment :-)).&lt;br /&gt;
::: [[User:Rominet|Rominet]] ([[User talk:Rominet|talk]]) 09:15, 14 November 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
: That's a good idea.  Note for Gitorious - I added this because there are a number of historical documents/pages that refer to developments that occurred on Gitorious which were not migrated to SourceForge.  I originally made the Gitorious links work by pointing to the archive by the Internet Archive (see [[Gitorious]]).  However that archive has been offline for a few years now.  The Internet Archive are storing all the data so it may return one day.&lt;br /&gt;
&lt;br /&gt;
: [[User:Bugman|Bugman]] ([[User talk:Bugman|talk]]) 22:06, 13 November 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Beware of shortened Git commit IDs ==&lt;br /&gt;
&lt;br /&gt;
While fixing broken links due to the {{tl|foo commit}} templates not specifying &amp;lt;code&amp;gt;proj=flightgear&amp;lt;/code&amp;gt; (this was implicit with &amp;lt;code&amp;gt;site=sf&amp;lt;/code&amp;gt; but isn't with &amp;lt;code&amp;gt;site=gl&amp;lt;/code&amp;gt;), I found that URLs at GitLab don't accept the same shortened Git commit IDs as those at SourceForge:&lt;br /&gt;
 https://sourceforge.net/p/flightgear/fgdata/ci/807062 - OK&lt;br /&gt;
 https://gitlab.com/flightgear/fgdata/-/commit/807062  - NOK&lt;br /&gt;
 https://gitlab.com/flightgear/fgdata/-/commit/807062d - OK&lt;br /&gt;
 https://gitlab.com/flightgear/fgdata/-/commit/807062d0b6f858885547f27325e829c2bf42a12b - OK&lt;br /&gt;
&lt;br /&gt;
As a consequence, there are probably a lot of broken links in the wiki due to shortened commit IDs. Better always use the long ones...&lt;br /&gt;
&lt;br /&gt;
{{Note|Commit ID 807062 in FGData is not ambiguous at the time of this writing.}}&lt;br /&gt;
[[User:Rominet|Rominet]] ([[User talk:Rominet|talk]]) 15:45, 3 December 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
: I have modified {{tl|Simgear_commit}}, {{tl|Flightgear_commit}}, {{tl|Fgdata_commit}}, etc. (12 templates!) to show a commit ID truncated to 7 characters in the automatically generated link text, so there is no excuse for not using the full commit IDs anymore when using these templates (see the result [[Howto:Building_FlightGear_without_HiDPI_support#Commits|here]] for instance). Thanks to [[User:Gijs|Gijs]] for installing [https://en.wikipedia.org/wiki/Module:Ustring Module:Ustring] which made this possible!&lt;br /&gt;
&lt;br /&gt;
: Note that manually provided ''text'' arguments are not truncated.&lt;br /&gt;
&lt;br /&gt;
: [[User:Rominet|Rominet]] ([[User talk:Rominet|talk]]) 10:10, 25 December 2025 (UTC)&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Nasal_library/geo&amp;diff=143319</id>
		<title>Nasal library/geo</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Nasal_library/geo&amp;diff=143319"/>
		<updated>2025-12-25T10:37:49Z</updated>

		<summary type="html">&lt;p&gt;Rominet: Fix broken links due to the use of shortened commit IDs (it doesn't work the same way at GitLab as at SourceForge!)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Nasal Navigation|nocat=1}}&lt;br /&gt;
This page contains documentation for the '''&amp;lt;code&amp;gt;geo&amp;lt;/code&amp;gt; namespace''' in [[Nasal]]. This namespace provides various geography/position-related [[#Functions|functions]], as well the [[#Coord|main class]]. Everything in the &amp;lt;code&amp;gt;geo&amp;lt;/code&amp;gt; namespace is sourced from {{fgdata file|Nasal/geo.nas}}&lt;br /&gt;
&lt;br /&gt;
{{tip|Copy &amp;amp; paste the examples into your [[Nasal Console]] and execute them to see what they do.|width=70%}}&lt;br /&gt;
&lt;br /&gt;
== Classes ==&lt;br /&gt;
=== Coord ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|mode = class&lt;br /&gt;
|text = The main class, used widely for storing and managing positional data. Coordinates may be stored in either {{wikipedia|ECEF|Earth-centered, Earth-fixed}} coordinates (x, y and z) or {{wikipedia|geodetic coordinates}} (latitude, longitude, and altitude). In addition, it will convert coordinates as necessary. However, note that for the conversion to work, set_latlon() and set_xyz() must be used.&lt;br /&gt;
}}&lt;br /&gt;
==== new() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = geo.Coord.new([coord]);&lt;br /&gt;
|text = Constructor function. Returns a new &amp;lt;code&amp;gt;geo.Coord&amp;lt;/code&amp;gt; instance.&lt;br /&gt;
|param1 = coord&lt;br /&gt;
|param1text = An optional &amp;lt;code&amp;gt;geo.Coord&amp;lt;/code&amp;gt; instance. If given, the returned instance will contain the values from this argument.&lt;br /&gt;
|example1 = var coord = geo.Coord.new();&lt;br /&gt;
|example2 = var ac_pos = geo.aircraft_position();&lt;br /&gt;
var coord = geo.Coord.new(ac_pos);&lt;br /&gt;
coord.dump();&lt;br /&gt;
}}&lt;br /&gt;
==== set() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = geo.Coord.set(coord);&lt;br /&gt;
|text = Sets the coordinates. Returns the &amp;lt;code&amp;gt;geo.Coord&amp;lt;/code&amp;gt; instance.&lt;br /&gt;
|param1 = coord&lt;br /&gt;
|param1text = Sets the coordinates from another &amp;lt;code&amp;gt;geo.Coord&amp;lt;/code&amp;gt; instance.&lt;br /&gt;
|example1 = var ac_pos = geo.aircraft_position();&lt;br /&gt;
var coord = geo.Coord.new();&lt;br /&gt;
coord.set(ac_pos);&lt;br /&gt;
coord.dump();&lt;br /&gt;
}}&lt;br /&gt;
==== set_lat() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = geo.Coord.set_lat(lat);&lt;br /&gt;
|text = Sets the {{wikipedia|latitude}} coordinate. Returns the &amp;lt;code&amp;gt;geo.Coord&amp;lt;/code&amp;gt; instance.&lt;br /&gt;
|param1 = lat&lt;br /&gt;
|param1text = The latitude coordinate, in degrees.&lt;br /&gt;
|example1 = var coord = geo.Coord.new();&lt;br /&gt;
coord.set_latlon(0, 0, 0);&lt;br /&gt;
coord.set_lat(45);&lt;br /&gt;
coord.dump();&lt;br /&gt;
}}&lt;br /&gt;
==== set_lon() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = geo.Coord.set_lon(lon);&lt;br /&gt;
|text = Sets the {{wikipedia|longitude}} coordinate. Returns the &amp;lt;code&amp;gt;geo.Coord&amp;lt;/code&amp;gt; instance.&lt;br /&gt;
|param1 = lon&lt;br /&gt;
|param1text = The longitude coordinate, in degrees.&lt;br /&gt;
|example1 = var coord = geo.Coord.new();&lt;br /&gt;
coord.set_latlon(0, 0, 0);&lt;br /&gt;
coord.set_lon(90);&lt;br /&gt;
coord.dump();&lt;br /&gt;
}}&lt;br /&gt;
==== set_alt() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = geo.Coord.set_alt(alt);&lt;br /&gt;
|text = Sets the {{wikipedia|altitude}} coordinate. Returns the &amp;lt;code&amp;gt;geo.Coord&amp;lt;/code&amp;gt; instance.&lt;br /&gt;
|param1 = alt&lt;br /&gt;
|param1text = The altitude coordinate. Note that this can be in either feet or metres, so make sure you convert correctly. Also note that in conversion, this coordinate will be assumed to be metres above equatorial radius of earth used is that defined by the {{wikipedia|WGS 84}} (6,378,137 metres).&lt;br /&gt;
|example1 = var coord = geo.Coord.new();&lt;br /&gt;
coord.set_latlon(0, 0, 0);&lt;br /&gt;
coord.set_alt(1000);&lt;br /&gt;
coord.dump();&lt;br /&gt;
}}&lt;br /&gt;
==== set_latlon() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = geo.Coord.set_latlon(lat, lon[, alt]);&lt;br /&gt;
|text = Sets the latitude and longitude coordinates, and optionally the altitude coordinate. Returns the &amp;lt;code&amp;gt;geo.Coord&amp;lt;/code&amp;gt; instance.&lt;br /&gt;
|param1 = lat&lt;br /&gt;
|param1text = The latitude coordinate, in degrees.&lt;br /&gt;
|param2 = lon&lt;br /&gt;
|param2text = The longitude coordinate, in degrees.&lt;br /&gt;
|param3 = alt&lt;br /&gt;
|param3text = The altitude coordinate. Note that this can be in either feet or metres, so make sure you convert correctly. Also note that in conversion, this coordinate will be assumed to be metres above equatorial radius of earth used is that defined by the {{wikipedia|WGS 84}} (6,378,137 metres). Defaults to 0.&lt;br /&gt;
|example1 = var coord = geo.Coord.new();&lt;br /&gt;
coord.set_latlon(45, 90);&lt;br /&gt;
coord.dump();&lt;br /&gt;
|example2 = var coord = geo.Coord.new();&lt;br /&gt;
coord.set_latlon(45, 90, 1000);&lt;br /&gt;
coord.dump();&lt;br /&gt;
}}&lt;br /&gt;
==== set_x() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = geo.Coord.set_x(x);&lt;br /&gt;
|text = Sets the x-axis coordinate coordinate. Returns the &amp;lt;code&amp;gt;geo.Coord&amp;lt;/code&amp;gt; instance.&lt;br /&gt;
|param1 = x&lt;br /&gt;
|param1text = The mandatory x-axis coordinate, in metres.&lt;br /&gt;
|example1 = var coord = geo.Coord.new();&lt;br /&gt;
coord.set_xyz(0, 0, 0);&lt;br /&gt;
coord.set_x(10);&lt;br /&gt;
coord.dump();&lt;br /&gt;
}}&lt;br /&gt;
==== set_y() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = geo.Coord.set_y(y);&lt;br /&gt;
|text = Sets the y-axis coordinate coordinate. Returns the &amp;lt;code&amp;gt;geo.Coord&amp;lt;/code&amp;gt; instance.&lt;br /&gt;
|param1 = y&lt;br /&gt;
|param1text = The mandatory y-axis coordinate, in metres.&lt;br /&gt;
|example1 = var coord = geo.Coord.new();&lt;br /&gt;
coord.set_xyz(0,0,0);&lt;br /&gt;
coord.set_y(10);&lt;br /&gt;
coord.dump();&lt;br /&gt;
}}&lt;br /&gt;
==== set_z() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = geo.Coord.set_z(z);&lt;br /&gt;
|text = Sets the z-axis coordinate coordinate. Returns the &amp;lt;code&amp;gt;geo.Coord&amp;lt;/code&amp;gt; instance.&lt;br /&gt;
|param1 = z&lt;br /&gt;
|param1text = The mandatory z-axis coordinate, in metres.&lt;br /&gt;
|example1 = var coord = geo.Coord.new();&lt;br /&gt;
coord.set_xyz(0, 0, 0);&lt;br /&gt;
coord.set_y(10);&lt;br /&gt;
coord.dump();&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== set_xyz() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = geo.Coord.set_xyz(x, y, z);&lt;br /&gt;
|text = Sets all three Cartesian coordinates. Returns the &amp;lt;code&amp;gt;geo.Coord&amp;lt;/code&amp;gt; instance. All arguments are mandatory.&lt;br /&gt;
|param1 = x&lt;br /&gt;
|param1text = The x-axis coordinate, in metres.&lt;br /&gt;
|param2 = y&lt;br /&gt;
|param2text = The y-axis coordinate, in metres.&lt;br /&gt;
|param3 = z&lt;br /&gt;
|param3text = The z-axis coordinate, in metres.&lt;br /&gt;
|example1 = var coord = geo.Coord.new();&lt;br /&gt;
coord.set_xyz(10, 10, 10);&lt;br /&gt;
coord.dump();&lt;br /&gt;
}}&lt;br /&gt;
==== lat() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = geo.Coord.lat();&lt;br /&gt;
|text = Returns the latitude coordinate.&lt;br /&gt;
|example1 = var coord = geo.Coord.new();&lt;br /&gt;
coord.set_latlon(98, 173);&lt;br /&gt;
print(coord.lat()); # prints &amp;quot;98&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
==== lon() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = geo.Coord.lon();&lt;br /&gt;
|text = Returns the longitude coordinate.&lt;br /&gt;
|example1 = var coord = geo.Coord.new();&lt;br /&gt;
coord.set_latlon(98, 173);&lt;br /&gt;
print(coord.lon()); # prints &amp;quot;173&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
==== alt() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = geo.Coord.alt();&lt;br /&gt;
|text = Returns the altitude coordinate.&lt;br /&gt;
|example1 = var coord = geo.Coord.new();&lt;br /&gt;
coord.set_latlon(98, 173, 10);&lt;br /&gt;
print(coord.alt()); # prints &amp;quot;10&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
==== latlon() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = geo.Coord.latlon();&lt;br /&gt;
|text = Returns a vector containing the latitude, longitude, and altitude, in that order.&lt;br /&gt;
|example1 = var coord = geo.Coord.new();&lt;br /&gt;
coord.set_latlon(98, 173, 10);&lt;br /&gt;
debug.dump(coord.latlon()); # prints &amp;quot;[98, 173, 10]&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
==== x() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = geo.Coord.x();&lt;br /&gt;
|text = Returns the x-axis coordinate.&lt;br /&gt;
|example1 = var coord = geo.Coord.new();&lt;br /&gt;
coord.set_xyz(10, 10, 10);&lt;br /&gt;
print(coord.x()); # prints &amp;quot;10&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
==== y() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = geo.Coord.y();&lt;br /&gt;
|text = Returns the y-axis coordinate.&lt;br /&gt;
|example1 = var coord = geo.Coord.new();&lt;br /&gt;
coord.set_xyz(10, 10, 10);&lt;br /&gt;
print(coord.y()); # prints &amp;quot;10&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
==== z() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = geo.Coord.z();&lt;br /&gt;
|text = Returns the z-axis coordinate.&lt;br /&gt;
|example1 = var coord = geo.Coord.new();&lt;br /&gt;
coord.set_xyz(10, 10, 10);&lt;br /&gt;
print(coord.z()); # prints &amp;quot;10&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
==== xyz() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = geo.Coord.xyz();&lt;br /&gt;
|text = Returns a vector containing the x, y, and z coordinates, in that order.&lt;br /&gt;
|example1 = var coord = geo.Coord.new();&lt;br /&gt;
coord.set_xyz(20, 10, 30);&lt;br /&gt;
debug.dump(coord.xyz()); # prints &amp;quot;[20, 10, 30]&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
==== is_defined() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = geo.Coord.is_defined();&lt;br /&gt;
|text = Returns 1 (true) if all three coordinates (either x/y/z or /lat/lon/alt) are defined. Note that set_latlon() or set_xyz() must be used for this function to work correctly.&lt;br /&gt;
|example1 = var coord = geo.Coord.new();&lt;br /&gt;
coord.set_xyz(10, 10, 10);&lt;br /&gt;
print(coord.is_defined()); # prints &amp;quot;1&amp;quot;&lt;br /&gt;
|example2 = var coord = geo.Coord.new();&lt;br /&gt;
print(coord.is_defined()); # prints &amp;quot;0&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
==== dump() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = geo.Coord.dump();&lt;br /&gt;
|text = Dumps all six coordinates into the console. It requires all three coordinates (either x/y/z or /lat/lon/alt) to be defined. Note that set_latlon() or set_xyz() must be used for this function to work correctly.&lt;br /&gt;
|example1 = var coord = geo.Coord.new();&lt;br /&gt;
coord.set_xyz(10, 10, 10);&lt;br /&gt;
coord.dump(); # prints &amp;quot;x=10.000000  y=10.000000  z=10.000000    lat=89.981086  lon=44.999998  alt=-6356742.309706&amp;quot;&lt;br /&gt;
|example2 = var coord = geo.Coord.new();&lt;br /&gt;
coord.set_latlon(90, 45, 10);&lt;br /&gt;
coord.dump(); # prints &amp;quot;x=0.055063  y=0.055063  z=6356762.314245    lat=90.000000  lon=45.000000  alt=10.000000&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
==== course_to() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = geo.Coord.course_to(coord);&lt;br /&gt;
|text = Returns the initial bearing (see [http://www.movable-type.co.uk/scripts/latlong.html#bearing here]) to another &amp;lt;code&amp;gt;geo.Coord&amp;lt;/code&amp;gt; instance. The bearing will be an {{wikipedia|absolute bearing}} (in the range 0–360).&lt;br /&gt;
|param1 = coord&lt;br /&gt;
|param1text = Mandatory &amp;lt;code&amp;gt;geo.Coord&amp;lt;/code&amp;gt; instance to calculate bearing to.&lt;br /&gt;
|example1 = var c1 = geo.Coord.new();&lt;br /&gt;
c1.set_latlon(0, 0);&lt;br /&gt;
var c2 = geo.Coord.new();&lt;br /&gt;
c2.set_latlon(1, 1);&lt;br /&gt;
printf(&amp;quot;%.5f&amp;quot;, c1.course_to(c2)); # prints &amp;quot;44.99564&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== distance_to() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = geo.Coord.distance_to(coord);&lt;br /&gt;
|text = Returns the great circle distance in metres to another &amp;lt;code&amp;gt;geo.Coord&amp;lt;/code&amp;gt; instance. Note that this function ignores altitude.&lt;br /&gt;
|param1 = coord&lt;br /&gt;
|param1text = Mandatory &amp;lt;code&amp;gt;geo.Coord&amp;lt;/code&amp;gt; instance to calculate distance to.&lt;br /&gt;
|example1 = var c1 = geo.Coord.new();&lt;br /&gt;
c1.set_latlon(0, 0);&lt;br /&gt;
var c2 = geo.Coord.new();&lt;br /&gt;
c2.set_latlon(1, 1);&lt;br /&gt;
printf(&amp;quot;%i&amp;quot;, c1.distance_to(c2)); # prints &amp;quot;157425&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
==== direct_distance_to() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = geo.Coord.direct_distance_to(coord);&lt;br /&gt;
|text = Returns the direct distance (cutting through the earth) in metres to another &amp;lt;code&amp;gt;geo.Coord&amp;lt;/code&amp;gt; instance. &lt;br /&gt;
|param1 = coord&lt;br /&gt;
|param1text = Mandatory &amp;lt;code&amp;gt;geo.Coord&amp;lt;/code&amp;gt; instance to calculate distance to.&lt;br /&gt;
|example1 = var c1 = geo.Coord.new();&lt;br /&gt;
c1.set_latlon(0, 0);&lt;br /&gt;
var c2 = geo.Coord.new();&lt;br /&gt;
c2.set_latlon(45, 90);&lt;br /&gt;
printf(&amp;quot;%i&amp;quot;, c1.direct_distance_to(c2)); # prints &amp;quot;9012522&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
==== apply_course_distance() ====&lt;br /&gt;
[[File:Missiles on a map.png|thumb]]&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = geo.Coord.apply_course_distance(course, dist);&lt;br /&gt;
|text = Calculates a new coordinate from a given course and distancce, and then updates the coordinates to the new set. Returns the &amp;lt;code&amp;gt;geo.Coord&amp;lt;/code&amp;gt; instance.&lt;br /&gt;
|param1 = course&lt;br /&gt;
|param1text = Mandatory absolute bearing (0–360) to use in calculation.&lt;br /&gt;
|param2 = dist&lt;br /&gt;
|param2text = Mandatory distance in metres to use in calculation.&lt;br /&gt;
|example1 = var coord = geo.Coord.new();&lt;br /&gt;
coord.set_latlon(0, 0);&lt;br /&gt;
coord.dump();&lt;br /&gt;
coord.apply_course_distance(245, 10000);&lt;br /&gt;
coord.dump(); # lat=-0.037964  lon=-0.081415&lt;br /&gt;
|example2 = &lt;br /&gt;
# WIP:&lt;br /&gt;
# get current aircraft position: &lt;br /&gt;
var centerPosition = geo.aircraft_position();&lt;br /&gt;
# set up a for-loop &lt;br /&gt;
# apply a bearing offset&lt;br /&gt;
# and distance 10 nm in front of the current position&lt;br /&gt;
# foreach position, add an AI model using put_model&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== PositionedSearch ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|mode = class&lt;br /&gt;
|version = 3.0&lt;br /&gt;
|commit = {{fgdata commit|a9576e8c8d292360582aa9ca164ee0043e6a5097|t=commit}}&lt;br /&gt;
|text = This class can be used to show differences between FGPositioned (namespace: &amp;lt;code&amp;gt;positioned&amp;lt;/code&amp;gt;) search queries. Although it is only used for [[MapStructure]] and the [[Nasal Browser]] as of 09/2016, it can also be used for other applications.&lt;br /&gt;
}}&lt;br /&gt;
==== new() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = geo.PositionedSearch.new(searchCmd, onAdded, onRemoved[, obj]);&lt;br /&gt;
|text = Constructor function. Returns a new &amp;lt;code&amp;gt;geo.PositionedSearch&amp;lt;/code&amp;gt; instance.&lt;br /&gt;
|param1 = searchCmd&lt;br /&gt;
|param1text = A mandatory function that will actually do the searching. It must return a vector containing the elements from the search.&lt;br /&gt;
|param2 = onAdded&lt;br /&gt;
|param2text = A mandatory function that will be called if a element has been added to the search results. The element added will be passed to this function.&lt;br /&gt;
|param3 = onRemoved&lt;br /&gt;
|param3text = A mandatory function that will be called if a element has been removed from the search results. The element removed will be passed to this function.&lt;br /&gt;
|param4 = obj&lt;br /&gt;
|param4text = Optional &amp;lt;code&amp;gt;'''me'''&amp;lt;/code&amp;gt; reference. This will be used as the &amp;lt;code&amp;gt;'''me'''&amp;lt;/code&amp;gt; reference in each of the above fucntions.&lt;br /&gt;
|example1 = var searchCmd = func(){&lt;br /&gt;
    return positioned.findAirportsWithinRange(10);&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
# This function will be called whenever an item is added&lt;br /&gt;
var added = func(apt){&lt;br /&gt;
    print(&amp;quot;Airport &amp;quot;, apt.id, &amp;quot; added&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# This function will be called whenever an item is removed&lt;br /&gt;
var removed = func(apt){&lt;br /&gt;
    print(&amp;quot;Airport &amp;quot;, apt.id, &amp;quot; removed&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# Create a new object, passing to it the search function to be used and the callbacks&lt;br /&gt;
var searcher = geo.PositionedSearch.new(searchCmd, added, removed);&lt;br /&gt;
&lt;br /&gt;
# Actually update the searcher object&lt;br /&gt;
searcher.update();&lt;br /&gt;
}}&lt;br /&gt;
==== test() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = geo.PositionedSearch.test([from[, to]]);&lt;br /&gt;
|text = Performs a test of the class. It benchmark's the amount of time it switch between searches for fixes at certain ranges.&lt;br /&gt;
|param1 = from&lt;br /&gt;
|param1text = Optional distance parameter in nautical miles for the first search for fixes. Defaults to 640.&lt;br /&gt;
|param2 = to&lt;br /&gt;
|param2text = Optional distance parameter in nautical miles for the second search for fixes. Defaults to 320.&lt;br /&gt;
|example1 = geo.PositionedSearch.test(); # prints the test results and changed elements&lt;br /&gt;
|example2 = geo.PositionedSearch.test(10, 50); # prints the test results and changed elements&lt;br /&gt;
}}&lt;br /&gt;
==== update() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = geo.PositionedSearch.update([searchCmd]);&lt;br /&gt;
|text = Performs an search. It executes the search function and analyses the results.&lt;br /&gt;
|param1 = searchCmd&lt;br /&gt;
|param1text = Optional search function to use instead of the one given in &amp;lt;code&amp;gt;[[#new()_2|PositionedSearch.new()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
|example1 = var searchCmd = func(){&lt;br /&gt;
    return positioned.findAirportsWithinRange(10);&lt;br /&gt;
};&lt;br /&gt;
var added = func(apt){&lt;br /&gt;
    print(&amp;quot;Airport &amp;quot;, apt.id, &amp;quot; added&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
var removed = func(apt){&lt;br /&gt;
    print(&amp;quot;Airport &amp;quot;, apt.id, &amp;quot; removed&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
var searcher = geo.PositionedSearch.new(searchCmd, added, removed);&lt;br /&gt;
searcher.update();&lt;br /&gt;
}}&lt;br /&gt;
==== _equals ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = geo.PositionedSearch._equals;&lt;br /&gt;
|text = Function that checks if two objects are equal. You must redefine this function to use &amp;lt;code&amp;gt;geo.PositionedSearch&amp;lt;/code&amp;gt; for other uses.&lt;br /&gt;
|example1 = var searchCmd = func(){&lt;br /&gt;
    var vec = [];&lt;br /&gt;
    var max = rand() * 10;&lt;br /&gt;
    for(var i = 1; i &amp;lt;= max; i += 1){&lt;br /&gt;
        append(vec, i);&lt;br /&gt;
    }&lt;br /&gt;
    return vec;&lt;br /&gt;
};&lt;br /&gt;
var added = func(num){&lt;br /&gt;
    print(num, &amp;quot; added&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
var removed = func(num){&lt;br /&gt;
    print(num, &amp;quot; removed&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
var searcher = geo.PositionedSearch.new(searchCmd, added, removed);&lt;br /&gt;
searcher._equals = func(a, b){ return a == b; }&lt;br /&gt;
searcher.update();&lt;br /&gt;
print(&amp;quot;====&amp;quot;);&lt;br /&gt;
searcher.update(); # run again to see differences between both queries&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Functions ==&lt;br /&gt;
=== aircraft_position() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = geo.aircraft_position();&lt;br /&gt;
|text = Returns the main aircraft's current position in the form of a &amp;lt;code&amp;gt;geo.Coord&amp;lt;/code&amp;gt; object. Note that the altitude will be in metres.&lt;br /&gt;
|example1 = var ac_pos = geo.aircraft_position();&lt;br /&gt;
ac_pos.dump();&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== click_position() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = geo.click_position();&lt;br /&gt;
|text = Returns the position of the last mouse click on the landscape. Note that the altitude will be in metres.&lt;br /&gt;
|example1 = var click_pos = geo.click_position();&lt;br /&gt;
click_pos.dump();&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== elevation() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = geo.elevation(lat, lon[, max_alt]);&lt;br /&gt;
|text = Returns the elevation in metres of a certain point on the scenery. See also {{func link|geodinfo()}} (which is used internally).&lt;br /&gt;
&lt;br /&gt;
If the terrain altitude has not yet been loaded in the area identified by the coordinates, the function returns the ''nil'' value.&lt;br /&gt;
|param1 = lat&lt;br /&gt;
|param1text = Mandatory latitude coordinate.&lt;br /&gt;
|param2 = lon&lt;br /&gt;
|param2text = Mandatory longitude coordinate.&lt;br /&gt;
|param3 = max_alt&lt;br /&gt;
|param3text = Optional altitude in metres from which to begin searching. Defaults to 10,000 m.&lt;br /&gt;
|example1 = var ac_pos = geo.aircraft_position();&lt;br /&gt;
var elev = geo.elevation(ac_pos.lat(), ac_pos.lon());&lt;br /&gt;
printf(&amp;quot;Terrain elevation: %i m&amp;quot;, elev);&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== format() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = geo.format(lat, lon);&lt;br /&gt;
|text = Returns the coordinate formatted as a string. The format will be the same as used for scenery tiles, e.g., &amp;lt;code&amp;gt;w010n50&amp;lt;/code&amp;gt; (10 degrees West, 50 degrees North).&lt;br /&gt;
|param1 = lat&lt;br /&gt;
|param1text = Mandatory latitude coordinate.&lt;br /&gt;
|param2 = lon&lt;br /&gt;
|param2text = Mandatory longitude coordinate.&lt;br /&gt;
|example1 = var ac_pos = geo.aircraft_position();&lt;br /&gt;
print(geo.format(ac_pos.lat(), ac_pos.lon()));&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== normdeg() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = geo.normdeg(angle);&lt;br /&gt;
|text = Normalizes an angle to be in the range 0–360.&lt;br /&gt;
|param1 = angle&lt;br /&gt;
|param1text = Mandatory angle to normalize.&lt;br /&gt;
|example1 = print(geo.normdeg(45)); # print &amp;quot;45&amp;quot;&lt;br /&gt;
|example2 = print(geo.normdeg(-90)); # print &amp;quot;270&amp;quot;&lt;br /&gt;
|example3 = print(geo.normdeg(1060)); # print &amp;quot;340&amp;quot;&lt;br /&gt;
|example4 = print(geo.normdeg(-653)); # print &amp;quot;67&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== normdeg180() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = geo.normdeg180(angle);&lt;br /&gt;
|version = 2.12&lt;br /&gt;
|commit = {{fgdata commit|8c23d095b05c3ba2d9592375b0c2854e2cbcd180|t=commit}}&lt;br /&gt;
|text = Normalizes an angle to be in the range -180–180.&lt;br /&gt;
|param1 = angle&lt;br /&gt;
|param1text = Mandatory angle to normalize.&lt;br /&gt;
|example1 = print(geo.normdeg180(96)); # print &amp;quot;96&amp;quot;&lt;br /&gt;
|example2 = print(geo.normdeg180(-96)); # print &amp;quot;-96&amp;quot;&lt;br /&gt;
|example3 = print(geo.normdeg180(256)); # print &amp;quot;-104&amp;quot;&lt;br /&gt;
|example4 = print(geo.normdeg180(-209)); # print &amp;quot;151&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== put_model() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = geo.put_model(path, lat, lon[, elev[, hdg[, pitch[, roll]]]]);&lt;br /&gt;
geo.put_model(path, coord[, hdg[, pitch[, roll]]]]);&lt;br /&gt;
|text = Places a model in the simulation at a given location and orientation. If successful, returns the model's root property as a &amp;lt;code&amp;gt;props.Node&amp;lt;/code&amp;gt; object.&lt;br /&gt;
|param1 = path&lt;br /&gt;
|param1text = Path to the model as a string.&lt;br /&gt;
|param2 = lat&lt;br /&gt;
|param2text = Latitude coordinate.&lt;br /&gt;
|param3 = lon&lt;br /&gt;
|param3text = Longitude coordinate.&lt;br /&gt;
|param4 = elev&lt;br /&gt;
|param4text = Optional altitude. Defaults to &amp;lt;code&amp;gt;'''nil'''&amp;lt;/code&amp;gt;, in which case the model will be placed on the terrain. Note that an error will be thrown if the terrain's elevation cannot be found, e.g., if there is no scenery tile loaded at the location.&lt;br /&gt;
|param5 = coord&lt;br /&gt;
|param5text = A &amp;lt;code&amp;gt;geo.Coord&amp;lt;/code&amp;gt; instance, which, if given, replaces '''lat''', '''lon''' and '''elev'''.&lt;br /&gt;
|param6 = hdg&lt;br /&gt;
|param6text = Optional model heading. Defaults to 0.&lt;br /&gt;
|param7 = pitch&lt;br /&gt;
|param7text = Optional model pitch. Defaults to 0.&lt;br /&gt;
|param8 = roll&lt;br /&gt;
|param8text = Optional model roll. Defaults to 0.&lt;br /&gt;
|example1 = var path = 'Models/Geometry/glider.ac';&lt;br /&gt;
var coord = geo.aircraft_position();&lt;br /&gt;
var course = getprop(&amp;quot;/orientation/heading-deg&amp;quot;);&lt;br /&gt;
coord.apply_course_distance(course, 100); # Model to be added 100 m ahead&lt;br /&gt;
var model = geo.put_model(path, coord, course); # Place the default glider&lt;br /&gt;
|example2 = var path = 'Models/Geometry/glider.ac';&lt;br /&gt;
var coord = geo.aircraft_position();&lt;br /&gt;
coord.apply_course_distance(getprop(&amp;quot;/orientation/heading-deg&amp;quot;), 100); # model to be added 100 m ahead&lt;br /&gt;
var model = geo.put_model(path, coord.lat(), coord.lon(), coord.alt(), 0, 45, 50); # Place the default glider&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== tile_index() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = geo.tile_index(lat, lon);&lt;br /&gt;
|text = Returns the current tile's index. Effectively a wrapper for {{func link|tileIndex()}}.&lt;br /&gt;
|param1 = lat&lt;br /&gt;
|param1text = Mandatory latitude coordinate.&lt;br /&gt;
|param2 = lon&lt;br /&gt;
|param2text = Mandatory longitude coordinate.&lt;br /&gt;
|example1 = var ac_pos = geo.aircraft_position();&lt;br /&gt;
print(geo.tile_index(ac_pos.lat(), ac_pos.lon())); # prints the index of the current tile&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== tile_path() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = geo.tile_path(lat, lon);&lt;br /&gt;
|text = Returns the current tile's path under &amp;lt;tt&amp;gt;''[[$FG_SCENERY]]/Terrain''&amp;lt;/tt&amp;gt;.&lt;br /&gt;
|param1 = lat&lt;br /&gt;
|param1text = Mandatory latitude coordinate.&lt;br /&gt;
|param2 = lon&lt;br /&gt;
|param2text = Mandatory longitude coordinate.&lt;br /&gt;
|example1 = var ac_pos = geo.aircraft_position();&lt;br /&gt;
printfinddata(geo.tile_path(ac_pos.lat(), ac_pos.lon())); # prints the path of the current&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== viewer_position() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = geo.viewer_position();&lt;br /&gt;
|text = Returns the current viewer position in the form of a &amp;lt;code&amp;gt;geo.Coord&amp;lt;/code&amp;gt; object. Note that the altitude will be in metres.&lt;br /&gt;
|example1 = var v_pos = geo.viewer_position();&lt;br /&gt;
v_pos.dump();&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Variable ==&lt;br /&gt;
=== ERAD ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = geo.ERAD;&lt;br /&gt;
|text = Radius of Earth in metres. This is almost equivalent to Earth's equatorial radius (6,378,137 m). Value: 6,378,138.12&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Nasal namespaces}}&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Nasal_library/io&amp;diff=143318</id>
		<title>Nasal library/io</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Nasal_library/io&amp;diff=143318"/>
		<updated>2025-12-25T10:34:38Z</updated>

		<summary type="html">&lt;p&gt;Rominet: Fix broken links due to the use of shortened commit IDs (it doesn't work the same way at GitLab as at SourceForge!)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Nasal Navigation|nocat=1}}&lt;br /&gt;
This page contains documentation for the '''&amp;lt;code&amp;gt;io&amp;lt;/code&amp;gt; namespace''' in [[Nasal]]. This namespace provides APIs for input/output (IO) operations on files. The &amp;lt;code&amp;gt;io&amp;lt;/code&amp;gt; namespace is sourced from {{fgdata file|Nasal/io.nas}} and {{simgear file|simgear/nasal/iolib.c}}.&lt;br /&gt;
&lt;br /&gt;
== Functions ==&lt;br /&gt;
=== basename() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = io.basename(path);&lt;br /&gt;
|version = 3.0&lt;br /&gt;
|commit = {{fgdata commit|6ae3fae39397fca5a2f5d6fba0bb2e659a7edc8b|t=commit}}&lt;br /&gt;
|text = Returns last element of a path as a string.&lt;br /&gt;
|param1 = path&lt;br /&gt;
|param1text = Path as a string.&lt;br /&gt;
|example1 = var path = '/demo/demo.xml';&lt;br /&gt;
print(io.basename(path)); # prints &amp;quot;demo.xml&amp;quot;&lt;br /&gt;
|example2 = var path = 'C:\FlightGear\FlightGear 3.2.0\data';&lt;br /&gt;
print(io.basename(path)); # prints &amp;quot;data&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== close() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = io.close(file);&lt;br /&gt;
|text = Flushes and closes the specified file. Returns &amp;lt;code&amp;gt;'''nil'''&amp;lt;/code&amp;gt;.&lt;br /&gt;
|param1 = file&lt;br /&gt;
|param1text = File object as returned by {{func link|open()|page=this}}.&lt;br /&gt;
|example1 = var path = getprop(&amp;quot;/sim/fg-root&amp;quot;) ~ '/keyboard.xml';&lt;br /&gt;
var file = io.open(path);&lt;br /&gt;
print(io.readln(file)); # prints the XML header&lt;br /&gt;
io.close(file);&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== dirname() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = io.dirname(path);&lt;br /&gt;
|version = 3.0&lt;br /&gt;
|commit = {{fgdata commit|6ae3fae39397fca5a2f5d6fba0bb2e659a7edc8b|t=commit}}&lt;br /&gt;
|text = Returns the directory of a path as a string.&lt;br /&gt;
|param1 = path&lt;br /&gt;
|param1text = Path as a string.&lt;br /&gt;
|example1 = var path = '/demo/demo.xml';&lt;br /&gt;
print(io.dirname(path)); # prints &amp;quot;/demo/&amp;quot;&lt;br /&gt;
|example2 = var path = 'C:\FlightGear\FlightGear 3.2.0\data';&lt;br /&gt;
print(io.dirname(path)); # prints &amp;quot;C:/FlightGear/FlightGear 3.2.0/&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== flush() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = io.flush(file);&lt;br /&gt;
|text = Flushes the file's buffer. This means that the contents of the buffer (a kind of temporary storage) are written to the actual file on the hard disk. Note that the buffer is also flushed when {{func link|close()|page=this}} is called.&lt;br /&gt;
|param1 = file&lt;br /&gt;
|param1text = File object as returned by {{func link|open()|page=this}}.&lt;br /&gt;
|example1 = var path = getprop(&amp;quot;/sim/fg-home&amp;quot;) ~ '/Export/demo.txt';&lt;br /&gt;
var file = io.open(path, &amp;quot;w&amp;quot;); # create and open file&lt;br /&gt;
io.write(file, &amp;quot;Hello, World!&amp;quot;); # write (to the buffer)&lt;br /&gt;
&lt;br /&gt;
var file2 = io.open(path); # open the file separatly&lt;br /&gt;
var b = bits.buf(13); # create a buffer&lt;br /&gt;
io.read(file2, b, 13); # read file&lt;br /&gt;
print(b); # prints nothing&lt;br /&gt;
&lt;br /&gt;
io.flush(file); # flush buffer to file&lt;br /&gt;
io.read(file2, b, 13); # read file again&lt;br /&gt;
print(b); # prints &amp;quot;Hello, World!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
io.close(file); # close&lt;br /&gt;
io.close(file2);&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== include() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = io.include(file);&lt;br /&gt;
|version = 3.0&lt;br /&gt;
|commit = {{fgdata commit|6ae3fae39397fca5a2f5d6fba0bb2e659a7edc8b|t=commit}}&lt;br /&gt;
|text = Loads a given Nasal file into where the function is called from.&lt;br /&gt;
|param1 = file&lt;br /&gt;
|param1text = Path to file as a string. If it is just a filename, it will be assumed that the file is in the same folder as calling script. Otherwise, it will be searched for in the standard FlightGear directories (see [[Resolving Paths]]).&lt;br /&gt;
|example1 = io.include(&amp;quot;Nasal/geo.nas&amp;quot;); # include the geo namespace&lt;br /&gt;
var coord = Coord.new(); # create a new Coord object&lt;br /&gt;
coord.set_latlon(0, 0, 2000); # set coordinates&lt;br /&gt;
print(coord.alt()); # prints &amp;quot;2000&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== load_nasal() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = io.load_nasal(file[, module]);&lt;br /&gt;
|text = Loads and executes a given Nasal script into a namespace.&lt;br /&gt;
|param1 = file&lt;br /&gt;
|param1text = Full path to the Nasal file as a string.&lt;br /&gt;
|param2 = module&lt;br /&gt;
|param2text = Optional name of module to load the script into as a string. If not given, the namespace will be the name of the file.&lt;br /&gt;
|example1text = For the examples, first put the below code in to a new file, &amp;lt;tt&amp;gt;''[[$FG_HOME]]/Export/demo.nas''&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
var sayHello = func(){&lt;br /&gt;
    print(&amp;quot;Hello, World!&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|example1 = var file = getprop(&amp;quot;/sim/fg-home&amp;quot;) ~ '/Export/demo.nas';&lt;br /&gt;
io.load_nasal(file); # load into &amp;quot;demo&amp;quot; namespace&lt;br /&gt;
demo.sayHello(); # &amp;quot;Hello, World!&amp;quot; will be printed&lt;br /&gt;
|example2 = var file = getprop(&amp;quot;/sim/fg-home&amp;quot;) ~ '/Export/demo.nas';&lt;br /&gt;
io.load_nasal(file, &amp;quot;myDemo&amp;quot;); # load into &amp;quot;myDemo&amp;quot; namespace&lt;br /&gt;
myDemo.sayHello(); # &amp;quot;Hello, World!&amp;quot; will be printed&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== open() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = io.open(path[, mode]);&lt;br /&gt;
|text = Opens the file with the specified mode and returns an &amp;lt;code&amp;gt;iofile&amp;lt;/code&amp;gt; ghost object representing the file.&lt;br /&gt;
{{{!}} class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Mode !! Meaning&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;r&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}} Opens a file for input (reading) operations. The file must exist.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;w&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}} Creates a new file for output (writing) operations. If the file already exists, its contents will be cleared first.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}} Opens a file for appending data. The file is created if it does not exist.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;r+&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}} Open for input and output operations. The file must exist.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;w+&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}} Creates a new file for input and output operations. If the file already exists, its contents will be cleared first.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;a+&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}} Opens a file for input and output operations. Output operations will append data to the end of the file. Input operations are affected by {{func link|seek()|page=this}}, but output operations will move the position back to the end of the file. The file is created if it does not exist.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;rb&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}} Opens a file for input operations, treating it as a binary file. The file must exist. '''Default mode'''.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;wb&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}} Creates a new file for output operations, treating it as a binary file. If the file already exists, its contents will be cleared first.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;ab&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}} Opens a file for appending data, treating it as a binary file. The file is created if it does not exist.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;r+b&amp;lt;/code&amp;gt; ''or'' &amp;lt;code&amp;gt;rb+&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}} Open for input and output operations, treating it as a binary file. The file must exist.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;w+b&amp;lt;/code&amp;gt; ''or'' &amp;lt;code&amp;gt;wb+&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}} Creates a new file for input and output operations, treating it as a binary file. If the file already exists, its contents will be cleared first.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} &amp;lt;code&amp;gt;a+b&amp;lt;/code&amp;gt; ''or'' &amp;lt;code&amp;gt;ab+&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}} Opens a file for input and output operations, treating it as a binary file. Output operations will append data to the end of the file. Input operations are affected by {{func link|seek()|page=this}}, but output operations will move the position back to the end of the file. The file is created if it does not exist.&lt;br /&gt;
{{!}}}&lt;br /&gt;
|param1 = path&lt;br /&gt;
|param1text = Full path to the file as a string.&lt;br /&gt;
|param2 = mode&lt;br /&gt;
|param2text = Optional mode parameter. See the table below. Defaults to &amp;quot;rb&amp;quot;.&lt;br /&gt;
|example1text = Note that the below example must be run first for the others to work.&lt;br /&gt;
|example1 = var path = getprop(&amp;quot;/sim/fg-home&amp;quot;) ~ '/Export/demo.txt';&lt;br /&gt;
var file = io.open(path, &amp;quot;w&amp;quot;); # open in write mode&lt;br /&gt;
var text = 'Hello, World!' ~ &amp;quot;\r&amp;quot;;&lt;br /&gt;
io.write(file, text);&lt;br /&gt;
io.close(file);&lt;br /&gt;
|example2 = var path = getprop(&amp;quot;/sim/fg-home&amp;quot;) ~ '/Export/demo.txt';&lt;br /&gt;
var file = io.open(path, &amp;quot;r&amp;quot;); # open in read mode&lt;br /&gt;
print(io.readln(file)); # prints &amp;quot;Hello, World!&amp;quot;&lt;br /&gt;
io.close(file);&lt;br /&gt;
|example3 = var path = getprop(&amp;quot;/sim/fg-home&amp;quot;) ~ '/Export/demo.txt';&lt;br /&gt;
var file = io.open(path, &amp;quot;a&amp;quot;); # open in append mode&lt;br /&gt;
var text = &amp;quot;\n&amp;quot; ~ 'This is line 2';&lt;br /&gt;
io.write(file, text);&lt;br /&gt;
io.close(file);&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== read() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = io.read(file, buf, len);&lt;br /&gt;
|text = Reads a given number of bytes from the given file and places those bytes into the given buffer. The bytes will be read from the position of the position indicator (this can be changed using {{func link|seek()|page=this}}). Failures are thrown as runtime errors. Returns the number of bytes successfully read.&lt;br /&gt;
|param1 = file&lt;br /&gt;
|param1text = File object as returned by {{func link|open()|page=this}}.&lt;br /&gt;
|param2 = buf&lt;br /&gt;
|param2text = Buffer to read bytes into. A new buffer can be created using &amp;lt;code&amp;gt;bits.buf(size)&amp;lt;/code&amp;gt;. Must not be smaller than '''len'''. &lt;br /&gt;
|param3 = len&lt;br /&gt;
|param3text = Number of bytes to read as an integer. The position indicator will be advanced by this number of bytes. Must not be greater than the size of '''buf'''.&lt;br /&gt;
|example1 = var path = getprop(&amp;quot;/sim/fg-root&amp;quot;) ~ '/Nasal/geo.nas';&lt;br /&gt;
var file = io.open(path);&lt;br /&gt;
var len = 5;&lt;br /&gt;
var buf = bits.buf(len);&lt;br /&gt;
io.read(file, buf, len);&lt;br /&gt;
print(buf); # prints &amp;quot;# geo&amp;quot;&lt;br /&gt;
io.read(file, buf, len);&lt;br /&gt;
print(buf); # prints &amp;quot; func&amp;quot;&lt;br /&gt;
io.close(file);&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== read_airport_properties() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = io.read_airport_properties(icao, fname[, target]);&lt;br /&gt;
|version = 2.4&lt;br /&gt;
|commit = {{fgdata commit|d4fb116cd22821de9669fd8b48c49b1a526dd6b5|t=commit}}&lt;br /&gt;
|text = Loads an airport-related XML file. Paths will be concatenated in the following form: &amp;lt;tt&amp;gt;''[[$FG_SCENERY]]/Airports/'''''i'''''/'''''c'''''/'''''a'''''/'''''icao'''''.'''''fname'''''.xml''&amp;lt;/tt&amp;gt;. Returns the data as a &amp;lt;code&amp;gt;props.Node&amp;lt;/code&amp;gt; object or &amp;lt;code&amp;gt;'''nil'''&amp;lt;/code&amp;gt; on error. Note that the file ''must'' be in the [[PropertyList XML files|PropertyList]] format, or else the function will fail.&lt;br /&gt;
|param1 = icao&lt;br /&gt;
|param1text = ICAO code of the airport as a string.&lt;br /&gt;
|param2 = fname&lt;br /&gt;
|param2text = Filename of the airport data file as a string, e.g., &amp;quot;groundnet&amp;quot;, &amp;quot;ils&amp;quot;, &amp;quot;jetways&amp;quot;, &amp;quot;rwyuse&amp;quot;, &amp;quot;threshold&amp;quot;, or &amp;quot;twr&amp;quot;. See above for its use in the concatenation of the path.&lt;br /&gt;
|param3 = target&lt;br /&gt;
|param3text = Optional place to put the results in the [[Property Tree]]. May be either a &amp;lt;code&amp;gt;props.Node&amp;lt;/code&amp;gt; object pointing to a place in the Property Tree or a property path.&lt;br /&gt;
|example1 = var data = io.read_airport_properties(&amp;quot;KSFO&amp;quot;, &amp;quot;ils&amp;quot;); # the airport might need changing&lt;br /&gt;
props.dump(data); # dump data&lt;br /&gt;
|example2 = var node = props.globals.getNode(&amp;quot;demo&amp;quot;, 1);&lt;br /&gt;
io.read_airport_properties(&amp;quot;KSFO&amp;quot;, &amp;quot;ils&amp;quot;, node); # the airport might need changing&lt;br /&gt;
props.dump(node); # dump data&lt;br /&gt;
|example3 = var path = &amp;quot;/demo&amp;quot;;&lt;br /&gt;
io.read_airport_properties(&amp;quot;KSFO&amp;quot;, &amp;quot;ils&amp;quot;, path); # the airport might need changing&lt;br /&gt;
props.dump(props.globals.getNode(path)); # dump data&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== read_properties() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = io.read_properties(path[, target]);&lt;br /&gt;
|text = Loads an XML file. Returns the data as a &amp;lt;code&amp;gt;props.Node&amp;lt;/code&amp;gt; object on success or &amp;lt;code&amp;gt;'''nil'''&amp;lt;/code&amp;gt; on error. Note that the file ''must'' be in the [[PropertyList XML files|PropertyList]] format, or else the function will fail.&lt;br /&gt;
|param1 = path&lt;br /&gt;
|param1text = Path to the XML file as a string.&lt;br /&gt;
|param2 = target&lt;br /&gt;
|param2text = Optional place to put the results in the [[Property Tree]]. May be either a &amp;lt;code&amp;gt;props.Node&amp;lt;/code&amp;gt; object pointing to a place in the Property Tree or a property path.&lt;br /&gt;
|example1 = var path = getprop(&amp;quot;/sim/fg-root&amp;quot;) ~ '/keyboard.xml';&lt;br /&gt;
var data = io.read_properties(path);&lt;br /&gt;
props.dump(data); # dump data&lt;br /&gt;
|example2 = var path = getprop(&amp;quot;/sim/fg-root&amp;quot;) ~ '/keyboard.xml';&lt;br /&gt;
var node = props.globals.getNode(&amp;quot;demo&amp;quot;, 1);&lt;br /&gt;
io.read_properties(path, node);&lt;br /&gt;
props.dump(node); # dump data&lt;br /&gt;
|example3 = var path = getprop(&amp;quot;/sim/fg-root&amp;quot;) ~ '/keyboard.xml';&lt;br /&gt;
var node = &amp;quot;/demo&amp;quot;;&lt;br /&gt;
io.read_properties(path, node);&lt;br /&gt;
props.dump(props.globals.getNode(node)); # dump data&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== readfile() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = io.readfile(file);&lt;br /&gt;
|text = Reads and returns a complete file as a string. Failures are thrown as runtime errors.&lt;br /&gt;
|param1 = file&lt;br /&gt;
|param1text = Path to the file as a string.&lt;br /&gt;
|example1 = var file = getprop(&amp;quot;/sim/fg-root&amp;quot;) ~ '/Nasal/math.nas';&lt;br /&gt;
file = io.readfile(file);&lt;br /&gt;
print(file);&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== readln() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = io.readln(file);&lt;br /&gt;
|text = Reads and returns a single line from the file, advancing the position indicator. Accepts different {{wikipedia|newline}} types, including {{abbr|LF|line feed}}, {{abbr|CR|carriage return}}, and CR+LF. Does not include the EOL character(s) in the returned string. End of file or an error is signaled by returning &amp;lt;code&amp;gt;'''nil'''&amp;lt;/code&amp;gt;.&lt;br /&gt;
|param1 = file&lt;br /&gt;
|param1text = File object as returned by {{func link|open()|page=this}}.&lt;br /&gt;
|example1 = var path = getprop(&amp;quot;/sim/fg-root&amp;quot;) ~ '/Nasal/bits.nas';&lt;br /&gt;
var file = io.open(path);&lt;br /&gt;
var line = io.readln(file);&lt;br /&gt;
print(line); # prints &amp;quot;var bit = [var _ = 1];&amp;quot;&lt;br /&gt;
line = io.readln(file);&lt;br /&gt;
print(line); # prints &amp;quot;for (var i = 1; i &amp;lt; 32; i += 1)&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== readxml() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = io.readxml(path[, prefix]);&lt;br /&gt;
|text = Reads an XML file from an absolute path and returns it as a &amp;lt;code&amp;gt;props.Node&amp;lt;/code&amp;gt; object. All nodes will be of the string type. Also, all attributes will be converted in subnodes with a prefix appended. Returns &amp;lt;code&amp;gt;'''nil'''&amp;lt;/code&amp;gt; on error.&lt;br /&gt;
|param1 = path&lt;br /&gt;
|param1text = Absolute path to the XML file.&lt;br /&gt;
|param2 = prefix&lt;br /&gt;
|param2text = Optional prefix to give to the attribute nodes. If it is &amp;lt;code&amp;gt;'''nil'''&amp;lt;/code&amp;gt;, then attributes will be ignored. Defaults to &amp;quot;___&amp;quot; (three underscores).&lt;br /&gt;
|example1text = First, put the following code into &amp;lt;tt&amp;gt;''[[$FG_HOME]]/Export/demo.xml''&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;foo&amp;gt;&lt;br /&gt;
  &amp;lt;bar attr1=&amp;quot;Hello&amp;quot; attr2=&amp;quot;World&amp;quot;&amp;gt;abc&amp;lt;/bar&amp;gt;&lt;br /&gt;
  &amp;lt;bar&amp;gt;xyz&amp;lt;/bar&amp;gt;&lt;br /&gt;
&amp;lt;/foo&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|example1 = var path = getprop(&amp;quot;/sim/fg-home&amp;quot;) ~ '/Export/demo.xml';&lt;br /&gt;
var data = io.readxml(path);&lt;br /&gt;
props.dump(data); # dump data&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== seek() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = io.seek(file, position, whence);&lt;br /&gt;
|text = Moves the pointer position to a specified place.&lt;br /&gt;
|param1 = file&lt;br /&gt;
|param1text = File object as returned by {{func link|open()|page=this}}.&lt;br /&gt;
|param2 = position&lt;br /&gt;
|param2text = Number of bytes offset from '''whence''' as an integer. If '''whence''' is {{func link|SEEK_SET|page=this}}, this cannot be negative.&lt;br /&gt;
|param3 = whence&lt;br /&gt;
|param3text = Specifies position to set the offset from. Must be one of {{func link|SEEK_SET|page=this}} (beginning of file), {{func link|SEEK_END|page=this}} (end of file), or {{func link|SEEK_CUR|page=this}} (current pointer position).&lt;br /&gt;
|example1 = var path = getprop(&amp;quot;/sim/fg-root&amp;quot;) ~ '/Nasal/geo.nas';&lt;br /&gt;
var file = io.open(path, &amp;quot;r&amp;quot;); # open file&lt;br /&gt;
var len = 15;&lt;br /&gt;
var buf = bits.buf(len);&lt;br /&gt;
io.seek(file, 122, io.SEEK_SET); # set to the desired position&lt;br /&gt;
io.read(file, buf, len); # read file&lt;br /&gt;
print(buf); # prints &amp;quot;geo.Coord class&amp;quot;&lt;br /&gt;
io.close(file); # close file&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== stat() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = io.stat(path);&lt;br /&gt;
|text = Calls {{wikipedia|stat (system call)|stat}} and returns a vector containing 12 pieces of data. See the table below for a list of them in order from first in the vector to last. Returns &amp;lt;code&amp;gt;'''nil'''&amp;lt;/code&amp;gt; if the file does not exist.&lt;br /&gt;
{{{!}} class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data !! Meaning &lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} dev {{!!}} Identifier of device containing file&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} ino {{!!}} Inode number&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} mode {{!!}} Protection mode&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} nlink {{!!}} Reference count of hard links&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} uid {{!!}} User identifier of owner&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} gid {{!!}} Group identifier of owner&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} rdev {{!!}} Device identifier (if special file)&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} size {{!!}} Total file size, in bytes&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} atime {{!!}} Time of last access as a Unix timestamp&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} mtime {{!!}} Time of last modification as a Unix timestamp&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} ctime {{!!}} Time of last status change as a Unix timestamp&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} type {{!!}} Type of file. May be one of &amp;quot;unk&amp;quot;, &amp;quot;reg&amp;quot;, &amp;quot;dir&amp;quot;, &amp;quot;chr&amp;quot;, &amp;quot;blk&amp;quot;, &amp;quot;fifo&amp;quot;, &amp;quot;lnk&amp;quot;, or &amp;quot;sock&amp;quot;.&amp;lt;br&amp;gt;See {{simgear file|simgear/nasal/iolib.c|l=214}}.&lt;br /&gt;
{{!}}}&lt;br /&gt;
|param1 = path&lt;br /&gt;
|param1text = Path to the file as a string.&lt;br /&gt;
|example1 = var path = getprop(&amp;quot;/sim/fg-root&amp;quot;) ~ '/Nasal/geo.nas';&lt;br /&gt;
var stat = io.stat(path);&lt;br /&gt;
printf(&amp;quot;File size: %s bytes&amp;quot;, stat[7]); # prints file size&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== tell() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = io.tell(file);&lt;br /&gt;
|text = Returns the current pointer position of the file.&lt;br /&gt;
|param1 = file&lt;br /&gt;
|param1text = File object as returned by {{func link|open()|page=this}}.&lt;br /&gt;
|example1 = var path = getprop(&amp;quot;/sim/fg-root&amp;quot;) ~ '/Nasal/geo.nas';&lt;br /&gt;
var file = io.open(path);&lt;br /&gt;
io.seek(file, 2, io.SEEK_SET);&lt;br /&gt;
print(io.tell(file)); # prints &amp;quot;2&amp;quot;&lt;br /&gt;
io.close(file);&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== write() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = io.write(file, string);&lt;br /&gt;
|text = Writes a string to a given file and returns the number of bytes successfully written.&lt;br /&gt;
|param1 = file&lt;br /&gt;
|param1text = File object as returned by {{func link|open()|page=this}}.&lt;br /&gt;
|param2 = string&lt;br /&gt;
|param2text = String to write to the file.&lt;br /&gt;
{{tip|It is good practice to make sure that all lines, including the last one, end in a newline (&amp;lt;code&amp;gt;\n&amp;lt;/code&amp;gt;). This will especially help if you will be calling {{func link|readln()|page=this}} on the file later.}}&lt;br /&gt;
|example1 = var path = getprop(&amp;quot;/sim/fg-home&amp;quot;) ~ '/Export/demo.txt';&lt;br /&gt;
var file = io.open(path, &amp;quot;wb&amp;quot;); # open in write mode&lt;br /&gt;
var str = 'Hello World!' ~ &amp;quot;\n&amp;quot;;&lt;br /&gt;
io.write(file, str); # write the data&lt;br /&gt;
io.close(file); # close (and flush) the file stream&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== write_properties() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = io.write_properties(path, prop);&lt;br /&gt;
|text = Writes nodes from the [[Property Tree]] to an XML file in FlightGear's [[PropertyList XML files|PropertyList]] format. If the file does not exist, it will be created. If it does, all contents will be overwritten. Returns the filename on success or &amp;lt;code&amp;gt;'''nil'''&amp;lt;/code&amp;gt; on error.&lt;br /&gt;
|param1 = path&lt;br /&gt;
|param1text = Path of the file to write to as a string. If it does not have a &amp;lt;tt&amp;gt;.xml&amp;lt;/tt&amp;gt; extension, &amp;lt;tt&amp;gt;.xml&amp;lt;/tt&amp;gt; will be added to it.&lt;br /&gt;
|param2 = prop&lt;br /&gt;
|param2text = Either a property path or a &amp;lt;code&amp;gt;props.Node&amp;lt;/code&amp;gt; object. Note that, when the latter is used, results will be more accurate if it refers to a node in the Property Tree, otherwise the node will have to be copied, which may change the node type.&lt;br /&gt;
|example1 = var path = getprop(&amp;quot;/sim/fg-home&amp;quot;) ~ '/Export/demo.xml';&lt;br /&gt;
var prop = &amp;quot;/position&amp;quot;;&lt;br /&gt;
print(io.write_properties(path, prop));&lt;br /&gt;
|example2 = var path = getprop(&amp;quot;/sim/fg-home&amp;quot;) ~ '/Export/demo.xml';&lt;br /&gt;
var prop = props.globals.getNode(&amp;quot;position&amp;quot;);&lt;br /&gt;
print(io.write_properties(path, prop));&lt;br /&gt;
|example3 = var path = getprop(&amp;quot;/sim/fg-home&amp;quot;) ~ '/Export/demo.xml';&lt;br /&gt;
var tree = {&lt;br /&gt;
    &amp;quot;a&amp;quot;: 12.34,&lt;br /&gt;
    &amp;quot;b&amp;quot;: &amp;quot;Hello, World!&amp;quot;,&lt;br /&gt;
    &amp;quot;c&amp;quot;: {&lt;br /&gt;
        &amp;quot;d&amp;quot;: [1, 2, 3]&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
var prop = props.Node.new(tree);&lt;br /&gt;
print(io.write_properties(path, prop));&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== writexml() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = io.basename(path, node[, indent[, prefix]]);&lt;br /&gt;
|text = Writes a node structure to an XML file.&lt;br /&gt;
|param1 = path&lt;br /&gt;
|param1text = Path of the file to write to as a string. If it does not have a &amp;lt;tt&amp;gt;.xml&amp;lt;/tt&amp;gt; extension, &amp;lt;tt&amp;gt;.xml&amp;lt;/tt&amp;gt; will be added to it.&lt;br /&gt;
|param2 = node&lt;br /&gt;
|param2text = &amp;lt;code&amp;gt;props.Node&amp;lt;/code&amp;gt; object containing the data to write to the file. Attributes should be included as child nodes with a certain '''prefix'''. See also {{func link|readxml()|page=this}}. It must also have just one root node.&lt;br /&gt;
|param3 = indent&lt;br /&gt;
|param3text = Optional string specifying what characters should be used to indent lines. Defaults to one horizontal tab character (&amp;lt;tt&amp;gt;\t&amp;lt;/tt&amp;gt;).&lt;br /&gt;
|param4 = prefix&lt;br /&gt;
|param4text = Optional string specifying what prefixes attributes will have.&lt;br /&gt;
|example1 = var path = getprop(&amp;quot;/sim/fg-home&amp;quot;) ~ '/Export/demo.xml';&lt;br /&gt;
var tree = {&lt;br /&gt;
    &amp;quot;source&amp;quot;: {&lt;br /&gt;
        ___type: &amp;quot;book&amp;quot;, # will become an attribute&lt;br /&gt;
        &amp;quot;title&amp;quot;: &amp;quot;The Grand Book of Code&amp;quot;,&lt;br /&gt;
        &amp;quot;author-last&amp;quot;: &amp;quot;Echter&amp;quot;,&lt;br /&gt;
        &amp;quot;author-first&amp;quot;: &amp;quot;William C.&amp;quot;,&lt;br /&gt;
        &amp;quot;year&amp;quot;: &amp;quot;2011&amp;quot;,&lt;br /&gt;
        &amp;quot;publisher&amp;quot;: &amp;quot;Pen Publishers&amp;quot;,&lt;br /&gt;
        &amp;quot;city&amp;quot;: &amp;quot;Manchester&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
var node = props.Node.new(tree);&lt;br /&gt;
io.writexml(path, node);&lt;br /&gt;
|example2 = var path = getprop(&amp;quot;/sim/fg-home&amp;quot;) ~ '/Export/demo.xml';&lt;br /&gt;
var tree = {&lt;br /&gt;
    &amp;quot;source&amp;quot;: {&lt;br /&gt;
        _attr_type: &amp;quot;book&amp;quot;,&lt;br /&gt;
        &amp;quot;title&amp;quot;: &amp;quot;The Grand Book of Code&amp;quot;,&lt;br /&gt;
        &amp;quot;author-last&amp;quot;: &amp;quot;Echter&amp;quot;,&lt;br /&gt;
        &amp;quot;author-first&amp;quot;: &amp;quot;William C.&amp;quot;,&lt;br /&gt;
        &amp;quot;year&amp;quot;: &amp;quot;2011&amp;quot;,&lt;br /&gt;
        &amp;quot;publisher&amp;quot;: &amp;quot;Pen Publishers&amp;quot;,&lt;br /&gt;
        &amp;quot;city&amp;quot;: &amp;quot;Manchester&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
var node = props.Node.new(tree);&lt;br /&gt;
io.writexml(path, node, &amp;quot;  &amp;quot;, &amp;quot;_attr_&amp;quot;); # indent using two spaces&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
=== SEEK_CUR ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = io.SEEK_CUR;&lt;br /&gt;
|text = Used with {{func link|seek()|page=this}}. Means the offset will be counted from the current pointer postion.&lt;br /&gt;
}}&lt;br /&gt;
=== SEEK_END ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = io.SEEK_END;&lt;br /&gt;
|text = Used with {{func link|seek()|page=this}}. Means the offset will be counted from the end of the file.&lt;br /&gt;
}}&lt;br /&gt;
=== SEEK_SET ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = io.SEEK_SET;&lt;br /&gt;
|text = Used with {{func link|seek()|page=this}}. Means the offset will be counted from the beginning of the file.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Nasal namespaces}}&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Highlighting&amp;diff=143317</id>
		<title>Highlighting</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Highlighting&amp;diff=143317"/>
		<updated>2025-12-25T10:31:00Z</updated>

		<summary type="html">&lt;p&gt;Rominet: Use full commit ID&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
Highlighting is an experimental system on next for highlighting related animated parts of one's aircraft such as the rudder pedals and the rudder, or the undercarriage lever in the cockpit and the undercarriage itself. It also lists the properties that are used in these animations.&lt;br /&gt;
&lt;br /&gt;
The intention is to enable the controls of an aircraft to be explored visually. For example one can find what controls the steering on a 777 by moving the mouse over the nose-wheel; this will highlight the tiller control in the cockpit. In practise it's easier to do this using an Extra View window so that one can see inside the cockpit at the same time as the external aircraft.&lt;br /&gt;
&lt;br /&gt;
== Demo video ==&lt;br /&gt;
&lt;br /&gt;
See: http://op59.net/fg-highlighting-demo.ogv&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
See menu '''Help / Highlighting''' which opens the '''Highlighting''' dialogue box with an '''Enabled''' checkbox. When enabled, moving the mouse over an animated part of the aircraft such as a control surface or cockpit control will highlight the animation, plus any related animations. The dialogue box will also show the properties that are involved in the animation and information about related dialogue boxes.&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
&lt;br /&gt;
Highlighting currently works best with YASim aircraft - the system gathers information from YASim about associations between properties (e.g. &amp;lt;code&amp;gt;/controls/flight/flaps&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/surface-positions/flap-pos-norm&amp;lt;/code&amp;gt;). One can gather similar information from JSBSim but this is not yet working properly.&lt;br /&gt;
&lt;br /&gt;
Information is also gathered from autopilot filters (on the 777 these associate &amp;lt;code&amp;gt;/controls/flight/rudder-nul&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;/fcs/fbw/yaw/rudder-ratio-out&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
See: {{flightgear commit|1bafe15c4cc5a05509ee06b50cfe123f6f36ef54}}&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Changelog_2016.2&amp;diff=143316</id>
		<title>Changelog 2016.2</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Changelog_2016.2&amp;diff=143316"/>
		<updated>2025-12-25T10:29:21Z</updated>

		<summary type="html">&lt;p&gt;Rominet: Fix broken links due to the use of shortened commit IDs (it doesn't work the same way at GitLab as at SourceForge!)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{changelogs|prev=2016.1|next=2016.3}}&lt;br /&gt;
&lt;br /&gt;
The FlightGear development team is delighted to announce the v2016.2 &amp;quot;Barcelona&amp;quot; release of FlightGear, the free, open-source flight simulator. This new version contains many exciting new features, enhancements and bugfixes. Highlights in this release include the Space Shuttle, ALS filters, a new HTTP TerraSync system, and improvements to our automatic ATIS.&lt;br /&gt;
&lt;br /&gt;
Founded in 1997, FlightGear is developed by a worldwide group of volunteers, brought together by a shared ambition to create the most realistic flight simulator possible that is free to use, modify and distribute. FlightGear is used all over the world by desktop flight simulator enthusiasts, for research in universities and for interactive exhibits in museums.&lt;br /&gt;
&lt;br /&gt;
FlightGear features more than 400 aircraft, a worldwide scenery database, a multiplayer environment, detailed sky modelling, a flexible and open aircraft modelling system, varied networking options, multiple display support, a powerful scripting language and an open architecture. Best of all, being open-source, the simulator is owned by the community and everyone is encouraged to contribute. &lt;br /&gt;
&lt;br /&gt;
Download FlightGear v2016.2 for free from [http://www.flightgear.org/ FlightGear.org]&lt;br /&gt;
&lt;br /&gt;
FlightGear – Fly Free!&lt;br /&gt;
&lt;br /&gt;
=== Release name ===&lt;br /&gt;
In line with the [[release plan]] adopted in FlightGear v2016.1, this release has been named after its default airport, [[Barcelona–El Prat Airport|Barcelona Airport]] (LEBL).&lt;br /&gt;
&lt;br /&gt;
=== Major enhancements in this release ===&lt;br /&gt;
==== Core ====&lt;br /&gt;
* Video configuration can now be saved.&lt;br /&gt;
* The [[TerraSync]] server has been switched to a HTTP-based system instead of SVN.&lt;br /&gt;
* All scenery models have been cleaned up and moved to TerraSync.&lt;br /&gt;
&lt;br /&gt;
==== ATIS and METAR ====&lt;br /&gt;
* Various improvements in the reporting of wind, atmospheric pressure, and sky cover&lt;br /&gt;
* Custom ATIS formats for the US/Canada/Pacific region and the UK based on real recordings&lt;br /&gt;
* Bug fixes and data updates to reduce occurrence of NIL weather&lt;br /&gt;
&lt;br /&gt;
==== Atmospheric Light Scattering ====&lt;br /&gt;
* Filters have been added, enabling infrared and night-vision views.&lt;br /&gt;
* [[ALS technical notes#ALS procedural lights|ALS procedural lights]] have been added.&lt;br /&gt;
* An ALS-based system for displaying [[birds]] has been added.&lt;br /&gt;
&lt;br /&gt;
==== Environment Rendering ====&lt;br /&gt;
* A bug that prevented precipitation from appearing has been fixed.&lt;br /&gt;
&lt;br /&gt;
==== Multiplayer ====&lt;br /&gt;
* A bug in the multiplayer protocol has been {{flightgear commit|4f8cbbb204bd9e28aeed71de8ae0b88019981124|t=fixed}}.&lt;br /&gt;
&lt;br /&gt;
==== Usability ====&lt;br /&gt;
* [[Route Manager]] now allows entry of a space-separated list of waypoints.&lt;br /&gt;
&lt;br /&gt;
==== Internationalization ====&lt;br /&gt;
* The Italian translation for menus, loading messages and help for command line switches has been updated.&lt;br /&gt;
&lt;br /&gt;
==== Scenery ====&lt;br /&gt;
* Further improvements to regional textures.&lt;br /&gt;
* New buildings for Heathrow Airport and [[Barcelona–El Prat Airport]]&lt;br /&gt;
&lt;br /&gt;
==== Nasal Scripting ====&lt;br /&gt;
* A bug in {{func link|clamp()|math}} has been {{simgear commit|bba11c18d1ebf2c347d6330ff1d5b9aef75e76cb|t=fixed}}.&lt;br /&gt;
&lt;br /&gt;
==== Documentation ====&lt;br /&gt;
* A Chinese translation of the Manual has been added.&lt;br /&gt;
&lt;br /&gt;
==== Highlighted new and improved aircraft ====&lt;br /&gt;
* [[Parachutist]]&lt;br /&gt;
* [[Piper J3 Cub]]&lt;br /&gt;
* [[Boeing 757]]&lt;br /&gt;
* [[Extra EA-500]]&lt;br /&gt;
* [[Saab JA-37 Viggen]]&lt;br /&gt;
* [https://forum.flightgear.org/viewtopic.php?f=4&amp;amp;t=28475 Cessna 182S Skylane]&lt;br /&gt;
* [[Space Shuttle]]&lt;br /&gt;
* [[Beagle Pup]]&lt;br /&gt;
* [[Icaro Laminar 13 MRX]]&lt;br /&gt;
&lt;br /&gt;
==== Other ====&lt;br /&gt;
===== FGPromo: A FlightGear Promotional Video =====&lt;br /&gt;
After more than 5 months of hard work, FGPromo, a video showing off FlightGear at its finest, has been released!&lt;br /&gt;
{{#ev:youtube|yPBdJT2Pkdc||center}}&lt;br /&gt;
&lt;br /&gt;
==== Bug fixes ====&lt;br /&gt;
* See [https://sourceforge.net/p/flightgear/codetickets/search/?q=%21ticket_num%3A437+AND+status%3AFixed+AND+mod_date%3A%5B2016-02-17T00%3A00%3A00Z+TO+2016-05-17T00%3A00%3A00Z%5D our bugtracker] for a list, albeit incomplete, of the bugs fixed in this release.&lt;br /&gt;
&lt;br /&gt;
[[Category:FlightGear changelogs]]&lt;br /&gt;
[[Category:New Versioning Scheme]]&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Performance_testing_by_replaying_recordings&amp;diff=143315</id>
		<title>Performance testing by replaying recordings</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Performance_testing_by_replaying_recordings&amp;diff=143315"/>
		<updated>2025-12-25T10:27:35Z</updated>

		<summary type="html">&lt;p&gt;Rominet: Use full commit ID (which are safer, even though the length was sufficient for GitLab here)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
Continuous recordings can record and replay the main window's size and the view (view type, direction, zoom), so replaying can be used to do standardised performance testing of the rendering code.&lt;br /&gt;
&lt;br /&gt;
We have a Python script in the flightgear repository called {{flightgear file|scripts/python/performance_replay.py}} that replays a recording in Flightgear while gathering frame-time information, from which is outputs statistics such as average and standard deviation frame times and average frame rate.&lt;br /&gt;
&lt;br /&gt;
Recordings can be replayed from a URL, which simplifies various use cases.&lt;br /&gt;
&lt;br /&gt;
As of '''2021-11-8''', these changes have been pushed to next; See: {{flightgear commit|50a4d869617e6dd85ea8db8843f2e3cf99bc6834}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
Example usage replaying a short recording of the Harrier-GR3 at LOWI, replaying window size and view changes, and then showing frame-rate statistics:&lt;br /&gt;
&lt;br /&gt;
    ./flightgear/scripts/python/performance_replay.py -f ./run_fgfs.sh -i http://op59.net/harrier-gr3-20211107-162046-continuous.fgtape&lt;br /&gt;
&lt;br /&gt;
== Future ==&lt;br /&gt;
&lt;br /&gt;
* Improve communication - at the moment, the telnet protocol is slow and limits how much data can be transfered, which restricts the amount of data sent from Flightgear to performance_replay.py after replay has finished.&lt;br /&gt;
* Specify a fixed set of weather parameters, possibly including a fixed seed for random number generation. Also see [[Advanced_weather#Connection_with_the_multiplayer_system]].&lt;br /&gt;
* Write output data to a file so it can be available to other programmes, e.g. for plotting.&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
* This was worked on in the 2021 Hackathon - see: [[Hackathon_Proposal:_Performance_testing_by_replaying_recordings]]&lt;br /&gt;
* For details of the Continuous recording  format, see: {{flightgear source|path=docs-mini/README-recordings.md}}&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Canvas_GUI&amp;diff=143314</id>
		<title>Canvas GUI</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Canvas_GUI&amp;diff=143314"/>
		<updated>2025-12-25T10:24:25Z</updated>

		<summary type="html">&lt;p&gt;Rominet: Fix broken links due to the use of shortened commit IDs (it doesn't work the same way at GitLab as at SourceForge!)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Out of date}}&lt;br /&gt;
{{Canvas Navigation}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{cquote&lt;br /&gt;
  |&amp;lt;nowiki&amp;gt;I'd love for FlightGear to be runtime configurable through a GUI --&lt;br /&gt;
just drag and drop a property onto a drop-down menu, a keyboard&lt;br /&gt;
diagram, etc., and build new dialogs while the plane is flying.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  |{{cite web |url=http://www.mail-archive.com/flightgear-devel%40flightgear.org/msg09560.html&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;starting the XML GUI; early implementors needed&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;David Megginson&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt; Fri, 08 Nov 2002 17:15:38 -0800&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Note| the GUI API documentation can be found here: [[Canvas GUI API]]}}&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
{{Mergeto|Howto:Creating a Canvas GUI Widget}}&lt;br /&gt;
In order to eventually phase out PUI completely, we need to stop adding PUI dependencies to the source tree. We now have the Canvas system, and there’s a formal decision to modernize the GUI using the Canvas, and completely replace PUI sooner rather than later.&lt;br /&gt;
&lt;br /&gt;
The shortcomings of our GUI, and PUI in particular, have been repeatedly brought up on the devel list over the years.&lt;br /&gt;
&lt;br /&gt;
It was a lot of work to get rid of hard-coded PUI dialogs, and we still have a bunch of hard-coded PUI widgets – as long as we have those, getting totally rid of PUI will be increasingly difficult, because each hard-coded widget will either need to be phased out or manually ported.&lt;br /&gt;
&lt;br /&gt;
Which is exactly the reason why adding additional PUI widgets to the source tree is a really bad idea and counter-constructive to accomplish our long-term goal of phasing out PUI completely.&lt;br /&gt;
&lt;br /&gt;
We should really work out a plan to get rid of hard-coded PUI widgets and re-implement them using canvas-driven widgets, and extend the canvas as we go. Once that is accomplished, completely replacing PUI will become much more straightforward, because it will basically boil down to writing a parser in Nasal to turn our existing dialogs into canvas widgets.&lt;br /&gt;
&lt;br /&gt;
Adding more and more hard-coded PUI widgets to the mix will make our work increasingly difficult, especially if they implement important and useful features that we really want.&lt;br /&gt;
&lt;br /&gt;
We really need to keep the total picture in mind, or we are growing our todo lists with stuff that wasn’t really necessary in the first place.&lt;br /&gt;
&lt;br /&gt;
This discussion is solely focussed on providing a sane migration path, with the ultimate goal of getting totally rid of PUI.&lt;br /&gt;
&lt;br /&gt;
Given that we have agreed to depreciate PUI, there's simply no reasonable reason to keep on adding PUI widgets/dependencies to the source tree - we need to stop doing that right now. Instead, we need to identify required Nasal/Canvas enhancements, in order to allow these widgets to be implemented outside C++ space.&lt;br /&gt;
&lt;br /&gt;
== Status 04/2014 ==&lt;br /&gt;
{{Note|As of 04/2014, we have several people independently interested in working on Canvas/GUI features:&lt;br /&gt;
* owenpsmith &amp;amp; macnab (via [[Aircraft Generation Wizard]])&lt;br /&gt;
* Philosopher working on an [[Interactive Nasal Console]] using Canvas&lt;br /&gt;
* kuifje09 working on Canvas/GUI widgets (for [[FGPlot]])&lt;br /&gt;
* galvedro &amp;amp; Necolatis working on a Canvas-based procedurally created failure management dialog [[A Failure Management Framework for FlightGear]]&lt;br /&gt;
* punkedpanda interested in helping with GUI improvements&lt;br /&gt;
* also, one user mentioned being interested in working on an integrated GUI launcher in {{Issue|1295}}&lt;br /&gt;
It would make sense to coordinate all these efforts a little, so if you're working on anything related, please get in touch via the Canvas subforum.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{cquote&lt;br /&gt;
  |&amp;lt;nowiki&amp;gt;So far, Canvas/MapStructure have helped make 2D maps available for all needs in FlightGear, and a canvas/Nasal-based parser that processes our existing GUI dialogs/HUDs or 2D panels code would have the same benefits (GUI: 10k, HUD:3k, 2D panels:4k). Generic canvas/Nasal framework for each of those would probably also be under 4k in total. But it is so much easier being NOT consistent.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=209465#p209465&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;Re: scaling instruments in xml&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;Hooray&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;Wed May 14&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Before creating new widgets please have a look at Tom's fgdata branch: {{gitorious url|fg|toms-fgdata|branch=canvas-gui-demo}}&lt;br /&gt;
Tom is currently working on creating a standard widget and layout system (similar to eg. Qt). At the moment there only exists a button widget (but already with focus, and hover/press effects) [http://forum.flightgear.org/viewtopic.php?f=24&amp;amp;p=186563#p186563].&lt;br /&gt;
Specifically, see {{gitorious source|fg|toms-fgdata|branch=canvas-gui-demo|path=Nasal/canvas/gui|view=tree|pre=$FG_ROOT}}.&lt;br /&gt;
&lt;br /&gt;
Before we can replace PUI with a Canvas based GUI a lot work has to be done. Tom is currently working on extending the current canvas windows manager to also become a simple decorator engine which will allow creating unified window decorations and handling like dragging/resizing/closing windows. When this is done we can think of creating simple dialogs. And then we can start creating different widgets and see how to implement a layouting engine. And only then we can start thinking about replacing PUI dialogs with Canvas dialogs. (We may also need a fallback for older hardware as render-to-texture probably won't be supported).&lt;br /&gt;
&lt;br /&gt;
So in the current state it would bring us much benefit to create a separate canvas dialog showing log messages without being able to show it in normal PUI dialogs. Later if we have got a list widgets it will be very easy to just print the log messages to this list widget.&lt;br /&gt;
&lt;br /&gt;
== Creating new Widgets ==&lt;br /&gt;
&lt;br /&gt;
* text label&lt;br /&gt;
* checkbox&lt;br /&gt;
* radio buttons&lt;br /&gt;
* text field&lt;br /&gt;
* edit box&lt;br /&gt;
&lt;br /&gt;
== PUI Widgets ==&lt;br /&gt;
Canvas dialogs are definitely the way to go, as they are far more flexible and will replace PUI in the future. Since I think FG 2.11 you can create canvas dialogs with window decoration, including a title bar allowing to drag the window around and a close icon:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
var dlg = canvas.Window.new([400,300], &amp;quot;dialog&amp;quot;)&lt;br /&gt;
    .set(&amp;quot;title&amp;quot;, &amp;quot;My Canvas Dialog&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The existing XML dialogs can still be used and will also be usable in the future (by a backwards compatibility layer or some migration path). &lt;br /&gt;
&lt;br /&gt;
Implementing all our existing PUI/XML-based dialogs is almost certainly going to be more work than providing a Nasal-space migration path/wrapper that reads the old dialogs and turns them into &amp;quot;modern&amp;quot; canvas windows, possibly by just overwriting the dialog-show fgcommand via the new removecommand/addcommand APIs. And phasing out canvas widget should be fairly straightforward too, because those can be directly mapped to embedded/nested canvas textures, so I wouldn't worry too much ...&lt;br /&gt;
&lt;br /&gt;
All standard widgets (textbox, label, radio button, checkbox etc) can be provided by a Nasal parser that turns the existing GUI XML into canvas widgets — our hard-coded widgets however, need to be separately re-implemented. Here's a list of custom, hardcoded, PUI widgets which we will need to re-implement using the Canvas, usually located in {{flightgear file|src/GUI}}:&lt;br /&gt;
&lt;br /&gt;
* {{flightgear file|src/GUI/MapWidget.cxx|t=map widget}} (see [[MapStructure]])&lt;br /&gt;
** {{flightgear commit|433af2b51a3bcec7488ac2fbf94b8edfc1e1cb43}} (expose the flight recorder/replay buffers via cppbind)&lt;br /&gt;
** {{flightgear commit|11c00afaec8836a5f52bcf8832ff2d50e2f11523}} (add support for helipads from apt.dat 850+)&lt;br /&gt;
** {{flightgear commit|6bf47cd248ed388e6a4dd3ffa2d00977b00b62fb}} (MapWidget: make use of the new POI system and display cities on the map. This is meant as a preview.)&lt;br /&gt;
** {{flightgear commit|658bda6e40da65c317fd387ed1a2fcf628e7ed1b}} (MapWidget: Show counties and towns as well, depending on the zoom. Some colors added.)&lt;br /&gt;
** {{flightgear commit|38a373ba845d2bbea920cbcff90be5dc33040fe5}} (Display AI traffic route in map. Add some helpers so MapWidget can show the origin and destination of AIAircraft with a FlightPlan.)&lt;br /&gt;
* {{flightgear file|src/GUI/FGPUIDialog.cxx|l=169|t=loglist}} {{progressbar|70}}&lt;br /&gt;
** Required APIs: logbuffer needs to be exposed to Nasal via cppbind&lt;br /&gt;
* {{flightgear file|src/GUI/WaypointList.cxx|l=169|t=waypoint list}}&lt;br /&gt;
** {{flightgear commit|7afedb1702829b244fcf998391a83833efee7f01}}&lt;br /&gt;
** {{flightgear commit|846fd2169832c8938f04386139de746a06e80d4b}}&lt;br /&gt;
* {{flightgear file|src/GUI/AirportList.cxx|t=airport list}}&lt;br /&gt;
** Required APIs: extended NasalPositioned API&lt;br /&gt;
* {{flightgear file|src/GUI/WaypointList.cxx|t=waypoint list}}&lt;br /&gt;
** Required APIs: extended NasalPositioned API&lt;br /&gt;
* {{flightgear file|src/GUI/property_list.cxx|t=property list}}&lt;br /&gt;
* {{flightgear file|src/GUI/PUIFileDialog.cxx|t=file dialog}}&lt;br /&gt;
* {{flightgear file|src/GUI/menubar.cxx|t=menubar}} (see [[Howto:Making a Canvas Menubar]])&lt;br /&gt;
&lt;br /&gt;
In order to re-implement these using the Canvas system, we need to identify Nasal APIs that are currently missing, and which need to be provided via the cppbind framework.&lt;br /&gt;
&lt;br /&gt;
This way, C++ developers can concentrate on providing the missing Nasal/C++ hooks, whereas Nasal developers can provide the required widgets.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Canvas GUI]]&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Nasal_library/math&amp;diff=143313</id>
		<title>Nasal library/math</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Nasal_library/math&amp;diff=143313"/>
		<updated>2025-12-25T10:19:10Z</updated>

		<summary type="html">&lt;p&gt;Rominet: Fix broken links due to the use of shortened commit IDs (it doesn't work the same way at GitLab as at SourceForge!)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Nasal Navigation|nocat=1}}&lt;br /&gt;
This page contains documentation for the '''&amp;lt;code&amp;gt;math&amp;lt;/code&amp;gt; namespace''' in [[Nasal]]. This namespace provides various mathematical [[#Functions|functions]] and [[#Variables|variables]]. The &amp;lt;code&amp;gt;math&amp;lt;/code&amp;gt; namespace is sourced from two files:&lt;br /&gt;
* {{simgear file|simgear/nasal/mathlib.c}}&lt;br /&gt;
* {{fgdata file|Nasal/math.nas}}&lt;br /&gt;
&lt;br /&gt;
{{tip|Copy &amp;amp; paste the examples into your [[Nasal Console]] and execute them to see what they do.|width=70%}}&lt;br /&gt;
&lt;br /&gt;
== Functions ==&lt;br /&gt;
=== abs() ===&lt;br /&gt;
&amp;lt;!-- &lt;br /&gt;
Duplicate of [[Nasal library#abs()]]&lt;br /&gt;
--&amp;gt;{{Nasal doc&lt;br /&gt;
|syntax = math.abs(x);&lt;br /&gt;
|source = {{fgdata file|Nasal/math.nas|t=Source}}&lt;br /&gt;
|text = This simple function returns the {{wikipedia|absolute value|noicon=1}} of the provided number.&lt;br /&gt;
|param1 = x&lt;br /&gt;
|param1text = This argument is required and should be a number.&lt;br /&gt;
|example1 = print(math.abs(1)); # prints &amp;quot;1&amp;quot;&lt;br /&gt;
|example2 = print(math.abs(-1)); # prints &amp;quot;1&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== acos() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = math.acos(x);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/mathlib.c|l=196|t=Source}}&lt;br /&gt;
|text = Implements the arccosine trigonometric function. Returns an angle in radians from the given ratio.&lt;br /&gt;
|param1 = x&lt;br /&gt;
|param1text = Mandatory number that should be a ratio in the range -1 ≤ x ≤ 1.&lt;br /&gt;
|example1 = var ratio = 1 / 1.414;&lt;br /&gt;
print(math.acos(ratio) * R2D); # prints the angle in degrees (approximately 45)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== asin() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = math.asin(x);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/mathlib.c|l=187|t=Source}}&lt;br /&gt;
|text = Implements the arcsine trigonometric function. Returns an angle in radians from the given ratio.&lt;br /&gt;
|param1 = x&lt;br /&gt;
|param1text = Mandatory number that should be a ratio in the range -1 ≤ x ≤ 1.&lt;br /&gt;
|example1 = var ratio = 1 / 1.414;&lt;br /&gt;
print(math.asin(ratio) * R2D); # prints the angle in degrees (approximately 45)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== atan2() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = math.atan2(y, x);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/mathlib.c|l=78|t=Source}}&lt;br /&gt;
|text = Implements the {{wikipedia|Atan2|two-argument version}} of the arctangent trigonometric function. Returns an angle in radians between the positive x-axis of a plane and the point given by the coordinates (x, y) on it.&lt;br /&gt;
|param1 = y&lt;br /&gt;
|param1text = Mandatory y-axis coordinate as a number.&lt;br /&gt;
|param2 = x&lt;br /&gt;
|param2text = Mandatory x-axis coordinate as a number.&lt;br /&gt;
|example1 = var x = 1;&lt;br /&gt;
var y = 1;&lt;br /&gt;
print(math.atan2(y, x) * R2D); # prints the angle in degrees (45)&lt;br /&gt;
|example2 = var x = -1;&lt;br /&gt;
var y = -1;&lt;br /&gt;
print(math.atan2(y, x) * R2D); # prints the angle in degrees (-135)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== avg() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = math.avg(x[, y[, z[, ...]]]);&lt;br /&gt;
|source = {{fgdata file|Nasal/math.nas|t=Source}}&lt;br /&gt;
|version = 2.4&lt;br /&gt;
|commit = {{fgdata commit|36c48caaf273b0547bc8b54ae1ec8c7f4b9d4151|t=Commit}}&lt;br /&gt;
|text = Returns the average of the given numbers. There must be at least one argument, but there may be as many as you like.&lt;br /&gt;
|example1 = print(math.avg(1, 2, 3, 4)); # prints 2.5&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== ceil() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = math.ceil(x);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/mathlib.c|l=97|t=Source}}&lt;br /&gt;
|version = 2.10&lt;br /&gt;
|commit = {{simgear commit|830bc3eac382d4d3d709e263f7700350f5ea7523|t=Commit}}&lt;br /&gt;
|text = Returns the {{wikipedia|Ceiling function|ceiling}} of a number, that is, the smallest following integer.&lt;br /&gt;
|param1 = x&lt;br /&gt;
|param1text = Number to return the ceiling of.&lt;br /&gt;
|example1 = print(math.ceil(2)); # prints 2&lt;br /&gt;
|example2 = print(math.ceil(2.1)); # prints 3&lt;br /&gt;
|example3 = print(math.ceil(-2.9)); # prints -2&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== clamp() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = math.clamp(x, min, max);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/mathlib.c|l=117|t=Source}}&lt;br /&gt;
|version = 2.10&lt;br /&gt;
|commit = {{simgear commit|830bc3eac382d4d3d709e263f7700350f5ea7523|t=Commit}}&lt;br /&gt;
|text = Clamps a number so that is within the range given. All arguments are mandatory and must be numbers.&lt;br /&gt;
{{Note|Up until FG v2016.2, the clamping algorithm was not correct, meaning that the function will not behave correctly in FlightGear versions below 2016.2. It was fixed by {{simgear commit|bba11c18d1ebf2c347d6330ff1d5b9aef75e76cb}}}}.&lt;br /&gt;
|param1 = x&lt;br /&gt;
|param1text = The number to be clamped.&lt;br /&gt;
|param2 = min&lt;br /&gt;
|param2text = Lower limit of the clamping range.&lt;br /&gt;
|param3 = max&lt;br /&gt;
|param3text = Upper limit of the clamping range.&lt;br /&gt;
|example1text = Note that none of these examples will work properly in FlightGear versions below 2016.2.&lt;br /&gt;
|example1 = print(math.clamp(5, 1, 10)); # prints 5&lt;br /&gt;
|example2 = print(math.clamp(0, 1, 10)); # prints 1&lt;br /&gt;
|example3 = print(math.clamp(12, 1, 10)); # prints 10&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== cos() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = math.cos(x);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/mathlib.c|l=32|t=Source}}&lt;br /&gt;
|text = Implements the cosine trigonometric function. Returns a ratio from a given angle in radians.&lt;br /&gt;
|param1 = x&lt;br /&gt;
|param1text = Mandatory number that should be an angle in radians.&lt;br /&gt;
|example1 = var angle = 180 * D2R;&lt;br /&gt;
print(math.cos(angle)); # prints the ratio (-1)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== exp() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = math.exp(x);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/mathlib.c|l=41|t=Source}}&lt;br /&gt;
|text = Returns the value of ''{{wikipedia|E (mathematical constant)|e|noicon=1}}'' raised to the given poweer.&lt;br /&gt;
|param1 = x&lt;br /&gt;
|param1text = Mandatory number which is the value of the exponent.&lt;br /&gt;
|example1 = printf(&amp;quot;%.4f&amp;quot;, math.exp(2)); # prints 7.3891&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== floor() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = math.floor(x);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/mathlib.c|l=88|t=Source}}&lt;br /&gt;
|version = 2.10&lt;br /&gt;
|commit = {{simgear commit|830bc3eac382d4d3d709e263f7700350f5ea7523|t=Commit}}&lt;br /&gt;
|text = Returns the {{wikipedia|Floor function|floor}} of a number, that is, the largest previous integer.&lt;br /&gt;
|param1 = x&lt;br /&gt;
|param1text = Number to return the floor of.&lt;br /&gt;
|example1 = print(math.floor(2)); # prints 2&lt;br /&gt;
|example2 = print(math.floor(2.1)); # prints 2&lt;br /&gt;
|example3 = print(math.floor(-2.9)); # prints -3&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== fmod() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = math.fmod(x, y);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/mathlib.c|l=106|t=Source}}&lt;br /&gt;
|version = 2.10&lt;br /&gt;
|commit = {{simgear commit|830bc3eac382d4d3d709e263f7700350f5ea7523|t=Commit}}&lt;br /&gt;
|text = Returns the result of the modulo operation of the given numbers, that is, is returns the remainder of '''x''' divided by '''y'''. Unlike {{func link|mod()|page=this}}, this function uses the C library function {{func link|fmod()|link=http://www.cplusplus.com/reference/cmath/fmod/}}, and has different (and more correct) behavior when negative arguments are passed to it (compare example 3 with example 3 of {{func link|mod()|page=this}}). Both arguments are mandatory and must be numbers.&lt;br /&gt;
{{Note|This function was initially added &amp;lt;code&amp;gt;math.mod()&amp;lt;/code&amp;gt;, but this was overridden by [[#mod.28.29|another version]] which already existed in FGData. In FlightGear 3.0, this function was {{simgear commit|ad83e70cf5983c7b307847aa2cb92c40e42bc534|t=renamed}} to &amp;lt;code&amp;gt;fmod()&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
|param1 = x&lt;br /&gt;
|param1text = The dividend.&lt;br /&gt;
|param2 = y&lt;br /&gt;
|param2text = The divisor. If this argument is 0, a floating point error will be generated.&lt;br /&gt;
|example1 = print(math.fmod(5, 2)); # prints 1 (2 goes into 5 twice with a remainder of 1; 2 * 2 + 1 = 5)&lt;br /&gt;
|example2 = print(math.fmod(10, 5)); # prints 0 (5 goes into 10 twice with a remainder of 0; 5 * 2 + 0 = 10)&lt;br /&gt;
|example3 = print(math.fmod(-5, 2)); # prints -1 (2 goes into -5 -2 times with a remainder of -1; 2 * -2 + -1 = -5)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== ln() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = math.ln(x);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/mathlib.c|l=50|t=Source}}&lt;br /&gt;
|text = Returns the natural (base ''e'') logarithm of the given number.&lt;br /&gt;
|param1 = x&lt;br /&gt;
|param1text = Number to return the logarithm of. Must be greater than 0.&lt;br /&gt;
|example1 = printf(&amp;quot;%.4f&amp;quot;, math.ln(60)); # prints 4.0943&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== log10() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = math.log10(x);&lt;br /&gt;
|source = {{fgdata file|Nasal/math.nas|t=Source}}&lt;br /&gt;
|text = Returns the common (base 10) logarithm of the given number.&lt;br /&gt;
|param1 = x&lt;br /&gt;
|param1text = Number to return the logarithm of. Must be greater than 0.&lt;br /&gt;
|example1 = printf(&amp;quot;%g&amp;quot;, math.log10(1000)); # prints 3&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== max() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = math.max(x[, y[, z[, ...]]]);&lt;br /&gt;
|source = {{fgdata file|Nasal/math.nas|t=Source}}&lt;br /&gt;
|version = 2.4&lt;br /&gt;
|commit = {{fgdata commit|36c48caaf273b0547bc8b54ae1ec8c7f4b9d4151|t=Commit}}&lt;br /&gt;
|text = Returns the highest number of the given numbers. There must be at least one argument, but there may be as many as you like.&lt;br /&gt;
|example1 = print(math.max(1, 2, 3, 4)); # prints 4&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== min() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = math.min(x[, y[, z[, ...]]]);&lt;br /&gt;
|source = {{fgdata file|Nasal/math.nas|t=Source}}&lt;br /&gt;
|version = 2.4&lt;br /&gt;
|commit = {{fgdata commit|36c48caaf273b0547bc8b54ae1ec8c7f4b9d4151|t=Commit}}&lt;br /&gt;
|text = Returns the lowest number of the given numbers. There must be at least one argument, but there may be as many as you like.&lt;br /&gt;
|example1 = print(math.min(1, 2, 3, 4)); # prints 1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== mod() ===&lt;br /&gt;
{{See also|Nasal library#fmod()}}&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = math.mod(x, y);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/mathlib.c|l=106|t=Source}}&lt;br /&gt;
|text = Returns the result of the modulo operation of the given numbers, that is, is returns the remainder of '''x''' divided by '''y'''. Note that this function does not not return correct answers when either or both the arguments are negative (see example 3), unlike &amp;lt;code&amp;gt;[[#fmod.28.29|fmod()]]&amp;lt;/code&amp;gt;. Both arguments are mandatory and must be numbers.&lt;br /&gt;
|param1 = x&lt;br /&gt;
|param1text = The dividend.&lt;br /&gt;
|param2 = y&lt;br /&gt;
|param2text = The divisor. If this argument is 0, infinity will be returned (printed as &amp;lt;code&amp;gt;0e-00&amp;lt;/code&amp;gt;).&lt;br /&gt;
|example1 = print(math.mod(5, 2)); # prints 1 (2 goes into 5 twice with a remainder of 1; 2 * 2 + 1 = 5)&lt;br /&gt;
|example2 = print(math.mod(10, 5)); # prints 0 (5 goes into 10 twice with a remainder of 0; 5 * 2 + 0 = 10)&lt;br /&gt;
|example3 = print(math.mod(-5, 4)); # prints 3 (incorrect, should be -1)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== periodic() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = math.periodic(min, max, x);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/mathlib.c|l=130|t=Source}}&lt;br /&gt;
|version = 2.10&lt;br /&gt;
|commit = {{simgear commit|830bc3eac382d4d3d709e263f7700350f5ea7523|t=Commit}}&lt;br /&gt;
|text = Normalizes the given number (e.g., a bearing) to be within a set periodic range (e.g., compass bearings, which go from 0 to 360). All the arguments are mandatory and must be numbers.&lt;br /&gt;
|param1 = min&lt;br /&gt;
|param1text = Lower boundary of the periodic range.&lt;br /&gt;
|param2 = max&lt;br /&gt;
|param2text = Upper boundary of the periodic range&lt;br /&gt;
|param3 = x&lt;br /&gt;
|param3text = Number to normalize.&lt;br /&gt;
|example1 = var norm_360 = func(a){&lt;br /&gt;
    return math.periodic(0, 360, a);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
print(norm_360(-90)); # prints 270&lt;br /&gt;
print(norm_360(45)); # prints 45&lt;br /&gt;
|example2 = var norm_180 = func(a){&lt;br /&gt;
    return math.periodic(-180, 180, a);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
print(norm_180(45)); # prints 45&lt;br /&gt;
print(norm_180(270)); # prints -90&lt;br /&gt;
|example3 = print(math.periodic(0, 10, 15)); # prints 5&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== pow() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = math.pow(b, n);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/mathlib.c|l=68|t=Source}}&lt;br /&gt;
|text = Returns the base '''b''' raised to the '''n''' power. Both arguments are mandatory and must be numbers.&lt;br /&gt;
|param1 = b&lt;br /&gt;
|param1text = Base.&lt;br /&gt;
|param2 = n&lt;br /&gt;
|param2text = Exponent.&lt;br /&gt;
|example1 = print(math.pow(2, 2)); # prints 4&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== round() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = math.round(x[, p]);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/mathlib.c|l=153|t=Source}}&lt;br /&gt;
|version = 3.0&lt;br /&gt;
|commit = {{simgear commit|ad83e70cf5983c7b307847aa2cb92c40e42bc534|t=Commit}}&lt;br /&gt;
|text = Rounds '''x''' to the optional precision ('''p'''). If the fractional part of '''x''' is 0.5, it will always be rounded up. Both argument must be numbers. &lt;br /&gt;
|param1 = x&lt;br /&gt;
|param1text = Mandatory number to round.&lt;br /&gt;
|param2 = p&lt;br /&gt;
|param2text = Optional precision to round to. For example, if this is set to 10, '''x''' will be rounded to the nearest 10. Defaults to 1, and should be greater than or equal to 1 for correct output. For rounding to decimal places, it is better to use {{func link|sprintf}}.&lt;br /&gt;
|example1 = print(math.round(4.2)); # prints 4&lt;br /&gt;
|example2 = print(math.round(4.7)); # prints 5&lt;br /&gt;
|example3 = print(math.round(4.5)); # prints 5&lt;br /&gt;
|example4 = print(math.round(127, 10)); # prints 130&lt;br /&gt;
|example5 = print(math.round(456, 100)); # prints 500&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== sin() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = math.sin(x);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/mathlib.c|l=23|t=Source}}&lt;br /&gt;
|text = Implements the sine trigonometric function. Returns a ratio from a given angle in radians.&lt;br /&gt;
|param1 = x&lt;br /&gt;
|param1text = Mandatory number that should be an angle in radians.&lt;br /&gt;
|example1 = var angle = 90 * D2R;&lt;br /&gt;
print(math.sin(angle)); # prints the ratio (1)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== sgn() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = math.sgn(x);&lt;br /&gt;
|source = {{fgdata file|Nasal/math.nas|t=Source}}&lt;br /&gt;
|text = Returns the result of the sign function on the given number. If '''x''' is less than 0, -1 one is returned. If '''x''' equals 0, 0 is returned. If '''x''' is greater than 0, 1 is returned.&lt;br /&gt;
|param1 = x&lt;br /&gt;
|param1text = Mandatory number to return the sign of.&lt;br /&gt;
|example1 = print(math.sgn(-6)); # prints -1&lt;br /&gt;
|example2 = print(math.sgn(0)); # prints 0&lt;br /&gt;
|example3 = print(math.sgn(12)); # prints 1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== sqrt() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = math.sqrt(x);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/mathlib.c|l=59|t=Source}}&lt;br /&gt;
|text = Returns the square root of the given number.&lt;br /&gt;
|param1 = x&lt;br /&gt;
|param1text = Mandatory number to return the square root of. Must be greater than or equal to 0.&lt;br /&gt;
|example1 = print(math.sqrt(9)); # prints 3&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== tan() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = math.tan(x);&lt;br /&gt;
|source = {{simgear file|simgear/nasal/mathlib.c|l=177|t=Source}}&lt;br /&gt;
|text = Implements the tangent trigonometric function. Returns a ratio from a given angle in radians.&lt;br /&gt;
|param1 = x&lt;br /&gt;
|param1text = Mandatory number that should be an angle in radians.&lt;br /&gt;
|example1 = var angle = 45 * D2R;&lt;br /&gt;
print(math.tan(angle)); # prints the ratio (1)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
=== e ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = math.e;&lt;br /&gt;
|source = {{simgear file|simgear/nasal/mathlib.c|l=232|t=Source}}&lt;br /&gt;
|text = Important mathematical constant (see {{wikipedia|e (mathematical constant)}}). Value in simulation: 2.7182818284590452354&lt;br /&gt;
}}&lt;br /&gt;
=== pi ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = math.pi;&lt;br /&gt;
|source = {{simgear file|simgear/nasal/mathlib.c|l=231|t=Source}}&lt;br /&gt;
|text = Important mathematical constant (see {{wikipedia|pi (mathematical constant)}}). Value in simulation: 3.14159265358979323846&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Nasal namespaces}}&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=FlightGear_wiki:Village_pump&amp;diff=143312</id>
		<title>FlightGear wiki:Village pump</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=FlightGear_wiki:Village_pump&amp;diff=143312"/>
		<updated>2025-12-25T10:10:19Z</updated>

		<summary type="html">&lt;p&gt;Rominet: /* Beware of shortened Git commit IDs */ Mention the fact that Foo_commit templates now truncate the commit ID in link text if the latter is automatically generated from the commit ID&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NEWSECTIONLINK__&lt;br /&gt;
{{Archives|[[/Archive 2012|2012]]|[[/Archive 2013|2013]]|[[/Archive 2014|2014]]|[[/Archive 2015|2015]]|[[/Archive 2016|2016]]|[[/Archive 2017|2017]]|[[/Archive 2018|2018]]|[[/Archive 2019|2019]]|[[/Archive 2020|2020]]|[[/Archive 2021|2021]]|[[/Archive 2022|2022]]}}&lt;br /&gt;
{{shortcut|FGW:VP}}&lt;br /&gt;
&lt;br /&gt;
Welcome to the '''Village Pump'''. This page is used to discuss the technical issues, operations and guidelines of the [[FlightGear wiki]].&lt;br /&gt;
&lt;br /&gt;
Please &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[{{fullurl:{{FULLPAGENAME}}|action=edit&amp;amp;section=new}} add new topics]&amp;lt;/span&amp;gt; to the '''bottom''' of this page.&lt;br /&gt;
&lt;br /&gt;
Old discussions should be moved to a [[FlightGear wiki:Village pump/Archive YEAR]]. These discussions can then be moved to a relevant talk page if appropriate.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== MediaWiki updated to 1.39.6 ==&lt;br /&gt;
&lt;br /&gt;
We have updated MediaWiki to its latest LTS version 1.39.6 today. Although we've tested the update, chances are that we've missed certain scenarios or features. Please report any issues that you may encounter.&lt;br /&gt;
&lt;br /&gt;
[[User:Gijs|Gijs]] ([[User talk:Gijs|talk]]) 09:31, 30 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Embedded YouTube videos broken ==&lt;br /&gt;
&lt;br /&gt;
It seems that the [[mw:Extension:EmbedVideo|EmbedVideo extension]] was removed at some point. Consequently, pages such as [[Howto:Creating FlightGear Promo Videos]] are broken. At present, the best replacements seems to be [[mw:Extension:EmbedVideo_(fork)|a fork]] and [[mw:Extension:YouTube|Extension:YouTube]].&lt;br /&gt;
&lt;br /&gt;
—'''''[[User:Red Leader|&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Red Leader&amp;lt;/span&amp;gt;]]''''' ([[User talk:Red Leader|talk]], [[Special:Contributions/Red Leader|contribs]]) 19:21, 30 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Hi,&lt;br /&gt;
: Thanks for the report. It was introduced by today's update, but should be fixed now.&lt;br /&gt;
: [[User:Gijs|Gijs]] ([[User talk:Gijs|talk]]) 21:21, 30 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: Confirmed, thanks. And I’d completely forgotten about {{[[Template:Wikipedia|wikipedia]]}}. 😅&lt;br /&gt;
:: '''''[[User:Red Leader|&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Red Leader&amp;lt;/span&amp;gt;]]''''' ([[User talk:Red Leader|talk]], [[Special:Contributions/Red Leader|contribs]]) 21:57, 30 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Forum registration problem ==&lt;br /&gt;
&lt;br /&gt;
Hello,&lt;br /&gt;
I would like to register on the forum, but I tried several times without success. I sent an email to the administrator some time ago, but it seems to have been lost. I don't know what to do, is there somebody here who could help? Please tell me if you need additional information.&lt;br /&gt;
Thanks very much in advance. [[User:Kestrel|Kestrel]] ([[User talk:Kestrel|talk]]) 13:14, 25 March 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Hi,&lt;br /&gt;
: That's unfortunate! You can find my email address at https://forum.flightgear.org/contact.php Please try again if you've done that before, I'll actively monitor the address for any incoming messages, and let me know if you don't get a reply.&lt;br /&gt;
: [[User:Gijs|Gijs]] ([[User talk:Gijs|talk]]) 15:01, 25 March 2024 (UTC) (forum admin)&lt;br /&gt;
&lt;br /&gt;
== Sidebar link for &amp;quot;Build server&amp;quot; is broken ==&lt;br /&gt;
&lt;br /&gt;
Hello, &lt;br /&gt;
&lt;br /&gt;
Just wanted to bring to someones attention that the URL for &amp;quot;Build server&amp;quot; currently 404s. Not sure if this resource still exists or if its URL has changed.&lt;br /&gt;
&lt;br /&gt;
Cheers!&lt;br /&gt;
-Joshua&lt;br /&gt;
&lt;br /&gt;
: Hi Joshua,&lt;br /&gt;
: The URL is still correct, but the build server is temporarily down due to a server failure. It's being worked on, so should be back up &amp;quot;soon&amp;quot;.&lt;br /&gt;
: [[User:Gijs|Gijs]] ([[User talk:Gijs|talk]]) 12:29, 3 September 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
== FlightGear Wikipedia article image needs correctly sourced Flightgear wiki screenshot ==&lt;br /&gt;
https://en.wikipedia.org/wiki/FlightGear&lt;br /&gt;
&lt;br /&gt;
The image used for the Flightgear Wikipedia article appears to have been deleted, because it was sourced from the following Flightgear-wiki screenshot page:&lt;br /&gt;
&lt;br /&gt;
[[:File:Bo 105 over Sint Marteen.png]]&lt;br /&gt;
&lt;br /&gt;
which referred to an imgur link instead of the following thread, which gives a CC license based on a google search of the file name:&lt;br /&gt;
&lt;br /&gt;
https://forum.flightgear.org/viewtopic.php?f=88&amp;amp;t=32163&amp;amp;start=0&lt;br /&gt;
&lt;br /&gt;
Discussion on Wikipedia:&lt;br /&gt;
&lt;br /&gt;
https://en.wikipedia.org/wiki/Wikipedia:Files_for_discussion/2024_December_7#File:FlightGear_Flight_Sim_Bo_105_over_Sint_Marteen.png&lt;br /&gt;
&lt;br /&gt;
&amp;gt; ''Subsequent comments should be made on the appropriate discussion page (such as the file's talk page or in a [https://en.wikipedia.org/wiki/Wikipedia:Deletion_review deletion review]).''&lt;br /&gt;
&lt;br /&gt;
The person who uploaded it, or someone from the wiki, should ideally fix the FlightGear wiki page, and do a deletion review for the Wikipedia file. The file may have been used in multiple pages since screenshots are uncommon on Wikipedia due to proprietary apps. Feel free to remove this comment once it's taken care of. Good luck&lt;br /&gt;
&lt;br /&gt;
== Issues with three templates ==&lt;br /&gt;
&lt;br /&gt;
Hi,&lt;br /&gt;
&lt;br /&gt;
The [[Template:Fgmeta_commit|fgmeta commit]] template appears to be broken. It used to work in the first ''Note'' [[Scripted_Compilation_on_Linux_Debian/Ubuntu#For_the_curious:_the_SSH_way|here]] (see the URL).&lt;br /&gt;
&lt;br /&gt;
Also, I tried to use [[Template:Repo_link#Site:_Generic]] to create a link to the [https://gitlab.kitware.com/cmake/cmake.git CMake repo], but didn't manage: IIRC, the link text was empty.&lt;br /&gt;
&lt;br /&gt;
Finally, [[Template:Fgmeta_source]] doesn't seem to to what the doc. says for ''simplepath'': with&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;{{fgmeta source&lt;br /&gt;
| path = download_and_compile.sh&lt;br /&gt;
| simplepath = 1&lt;br /&gt;
}}&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the link text starts with a slash, so I used&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;{{fgmeta source&lt;br /&gt;
| path = download_and_compile.sh&lt;br /&gt;
| text = download_and_compile.sh&lt;br /&gt;
}}&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
which is of course more redundant.&lt;br /&gt;
&lt;br /&gt;
Thanks for considering! :-)&lt;br /&gt;
&lt;br /&gt;
[[User:Rominet|Rominet]] ([[User talk:Rominet|talk]])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
: Good catch.  I need to look into that one.  I may not have coded the commit part of GitLab into the master {{tl|repo_link}} template.&lt;br /&gt;
&lt;br /&gt;
: [[User:Bugman|Bugman]] ([[User talk:Bugman|talk]]) 15:41, 13 March 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: All fixed.  It was quite simple - the {{tl|fgmeta_source}} template was missing the &amp;lt;code&amp;gt;proj&amp;lt;/code&amp;gt; parameter.  I've also fixed {{tl|fgmeta_clone}}.&lt;br /&gt;
&lt;br /&gt;
:: [[User:Bugman|Bugman]] ([[User talk:Bugman|talk]]) 15:53, 13 March 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
::: Thanks for the reply and fixes, Bugman! (And sorry for the delay, I didn't see any notification...) I see the first item is indeed addressed. Regarding the second item, well, I see no place where I'd really want to use this now on the d&amp;amp;c page, so didn't test it. As for the third one, I still get &amp;lt;code&amp;gt;/download_and_compile.sh&amp;lt;/code&amp;gt; in the Preview when I try the above {{tl|fgmeta_source}} snippet with &amp;lt;code&amp;gt;simplepath = 1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
::: I looked at {{tl|fgmeta_clone}} too; it looks nice but seems to default to the &amp;lt;code&amp;gt;git://&amp;lt;/code&amp;gt; protocol. Would it be possible to make it default to using &amp;lt;code&amp;gt;https://&amp;lt;/code&amp;gt;? Thanks again. :-)&lt;br /&gt;
 &lt;br /&gt;
::: [[User:Rominet|Rominet]] ([[User talk:Rominet|talk]])&lt;br /&gt;
&lt;br /&gt;
:::: Not a problem.  For the &amp;lt;code&amp;gt;simplepath&amp;lt;/code&amp;gt; parameter, that is the designed behaviour in the {{tl|repo link}} template.  In most cases our repositories have complex directory structures and the desired output is the absolute file path, removing the protocol and URL parts of the path.  Do you wish to simply have the file name there?  No one had asked for that before, so I never added an option for that.  In the case of the source repositories, you often want to remove the first part of the absolute path so that for example in SimGear, {{simgear source|path=simgear/scene/util/QuadTreeBuilder.hxx|simplepath=1}} (&amp;lt;nowiki&amp;gt;{{simgear source|path=simgear/scene/util/QuadTreeBuilder.hxx|simplepath=1}}&amp;lt;/nowiki&amp;gt;) would be shown as {{simgear source|path=simgear/scene/util/QuadTreeBuilder.hxx|text=scene/util/QuadTreeBuilder.hxx}} (&amp;lt;nowiki&amp;gt;{{simgear source|path=simgear/scene/util/QuadTreeBuilder.hxx|text=scene/util/QuadTreeBuilder.hxx}}&amp;lt;/nowiki&amp;gt;.  This is not scriptable in MediaWiki so I left it all for the text parameter.&lt;br /&gt;
&lt;br /&gt;
:::: For the protocol, I have now added the &amp;lt;code&amp;gt;protocol&amp;lt;/code&amp;gt; parameter.  E.g. &amp;lt;nowiki&amp;gt;{{fgmeta clone | protocol = https}}&amp;lt;/nowiki&amp;gt;.  That will give &amp;lt;code&amp;gt;{{fgmeta clone | protocol = https}}&amp;lt;/code&amp;gt; (as of today generated as &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;git clone https://gitlab.com/flightgear/fgmeta.git&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
:::: [[User:Bugman|Bugman]] ([[User talk:Bugman|talk]]) 08:51, 24 March 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
::::: Thanks Bugman, I've updated the [[Scripted_Compilation_on_Linux_Debian/Ubuntu|download_and_compile.sh page]] to use &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{fgmeta clone | protocol = https}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; as you proposed; it works great. For the link to download_and_compile.sh, I can continue to use &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{fgmeta source | path = download_and_compile.sh | text = download_and_compile.sh}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, no problem.&lt;br /&gt;
&lt;br /&gt;
::::: As far as I'm concerned, everything is resolved here, so this thread/section can be deleted if someone wants to “clean up”.&lt;br /&gt;
&lt;br /&gt;
::::: ''Other subject:'' the only remaining thing is that I didn't receive any notification, neither for your replies here nor for the January changes by [[User:Jebba|Jebba]] to the [[Scripted_Compilation_on_Linux_Debian/Ubuntu|download_and_compile.sh page]] that is on my watchlist. I used to receive email notifications for these things years ago, haven't changed my preferences regarding this and don't see any setting that would explain why I don't receive these notifications anymore. Maybe email sending by the wiki software is not quite well configured according to current standards (SPF, DKIM, DMARC)?&lt;br /&gt;
&lt;br /&gt;
::::: [[User:Rominet|Rominet]] ([[User talk:Rominet|talk]])&lt;br /&gt;
&lt;br /&gt;
== Improve the 'simgear clone', 'flightgear clone' and 'fgdata clone' templates ==&lt;br /&gt;
&lt;br /&gt;
Hi,&lt;br /&gt;
&lt;br /&gt;
In order to improve [[Fedora_Packages_and_Compiling]], it would be nice to have the &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{simgear clone}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{flightgear clone}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{fgdata clone}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; templates on par with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{fgmeta clone}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (support for the &amp;lt;code&amp;gt;protocol&amp;lt;/code&amp;gt; parameter, etc.). I tried&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;{{simgear clone | protocol = https | opt = --single-branch --branch release/2024.1 | post = simgear}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
but it doesn't seem to work, as the preview shows this:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;git clone --single-branch --branch release/2024.1 git://gitlab.com simgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(ditto with &amp;lt;code&amp;gt;flightear clone&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;fgdata clone&amp;lt;/code&amp;gt;). Thanks in advance :-)&lt;br /&gt;
&lt;br /&gt;
[[User:Rominet|Rominet]] ([[User talk:Rominet|talk]])&lt;br /&gt;
&lt;br /&gt;
: I needed a while to work out the best strategy for these changes.  I've now gone through all of the {{tl|repo link}} cloning subtemplates listed on {{tl|repo link/doc related}} and added the &amp;lt;code&amp;gt;project&amp;lt;/code&amp;gt; parameter to the templates and the optional &amp;lt;code&amp;gt;protocol&amp;lt;/code&amp;gt; parameter.  These changes were required as the &amp;lt;code&amp;gt;gl&amp;lt;/code&amp;gt; section of the {{tl|repo_link}} template is constructed differently to the &amp;lt;code&amp;gt;sf&amp;lt;/code&amp;gt; section.  I've also updated the git cloning documentation {{tl|repo link/doc git clone}}.  I hope this covers everything you need.&lt;br /&gt;
&lt;br /&gt;
: [[User:Bugman|Bugman]] ([[User talk:Bugman|talk]]) 07:48, 1 April 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: Thanks a lot, Bugman, this works great! Your changes allowed me to perform [https://wiki.flightgear.org/w/index.php?title=Fedora_Packages_and_Compiling&amp;amp;type=revision&amp;amp;diff=141687&amp;amp;oldid=141513 this edit] in [[Fedora_Packages_and_Compiling]]. The only remaining &amp;lt;code&amp;gt;git clone&amp;lt;/code&amp;gt; command written in full on that page is for FG's fork of OpenSceneGraph at GitLab. I understand that choosing a proper name for an applicable &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{... clone}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; template probably requires some careful thinking... ;-)&lt;br /&gt;
&lt;br /&gt;
:: [[User:Rominet|Rominet]] ([[User talk:Rominet|talk]])&lt;br /&gt;
&lt;br /&gt;
== Default text in Template:Repo link ==&lt;br /&gt;
&lt;br /&gt;
Hi,&lt;br /&gt;
&lt;br /&gt;
The default ''text'' in {{tl|Repo link}} gives somewhat pleasant link texts such as&lt;br /&gt;
 flightgear/flightgear/src/Scripting/NasalSys.cxx&lt;br /&gt;
when the ''site'' is &amp;lt;code&amp;gt;sourceforge&amp;lt;/code&amp;gt;, however the result looks like a bug for other sites (though I understand this may be as intended). To be clear, the URLs are correct but the default link texts look weird because they start with the unqualified site name rather than the fully-qualified domain name. For instance,&lt;br /&gt;
 {{obr}}fgmeta source{{cbr}}&lt;br /&gt;
yields [https://gitlab.com/flightgear/fgmeta gitlab/flightgear/fgmeta/next] rather than [https://gitlab.com/flightgear/fgmeta gitlab.com/flightgear/fgmeta/next]. I suggest to replace &amp;lt;code&amp;gt;gitlab&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;gitlab.com&amp;lt;/code&amp;gt; in the default text (where the HTML comment says “Site advertising”) and do the same for &amp;lt;code&amp;gt;github&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Note: the Gitorious web site doesn't exist anymore, maybe that should be removed from the template?&lt;br /&gt;
&lt;br /&gt;
Thanks for considering; I can do the replacement if you wish.&lt;br /&gt;
&lt;br /&gt;
[[User:Rominet|Rominet]] ([[User talk:Rominet|talk]]) 10:38, 12 November 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Sounds sensible, so please go ahead!&lt;br /&gt;
: Regarding Gitorious, it may be nice to link to an archived version of the repos, such as https://archive.softwareheritage.org/browse/origin/directory/?origin_url=https://gitorious.org/flightgear/fgdata.git&amp;amp;visit_type=git Altough this only makes sense for repos or branches that are not part of our current GitLab...&lt;br /&gt;
: [[User:Gijs|Gijs]] ([[User talk:Gijs|talk]]) 13:58, 12 November 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: [https://wiki.flightgear.org/w/index.php?title=Template:Repo_link&amp;amp;action=history Done], thanks Gijs!&lt;br /&gt;
::&lt;br /&gt;
&lt;br /&gt;
:: One should be careful using this, though, because the resulting link ''texts'' may be non-existing URLs (after prepending the protocol) despite looking like valid ones, as shown by the first example in [[User:Rominet/Sandbox#FGMeta-Python repo templates]]!&lt;br /&gt;
&lt;br /&gt;
:: So, to avoid people getting trapped by this, maybe the default link text should start with something like &amp;lt;code&amp;gt;[GitLab]/...&amp;lt;/code&amp;gt; rather than the &amp;lt;code&amp;gt;gitlab.com/...&amp;lt;/code&amp;gt; I just put (to make it clear that such link texts are not supposed to be “Internet addresses”).&lt;br /&gt;
:: [[User:Rominet|Rominet]] ([[User talk:Rominet|talk]]) 16:20, 12 November 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
::: This is now implemented. For instance, &amp;lt;code&amp;gt;{{obr}}fgmeta-python source {{!}} path = pyproject.toml {{!}} tag  = 1.0.0b1 {{cbr}}&amp;lt;/code&amp;gt; results in {{fgmeta-python source | path = pyproject.toml | tag  = 1.0.0b1 }}. This also holds for GitHub and GitoriousIsNowClosed. SourceForge has no such prefix for now (it initially didn't, and editing its part of {{tl|Repo link}} requires a bit more temerity than what I have at the moment :-)).&lt;br /&gt;
::: [[User:Rominet|Rominet]] ([[User talk:Rominet|talk]]) 09:15, 14 November 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
: That's a good idea.  Note for Gitorious - I added this because there are a number of historical documents/pages that refer to developments that occurred on Gitorious which were not migrated to SourceForge.  I originally made the Gitorious links work by pointing to the archive by the Internet Archive (see [[Gitorious]]).  However that archive has been offline for a few years now.  The Internet Archive are storing all the data so it may return one day.&lt;br /&gt;
&lt;br /&gt;
: [[User:Bugman|Bugman]] ([[User talk:Bugman|talk]]) 22:06, 13 November 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Beware of shortened Git commit IDs ==&lt;br /&gt;
&lt;br /&gt;
While fixing broken links due to the {{tl|foo commit}} templates not specifying &amp;lt;code&amp;gt;proj=flightgear&amp;lt;/code&amp;gt; (this was implicit with &amp;lt;code&amp;gt;site=sf&amp;lt;/code&amp;gt; but isn't with &amp;lt;code&amp;gt;site=gl&amp;lt;/code&amp;gt;), I found that URLs at GitLab don't accept the same shortened Git commit IDs as those at SourceForge:&lt;br /&gt;
 https://sourceforge.net/p/flightgear/fgdata/ci/807062 - OK&lt;br /&gt;
 https://gitlab.com/flightgear/fgdata/-/commit/807062  - NOK&lt;br /&gt;
 https://gitlab.com/flightgear/fgdata/-/commit/807062d - OK&lt;br /&gt;
 https://gitlab.com/flightgear/fgdata/-/commit/807062d0b6f858885547f27325e829c2bf42a12b - OK&lt;br /&gt;
&lt;br /&gt;
As a consequence, there are probably a lot of broken links in the wiki due to shortened commit IDs. Better always use the long ones...&lt;br /&gt;
&lt;br /&gt;
{{Note|Commit ID 807062 in FGData is not ambiguous at the time of this writing.}}&lt;br /&gt;
[[User:Rominet|Rominet]] ([[User talk:Rominet|talk]]) 15:45, 3 December 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
: I have modified {{tl|Simgear_commit}}, {{tl|Flightgear_commit}}, {{tl|Fgdata_commit}}, etc. (12 templates!) to show a commit ID truncated to 7 characters in the automatically generated link text, so there is no excuse for not using long commit IDs anymore when using these templates (see the result [[Howto:Building_FlightGear_without_HiDPI_support#Commits|here]] for instance). Thanks to [[User:Gijs|Gijs]] for installing [https://en.wikipedia.org/wiki/Module:Ustring Module:Ustring] which made this possible!&lt;br /&gt;
&lt;br /&gt;
: Note that manually provided ''text'' arguments are not truncated.&lt;br /&gt;
&lt;br /&gt;
: [[User:Rominet|Rominet]] ([[User talk:Rominet|talk]]) 10:10, 25 December 2025 (UTC)&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Template:Fgdata-old_commit&amp;diff=143311</id>
		<title>Template:Fgdata-old commit</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Template:Fgdata-old_commit&amp;diff=143311"/>
		<updated>2025-12-25T09:56:34Z</updated>

		<summary type="html">&lt;p&gt;Rominet: When the 'text' argument isn't provided, shorten the commit ID in the 'text' argument passed to Repo_link (only in the text, not in the URL!)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{repo link&lt;br /&gt;
| infra  = Gitorious&lt;br /&gt;
| site   = go&lt;br /&gt;
| proj   = fg&lt;br /&gt;
| repo   = fgdata&lt;br /&gt;
| commit = {{{commit|{{{c|{{{1|master}}} }}} }}}&lt;br /&gt;
| view   = commit&lt;br /&gt;
| text   = {{#if: {{{commit|{{{c|{{{1|}}}}}}}}}&lt;br /&gt;
  | {{{text|{{{t|{{{2|fgdata-old commit {{#invoke:Ustring|sub|s1= {{{commit|{{{c|{{{1}}}}}}}}} |1|7}} }}} }}} }}}&lt;br /&gt;
  | &amp;lt;big style=&amp;quot;color:red;&amp;quot;&amp;gt;Missing parameter '''commit'''&amp;lt;/big&amp;gt;&lt;br /&gt;
  }}&lt;br /&gt;
}}&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{repo link/doc infrastructure commit&lt;br /&gt;
| template  = fgdata-old&lt;br /&gt;
| label     = fgdata-old&lt;br /&gt;
| infra     = Gitorious&lt;br /&gt;
| user      = 0&lt;br /&gt;
| proj      = fg&lt;br /&gt;
| repo      = fgdata&lt;br /&gt;
| go        = 1&lt;br /&gt;
| git       = 1&lt;br /&gt;
| svn       = 0&lt;br /&gt;
| eg1commit = c1d4d0&lt;br /&gt;
| eg2intro  = The C172P now has&lt;br /&gt;
| eg2commit = ba60f8&lt;br /&gt;
| eg2text   = variant support&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Template:Windows-3rd-party_commit&amp;diff=143310</id>
		<title>Template:Windows-3rd-party commit</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Template:Windows-3rd-party_commit&amp;diff=143310"/>
		<updated>2025-12-25T09:49:18Z</updated>

		<summary type="html">&lt;p&gt;Rominet: When the 'text' argument isn't provided, shorten the commit ID in the 'text' argument passed to Repo_link (only in the text, not in the URL!)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{repo link&lt;br /&gt;
| site   = {{project infrastructure|abbrev}}&lt;br /&gt;
| proj   = flightgear&lt;br /&gt;
| repo   = windows-3rd-party&lt;br /&gt;
| commit = {{{1|master}}}&lt;br /&gt;
| view   = commit&lt;br /&gt;
| text   = {{#if: {{{1|}}}&lt;br /&gt;
  | {{{text|{{{t|{{{2|Windows-3rd-Party commit {{#invoke:Ustring|sub|s1={{{1}}}|1|7}} }}} }}} }}}&lt;br /&gt;
  | {{error|Missing parameter '''commit'''|windows-3rd-party commit}}&lt;br /&gt;
  }}&lt;br /&gt;
}}&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{repo link/doc commit&lt;br /&gt;
| label     = Windows-3rd-Party&lt;br /&gt;
| repo      = windows-3rd-party&lt;br /&gt;
| git       = 1&lt;br /&gt;
| svn       = 0&lt;br /&gt;
| eg1commit = 5e28234&lt;br /&gt;
| eg2intro  = Initial&lt;br /&gt;
| eg2commit = 5e28234&lt;br /&gt;
| eg2text   = VS2013 support&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Template:Terrafs_commit&amp;diff=143309</id>
		<title>Template:Terrafs commit</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Template:Terrafs_commit&amp;diff=143309"/>
		<updated>2025-12-25T09:48:41Z</updated>

		<summary type="html">&lt;p&gt;Rominet: When the 'text' argument isn't provided, shorten the commit ID in the 'text' argument passed to Repo_link (only in the text, not in the URL!)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{repo link&lt;br /&gt;
| site   = sf&lt;br /&gt;
| proj   = flightgear&lt;br /&gt;
| repo   = terrafs&lt;br /&gt;
| commit = {{{1|master}}}&lt;br /&gt;
| view   = commit&lt;br /&gt;
| text   = {{#if: {{{1|}}}&lt;br /&gt;
  | {{{text|{{{t|{{{2|Terrafs commit {{#invoke:Ustring|sub|s1={{{1}}}|1|7}} }}} }}} }}}&lt;br /&gt;
  | {{error|Missing parameter '''commit'''|terrafs commit}}&lt;br /&gt;
  }}&lt;br /&gt;
}}&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{repo link/doc commit&lt;br /&gt;
| label     = TerraFS&lt;br /&gt;
| repo      = terrafs&lt;br /&gt;
| git       = 1&lt;br /&gt;
| svn       = 0&lt;br /&gt;
| eg1commit = 63631a5&lt;br /&gt;
| eg2intro  = The &lt;br /&gt;
| eg2commit = 63631a5&lt;br /&gt;
| eg2text   = README file&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Template:Terragear_commit&amp;diff=143308</id>
		<title>Template:Terragear commit</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Template:Terragear_commit&amp;diff=143308"/>
		<updated>2025-12-25T09:48:06Z</updated>

		<summary type="html">&lt;p&gt;Rominet: When the 'text' argument isn't provided, shorten the commit ID in the 'text' argument passed to Repo_link (only in the text, not in the URL!)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{repo link&lt;br /&gt;
| site   = {{project infrastructure|abbrev}}&lt;br /&gt;
| proj   = flightgear&lt;br /&gt;
| repo   = terragear&lt;br /&gt;
| commit = {{{1|master}}}&lt;br /&gt;
| view   = commit&lt;br /&gt;
| text   = {{#if: {{{1|}}}&lt;br /&gt;
  | {{{text|{{{t|{{{2|TerraGear commit {{#invoke:Ustring|sub|s1={{{1}}}|1|7}} }}} }}} }}}&lt;br /&gt;
  | &amp;lt;big style=&amp;quot;color:red;&amp;quot;&amp;gt;Missing parameter '''commit'''&amp;lt;/big&amp;gt;&lt;br /&gt;
  }}&lt;br /&gt;
}}&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{repo link/doc commit&lt;br /&gt;
| label     = TerraGear&lt;br /&gt;
| repo      = terragear&lt;br /&gt;
| git       = 1&lt;br /&gt;
| svn       = 0&lt;br /&gt;
| eg1commit = 86aa9261ca6b38bf14257ae45fc7c6c1120d17d2&lt;br /&gt;
| eg2intro  = We now have&lt;br /&gt;
| eg2commit = 5e8137af2b9c93d0cbb133ef2954377ef7630949&lt;br /&gt;
| eg2text   = robust reading of untrusted input&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Template:Sceneryweb_commit&amp;diff=143307</id>
		<title>Template:Sceneryweb commit</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Template:Sceneryweb_commit&amp;diff=143307"/>
		<updated>2025-12-25T09:47:24Z</updated>

		<summary type="html">&lt;p&gt;Rominet: When the 'text' argument isn't provided, shorten the commit ID in the 'text' argument passed to Repo_link (only in the text, not in the URL!)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{repo link&lt;br /&gt;
| site   = sf&lt;br /&gt;
| proj   = flightgear&lt;br /&gt;
| repo   = sceneryweb&lt;br /&gt;
| commit = {{{1|master}}}&lt;br /&gt;
| view   = commit&lt;br /&gt;
| text   = {{#if: {{{1|}}}&lt;br /&gt;
  | {{{text|{{{t|{{{2|SceneryWeb commit {{#invoke:Ustring|sub|s1={{{1}}}|1|7}} }}} }}} }}}&lt;br /&gt;
  | &amp;lt;big style=&amp;quot;color:red;&amp;quot;&amp;gt;Missing parameter '''commit'''&amp;lt;/big&amp;gt;&lt;br /&gt;
  }}&lt;br /&gt;
}}&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{repo link/doc commit&lt;br /&gt;
| label     = SceneryWeb&lt;br /&gt;
| repo      = sceneryweb&lt;br /&gt;
| git       = 1&lt;br /&gt;
| svn       = 0&lt;br /&gt;
| eg1commit = b4380d&lt;br /&gt;
| eg2intro  = The&lt;br /&gt;
| eg2commit = 8359ec&lt;br /&gt;
| eg2text   = Captcha is now disabled&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Template:Openradar_commit&amp;diff=143306</id>
		<title>Template:Openradar commit</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Template:Openradar_commit&amp;diff=143306"/>
		<updated>2025-12-25T09:46:41Z</updated>

		<summary type="html">&lt;p&gt;Rominet: When the 'text' argument isn't provided, shorten the commit ID in the 'text' argument passed to Repo_link (only in the text, not in the URL!)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{repo link&lt;br /&gt;
| site   = sf&lt;br /&gt;
| proj   = flightgear&lt;br /&gt;
| repo   = openradar&lt;br /&gt;
| commit = {{{1|master}}}&lt;br /&gt;
| view   = commit&lt;br /&gt;
| text   = {{#if: {{{1|}}}&lt;br /&gt;
  | {{{text|{{{t|{{{2|OpenRadar commit {{#invoke:Ustring|sub|s1={{{1}}}|1|7}} }}} }}} }}}&lt;br /&gt;
  | &amp;lt;big style=&amp;quot;color:red;&amp;quot;&amp;gt;Missing parameter '''commit'''&amp;lt;/big&amp;gt;&lt;br /&gt;
  }}&lt;br /&gt;
}}&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{repo link/doc commit&lt;br /&gt;
| label     = OpenRadar&lt;br /&gt;
| repo      = openradar&lt;br /&gt;
| git       = 1&lt;br /&gt;
| svn       = 0&lt;br /&gt;
| eg1commit = 2a2262&lt;br /&gt;
| eg2intro  = The&lt;br /&gt;
| eg2commit = 187e86&lt;br /&gt;
| eg2text   = Java version is now logged&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Template:Fgmeta-python_commit&amp;diff=143305</id>
		<title>Template:Fgmeta-python commit</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Template:Fgmeta-python_commit&amp;diff=143305"/>
		<updated>2025-12-25T09:46:10Z</updated>

		<summary type="html">&lt;p&gt;Rominet: When the 'text' argument isn't provided, shorten the commit ID in the 'text' argument passed to Repo_link (only in the text, not in the URL!)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{repo link&lt;br /&gt;
| site   = {{project infrastructure|abbrev}}&lt;br /&gt;
| proj   = flightgear&lt;br /&gt;
| repo   = fgmeta-python&lt;br /&gt;
| commit = {{{1|next}}}&lt;br /&gt;
| view   = commit&lt;br /&gt;
| text   = {{#if: {{{1|}}}&lt;br /&gt;
  | {{{text|{{{t|{{{2|FGMeta-Python commit {{#invoke:Ustring|sub|s1={{{1}}}|1|7}} }}} }}} }}}&lt;br /&gt;
  | &amp;lt;big style=&amp;quot;color:red;&amp;quot;&amp;gt;Missing parameter '''commit'''&amp;lt;/big&amp;gt;&lt;br /&gt;
  }}&lt;br /&gt;
}}&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{repo link/doc commit&lt;br /&gt;
| label     = FGMeta-Python&lt;br /&gt;
| repo      = fgmeta-python&lt;br /&gt;
| git       = 1&lt;br /&gt;
| svn       = 0&lt;br /&gt;
| eg1commit = 9ad4defecac2b2&lt;br /&gt;
| eg2intro  = The&lt;br /&gt;
| eg2commit = 306320827468c3&lt;br /&gt;
| eg2text   = &amp;lt;tt&amp;gt;flightGear&amp;lt;/tt&amp;gt; Python package version 1.0.0b1&lt;br /&gt;
| eg2post   = has now been tagged&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Template:Fgcom_commit&amp;diff=143304</id>
		<title>Template:Fgcom commit</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Template:Fgcom_commit&amp;diff=143304"/>
		<updated>2025-12-25T09:45:37Z</updated>

		<summary type="html">&lt;p&gt;Rominet: When the 'text' argument isn't provided, shorten the commit ID in the 'text' argument passed to Repo_link (only in the text, not in the URL!)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{repo link&lt;br /&gt;
| site   = {{project infrastructure|abbrev}}&lt;br /&gt;
| proj   = flightgear&lt;br /&gt;
| repo   = fgcom&lt;br /&gt;
| commit = {{{1|next}}}&lt;br /&gt;
| view   = commit&lt;br /&gt;
| text   = {{#if: {{{1|}}}&lt;br /&gt;
  | {{{text|{{{t|{{{2|FGCom commit {{#invoke:Ustring|sub|s1={{{1}}}|1|7}} }}} }}} }}}&lt;br /&gt;
  | {{error|Missing parameter '''commit'''|fgcom commit}}&lt;br /&gt;
  }}&lt;br /&gt;
}}&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{repo link/doc commit&lt;br /&gt;
| label     = FGCom&lt;br /&gt;
| repo      = fgcom&lt;br /&gt;
| git       = 1&lt;br /&gt;
| svn       = 0&lt;br /&gt;
| eg1commit = 3febe70&lt;br /&gt;
| eg2intro  = The version number is now&lt;br /&gt;
| eg2commit = 3febe70&lt;br /&gt;
| eg2text   = 2.12&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Template:Fgmeta_commit&amp;diff=143303</id>
		<title>Template:Fgmeta commit</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Template:Fgmeta_commit&amp;diff=143303"/>
		<updated>2025-12-25T09:44:38Z</updated>

		<summary type="html">&lt;p&gt;Rominet: When the 'text' argument isn't provided, shorten the commit ID in the 'text' argument passed to Repo_link (only in the text, not in the URL!)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{repo link&lt;br /&gt;
| site   = {{project infrastructure|abbrev}}&lt;br /&gt;
| proj   = flightgear&lt;br /&gt;
| repo   = fgmeta&lt;br /&gt;
| commit = {{{1|next}}}&lt;br /&gt;
| view   = commit&lt;br /&gt;
| text   = {{#if: {{{1|}}}&lt;br /&gt;
  | {{{text|{{{t|{{{2|FGMeta commit {{#invoke:Ustring|sub|s1={{{1}}}|1|7}} }}} }}} }}}&lt;br /&gt;
  | &amp;lt;big style=&amp;quot;color:red;&amp;quot;&amp;gt;Missing parameter '''commit'''&amp;lt;/big&amp;gt;&lt;br /&gt;
  }}&lt;br /&gt;
}}&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{repo link/doc commit&lt;br /&gt;
| label     = FGMeta&lt;br /&gt;
| repo      = fgmeta&lt;br /&gt;
| git       = 1&lt;br /&gt;
| svn       = 0&lt;br /&gt;
| eg1commit = c19096&lt;br /&gt;
| eg2intro  = The&lt;br /&gt;
| eg2commit = 0cd467&lt;br /&gt;
| eg2text   = FlightGear 2016.2.0 release&lt;br /&gt;
| eg2post   = has now been tagged&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Template:Simgear_commit&amp;diff=143302</id>
		<title>Template:Simgear commit</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Template:Simgear_commit&amp;diff=143302"/>
		<updated>2025-12-25T09:43:52Z</updated>

		<summary type="html">&lt;p&gt;Rominet: When the 'text' argument isn't provided, shorten the commit ID in the 'text' argument passed to Repo_link (only in the text, not in the URL!)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{repo link&lt;br /&gt;
| site   = {{project infrastructure|abbrev}}&lt;br /&gt;
| proj   = flightgear&lt;br /&gt;
| repo   = simgear&lt;br /&gt;
| commit = {{{1|next}}}&lt;br /&gt;
| view   = commit&lt;br /&gt;
| text   = {{#if: {{{1|}}}&lt;br /&gt;
  | {{{text|{{{t|{{{2|SimGear commit {{#invoke:Ustring|sub|s1={{{1}}}|1|7}} }}} }}} }}}&lt;br /&gt;
  | {{error|Missing parameter '''commit'''|simgear commit}}&lt;br /&gt;
  }}&lt;br /&gt;
}}&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{repo link/doc commit&lt;br /&gt;
| label     = SimGear&lt;br /&gt;
| repo      = simgear&lt;br /&gt;
| git       = 1&lt;br /&gt;
| svn       = 0&lt;br /&gt;
| eg1commit = c1b579ec&lt;br /&gt;
| eg2intro  = The surface light restriction&lt;br /&gt;
| eg2commit = 1a752d28&lt;br /&gt;
| eg2text   = has been lifted&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Template:Flightgear_commit&amp;diff=143301</id>
		<title>Template:Flightgear commit</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Template:Flightgear_commit&amp;diff=143301"/>
		<updated>2025-12-25T09:42:53Z</updated>

		<summary type="html">&lt;p&gt;Rominet: When the 'text' argument isn't provided, shorten the commit ID in the 'text' argument passed to Repo_link (only in the text, not in the URL!)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{repo link&lt;br /&gt;
| site   = {{project infrastructure|abbrev}}&lt;br /&gt;
| proj   = flightgear&lt;br /&gt;
| repo   = flightgear&lt;br /&gt;
| commit = {{{1|next}}}&lt;br /&gt;
| view   = commit&lt;br /&gt;
| text   = {{#if: {{{1|}}}&lt;br /&gt;
  | {{{text|{{{t|{{{2|FlightGear commit {{#invoke:Ustring|sub|s1={{{1}}}|1|7}} }}} }}} }}}&lt;br /&gt;
  | {{error|Missing parameter '''commit'''|flightgear commit}}&lt;br /&gt;
  }}&lt;br /&gt;
}}&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{repo link/doc commit&lt;br /&gt;
| label     = FlightGear&lt;br /&gt;
| repo      = flightgear&lt;br /&gt;
| git       = 1&lt;br /&gt;
| svn       = 0&lt;br /&gt;
| eg1commit = 0d9091ba&lt;br /&gt;
| eg2intro  = Maintenance such as&lt;br /&gt;
| eg2commit = 9745a6fc&lt;br /&gt;
| eg2text   = removing obsolete comments&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Template:Fgdata_commit&amp;diff=143300</id>
		<title>Template:Fgdata commit</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Template:Fgdata_commit&amp;diff=143300"/>
		<updated>2025-12-25T09:39:11Z</updated>

		<summary type="html">&lt;p&gt;Rominet: When the 'text' argument isn't provided, shorten the commit ID in the 'text' argument passed to Repo_link (only in the text, not in the URL!)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{repo link&lt;br /&gt;
| site   = {{project infrastructure|abbrev}}&lt;br /&gt;
| proj   = flightgear&lt;br /&gt;
| repo   = fgdata&lt;br /&gt;
| commit = {{{1|next}}}&lt;br /&gt;
| view   = commit&lt;br /&gt;
| text   = {{#if: {{{1|}}}&lt;br /&gt;
  | {{{text|{{{t|{{{2|FGData commit {{#invoke:Ustring|sub|s1={{{1}}}|1|7}} }}} }}} }}}&lt;br /&gt;
  | {{error|Missing parameter '''commit'''|fgdata commit}}&lt;br /&gt;
  }}&lt;br /&gt;
}}&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{repo link/doc commit&lt;br /&gt;
| label     = FGData&lt;br /&gt;
| repo      = fgdata&lt;br /&gt;
| git       = 1&lt;br /&gt;
| svn       = 0&lt;br /&gt;
| eg1commit = 776a6552&lt;br /&gt;
| eg2intro  = The moon now has a&lt;br /&gt;
| eg2commit = 83cbd1ec&lt;br /&gt;
| eg2text   = more detailed texture&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{repo link/doc commit&lt;br /&gt;
| label     = FGData&lt;br /&gt;
| repo      = fgdata&lt;br /&gt;
| git       = 1&lt;br /&gt;
| svn       = 0&lt;br /&gt;
| eg1commit = 81607f734e13add9be02816ddaec305d05bc4e47&lt;br /&gt;
| eg2intro  = Remove ATC chatter, as previously discussed:&lt;br /&gt;
    &lt;br /&gt;
    http://sourceforge.net/p/flightgear/mailman/message/32440533/&lt;br /&gt;
    http://sourceforge.net/p/flightgear/mailman/message/32428167/&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=User:Rominet/TestTemplate&amp;diff=143299</id>
		<title>User:Rominet/TestTemplate</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=User:Rominet/TestTemplate&amp;diff=143299"/>
		<updated>2025-12-25T09:32:37Z</updated>

		<summary type="html">&lt;p&gt;Rominet: Test: Fgdata_commit template that truncates the commit ID in Repo_link 'text' argument when the latter is generated by Fgdata_commit&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{repo link&lt;br /&gt;
| site   = {{project infrastructure|abbrev}}&lt;br /&gt;
| proj   = flightgear&lt;br /&gt;
| repo   = fgdata&lt;br /&gt;
| commit = {{{1|next}}}&lt;br /&gt;
| view   = commit&lt;br /&gt;
| text   = {{#if: {{{1|}}}&lt;br /&gt;
  | {{{text|{{{t|{{{2|FGData commit {{#invoke:Ustring|sub|s1={{{1}}}|1|7}} }}} }}} }}}&lt;br /&gt;
  | {{error|Missing parameter '''commit'''|fgdata commit}}&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=User:Rominet/Sandbox&amp;diff=143298</id>
		<title>User:Rominet/Sandbox</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=User:Rominet/Sandbox&amp;diff=143298"/>
		<updated>2025-12-25T09:20:12Z</updated>

		<summary type="html">&lt;p&gt;Rominet: /* String substitution */ Contrary to String.sub(), Ustring.sub() doesn't trigger an error when the end index exceeds the input string length&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Various tests ==&lt;br /&gt;
&lt;br /&gt;
Test of &amp;lt;code&amp;gt;{{tl|project infrastructure}}&amp;lt;/code&amp;gt;: {{project infrastructure}}&lt;br /&gt;
&lt;br /&gt;
Test of &amp;lt;code&amp;gt;{{obr}}project infrastructure|abbrev{{cbr}}&amp;lt;/code&amp;gt;: {{project infrastructure|abbrev}}&lt;br /&gt;
&lt;br /&gt;
Test of &amp;lt;code&amp;gt;{{obr}}[[User:Rominet/TestTemplate]]{{cbr}}&amp;lt;/code&amp;gt;: {{User:Rominet/TestTemplate}}&lt;br /&gt;
&lt;br /&gt;
== FGMeta-Python repo templates ==&lt;br /&gt;
&lt;br /&gt;
=== fgmeta-python source ===&lt;br /&gt;
&lt;br /&gt;
Test of {{tl|fgmeta-python source}} with&lt;br /&gt;
 {{obr}}fgmeta-python source&lt;br /&gt;
 {{!}} path = pyproject.toml&lt;br /&gt;
 {{!}} tag  = 1.0.0b1&lt;br /&gt;
 {{cbr}}&lt;br /&gt;
&lt;br /&gt;
→ {{fgmeta-python source&lt;br /&gt;
| path = pyproject.toml&lt;br /&gt;
| tag  = 1.0.0b1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The link text is clearly not an existing URL (the target URL is fine). Not a bug, the default link text is not supposed to be a URL. Use {{tl|fgmeta-python url}} or pass &amp;lt;code&amp;gt;full=1&amp;lt;/code&amp;gt; to {{tl|fgmeta-python source}} if you want the link text to be a URL.&lt;br /&gt;
&lt;br /&gt;
=== Git clone with the templates ===&lt;br /&gt;
&lt;br /&gt;
Bad &amp;lt;code&amp;gt;git clone&amp;lt;/code&amp;gt; command, written using {{tl|fgmeta-python source}} and its &amp;lt;code&amp;gt;cmd&amp;lt;/code&amp;gt; parameter:&lt;br /&gt;
 {{fgmeta-python source&lt;br /&gt;
| cmd = git clone&lt;br /&gt;
}}&lt;br /&gt;
Good &amp;lt;code&amp;gt;git clone&amp;lt;/code&amp;gt; command, written using {{tl|fgmeta-python clone}}:&lt;br /&gt;
 {{fgmeta-python clone}}&lt;br /&gt;
&lt;br /&gt;
=== Getting a URL with the templates ===&lt;br /&gt;
&lt;br /&gt;
URL for terrasync.py:&lt;br /&gt;
 {{obr}}fgmeta-python url {{!}} src/flightgear/meta/scripts/terrasync/terrasync.py {{cbr}}&lt;br /&gt;
&lt;br /&gt;
→ {{fgmeta-python url | src/flightgear/meta/scripts/terrasync/terrasync.py}}&lt;br /&gt;
&lt;br /&gt;
=== String substitution ===&lt;br /&gt;
&lt;br /&gt;
[[User:Gijs|Gijs]] kindly installed [[Module:String]] and [[Module:Ustring]] (I learnt from them at [https://www.mediawiki.org/wiki/Module:String Module:String] and [https://en.wikipedia.org/wiki/Module:Ustring Module:Ustring] from [https://www.mediawiki.org/wiki/Help:Extension:ParserFunctions#String_functions here]); let's try them:&lt;br /&gt;
 {{obr}}#invoke:String{{!}}sub{{!}}abcde{{!}}2{{!}}4{{cbr}}&lt;br /&gt;
⇒ {{#invoke:String|sub|abcde|2|4}}&lt;br /&gt;
 {{obr}}#invoke:Ustring{{!}}sub{{!}}s1=abcde{{!}}2{{!}}4{{cbr}}&lt;br /&gt;
⇒ {{#invoke:Ustring|sub|s1=abcde|2|4}}&lt;br /&gt;
 {{obr}}#invoke:Ustring{{!}}sub{{!}}s1=abcde{{!}}2{{!}}50{{cbr}}&lt;br /&gt;
⇒ {{#invoke:Ustring|sub|s1=abcde|2|50}}&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;code&amp;gt;{{obr}}padleft{{cbr}}&amp;lt;/code&amp;gt; is available too, but isn't quite appropriate for the sake of truncating commit ids in [[Template:Repo_link]]:&lt;br /&gt;
 {{obr}}padleft:{{!}}6{{!}}foo bar baz{{cbr}}&lt;br /&gt;
⇒ {{padleft:|6|foo bar baz}}&lt;br /&gt;
&lt;br /&gt;
 {{obr}}padleft:{{!}}20{{!}}foo bar baz{{cbr}}&lt;br /&gt;
⇒ {{padleft:|20|foo bar baz}}&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=User_talk:Rominet/Sandbox&amp;diff=143297</id>
		<title>User talk:Rominet/Sandbox</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=User_talk:Rominet/Sandbox&amp;diff=143297"/>
		<updated>2025-12-25T08:40:22Z</updated>

		<summary type="html">&lt;p&gt;Rominet: /* String substitution */ Reply to Gijs&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== String substitution ==&lt;br /&gt;
&lt;br /&gt;
Hi,&lt;br /&gt;
&lt;br /&gt;
I've added [[Module:String]] and [[Module:Ustring]] ;-) Enjoy!&lt;br /&gt;
&lt;br /&gt;
[[User:Gijs|Gijs]] ([[User talk:Gijs|talk]]) 10:11, 23 December 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Seems to work perfectly, thanks a lot Gijs! (glad I consulted the wiki history from the [[FlightGear_wiki:Village_pump|Village pump]]—for some reason, I don't receive the wiki notifications anymore... I used to, circa 2015-2017.). Merry Christmas!&lt;br /&gt;
&lt;br /&gt;
: --[[User:Rominet|Rominet]] ([[User talk:Rominet|talk]]) 08:39, 25 December 2025 (UTC)&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=User:Rominet/Sandbox&amp;diff=143296</id>
		<title>User:Rominet/Sandbox</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=User:Rominet/Sandbox&amp;diff=143296"/>
		<updated>2025-12-25T08:34:32Z</updated>

		<summary type="html">&lt;p&gt;Rominet: /* String substitution */ Test 'sub' function from Module:String and Module:Ustring ⇒ works, thanks Gijs!&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Various tests ==&lt;br /&gt;
&lt;br /&gt;
Test of &amp;lt;code&amp;gt;{{tl|project infrastructure}}&amp;lt;/code&amp;gt;: {{project infrastructure}}&lt;br /&gt;
&lt;br /&gt;
Test of &amp;lt;code&amp;gt;{{obr}}project infrastructure|abbrev{{cbr}}&amp;lt;/code&amp;gt;: {{project infrastructure|abbrev}}&lt;br /&gt;
&lt;br /&gt;
Test of &amp;lt;code&amp;gt;{{obr}}[[User:Rominet/TestTemplate]]{{cbr}}&amp;lt;/code&amp;gt;: {{User:Rominet/TestTemplate}}&lt;br /&gt;
&lt;br /&gt;
== FGMeta-Python repo templates ==&lt;br /&gt;
&lt;br /&gt;
=== fgmeta-python source ===&lt;br /&gt;
&lt;br /&gt;
Test of {{tl|fgmeta-python source}} with&lt;br /&gt;
 {{obr}}fgmeta-python source&lt;br /&gt;
 {{!}} path = pyproject.toml&lt;br /&gt;
 {{!}} tag  = 1.0.0b1&lt;br /&gt;
 {{cbr}}&lt;br /&gt;
&lt;br /&gt;
→ {{fgmeta-python source&lt;br /&gt;
| path = pyproject.toml&lt;br /&gt;
| tag  = 1.0.0b1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The link text is clearly not an existing URL (the target URL is fine). Not a bug, the default link text is not supposed to be a URL. Use {{tl|fgmeta-python url}} or pass &amp;lt;code&amp;gt;full=1&amp;lt;/code&amp;gt; to {{tl|fgmeta-python source}} if you want the link text to be a URL.&lt;br /&gt;
&lt;br /&gt;
=== Git clone with the templates ===&lt;br /&gt;
&lt;br /&gt;
Bad &amp;lt;code&amp;gt;git clone&amp;lt;/code&amp;gt; command, written using {{tl|fgmeta-python source}} and its &amp;lt;code&amp;gt;cmd&amp;lt;/code&amp;gt; parameter:&lt;br /&gt;
 {{fgmeta-python source&lt;br /&gt;
| cmd = git clone&lt;br /&gt;
}}&lt;br /&gt;
Good &amp;lt;code&amp;gt;git clone&amp;lt;/code&amp;gt; command, written using {{tl|fgmeta-python clone}}:&lt;br /&gt;
 {{fgmeta-python clone}}&lt;br /&gt;
&lt;br /&gt;
=== Getting a URL with the templates ===&lt;br /&gt;
&lt;br /&gt;
URL for terrasync.py:&lt;br /&gt;
 {{obr}}fgmeta-python url {{!}} src/flightgear/meta/scripts/terrasync/terrasync.py {{cbr}}&lt;br /&gt;
&lt;br /&gt;
→ {{fgmeta-python url | src/flightgear/meta/scripts/terrasync/terrasync.py}}&lt;br /&gt;
&lt;br /&gt;
=== String substitution ===&lt;br /&gt;
&lt;br /&gt;
[[User:Gijs|Gijs]] kindly installed [[Module:String]] and [[Module:Ustring]] (I learnt from them at [https://www.mediawiki.org/wiki/Module:String Module:String] and [https://en.wikipedia.org/wiki/Module:Ustring Module:Ustring] from [https://www.mediawiki.org/wiki/Help:Extension:ParserFunctions#String_functions here]); let's try them:&lt;br /&gt;
 {{obr}}#invoke:String{{!}}sub{{!}}abcde{{!}}2{{!}}4{{cbr}}&lt;br /&gt;
⇒ {{#invoke:String|sub|abcde|2|4}}&lt;br /&gt;
 {{obr}}#invoke:Ustring{{!}}sub{{!}}s1=abcde{{!}}2{{!}}4{{cbr}}&lt;br /&gt;
⇒ {{#invoke:Ustring|sub|s1=abcde|2|4}}&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;code&amp;gt;{{obr}}padleft{{cbr}}&amp;lt;/code&amp;gt; is available too, but isn't quite appropriate for the sake of truncating commit ids in [[Template:Repo_link]]:&lt;br /&gt;
 {{obr}}padleft:{{!}}6{{!}}foo bar baz{{cbr}}&lt;br /&gt;
⇒ {{padleft:|6|foo bar baz}}&lt;br /&gt;
&lt;br /&gt;
 {{obr}}padleft:{{!}}20{{!}}foo bar baz{{cbr}}&lt;br /&gt;
⇒ {{padleft:|20|foo bar baz}}&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=User:Rominet/Sandbox&amp;diff=143279</id>
		<title>User:Rominet/Sandbox</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=User:Rominet/Sandbox&amp;diff=143279"/>
		<updated>2025-12-19T09:37:21Z</updated>

		<summary type="html">&lt;p&gt;Rominet: Deplore the lack of a decent string substitution function&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Various tests ==&lt;br /&gt;
&lt;br /&gt;
Test of &amp;lt;code&amp;gt;{{tl|project infrastructure}}&amp;lt;/code&amp;gt;: {{project infrastructure}}&lt;br /&gt;
&lt;br /&gt;
Test of &amp;lt;code&amp;gt;{{obr}}project infrastructure|abbrev{{cbr}}&amp;lt;/code&amp;gt;: {{project infrastructure|abbrev}}&lt;br /&gt;
&lt;br /&gt;
Test of &amp;lt;code&amp;gt;{{obr}}[[User:Rominet/TestTemplate]]{{cbr}}&amp;lt;/code&amp;gt;: {{User:Rominet/TestTemplate}}&lt;br /&gt;
&lt;br /&gt;
== FGMeta-Python repo templates ==&lt;br /&gt;
&lt;br /&gt;
=== fgmeta-python source ===&lt;br /&gt;
&lt;br /&gt;
Test of {{tl|fgmeta-python source}} with&lt;br /&gt;
 {{obr}}fgmeta-python source&lt;br /&gt;
 {{!}} path = pyproject.toml&lt;br /&gt;
 {{!}} tag  = 1.0.0b1&lt;br /&gt;
 {{cbr}}&lt;br /&gt;
&lt;br /&gt;
→ {{fgmeta-python source&lt;br /&gt;
| path = pyproject.toml&lt;br /&gt;
| tag  = 1.0.0b1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The link text is clearly not an existing URL (the target URL is fine). Not a bug, the default link text is not supposed to be a URL. Use {{tl|fgmeta-python url}} or pass &amp;lt;code&amp;gt;full=1&amp;lt;/code&amp;gt; to {{tl|fgmeta-python source}} if you want the link text to be a URL.&lt;br /&gt;
&lt;br /&gt;
=== Git clone with the templates ===&lt;br /&gt;
&lt;br /&gt;
Bad &amp;lt;code&amp;gt;git clone&amp;lt;/code&amp;gt; command, written using {{tl|fgmeta-python source}} and its &amp;lt;code&amp;gt;cmd&amp;lt;/code&amp;gt; parameter:&lt;br /&gt;
 {{fgmeta-python source&lt;br /&gt;
| cmd = git clone&lt;br /&gt;
}}&lt;br /&gt;
Good &amp;lt;code&amp;gt;git clone&amp;lt;/code&amp;gt; command, written using {{tl|fgmeta-python clone}}:&lt;br /&gt;
 {{fgmeta-python clone}}&lt;br /&gt;
&lt;br /&gt;
=== Getting a URL with the templates ===&lt;br /&gt;
&lt;br /&gt;
URL for terrasync.py:&lt;br /&gt;
 {{obr}}fgmeta-python url {{!}} src/flightgear/meta/scripts/terrasync/terrasync.py {{cbr}}&lt;br /&gt;
&lt;br /&gt;
→ {{fgmeta-python url | src/flightgear/meta/scripts/terrasync/terrasync.py}}&lt;br /&gt;
&lt;br /&gt;
=== String substitution ===&lt;br /&gt;
&lt;br /&gt;
Unfortunately, functions from [https://www.mediawiki.org/wiki/Module:String Module:String] or [https://en.wikipedia.org/wiki/Module:Ustring Module:Ustring] as mentioned [https://www.mediawiki.org/wiki/Help:Extension:ParserFunctions#String_functions here] don't seem to be available on this wiki:&lt;br /&gt;
 {{obr}}#invoke:String{{!}}sub{{!}}target_string{{!}}2{{!}}4{{cbr}}&lt;br /&gt;
⇒ Script error: No such module &amp;quot;String&amp;quot;.&lt;br /&gt;
 {{obr}}#invoke:Ustring{{!}}sub{{!}}s1=abcde{{!}}2{{!}}4{{cbr}}&lt;br /&gt;
⇒ Script error: No such module &amp;quot;Ustring&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;code&amp;gt;{{obr}}padleft{{cbr}}&amp;lt;/code&amp;gt; is available but isn't quite appropriate for the sake of truncating commit ids in [[Template:Repo_link]]. :-/&lt;br /&gt;
 {{obr}}padleft:{{!}}6{{!}}foo bar baz{{cbr}}&lt;br /&gt;
⇒ {{padleft:|6|foo bar baz}}&lt;br /&gt;
&lt;br /&gt;
 {{obr}}padleft:{{!}}20{{!}}foo bar baz{{cbr}}&lt;br /&gt;
⇒ {{padleft:|20|foo bar baz}}&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=FlightGear_wiki:Village_pump&amp;diff=143154</id>
		<title>FlightGear wiki:Village pump</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=FlightGear_wiki:Village_pump&amp;diff=143154"/>
		<updated>2025-12-03T15:46:23Z</updated>

		<summary type="html">&lt;p&gt;Rominet: /* Beware of shortened Git commit IDs */ Precision and signature&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NEWSECTIONLINK__&lt;br /&gt;
{{Archives|[[/Archive 2012|2012]]|[[/Archive 2013|2013]]|[[/Archive 2014|2014]]|[[/Archive 2015|2015]]|[[/Archive 2016|2016]]|[[/Archive 2017|2017]]|[[/Archive 2018|2018]]|[[/Archive 2019|2019]]|[[/Archive 2020|2020]]|[[/Archive 2021|2021]]|[[/Archive 2022|2022]]}}&lt;br /&gt;
{{shortcut|FGW:VP}}&lt;br /&gt;
&lt;br /&gt;
Welcome to the '''Village Pump'''. This page is used to discuss the technical issues, operations and guidelines of the [[FlightGear wiki]].&lt;br /&gt;
&lt;br /&gt;
Please &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[{{fullurl:{{FULLPAGENAME}}|action=edit&amp;amp;section=new}} add new topics]&amp;lt;/span&amp;gt; to the '''bottom''' of this page.&lt;br /&gt;
&lt;br /&gt;
Old discussions should be moved to a [[FlightGear wiki:Village pump/Archive YEAR]]. These discussions can then be moved to a relevant talk page if appropriate.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== MediaWiki updated to 1.39.6 ==&lt;br /&gt;
&lt;br /&gt;
We have updated MediaWiki to its latest LTS version 1.39.6 today. Although we've tested the update, chances are that we've missed certain scenarios or features. Please report any issues that you may encounter.&lt;br /&gt;
&lt;br /&gt;
[[User:Gijs|Gijs]] ([[User talk:Gijs|talk]]) 09:31, 30 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Embedded YouTube videos broken ==&lt;br /&gt;
&lt;br /&gt;
It seems that the [[mw:Extension:EmbedVideo|EmbedVideo extension]] was removed at some point. Consequently, pages such as [[Howto:Creating FlightGear Promo Videos]] are broken. At present, the best replacements seems to be [[mw:Extension:EmbedVideo_(fork)|a fork]] and [[mw:Extension:YouTube|Extension:YouTube]].&lt;br /&gt;
&lt;br /&gt;
—'''''[[User:Red Leader|&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Red Leader&amp;lt;/span&amp;gt;]]''''' ([[User talk:Red Leader|talk]], [[Special:Contributions/Red Leader|contribs]]) 19:21, 30 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Hi,&lt;br /&gt;
: Thanks for the report. It was introduced by today's update, but should be fixed now.&lt;br /&gt;
: [[User:Gijs|Gijs]] ([[User talk:Gijs|talk]]) 21:21, 30 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: Confirmed, thanks. And I’d completely forgotten about {{[[Template:Wikipedia|wikipedia]]}}. 😅&lt;br /&gt;
:: '''''[[User:Red Leader|&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Red Leader&amp;lt;/span&amp;gt;]]''''' ([[User talk:Red Leader|talk]], [[Special:Contributions/Red Leader|contribs]]) 21:57, 30 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Forum registration problem ==&lt;br /&gt;
&lt;br /&gt;
Hello,&lt;br /&gt;
I would like to register on the forum, but I tried several times without success. I sent an email to the administrator some time ago, but it seems to have been lost. I don't know what to do, is there somebody here who could help? Please tell me if you need additional information.&lt;br /&gt;
Thanks very much in advance. [[User:Kestrel|Kestrel]] ([[User talk:Kestrel|talk]]) 13:14, 25 March 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Hi,&lt;br /&gt;
: That's unfortunate! You can find my email address at https://forum.flightgear.org/contact.php Please try again if you've done that before, I'll actively monitor the address for any incoming messages, and let me know if you don't get a reply.&lt;br /&gt;
: [[User:Gijs|Gijs]] ([[User talk:Gijs|talk]]) 15:01, 25 March 2024 (UTC) (forum admin)&lt;br /&gt;
&lt;br /&gt;
== Sidebar link for &amp;quot;Build server&amp;quot; is broken ==&lt;br /&gt;
&lt;br /&gt;
Hello, &lt;br /&gt;
&lt;br /&gt;
Just wanted to bring to someones attention that the URL for &amp;quot;Build server&amp;quot; currently 404s. Not sure if this resource still exists or if its URL has changed.&lt;br /&gt;
&lt;br /&gt;
Cheers!&lt;br /&gt;
-Joshua&lt;br /&gt;
&lt;br /&gt;
: Hi Joshua,&lt;br /&gt;
: The URL is still correct, but the build server is temporarily down due to a server failure. It's being worked on, so should be back up &amp;quot;soon&amp;quot;.&lt;br /&gt;
: [[User:Gijs|Gijs]] ([[User talk:Gijs|talk]]) 12:29, 3 September 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
== FlightGear Wikipedia article image needs correctly sourced Flightgear wiki screenshot ==&lt;br /&gt;
https://en.wikipedia.org/wiki/FlightGear&lt;br /&gt;
&lt;br /&gt;
The image used for the Flightgear Wikipedia article appears to have been deleted, because it was sourced from the following Flightgear-wiki screenshot page:&lt;br /&gt;
&lt;br /&gt;
[[:File:Bo 105 over Sint Marteen.png]]&lt;br /&gt;
&lt;br /&gt;
which referred to an imgur link instead of the following thread, which gives a CC license based on a google search of the file name:&lt;br /&gt;
&lt;br /&gt;
https://forum.flightgear.org/viewtopic.php?f=88&amp;amp;t=32163&amp;amp;start=0&lt;br /&gt;
&lt;br /&gt;
Discussion on Wikipedia:&lt;br /&gt;
&lt;br /&gt;
https://en.wikipedia.org/wiki/Wikipedia:Files_for_discussion/2024_December_7#File:FlightGear_Flight_Sim_Bo_105_over_Sint_Marteen.png&lt;br /&gt;
&lt;br /&gt;
&amp;gt; ''Subsequent comments should be made on the appropriate discussion page (such as the file's talk page or in a [https://en.wikipedia.org/wiki/Wikipedia:Deletion_review deletion review]).''&lt;br /&gt;
&lt;br /&gt;
The person who uploaded it, or someone from the wiki, should ideally fix the FlightGear wiki page, and do a deletion review for the Wikipedia file. The file may have been used in multiple pages since screenshots are uncommon on Wikipedia due to proprietary apps. Feel free to remove this comment once it's taken care of. Good luck&lt;br /&gt;
&lt;br /&gt;
== Issues with three templates ==&lt;br /&gt;
&lt;br /&gt;
Hi,&lt;br /&gt;
&lt;br /&gt;
The [[Template:Fgmeta_commit|fgmeta commit]] template appears to be broken. It used to work in the first ''Note'' [[Scripted_Compilation_on_Linux_Debian/Ubuntu#For_the_curious:_the_SSH_way|here]] (see the URL).&lt;br /&gt;
&lt;br /&gt;
Also, I tried to use [[Template:Repo_link#Site:_Generic]] to create a link to the [https://gitlab.kitware.com/cmake/cmake.git CMake repo], but didn't manage: IIRC, the link text was empty.&lt;br /&gt;
&lt;br /&gt;
Finally, [[Template:Fgmeta_source]] doesn't seem to to what the doc. says for ''simplepath'': with&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;{{fgmeta source&lt;br /&gt;
| path = download_and_compile.sh&lt;br /&gt;
| simplepath = 1&lt;br /&gt;
}}&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the link text starts with a slash, so I used&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;{{fgmeta source&lt;br /&gt;
| path = download_and_compile.sh&lt;br /&gt;
| text = download_and_compile.sh&lt;br /&gt;
}}&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
which is of course more redundant.&lt;br /&gt;
&lt;br /&gt;
Thanks for considering! :-)&lt;br /&gt;
&lt;br /&gt;
[[User:Rominet|Rominet]] ([[User talk:Rominet|talk]])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
: Good catch.  I need to look into that one.  I may not have coded the commit part of GitLab into the master {{tl|repo_link}} template.&lt;br /&gt;
&lt;br /&gt;
: [[User:Bugman|Bugman]] ([[User talk:Bugman|talk]]) 15:41, 13 March 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: All fixed.  It was quite simple - the {{tl|fgmeta_source}} template was missing the &amp;lt;code&amp;gt;proj&amp;lt;/code&amp;gt; parameter.  I've also fixed {{tl|fgmeta_clone}}.&lt;br /&gt;
&lt;br /&gt;
:: [[User:Bugman|Bugman]] ([[User talk:Bugman|talk]]) 15:53, 13 March 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
::: Thanks for the reply and fixes, Bugman! (And sorry for the delay, I didn't see any notification...) I see the first item is indeed addressed. Regarding the second item, well, I see no place where I'd really want to use this now on the d&amp;amp;c page, so didn't test it. As for the third one, I still get &amp;lt;code&amp;gt;/download_and_compile.sh&amp;lt;/code&amp;gt; in the Preview when I try the above {{tl|fgmeta_source}} snippet with &amp;lt;code&amp;gt;simplepath = 1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
::: I looked at {{tl|fgmeta_clone}} too; it looks nice but seems to default to the &amp;lt;code&amp;gt;git://&amp;lt;/code&amp;gt; protocol. Would it be possible to make it default to using &amp;lt;code&amp;gt;https://&amp;lt;/code&amp;gt;? Thanks again. :-)&lt;br /&gt;
 &lt;br /&gt;
::: [[User:Rominet|Rominet]] ([[User talk:Rominet|talk]])&lt;br /&gt;
&lt;br /&gt;
:::: Not a problem.  For the &amp;lt;code&amp;gt;simplepath&amp;lt;/code&amp;gt; parameter, that is the designed behaviour in the {{tl|repo link}} template.  In most cases our repositories have complex directory structures and the desired output is the absolute file path, removing the protocol and URL parts of the path.  Do you wish to simply have the file name there?  No one had asked for that before, so I never added an option for that.  In the case of the source repositories, you often want to remove the first part of the absolute path so that for example in SimGear, {{simgear source|path=simgear/scene/util/QuadTreeBuilder.hxx|simplepath=1}} (&amp;lt;nowiki&amp;gt;{{simgear source|path=simgear/scene/util/QuadTreeBuilder.hxx|simplepath=1}}&amp;lt;/nowiki&amp;gt;) would be shown as {{simgear source|path=simgear/scene/util/QuadTreeBuilder.hxx|text=scene/util/QuadTreeBuilder.hxx}} (&amp;lt;nowiki&amp;gt;{{simgear source|path=simgear/scene/util/QuadTreeBuilder.hxx|text=scene/util/QuadTreeBuilder.hxx}}&amp;lt;/nowiki&amp;gt;.  This is not scriptable in MediaWiki so I left it all for the text parameter.&lt;br /&gt;
&lt;br /&gt;
:::: For the protocol, I have now added the &amp;lt;code&amp;gt;protocol&amp;lt;/code&amp;gt; parameter.  E.g. &amp;lt;nowiki&amp;gt;{{fgmeta clone | protocol = https}}&amp;lt;/nowiki&amp;gt;.  That will give &amp;lt;code&amp;gt;{{fgmeta clone | protocol = https}}&amp;lt;/code&amp;gt; (as of today generated as &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;git clone https://gitlab.com/flightgear/fgmeta.git&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
:::: [[User:Bugman|Bugman]] ([[User talk:Bugman|talk]]) 08:51, 24 March 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
::::: Thanks Bugman, I've updated the [[Scripted_Compilation_on_Linux_Debian/Ubuntu|download_and_compile.sh page]] to use &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{fgmeta clone | protocol = https}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; as you proposed; it works great. For the link to download_and_compile.sh, I can continue to use &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{fgmeta source | path = download_and_compile.sh | text = download_and_compile.sh}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, no problem.&lt;br /&gt;
&lt;br /&gt;
::::: As far as I'm concerned, everything is resolved here, so this thread/section can be deleted if someone wants to “clean up”.&lt;br /&gt;
&lt;br /&gt;
::::: ''Other subject:'' the only remaining thing is that I didn't receive any notification, neither for your replies here nor for the January changes by [[User:Jebba|Jebba]] to the [[Scripted_Compilation_on_Linux_Debian/Ubuntu|download_and_compile.sh page]] that is on my watchlist. I used to receive email notifications for these things years ago, haven't changed my preferences regarding this and don't see any setting that would explain why I don't receive these notifications anymore. Maybe email sending by the wiki software is not quite well configured according to current standards (SPF, DKIM, DMARC)?&lt;br /&gt;
&lt;br /&gt;
::::: [[User:Rominet|Rominet]] ([[User talk:Rominet|talk]])&lt;br /&gt;
&lt;br /&gt;
== Improve the 'simgear clone', 'flightgear clone' and 'fgdata clone' templates ==&lt;br /&gt;
&lt;br /&gt;
Hi,&lt;br /&gt;
&lt;br /&gt;
In order to improve [[Fedora_Packages_and_Compiling]], it would be nice to have the &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{simgear clone}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{flightgear clone}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{fgdata clone}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; templates on par with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{fgmeta clone}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (support for the &amp;lt;code&amp;gt;protocol&amp;lt;/code&amp;gt; parameter, etc.). I tried&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;{{simgear clone | protocol = https | opt = --single-branch --branch release/2024.1 | post = simgear}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
but it doesn't seem to work, as the preview shows this:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;git clone --single-branch --branch release/2024.1 git://gitlab.com simgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(ditto with &amp;lt;code&amp;gt;flightear clone&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;fgdata clone&amp;lt;/code&amp;gt;). Thanks in advance :-)&lt;br /&gt;
&lt;br /&gt;
[[User:Rominet|Rominet]] ([[User talk:Rominet|talk]])&lt;br /&gt;
&lt;br /&gt;
: I needed a while to work out the best strategy for these changes.  I've now gone through all of the {{tl|repo link}} cloning subtemplates listed on {{tl|repo link/doc related}} and added the &amp;lt;code&amp;gt;project&amp;lt;/code&amp;gt; parameter to the templates and the optional &amp;lt;code&amp;gt;protocol&amp;lt;/code&amp;gt; parameter.  These changes were required as the &amp;lt;code&amp;gt;gl&amp;lt;/code&amp;gt; section of the {{tl|repo_link}} template is constructed differently to the &amp;lt;code&amp;gt;sf&amp;lt;/code&amp;gt; section.  I've also updated the git cloning documentation {{tl|repo link/doc git clone}}.  I hope this covers everything you need.&lt;br /&gt;
&lt;br /&gt;
: [[User:Bugman|Bugman]] ([[User talk:Bugman|talk]]) 07:48, 1 April 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: Thanks a lot, Bugman, this works great! Your changes allowed me to perform [https://wiki.flightgear.org/w/index.php?title=Fedora_Packages_and_Compiling&amp;amp;type=revision&amp;amp;diff=141687&amp;amp;oldid=141513 this edit] in [[Fedora_Packages_and_Compiling]]. The only remaining &amp;lt;code&amp;gt;git clone&amp;lt;/code&amp;gt; command written in full on that page is for FG's fork of OpenSceneGraph at GitLab. I understand that choosing a proper name for an applicable &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{... clone}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; template probably requires some careful thinking... ;-)&lt;br /&gt;
&lt;br /&gt;
:: [[User:Rominet|Rominet]] ([[User talk:Rominet|talk]])&lt;br /&gt;
&lt;br /&gt;
== Default text in Template:Repo link ==&lt;br /&gt;
&lt;br /&gt;
Hi,&lt;br /&gt;
&lt;br /&gt;
The default ''text'' in {{tl|Repo link}} gives somewhat pleasant link texts such as&lt;br /&gt;
 flightgear/flightgear/src/Scripting/NasalSys.cxx&lt;br /&gt;
when the ''site'' is &amp;lt;code&amp;gt;sourceforge&amp;lt;/code&amp;gt;, however the result looks like a bug for other sites (though I understand this may be as intended). To be clear, the URLs are correct but the default link texts look weird because they start with the unqualified site name rather than the fully-qualified domain name. For instance,&lt;br /&gt;
 {{obr}}fgmeta source{{cbr}}&lt;br /&gt;
yields [https://gitlab.com/flightgear/fgmeta gitlab/flightgear/fgmeta/next] rather than [https://gitlab.com/flightgear/fgmeta gitlab.com/flightgear/fgmeta/next]. I suggest to replace &amp;lt;code&amp;gt;gitlab&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;gitlab.com&amp;lt;/code&amp;gt; in the default text (where the HTML comment says “Site advertising”) and do the same for &amp;lt;code&amp;gt;github&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Note: the Gitorious web site doesn't exist anymore, maybe that should be removed from the template?&lt;br /&gt;
&lt;br /&gt;
Thanks for considering; I can do the replacement if you wish.&lt;br /&gt;
&lt;br /&gt;
[[User:Rominet|Rominet]] ([[User talk:Rominet|talk]]) 10:38, 12 November 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Sounds sensible, so please go ahead!&lt;br /&gt;
: Regarding Gitorious, it may be nice to link to an archived version of the repos, such as https://archive.softwareheritage.org/browse/origin/directory/?origin_url=https://gitorious.org/flightgear/fgdata.git&amp;amp;visit_type=git Altough this only makes sense for repos or branches that are not part of our current GitLab...&lt;br /&gt;
: [[User:Gijs|Gijs]] ([[User talk:Gijs|talk]]) 13:58, 12 November 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: [https://wiki.flightgear.org/w/index.php?title=Template:Repo_link&amp;amp;action=history Done], thanks Gijs!&lt;br /&gt;
::&lt;br /&gt;
&lt;br /&gt;
:: One should be careful using this, though, because the resulting link ''texts'' may be non-existing URLs (after prepending the protocol) despite looking like valid ones, as shown by the first example in [[User:Rominet/Sandbox#FGMeta-Python repo templates]]!&lt;br /&gt;
&lt;br /&gt;
:: So, to avoid people getting trapped by this, maybe the default link text should start with something like &amp;lt;code&amp;gt;[GitLab]/...&amp;lt;/code&amp;gt; rather than the &amp;lt;code&amp;gt;gitlab.com/...&amp;lt;/code&amp;gt; I just put (to make it clear that such link texts are not supposed to be “Internet addresses”).&lt;br /&gt;
:: [[User:Rominet|Rominet]] ([[User talk:Rominet|talk]]) 16:20, 12 November 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
::: This is now implemented. For instance, &amp;lt;code&amp;gt;{{obr}}fgmeta-python source {{!}} path = pyproject.toml {{!}} tag  = 1.0.0b1 {{cbr}}&amp;lt;/code&amp;gt; results in {{fgmeta-python source | path = pyproject.toml | tag  = 1.0.0b1 }}. This also holds for GitHub and GitoriousIsNowClosed. SourceForge has no such prefix for now (it initially didn't, and editing its part of {{tl|Repo link}} requires a bit more temerity than what I have at the moment :-)).&lt;br /&gt;
::: [[User:Rominet|Rominet]] ([[User talk:Rominet|talk]]) 09:15, 14 November 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
: That's a good idea.  Note for Gitorious - I added this because there are a number of historical documents/pages that refer to developments that occurred on Gitorious which were not migrated to SourceForge.  I originally made the Gitorious links work by pointing to the archive by the Internet Archive (see [[Gitorious]]).  However that archive has been offline for a few years now.  The Internet Archive are storing all the data so it may return one day.&lt;br /&gt;
&lt;br /&gt;
: [[User:Bugman|Bugman]] ([[User talk:Bugman|talk]]) 22:06, 13 November 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Beware of shortened Git commit IDs ==&lt;br /&gt;
&lt;br /&gt;
While fixing broken links due to the {{tl|foo commit}} templates not specifying &amp;lt;code&amp;gt;proj=flightgear&amp;lt;/code&amp;gt; (this was implicit with &amp;lt;code&amp;gt;site=sf&amp;lt;/code&amp;gt; but isn't with &amp;lt;code&amp;gt;site=gl&amp;lt;/code&amp;gt;), I found that URLs at GitLab don't accept the same shortened Git commit IDs as those at SourceForge:&lt;br /&gt;
 https://sourceforge.net/p/flightgear/fgdata/ci/807062 - OK&lt;br /&gt;
 https://gitlab.com/flightgear/fgdata/-/commit/807062  - NOK&lt;br /&gt;
 https://gitlab.com/flightgear/fgdata/-/commit/807062d - OK&lt;br /&gt;
 https://gitlab.com/flightgear/fgdata/-/commit/807062d0b6f858885547f27325e829c2bf42a12b - OK&lt;br /&gt;
&lt;br /&gt;
As a consequence, there are probably a lot of broken links in the wiki due to shortened commit IDs. Better always use the long ones...&lt;br /&gt;
&lt;br /&gt;
{{Note|Commit ID 807062 in FGData is not ambiguous at the time of this writing.}}&lt;br /&gt;
[[User:Rominet|Rominet]] ([[User talk:Rominet|talk]]) 15:45, 3 December 2025 (UTC)&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Nasal_library/props&amp;diff=143153</id>
		<title>Nasal library/props</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Nasal_library/props&amp;diff=143153"/>
		<updated>2025-12-03T14:58:17Z</updated>

		<summary type="html">&lt;p&gt;Rominet: Fix broken links due to shortened Git commit IDs (contrary to SourceForge, GitLab doesn't accept this number of characters in commit URLs)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Nasal Navigation|nocat=1}}&lt;br /&gt;
This page contains documentation for the '''&amp;lt;code&amp;gt;props&amp;lt;/code&amp;gt; namespace''' in [[Nasal]]. This namespace provides APIs for working with property trees (including the main [[Property Tree]]) via {{API Link|simgear|class|SGPropertyNode}}. The &amp;lt;code&amp;gt;props&amp;lt;/code&amp;gt; namespace is sourced from {{fgdata source|Nasal/props.nas}} and {{flightgear source|src/Scripting/nasal-props.cxx}}.&lt;br /&gt;
&lt;br /&gt;
== Class ==&lt;br /&gt;
=== Node ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|mode = class&lt;br /&gt;
|text = The main class, used widely for manipulating property trees.&lt;br /&gt;
}}&lt;br /&gt;
==== new() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.new([values]);&lt;br /&gt;
|text = Constructor function. Returns a new &amp;lt;code&amp;gt;props.Node&amp;lt;/code&amp;gt; instance.&lt;br /&gt;
|param1 = values&lt;br /&gt;
|param1text = An optional hash that will be the initial property structure.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
props.dump(node);&lt;br /&gt;
|example2 = var tree = {&lt;br /&gt;
    a: 1,&lt;br /&gt;
    b: [&amp;quot;a&amp;quot;, &amp;quot;b&amp;quot;, &amp;quot;c&amp;quot;],&lt;br /&gt;
    c: {&lt;br /&gt;
        d: 1 * 4&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
var node = props.Node.new(tree);&lt;br /&gt;
props.dump(node);&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== addChild() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.addChild(name[, min_idx[, append]]);&lt;br /&gt;
|version = 2.10&lt;br /&gt;
|commit = {{fgdata commit|a15d5829379864c7138edff621d6864c5f426d0b|t=commit}}&lt;br /&gt;
|text = Add a new, blank child to the node. Returns the newly-created node.&lt;br /&gt;
|param1 = name&lt;br /&gt;
|param1text = The name of the node as a string.&lt;br /&gt;
|param2 = min_idx&lt;br /&gt;
|param2text = This specifies the minimum index to add the new one to. This takes precedence over '''append'''. Defaults to 0.&lt;br /&gt;
|param3 = append&lt;br /&gt;
|param3text = If there is already one or more children with the same name and this argument is 1 (true), the new child will be added after the child with the highest index. If 0 (false), the new child will be added at the lowest available index with the limit of '''min_idx'''. Defaults to 1 (true).&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;);&lt;br /&gt;
props.dump(node);&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;, 1);&lt;br /&gt;
props.dump(node); # a[1]&lt;br /&gt;
|example3 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;, 1);&lt;br /&gt;
props.dump(node); # a[1]&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;, 0, 0);&lt;br /&gt;
props.dump(node); # a[1] and a[0]&lt;br /&gt;
|example4 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;, 1);&lt;br /&gt;
props.dump(node); # a[1]&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;, 0, 1);&lt;br /&gt;
props.dump(node); # a[1] and a[2]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== addChildren() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.addChildren(name, count[, min_idx[, append]]);&lt;br /&gt;
|version = 2.10&lt;br /&gt;
|commit = {{fgdata commit|7f1117a5374beabb045fb76fbb6dd8bfb0128100|t=commit}}&lt;br /&gt;
|text = Adds multiple children with the same name to this node. Returns &amp;lt;code&amp;gt;'''nil&amp;lt;/code&amp;gt;.&lt;br /&gt;
|param1 = name&lt;br /&gt;
|param1text = The name of the nodes as a string.&lt;br /&gt;
|param2 = count&lt;br /&gt;
|param2text = Number of new children to add.&lt;br /&gt;
|param3 = min_idx&lt;br /&gt;
|param3text = Performs the same function as in &amp;lt;code&amp;gt;[[#addChild.28.29|Node.addChild()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
|param4 = append&lt;br /&gt;
|param4text = Performs the same function as in &amp;lt;code&amp;gt;[[#addChild.28.29|Node.addChild()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.addChildren(&amp;quot;a&amp;quot;, 2);&lt;br /&gt;
props.dump(node); # a[0] and a[1]&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.addChildren(&amp;quot;a&amp;quot;, 2, 1);&lt;br /&gt;
props.dump(node); # a[1] and a[2]&lt;br /&gt;
|example3 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;, 2);&lt;br /&gt;
props.dump(node); # a[2]&lt;br /&gt;
node.addChildren(&amp;quot;a&amp;quot;, 2, 0, 0);&lt;br /&gt;
props.dump(node); # a[2], a[0], and a[1]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== adjustValue() (since FG 2020.1) ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.adjustValue(delta);&lt;br /&gt;
|text = Adds delta (numeric) to current value respecting the node type. &lt;br /&gt;
|param1 = delta&lt;br /&gt;
|param1text = Numeric value (can be negative) to add to current node value.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== alias() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.alias(node, chainListener=0);&lt;br /&gt;
|text = Aliases this node to another one. Returns 1 on success and 0 on failure.&lt;br /&gt;
|param1 = node&lt;br /&gt;
|param1text = The node to alias to. Can be one of:&lt;br /&gt;
* A path to a property in the [[Property Tree]] as a string.&lt;br /&gt;
* A &amp;lt;code&amp;gt;prop&amp;lt;/code&amp;gt; ghost.&lt;br /&gt;
* A &amp;lt;code&amp;gt;props.Node&amp;lt;/code&amp;gt; object.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.alias(&amp;quot;/position/altitude-ft&amp;quot;);&lt;br /&gt;
props.dump(node); # equals the current altitude&lt;br /&gt;
|example2 = var node1 = props.Node.new();&lt;br /&gt;
node1.setDoubleValue(2.34);&lt;br /&gt;
var node2 = props.Node.new();&lt;br /&gt;
node2.alias(node1);&lt;br /&gt;
props.dump(node2); # equals 2.34&lt;br /&gt;
|param2=chainListener|param2text=Specify if listeners should work on aliased properties or not. Current default is false forbackwards compatability.}}&lt;br /&gt;
&lt;br /&gt;
==== clearValue() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.clearValue();&lt;br /&gt;
|text = Clears the value and type of the node.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.setDoubleValue(2.34);&lt;br /&gt;
props.dump(node); # prints &amp;quot;{DOUBLE} = 2.35&amp;quot;&lt;br /&gt;
node.clearValue();&lt;br /&gt;
props.dump(node); # prints &amp;quot;{NONE} = nil&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== decrement() (since FG 2020.1) ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.decrement(n = 1);&lt;br /&gt;
|text = Decrements integer property by n (default: n = 1)&lt;br /&gt;
|param1 = n&lt;br /&gt;
|param1text = Value to subtract, will be converted to int, defaults to 1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== equals() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.equals(node);&lt;br /&gt;
|version = 2.12&lt;br /&gt;
|commit = {{fgdata commit|d80722065f3c11e0511fa888b1f5f310dd0183e3|t=commit}}&lt;br /&gt;
|text = Checks whether the node refers to the same one as another. Returns 1 (true) if it is, and 0 (false) if otherwise.&lt;br /&gt;
|param1 = node&lt;br /&gt;
|param1text = Node to check against. May be either a &amp;lt;code&amp;gt;prop&amp;lt;/code&amp;gt; ghost or a &amp;lt;code&amp;gt;props.Node&amp;lt;/code&amp;gt; object.&lt;br /&gt;
|example1 = var n = props.Node.new();&lt;br /&gt;
var a = n;&lt;br /&gt;
print(a.equals(n)); # prints &amp;quot;1&amp;quot; (true)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== getAliasTarget() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.getAliasTarget();&lt;br /&gt;
|text = Returns the alias target of a node as another &amp;lt;code&amp;gt;props.Node&amp;lt;/code&amp;gt; instance.&lt;br /&gt;
|example1 = setprop(&amp;quot;/test&amp;quot;, 2.35);&lt;br /&gt;
var node = props.Node.new();&lt;br /&gt;
node.alias(&amp;quot;/test&amp;quot;);&lt;br /&gt;
var tgt = node.getAliasTarget();&lt;br /&gt;
print(tgt.getPath()); # prints &amp;quot;/test&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== getAttribute() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.getAttribute([rel_path, ]name);&lt;br /&gt;
props.Node.getAttribute();&lt;br /&gt;
|text = Returns an attribute. If no arguments are given, the function will return an integer specifying the attributes set for the node (see {{simgear source|simgear/props/props.hxx|l=767}} for a list). A list of attributes are below&lt;br /&gt;
{{{!}} class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! String !! Return value&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} last {{!!}} The highest used attribute code (should be 128). See for {{simgear source|simgear/props/props.hxx|l=767}} the codes.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} children {{!!}} Number of child nodes.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} listeners {{!!}} Number of listeners connected to this node.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} references {{!!}} Number of times the node has previously been referenced.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} tied {{!!}} Whether the node is tied.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} alias {{!!}} Whether the node is aliased.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} readable {{!!}} Whether the node can be read.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} writable {{!!}} Whether the node can be written to.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} archive {{!!}} Whether the node will be saved when the &amp;quot;save&amp;quot; [[fgcommands|fgcommand]] is triggered.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} trace-read {{!!}} Whether the reading of the node will be logged when &amp;lt;code&amp;gt;--log-level=info&amp;lt;/code&amp;gt;.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} trace-write {{!!}} Whether the writing to the node will be logged when &amp;lt;code&amp;gt;--log-level=info&amp;lt;/code&amp;gt;.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} userarchive {{!!}} Whether the node will be saved to the [[FlightGear configuration via XML#autosave.xml|autosave file]] (only works for actual properties).&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} preserve {{!!}} Whether the value of node will be preserved during resets (only works for actual properties).&lt;br /&gt;
{{!}}}&lt;br /&gt;
|param1 = rel_path&lt;br /&gt;
|param1text = Optional relative path as a string.&lt;br /&gt;
|param2 = name&lt;br /&gt;
|param2text = Attribute as a string. See the above table for a full list.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
var child = node.addChild(&amp;quot;a&amp;quot;);&lt;br /&gt;
print(node.getAttribute(&amp;quot;children&amp;quot;)); # prints &amp;quot;1&amp;quot;&lt;br /&gt;
|example2text = Example using relative path&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
var child = node.addChild(&amp;quot;a&amp;quot;);&lt;br /&gt;
print(node.getAttribute(&amp;quot;a&amp;quot;, &amp;quot;readable&amp;quot;)); # prints &amp;quot;1&amp;quot; (node can be read from)&lt;br /&gt;
|example3 = var node = props.Node.new();&lt;br /&gt;
var node2 = props.Node.new();&lt;br /&gt;
node2.alias(node);&lt;br /&gt;
print(node2.getAttribute(&amp;quot;alias&amp;quot;)); # prints &amp;quot;1&amp;quot; (true)&lt;br /&gt;
|example4 = print(props.globals.getNode(&amp;quot;/sim/signals/fdm-initialized&amp;quot;).getAttribute(&amp;quot;listeners&amp;quot;)); # prints the number of listeners&lt;br /&gt;
|example5 = print(props.globals.getNode(&amp;quot;/sim/time/elapsed-sec&amp;quot;).getAttribute(&amp;quot;tied&amp;quot;)); # prints &amp;quot;1&amp;quot; (true), meaning it is tied&lt;br /&gt;
|example6 = var node = props.Node.new();&lt;br /&gt;
print(node.getAttribute(&amp;quot;writable&amp;quot;)); # prints &amp;quot;1&amp;quot; (true), meaning the node can be written to&lt;br /&gt;
|example7text = Example using no arguments&lt;br /&gt;
|example7 = var node = props.Node.new();&lt;br /&gt;
print(node.getAttribute()); # prints &amp;quot;3&amp;quot; (true), meaning the node can be read from (1) and written to (2)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== getBoolValue() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.getBoolValue();&lt;br /&gt;
|text = Returns the value of a node converted to a boolean. If the node is a number type, 0  will return false, while 1 will return true. If the node is a string or unspecified type and the value is &amp;lt;code&amp;gt;&amp;quot;false&amp;quot;&amp;lt;/code&amp;gt;, false will be returned. Otherwise, true will be returned. Remember that boolean values are represented in Nasal as 1 (true) and 0 (false).&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.setBoolValue(1);&lt;br /&gt;
print(node.getBoolValue() ? &amp;quot;true&amp;quot; : &amp;quot;false&amp;quot;); # prints &amp;quot;true&amp;quot;&lt;br /&gt;
node.setBoolValue(0);&lt;br /&gt;
print(node.getBoolValue() ? &amp;quot;true&amp;quot; : &amp;quot;false&amp;quot;); # prints &amp;quot;false&amp;quot;&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.setDoubleValue(1.23);&lt;br /&gt;
print(node.getBoolValue() ? &amp;quot;true&amp;quot; : &amp;quot;false&amp;quot;); # prints &amp;quot;true&amp;quot;&lt;br /&gt;
node.setDoubleValue(-1.23);&lt;br /&gt;
print(node.getBoolValue() ? &amp;quot;true&amp;quot; : &amp;quot;false&amp;quot;); # prints &amp;quot;true&amp;quot;&lt;br /&gt;
node.setDoubleValue(0.0);&lt;br /&gt;
print(node.getBoolValue() ? &amp;quot;true&amp;quot; : &amp;quot;false&amp;quot;); # prints &amp;quot;false&amp;quot;&lt;br /&gt;
|example3 = var node = props.Node.new();&lt;br /&gt;
node.setIntValue(2);&lt;br /&gt;
print(node.getBoolValue() ? &amp;quot;true&amp;quot; : &amp;quot;false&amp;quot;); # prints &amp;quot;true&amp;quot;&lt;br /&gt;
node.setIntValue(-2);&lt;br /&gt;
print(node.getBoolValue() ? &amp;quot;true&amp;quot; : &amp;quot;false&amp;quot;); # prints &amp;quot;true&amp;quot;&lt;br /&gt;
node.setIntValue(0);&lt;br /&gt;
print(node.getBoolValue() ? &amp;quot;true&amp;quot; : &amp;quot;false&amp;quot;); # prints &amp;quot;false&amp;quot;&lt;br /&gt;
|example4 = var node = props.Node.new();&lt;br /&gt;
node.setValue(&amp;quot;Hello, World!&amp;quot;);&lt;br /&gt;
print(node.getBoolValue() ? &amp;quot;true&amp;quot; : &amp;quot;false&amp;quot;); # prints &amp;quot;true&amp;quot;&lt;br /&gt;
node.setValue(&amp;quot;false&amp;quot;);&lt;br /&gt;
print(node.getBoolValue() ? &amp;quot;true&amp;quot; : &amp;quot;false&amp;quot;); # prints &amp;quot;false&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== getChild() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.getChild(rel_path[, idx[, create]]);&lt;br /&gt;
|text = Returns a child of a node as another &amp;lt;code&amp;gt;props.Node&amp;lt;/code&amp;gt; instance.&lt;br /&gt;
|param1 = rel_path&lt;br /&gt;
|param1text = Relative path to the child node as a string.&lt;br /&gt;
|param2 = idx&lt;br /&gt;
|param2text = Optional index for the child node as an integer.&lt;br /&gt;
|param3 = create&lt;br /&gt;
|param3text = If set to 1 (true), a new child will be created if it does not exist. If set to 0 (false), the function will not create a new child and the function will return &amp;lt;code&amp;gt;'''nil'''&amp;lt;/code&amp;gt; if no child exists. Defaults to 0.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;);&lt;br /&gt;
var c = node.getChild(&amp;quot;a&amp;quot;);&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.addChildren(&amp;quot;a&amp;quot;, 3);&lt;br /&gt;
node.getNode(&amp;quot;a[1]&amp;quot;).setDoubleValue(2.35);&lt;br /&gt;
var c = node.getChild(&amp;quot;a&amp;quot;, 1);&lt;br /&gt;
print(c.getValue()); # prints &amp;quot;2.35&amp;quot;&lt;br /&gt;
|example3 = var node = props.Node.new();&lt;br /&gt;
var c = node.getChild(&amp;quot;a&amp;quot;, 1, 1);&lt;br /&gt;
props.dump(node); # new child a[1] will have appeared&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== getChildren() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.getChildren([name]);&lt;br /&gt;
|text = Returns a vector of child nodes, optionally those with a certain name, as &amp;lt;code&amp;gt;props.Node&amp;lt;/code&amp;gt; instances.&lt;br /&gt;
|param1 = name&lt;br /&gt;
|param1text = Optional name of the child nodes as a string. If not given, all children will be returned.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.addChildren(&amp;quot;a&amp;quot;, 3);&lt;br /&gt;
node.addChildren(&amp;quot;b&amp;quot;, 3);&lt;br /&gt;
debug.dump(node.getChildren()); # all child nodes in the vector&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.addChildren(&amp;quot;a&amp;quot;, 3);&lt;br /&gt;
node.addChildren(&amp;quot;b&amp;quot;, 3);&lt;br /&gt;
debug.dump(node.getChildren(&amp;quot;b&amp;quot;)); # only children with the name &amp;quot;b&amp;quot; in the vector&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== getIndex() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.getIndex();&lt;br /&gt;
|text = Returns the index of a node as an integer.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.addChildren(&amp;quot;a&amp;quot;, 3);&lt;br /&gt;
print(node.getChild(&amp;quot;a&amp;quot;, 1).getIndex()); # prints &amp;quot;1&amp;quot;&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;b&amp;quot;);&lt;br /&gt;
print(node.getChild(&amp;quot;b&amp;quot;).getIndex()); # prints &amp;quot;0&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== getName() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.getName();&lt;br /&gt;
|text = Returns the name of the node as a string.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
var c = node.addChild(&amp;quot;a&amp;quot;);&lt;br /&gt;
debug.dump(c.getName()); # prints &amp;quot;a&amp;quot;&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.addChildren(&amp;quot;a&amp;quot;, 3);&lt;br /&gt;
debug.dump(node.getChild(&amp;quot;a&amp;quot;, 2).getName()); # prints &amp;quot;a&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== getNode() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.getNode(rel_path[, create]);&lt;br /&gt;
|text = Returns a subnode as another &amp;lt;code&amp;gt;props.Node&amp;lt;/code&amp;gt; instance.&lt;br /&gt;
|param1 = rel_path&lt;br /&gt;
|param1text = Relative path to the subnode as a string.&lt;br /&gt;
|param2 = create&lt;br /&gt;
|param2text = If 1 (true), the node will be created if it does not exist. If 0 (false) and the node does not exist, the function will return &amp;lt;code&amp;gt;'''nil'''&amp;lt;/code&amp;gt;. Default to 0 (false).&lt;br /&gt;
|example1 = var tree = {&lt;br /&gt;
    &amp;quot;a&amp;quot;: 1,&lt;br /&gt;
    &amp;quot;b&amp;quot;: &amp;quot;Hi&amp;quot;,&lt;br /&gt;
    &amp;quot;c&amp;quot;: {&lt;br /&gt;
        &amp;quot;d&amp;quot;: &amp;quot;Hello, World!&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
var node = props.Node.new(tree);&lt;br /&gt;
print(node.getNode(&amp;quot;c/d&amp;quot;).getValue()); # prints &amp;quot;Hello, World!&amp;quot;&lt;br /&gt;
|example2 = var tree = {&lt;br /&gt;
    &amp;quot;a&amp;quot;: 1,&lt;br /&gt;
    &amp;quot;b&amp;quot;: &amp;quot;Hi&amp;quot;,&lt;br /&gt;
    &amp;quot;c&amp;quot;: {}&lt;br /&gt;
};&lt;br /&gt;
var node = props.Node.new(tree);&lt;br /&gt;
node.getNode(&amp;quot;c/d&amp;quot;, 1).setDoubleValue(2.35);&lt;br /&gt;
props.dump(node); # c/d now exists&lt;br /&gt;
|example3 = var ac = props.globals.getNode(&amp;quot;sim/aircraft&amp;quot;);&lt;br /&gt;
print(&amp;quot;Current aircraft is: &amp;quot;, ac.getValue());&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== getParent() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.getParent();&lt;br /&gt;
|text = Returns the parent of a node, or &amp;lt;code&amp;gt;'''nil'''&amp;lt;/code&amp;gt; if there is no parent.&lt;br /&gt;
|example1 = var tree = {&lt;br /&gt;
    &amp;quot;a&amp;quot;: 1,&lt;br /&gt;
    &amp;quot;b&amp;quot;: &amp;quot;Hi&amp;quot;,&lt;br /&gt;
    &amp;quot;c&amp;quot;: {&lt;br /&gt;
        &amp;quot;d&amp;quot;: &amp;quot;Hello, World!&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
var node = props.Node.new(tree);&lt;br /&gt;
props.dump(node.getNode(&amp;quot;c/d&amp;quot;).getParent()); # dumps &amp;quot;c&amp;quot;&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
debug.dump(node.getParent()); # prints nil&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== getPath() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.getPath();&lt;br /&gt;
|text = Returns the path of the node as a string.&lt;br /&gt;
|example1 = var tree = {&lt;br /&gt;
    &amp;quot;a&amp;quot;: 1,&lt;br /&gt;
    &amp;quot;b&amp;quot;: &amp;quot;Hi&amp;quot;,&lt;br /&gt;
    &amp;quot;c&amp;quot;: {&lt;br /&gt;
        &amp;quot;d&amp;quot;: &amp;quot;Hello, World!&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
var node = props.Node.new(tree);&lt;br /&gt;
print(node.getNode(&amp;quot;c/d&amp;quot;).getPath()); # prints &amp;quot;/c/d&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== getType() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.getType();&lt;br /&gt;
|text = Returns node's type as a string. It should be one of &amp;quot;NONE&amp;quot;, &amp;quot;ALIAS&amp;quot;, &amp;quot;BOOL&amp;quot;, &amp;quot;INT&amp;quot;, &amp;quot;LONG&amp;quot; (long integer), &amp;quot;FLOAT&amp;quot;, &amp;quot;DOUBLE&amp;quot;, &amp;quot;STRING&amp;quot;, &amp;quot;VEC3D&amp;quot;, &amp;quot;VEC4D&amp;quot;, &amp;quot;UNSPECIFIED&amp;quot;.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
print(node.getType()); # prints &amp;quot;NONE&amp;quot;&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.setIntValue(12);&lt;br /&gt;
print(node.getType()); # prints &amp;quot;INT&amp;quot;&lt;br /&gt;
|example3 = var node = props.Node.new();&lt;br /&gt;
node.setValue([0.4, 0.2, 1]);&lt;br /&gt;
debug.dump(node.getValue()); # prints &amp;quot;[0.4, 0.2, 1]&amp;quot;&lt;br /&gt;
print(node.getType()); # prints &amp;quot;VEC3D&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== getValue() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.getValue([rel_path]);&lt;br /&gt;
|text = {{hatnote|See also {{func link|getBoolValue()|page=this}}.}}&lt;br /&gt;
&lt;br /&gt;
Returns the value of the node.&lt;br /&gt;
|param1 = rel_path&lt;br /&gt;
|param1text = Optional relative path to a subnode as a string, which may contain '/' characters. If the subnode does not exist, we return nil.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.setDoubleValue(2.35);&lt;br /&gt;
print(node.getValue()); # prints &amp;quot;2.35&amp;quot;&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.setValue(&amp;quot;Hi&amp;quot;);&lt;br /&gt;
print(node.getValue()); # prints &amp;quot;Hi&amp;quot;&lt;br /&gt;
|example3 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;).setValue(&amp;quot;Hi&amp;quot;);&lt;br /&gt;
print(node.getValue(&amp;quot;a&amp;quot;)); # prints &amp;quot;Hi&amp;quot;&lt;br /&gt;
|example4 = var node = props.Node.new();&lt;br /&gt;
node.setValue([0, 0.5, 1]);&lt;br /&gt;
debug.dump(node.getValue()); # prints &amp;quot;[0, 0.5, 1]&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== getValues() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.getValues();&lt;br /&gt;
|text = Returns the node tree as a hash, with all the various subnodes, etc. If the node has no children, the result is equivalent to {{func link|getValue()|page=this}}. Subnodes that are indexed will be combined into one key and their values placed in a vector (see example 2).&lt;br /&gt;
|example1 = var tree = {&lt;br /&gt;
    &amp;quot;string&amp;quot;: &amp;quot;Hi&amp;quot;,&lt;br /&gt;
    &amp;quot;number&amp;quot;: 1.2,&lt;br /&gt;
    &amp;quot;subnode&amp;quot;: {&lt;br /&gt;
        &amp;quot;idx-node&amp;quot;: [1, 2, 3]&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
var node = props.Node.new(tree);&lt;br /&gt;
node.addChild(&amp;quot;bool&amp;quot;).setBoolValue(1);&lt;br /&gt;
props.dump(node); # dump to node tree&lt;br /&gt;
debug.dump(node.getValues()); # dump the node converted to hash&lt;br /&gt;
|example2 = var tree = {&lt;br /&gt;
    &amp;quot;a&amp;quot;: [1, 2, 3]&lt;br /&gt;
};&lt;br /&gt;
var node = props.Node.new(tree);&lt;br /&gt;
props.dump(node); # a[0] = 1, a[1] = 2, a[2] = 3&lt;br /&gt;
debug.dump(node.getValues()); # a: [1, 2, 3]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== increment() (since FG 2020.1) ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.increment(n = 1);&lt;br /&gt;
|text = Increments integer property by n (default: n = 1)&lt;br /&gt;
|param1 = n&lt;br /&gt;
|param1text = Value to add, will be converted to int, defaults to 1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== initNode() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.initNode([path[, value[, type[, force]]]]);&lt;br /&gt;
|text = Initializes a node if it doesn't exist and returns that node as a &amp;lt;code&amp;gt;props.Node&amp;lt;/code&amp;gt; object.&lt;br /&gt;
|param1 = path&lt;br /&gt;
|param1text = Optional path to a subnode as a string. If not given, the node itself will be initialized.&lt;br /&gt;
|param2 = value&lt;br /&gt;
|param2text = Optional default value to initialize the node with.&lt;br /&gt;
|param3 = type&lt;br /&gt;
|param3text = Optional string that will set the type of the node. Must be one of &amp;lt;code&amp;gt;&amp;quot;DOUBLE&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;INT&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;BOOL&amp;quot;&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;&amp;quot;STRING&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
|param4 = force&lt;br /&gt;
|param4text = If set to 1 (true), the node's type will be forced to change.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
var a = node.initNode(&amp;quot;a&amp;quot;);&lt;br /&gt;
props.dump(a);&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
var a = node.initNode(&amp;quot;a&amp;quot;, &amp;quot;Hi&amp;quot;);&lt;br /&gt;
props.dump(a);&lt;br /&gt;
|example3 = var node = props.Node.new();&lt;br /&gt;
var a = node.initNode(&amp;quot;a&amp;quot;, 1.25, &amp;quot;INT&amp;quot;);&lt;br /&gt;
props.dump(a); # a = 1&lt;br /&gt;
|example4 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;).setBoolValue(0);&lt;br /&gt;
props.dump(node.getChild(&amp;quot;a&amp;quot;)); # a = 0 (type: bool)&lt;br /&gt;
var a = node.initNode(&amp;quot;a&amp;quot;, 1.25, &amp;quot;INT&amp;quot;, 1);&lt;br /&gt;
props.dump(a); # a = 0 (type: int)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== isInt() (since FG 2020.1) ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.isInt();&lt;br /&gt;
|text = Returns true (1) if node '''type''' is &amp;quot;INT&amp;quot; or &amp;quot;LONG&amp;quot; (long integer) otherwise false (0).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== isNumeric() (since FG 2020.1) ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.isNumeric();&lt;br /&gt;
|text = Returns true (1) if node '''type''' is &amp;quot;INT&amp;quot;, &amp;quot;LONG&amp;quot;, &amp;quot;FLOAT&amp;quot; or &amp;quot;DOUBLE&amp;quot; otherwise false (0).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== remove() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.remove();&lt;br /&gt;
|text = Removes the node and returns the removed node.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;);&lt;br /&gt;
props.dump(node);&lt;br /&gt;
node.getChild(&amp;quot;a&amp;quot;).remove();&lt;br /&gt;
props.dump(node); # child &amp;quot;a&amp;quot; does not exist anymore&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== removeAllChildren() ====&lt;br /&gt;
{{Caution|Be careful when  using this API in conjunction with the Canvas system and element specific properties, for details please see [[Howto:Canvas Path Benchmarking]]}}&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.removeAllChildren();&lt;br /&gt;
|version = 3.2&lt;br /&gt;
|commit = {{fgdata commit|4766ed21a68230c0c15265e5604a74f4d99e0f5d|t=commit}}&lt;br /&gt;
|text = Removes all child nodes and returns the node.&lt;br /&gt;
|example1 = var tree = {&lt;br /&gt;
    &amp;quot;a&amp;quot;: 1,&lt;br /&gt;
    &amp;quot;b&amp;quot;: 2,&lt;br /&gt;
    &amp;quot;c&amp;quot;: 3&lt;br /&gt;
};&lt;br /&gt;
var node = props.Node.new(tree);&lt;br /&gt;
props.dump(node);&lt;br /&gt;
node.removeAllChildren();&lt;br /&gt;
props.dump(node); # all children have been removed&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== removeChild() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.removeChild(rel_path, idx);&lt;br /&gt;
|text = Removes a given child node child nodes and returns the node.&lt;br /&gt;
|param1 = rel_path&lt;br /&gt;
|param1text = Relative path to a subnode as a string.&lt;br /&gt;
|param2 = idx&lt;br /&gt;
|param2text = Index of the subnode to remove as an integer.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;);&lt;br /&gt;
props.dump(node);&lt;br /&gt;
node.removeChild(&amp;quot;a&amp;quot;, 0);&lt;br /&gt;
props.dump(node); # child &amp;quot;a&amp;quot; has been removed&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.addChildren(&amp;quot;a&amp;quot;, 2);&lt;br /&gt;
props.dump(node);&lt;br /&gt;
node.removeChild(&amp;quot;a&amp;quot;, 0);&lt;br /&gt;
props.dump(node); # just a[1] remains&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== removeChildren() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.removeChildren([name]);&lt;br /&gt;
|text = Removes all children with a specified name. If no arguments are given, all children will be removed (see also {{func link|removeAllChildren()|page=this}}).&lt;br /&gt;
|param1 = name&lt;br /&gt;
|param1text = Optional name of children to remove as a string.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.addChildren(&amp;quot;a&amp;quot;, 2);&lt;br /&gt;
node.addChildren(&amp;quot;b&amp;quot;, 2);&lt;br /&gt;
props.dump(node);&lt;br /&gt;
node.removeChildren(&amp;quot;a&amp;quot;);&lt;br /&gt;
props.dump(node); # just children named &amp;quot;b&amp;quot; remain&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.addChildren(&amp;quot;a&amp;quot;, 2);&lt;br /&gt;
node.addChildren(&amp;quot;b&amp;quot;, 2);&lt;br /&gt;
props.dump(node);&lt;br /&gt;
node.removeChildren();&lt;br /&gt;
props.dump(node); # all children removed&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== setAttribute() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.setAttribute([rel_path, ]attr, value);&lt;br /&gt;
props.Node.setAttribute(attrs);&lt;br /&gt;
|text = Sets an attribute or multiple attributes. A list of attributes and their codes are below. For a brand new node, the default attributes are ''readable'' and ''writable''. Returns an integer specifying the old attributes.&lt;br /&gt;
{{{!}} class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! String !! Description&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} readable {{!!}} Whether the node can be read.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} writable {{!!}} Whether the node can be written to.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} archive {{!!}} Whether the node will be saved when the &amp;quot;save&amp;quot; [[fgcommands|fgcommand]] is triggered.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} trace-read {{!!}} Whether the reading of the node will be logged when &amp;lt;code&amp;gt;--log-level=info&amp;lt;/code&amp;gt;.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} trace-write {{!!}} Whether the writing to the node will be logged when &amp;lt;code&amp;gt;--log-level=info&amp;lt;/code&amp;gt;.&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} userarchive {{!!}} Whether the node will be saved to the [[FlightGear configuration via XML#autosave.xml|autosave file]] (only works for actual properties).&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} preserve {{!!}} Whether the value of node will be preserved during resets (only works for actual properties).&lt;br /&gt;
{{!}}}&lt;br /&gt;
|param1 = rel_path&lt;br /&gt;
|param1text = Optional relative path as a string.&lt;br /&gt;
|param2 = attr&lt;br /&gt;
|param2text = Name of attribute to set as a string. See above.&lt;br /&gt;
|param3 = value&lt;br /&gt;
|param3text = Boolean value to set the property to.&lt;br /&gt;
|param4 = attrs&lt;br /&gt;
|param4text = When the function is used in its second form, this argument is used. This argument should be an integer specifying which arguments are set to true. See {{simgear source|simgear/props/props.hxx|l=767}} for the full list of codes. Simply add codes of the desired attributes together.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.setAttribute(&amp;quot;trace-write&amp;quot;, 1);&lt;br /&gt;
node.setIntValue(12); # will be traced&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.setAttribute(&amp;quot;readable&amp;quot;, 0);&lt;br /&gt;
var val = node.getValue();&lt;br /&gt;
debug.dump(val); # prints &amp;quot;nil&amp;quot;&lt;br /&gt;
|example3 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;);&lt;br /&gt;
node.setAttribute(&amp;quot;a&amp;quot;, &amp;quot;trace-write&amp;quot;, 1);&lt;br /&gt;
node.getChild(&amp;quot;a&amp;quot;).setIntValue(12); # will be traced&lt;br /&gt;
|example4 = var node = props.Node.new();&lt;br /&gt;
node.setAttribute(35); # read + write + trace-write&lt;br /&gt;
node.setIntValue(12); # will be traced&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== setBoolValue() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.setBoolValue([rel_path, ]value);&lt;br /&gt;
|text = {{note|For setting the values of [[Property Tree]] nodes, it is recommended to use {{func link|setprop()}} if possible, due to performance differences.}}&lt;br /&gt;
&lt;br /&gt;
Sets a node to a boolean value. If the node has no type, it will be set to a bool type. If the node is already a number type, it will be set to either 1 or 0. If it is a string, it will be set to either &amp;quot;true&amp;quot; or &amp;quot;false&amp;quot;. Returns 1 (true) if the operation was successful.&lt;br /&gt;
|param1 = rel_path&lt;br /&gt;
|param1text = Optional relative path as a string.&lt;br /&gt;
|param2 = value&lt;br /&gt;
|param2text = Value to set the node to, will be interpreted into a boolean. If it is &amp;lt;code&amp;gt;'''nil'''&amp;lt;/code&amp;gt;, it will be false. If it is a string, it will be false. If it is a number, 0 will be false, while other numbers will be true. All other cases will be interpreted as 0.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.setBoolValue(nil);&lt;br /&gt;
props.dump(node); # node = 0 (false)&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.setBoolValue(&amp;quot;Hi&amp;quot;);&lt;br /&gt;
props.dump(node); # node = 1 (true)&lt;br /&gt;
|example3 = var node = props.Node.new();&lt;br /&gt;
node.setBoolValue(0);&lt;br /&gt;
props.dump(node); # node = 0 (false)&lt;br /&gt;
node.setBoolValue(1.25);&lt;br /&gt;
props.dump(node); # node = 1 (true)&lt;br /&gt;
|example4 = var node = props.Node.new();&lt;br /&gt;
node.setValue(&amp;quot;String&amp;quot;);&lt;br /&gt;
props.dump(node); # node = &amp;quot;String&amp;quot; (type: string)&lt;br /&gt;
node.setBoolValue(1);&lt;br /&gt;
props.dump(node); # node = &amp;quot;true&amp;quot;&lt;br /&gt;
|example5 = var node = props.Node.new();&lt;br /&gt;
node.setDoubleValue(12.32);&lt;br /&gt;
props.dump(node); # node = 12.32 (type: double)&lt;br /&gt;
node.setBoolValue(1);&lt;br /&gt;
props.dump(node); # node = 1&lt;br /&gt;
|example6 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;);&lt;br /&gt;
node.setBoolValue(&amp;quot;a&amp;quot;, 1);&lt;br /&gt;
props.dump(node); # /a = 1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== setDoubleValue() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.setDoubleValue([rel_path, ]value);&lt;br /&gt;
|text = {{note|For setting the values of [[Property Tree]] nodes, it is recommended to use {{func link|setprop()}} if possible, due to performance differences.}}&lt;br /&gt;
&lt;br /&gt;
Sets a node to a double value. If the node has no type, it will be set to a double type. If the node is a bool, values different from zero will be interpreted as true. If the node is a string, the value will be converted to a string. If the node is an integer type, it will be truncated to the closest integer to zero. Returns 1 (true) if the operation was successful.&lt;br /&gt;
|param1 = rel_path&lt;br /&gt;
|param1text = Optional relative path as a string.&lt;br /&gt;
|param2 = value&lt;br /&gt;
|param2text = Value to set the node to, will be interpreted into a double number. It must be a valid number or a string that can be converted to a number.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.setDoubleValue(1.1);&lt;br /&gt;
props.dump(node); # node = 1.1 (type: double)&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.setDoubleValue(&amp;quot;1.1&amp;quot;);&lt;br /&gt;
props.dump(node); # node = 1.1 (type: double)&lt;br /&gt;
|example3 = var node = props.Node.new();&lt;br /&gt;
node.setBoolValue(1);&lt;br /&gt;
node.setDoubleValue(&amp;quot;1.1&amp;quot;);&lt;br /&gt;
props.dump(node); # node = 1 (type: bool)&lt;br /&gt;
node.setDoubleValue(0.0);&lt;br /&gt;
props.dump(node); # node = 0 (type: bool)&lt;br /&gt;
|example4 = var node = props.Node.new();&lt;br /&gt;
node.setIntValue(1);&lt;br /&gt;
node.setDoubleValue(1.1);&lt;br /&gt;
props.dump(node); # node = 1 (type: int)&lt;br /&gt;
node.setDoubleValue(&amp;quot;-1.1&amp;quot;);&lt;br /&gt;
props.dump(node); # node = -1 (type: int)&lt;br /&gt;
|example5 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;);&lt;br /&gt;
node.setDoubleValue(&amp;quot;a&amp;quot;, 12.2);&lt;br /&gt;
props.dump(node); # /a = 12.2&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== setIntValue() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.setIntValue([rel_path, ]value);&lt;br /&gt;
|text = {{note|For setting the values of [[Property Tree]] nodes, it is recommended to use {{func link|setprop()}} if possible, due to performance differences.}}&lt;br /&gt;
&lt;br /&gt;
Sets a node to an integer value. If the node has no type, it will be set to a integer type. If the node is a bool, values different from zero will be interpreted as true. If the node is a string, the value will be converted to a string. Returns 1 (true) if the operation was successful.&lt;br /&gt;
|param1 = rel_path&lt;br /&gt;
|param1text = Optional relative path as a string.&lt;br /&gt;
|param2 = value&lt;br /&gt;
|param2text = Value to set the node to, will be interpreted into a integer. It must be a valid number or a string that can be converted to a number. If the number is a double, it will be truncated to the closest integer to zero.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.setIntValue(12);&lt;br /&gt;
props.dump(node); # node = 12&lt;br /&gt;
node.setIntValue(&amp;quot;6&amp;quot;);&lt;br /&gt;
props.dump(node); # node = 6&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.setIntValue(12.2);&lt;br /&gt;
props.dump(node); # node = 12&lt;br /&gt;
node.setIntValue(-12.2);&lt;br /&gt;
props.dump(node); # node = 12&lt;br /&gt;
|example3 = var node = props.Node.new();&lt;br /&gt;
node.setBoolValue(1);&lt;br /&gt;
node.setIntValue(12.5);&lt;br /&gt;
props.dump(node); # node = 1 (type: bool)&lt;br /&gt;
node.setIntValue(0);&lt;br /&gt;
props.dump(node); # node = 0 (type: bool)&lt;br /&gt;
|example4 = var node = props.Node.new();&lt;br /&gt;
node.setValue(&amp;quot;Hi&amp;quot;);&lt;br /&gt;
node.setIntValue(12);&lt;br /&gt;
props.dump(node); # node = &amp;quot;12&amp;quot; (type: string)&lt;br /&gt;
|example5 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;);&lt;br /&gt;
node.setIntValue(&amp;quot;a&amp;quot;, 12);&lt;br /&gt;
props.dump(node); # /a = 12&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== setValue() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.setValue([rel_path, ]value);&lt;br /&gt;
|text = {{hatnote|See also {{func link|setBoolValue()|page=this}}, {{func link|setDoubleValue()|page=this}}, and {{func link|setIntValue()|page=this}}.}}&lt;br /&gt;
&lt;br /&gt;
{{note|For setting the values of [[Property Tree]] nodes, it is recommended to use {{func link|setprop()}} if possible, due to performance differences.}}&lt;br /&gt;
&lt;br /&gt;
Sets a node to a given value. See table below for conversions and effects. Note that vec3d and vec4d types are not fully integrated into SGPropertyNode. Returns 1 (true) if the operation was successful.&lt;br /&gt;
&lt;br /&gt;
{{{!}} class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
{{!}} colspan=&amp;quot;2&amp;quot; style=&amp;quot;text-align:right&amp;quot; {{!}} '''value''' type → &lt;br /&gt;
! rowspan=&amp;quot;2&amp;quot; {{!}} Number&lt;br /&gt;
! rowspan=&amp;quot;2&amp;quot; {{!}} String &lt;br /&gt;
! rowspan=&amp;quot;2&amp;quot; {{!}} Vector&lt;br /&gt;
{{!-}}&lt;br /&gt;
{{!}} style=&amp;quot;text-align:left&amp;quot; {{!}} Current node&amp;lt;br&amp;gt;type ↓&lt;br /&gt;
{{!}} style=&amp;quot;text-align:right&amp;quot; {{!}} Result ↘&lt;br /&gt;
{{!-}}&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; {{!}} None/unspecified&lt;br /&gt;
{{!}}&lt;br /&gt;
* Type set to &amp;lt;code&amp;gt;double&amp;lt;/code&amp;gt;&lt;br /&gt;
* Node set to '''value'''.&lt;br /&gt;
{{!}}&lt;br /&gt;
* Type set to &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt;&lt;br /&gt;
* Node set to '''value'''.&lt;br /&gt;
{{!}}&lt;br /&gt;
* Type set to &amp;lt;code&amp;gt;vec*d&amp;lt;/code&amp;gt;&lt;br /&gt;
* Node set to '''value'''.&lt;br /&gt;
{{!-}}&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; {{!}} Bool&lt;br /&gt;
{{!}}&lt;br /&gt;
* If '''value''' != 0, node set to true.&lt;br /&gt;
* If '''value''' == 0, node set to false.&lt;br /&gt;
{{!}}&lt;br /&gt;
* If '''value''' == &amp;quot;true&amp;quot;, node set to true.&lt;br /&gt;
* If '''value''' can be converted to an integer,&amp;lt;br&amp;gt;and != 0, node set to true.&lt;br /&gt;
{{!}} Node set to true.&lt;br /&gt;
{{!-}}&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; {{!}} Integer&lt;br /&gt;
{{!}} Node set to truncated '''value'''&lt;br /&gt;
{{!}} Node set to '''value ''' converted and truncated to an integer.&lt;br /&gt;
{{!}} Node set to 1.&lt;br /&gt;
{{!-}}&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; {{!}} Double&lt;br /&gt;
{{!}} Node set to '''value'''.&lt;br /&gt;
{{!}} Node set to '''value''' converted to number.&lt;br /&gt;
{{!}} Throws an error (vector is not a number).&lt;br /&gt;
{{!-}}&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; {{!}} String&lt;br /&gt;
{{!}} Node set to '''value''' converted to string. {{!!}} Node set to '''value'''. {{!!}} Node not set.&lt;br /&gt;
{{!}}}&lt;br /&gt;
|param1 = rel_path&lt;br /&gt;
|param1text = Optional relative path as a string.&lt;br /&gt;
|param2 = value&lt;br /&gt;
|param2text = Value to set the node to. Must be a string, a valid number, or a vector consisting of 3 or 4 numbers. See table above for conversions and effects.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
node.setValue(&amp;quot;Hi&amp;quot;);&lt;br /&gt;
props.dump(node); # node = &amp;quot;Hi&amp;quot;&lt;br /&gt;
|example2 = var node = props.Node.new();&lt;br /&gt;
node.addChild(&amp;quot;a&amp;quot;);&lt;br /&gt;
node.setValue(&amp;quot;a&amp;quot;, &amp;quot;Hi&amp;quot;);&lt;br /&gt;
props.dump(node); # \a = &amp;quot;Hi&amp;quot;&lt;br /&gt;
|example3 = var node = props.Node.new();&lt;br /&gt;
node.setValue([0.4, 0.2, 1]);&lt;br /&gt;
debug.dump(node.getValue()); # prints &amp;quot;[0.4, 0.2, 1]&amp;quot;&lt;br /&gt;
print(node.getType()); # prints &amp;quot;VEC3D&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== setValues() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.setValues(val);&lt;br /&gt;
|text = {{hatnote|See also {{func link|getValues()|page=this}}.}}&lt;br /&gt;
&lt;br /&gt;
Sets the nodes property tree from a Nasal hash. Scalars will become nodes in the tree and hashes will become named subnodes. Vectors will be converted into indexed nodes, with the values in the vector becoming their values (see examples below).&lt;br /&gt;
|param1 = val&lt;br /&gt;
|param1text = A hash that will become the property tree.&lt;br /&gt;
|example1 = var val = {&lt;br /&gt;
    &amp;quot;a&amp;quot;: 100 # &amp;quot;a&amp;quot; will become the subnode's name, and 100 its value&lt;br /&gt;
};&lt;br /&gt;
var node = props.Node.new();&lt;br /&gt;
node.setValues(val);&lt;br /&gt;
props.dump(node); # dump tree&lt;br /&gt;
|example2 = var val = {&lt;br /&gt;
    &amp;quot;a&amp;quot;: 1,&lt;br /&gt;
    &amp;quot;b&amp;quot;: &amp;quot;Hi&amp;quot;,&lt;br /&gt;
    &amp;quot;c&amp;quot;: {&lt;br /&gt;
        &amp;quot;d&amp;quot;: [1, 2, 3]&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
var node = props.Node.new();&lt;br /&gt;
node.setValues(val);&lt;br /&gt;
props.dump(node); # dump tree&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== unalias() ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.Node.unalias();&lt;br /&gt;
|text = Un-aliases the node and returns it to a blank state. Returns 1 on success and 0 on failure (e.g., when used on a tied property).&lt;br /&gt;
|example2 = var node1 = props.Node.new();&lt;br /&gt;
node1.setDoubleValue(2.35);&lt;br /&gt;
var node2 = props.Node.new();&lt;br /&gt;
node2.alias(node1);&lt;br /&gt;
&lt;br /&gt;
props.dump(node2); # equals 2.35&lt;br /&gt;
node2.unalias();&lt;br /&gt;
props.dump(node2); # no value or type&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== toggleBoolValue() (since FG 2020.1) ====&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = toggleBoolValue();&lt;br /&gt;
|text = Toggle a boolean property. You have to make sure the property is of type bool!&lt;br /&gt;
|example1 = var b = props.Node.new().initNode(&amp;quot;/_test/bool&amp;quot;, 1, &amp;quot;BOOL&amp;quot;);&lt;br /&gt;
print(&amp;quot;bool &amp;quot;, b.getValue());&lt;br /&gt;
b.toggleBoolValue();&lt;br /&gt;
print(&amp;quot;after toggleBoolValue &amp;quot;, b.getValue());&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Functions ==&lt;br /&gt;
=== compileCondition() ===&lt;br /&gt;
{{see also|Conditions}}&lt;br /&gt;
&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.compileCondition(node);&lt;br /&gt;
|version = 3.2&lt;br /&gt;
|commit = {{fgdata commit|43f8ce08706629e69984b1cc34e5e979d03ef09a|t=commit}}&lt;br /&gt;
|text = Compiles a [[conditions|condition]] property branch and returns a &amp;lt;code&amp;gt;Condition&amp;lt;/code&amp;gt; ghost object or &amp;lt;code&amp;gt;'''nil'''&amp;lt;/code&amp;gt; on error. This ghost will contain a &amp;lt;code&amp;gt;test()&amp;lt;/code&amp;gt; function that will return the result of the condition as either 1 (true) or 0 (false).&lt;br /&gt;
|param1 = node&lt;br /&gt;
|param1text = Either a props.Node containing the condition, or a string specifying a place in the [[Property Tree]] where there is a condition branch.&lt;br /&gt;
|example1 = var tree = {&lt;br /&gt;
    &amp;quot;equals&amp;quot;: {&lt;br /&gt;
        &amp;quot;property&amp;quot;: '/test',&lt;br /&gt;
        &amp;quot;value&amp;quot;: 12&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
var node = props.Node.new(tree);&lt;br /&gt;
setprop(&amp;quot;/test&amp;quot;, 12);&lt;br /&gt;
&lt;br /&gt;
var cond = props.compileCondition(node);&lt;br /&gt;
print(cond.test()); # prints &amp;quot;1&amp;quot; (true)&lt;br /&gt;
setprop(&amp;quot;/test&amp;quot;, 15);&lt;br /&gt;
print(cond.test()); # prints &amp;quot;0&amp;quot; (false)&lt;br /&gt;
|example2 = var tree = {&lt;br /&gt;
    &amp;quot;equals&amp;quot;: {&lt;br /&gt;
        &amp;quot;property&amp;quot;: '/test',&lt;br /&gt;
        &amp;quot;value&amp;quot;: 12&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
props.globals.getNode(&amp;quot;test2/condition&amp;quot;, 1).setValues(tree); # place it in the Property Tree&lt;br /&gt;
setprop(&amp;quot;/test&amp;quot;, 12);&lt;br /&gt;
&lt;br /&gt;
var cond = props.compileCondition(node);&lt;br /&gt;
print(cond.test()); # prints &amp;quot;1&amp;quot; (true)&lt;br /&gt;
setprop(&amp;quot;/test&amp;quot;, 15);&lt;br /&gt;
print(cond.test()); # prints &amp;quot;0&amp;quot; (false)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== condition() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.condition(node);&lt;br /&gt;
|text = Evaluates a [[conditions|condition]] property branch and returns the result as a boolean.&lt;br /&gt;
|param1 = node&lt;br /&gt;
|param1text = Either a props.Node containing the condition, or a string specifying a place in the [[Property Tree]] where there is a condition branch.&lt;br /&gt;
|example1 = var tree = {&lt;br /&gt;
    &amp;quot;equals&amp;quot;: {&lt;br /&gt;
        &amp;quot;property&amp;quot;: '/test',&lt;br /&gt;
        &amp;quot;value&amp;quot;: 12&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
var node = props.Node.new(tree);&lt;br /&gt;
setprop(&amp;quot;/test&amp;quot;, 12);&lt;br /&gt;
&lt;br /&gt;
print(props.condition(node)); # prints &amp;quot;1&amp;quot; (true)&lt;br /&gt;
setprop(&amp;quot;/test&amp;quot;, 15);&lt;br /&gt;
print(props.condition(node)); # prints &amp;quot;0&amp;quot; (false)&lt;br /&gt;
|example2 = var tree = {&lt;br /&gt;
    &amp;quot;equals&amp;quot;: {&lt;br /&gt;
        &amp;quot;property&amp;quot;: '/test',&lt;br /&gt;
        &amp;quot;value&amp;quot;: 12&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
props.globals.getNode(&amp;quot;test2/condition&amp;quot;, 1).setValues(tree); # place it in the Property Tree&lt;br /&gt;
setprop(&amp;quot;/test&amp;quot;, 12);&lt;br /&gt;
&lt;br /&gt;
print(props.condition(node)); # prints &amp;quot;1&amp;quot; (true)&lt;br /&gt;
setprop(&amp;quot;/test&amp;quot;, 15);&lt;br /&gt;
print(props.condition(node)); # prints &amp;quot;0&amp;quot; (false)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== copy() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.copy(src, dest[, attr]);&lt;br /&gt;
|text = Copies the property tree of the source into the destination node. Note that aliased properties will not be copied.&lt;br /&gt;
|param1 = src&lt;br /&gt;
|param1text = Source &amp;lt;code&amp;gt;props.Node object&amp;lt;/code&amp;gt; to copy from.&lt;br /&gt;
|param2 = dest&lt;br /&gt;
|param2text = Destination &amp;lt;code&amp;gt;props.Node object&amp;lt;/code&amp;gt; to copy to.&lt;br /&gt;
|param3 = attr&lt;br /&gt;
|param3text = If set to 1 (true), attributes will also be copied. Defaults to 0 (false).&lt;br /&gt;
|example1 = var tree = {&lt;br /&gt;
    &amp;quot;a&amp;quot;: 1.5,&lt;br /&gt;
    &amp;quot;b&amp;quot;: &amp;quot;Hi&amp;quot;,&lt;br /&gt;
    &amp;quot;c&amp;quot;: {&lt;br /&gt;
        &amp;quot;d&amp;quot;: [1, 2, 3]&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
var src = props.Node.new(tree);&lt;br /&gt;
var dest = props.Node.new();&lt;br /&gt;
props.copy(src, dest);&lt;br /&gt;
props.dump(dest);&lt;br /&gt;
|example2 = var src = props.Node.new();&lt;br /&gt;
var a = src.addChild(&amp;quot;a&amp;quot;);&lt;br /&gt;
a.setAttribute(&amp;quot;trace-write&amp;quot;, 1);&lt;br /&gt;
a.setIntValue(12);&lt;br /&gt;
var dest = props.Node.new();&lt;br /&gt;
props.copy(src, dest, 1);&lt;br /&gt;
print(dest.getNode(&amp;quot;a&amp;quot;).getAttribute(&amp;quot;trace-write&amp;quot;)); # prints &amp;quot;1&amp;quot; (true)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== dump() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.dump(node);&lt;br /&gt;
|text = Recursively dump the state of a node into the console, showing value and type of each node. Note that as of 10/2016, the value of vec*d type nodes cannot be dumped.&lt;br /&gt;
|param1 = node&lt;br /&gt;
|param1text = Node to dump.&lt;br /&gt;
|example1 = var node = var tree = {&lt;br /&gt;
    &amp;quot;a&amp;quot;: 12,&lt;br /&gt;
    &amp;quot;b&amp;quot;: &amp;quot;Hi&amp;quot;,&lt;br /&gt;
    &amp;quot;c&amp;quot;: {&lt;br /&gt;
        &amp;quot;d&amp;quot;: [1, 2, 3]&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
var node = props.Node.new(tree);&lt;br /&gt;
props.dump(node); # dump into console&lt;br /&gt;
|example2 = # Dump the entire Property Tree&lt;br /&gt;
# Warning! This is an intensive operation!&lt;br /&gt;
props.dump(props.globals);&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== getNode() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.getNode();&lt;br /&gt;
|version = 3.2&lt;br /&gt;
|commit = {{fgdata commit|807062d0b6f858885547f27325e829c2bf42a12b|t=commit}}&lt;br /&gt;
|text = Shortcut for &amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot; inline&amp;gt;props.globals.getNode()&amp;lt;/syntaxhighlight&amp;gt;. See {{func link|getNode()||Node|page=this}} for full documentation.&lt;br /&gt;
|example1 = print(&amp;quot;Current aircraft is: &amp;quot;, props.getNode(&amp;quot;/sim/aircraft&amp;quot;).getValue());&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== nodeList() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.nodeList(arg[, arg[, ...]]);&lt;br /&gt;
|text = Converts its arguments into a vector of node objects if possible and returns that vector. &lt;br /&gt;
|param1 = arg&lt;br /&gt;
|param1text = Object to operate on. Must be a node object, string, vector, hash, function, or &amp;lt;code&amp;gt;prop&amp;lt;/code&amp;gt; ghost. Vectors and hashes must contain any of the other acceptable types, functions must return any of the other types, strings will be assumed to be paths to global properties, and ghosts will be converted into node objects. There may be any number of arguments.&lt;br /&gt;
|example1 = var node = props.Node.new();&lt;br /&gt;
var f = func(){&lt;br /&gt;
    var n = props.Node.new();&lt;br /&gt;
    return n._g;&lt;br /&gt;
}&lt;br /&gt;
var list = props.nodeList(node,&lt;br /&gt;
    &amp;quot;/sim/aircraft&amp;quot;,&lt;br /&gt;
    [&amp;quot;/sim/fg-root&amp;quot;],&lt;br /&gt;
    { &amp;quot;path&amp;quot;: &amp;quot;/sim/fg-home&amp;quot; },&lt;br /&gt;
    f&lt;br /&gt;
);&lt;br /&gt;
debug.dump(list); # dump list&lt;br /&gt;
|example2 = var root = &amp;quot;/sim/version/&amp;quot;;&lt;br /&gt;
var info = [&lt;br /&gt;
    root ~ &amp;quot;build-id&amp;quot;,&lt;br /&gt;
    root ~ &amp;quot;build-number&amp;quot;,&lt;br /&gt;
    root ~ &amp;quot;flightgear&amp;quot;,&lt;br /&gt;
    root ~ &amp;quot;hla-support&amp;quot;,&lt;br /&gt;
    root ~ &amp;quot;openscenegraph&amp;quot;,&lt;br /&gt;
    root ~ &amp;quot;revision&amp;quot;,&lt;br /&gt;
    root ~ &amp;quot;simgear&amp;quot;&lt;br /&gt;
];&lt;br /&gt;
info = props.nodeList(info); # turn into list of nodes&lt;br /&gt;
foreach(var n; info){&lt;br /&gt;
    print(n.getValue()); # dump info&lt;br /&gt;
}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== runBinding() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.runBinding(node[, module]);&lt;br /&gt;
|text = Runs a [[Bindings|binding]] element in a node object. Returns 1 (true) on success and 0 (false) on failure.&lt;br /&gt;
|param1 = node&lt;br /&gt;
|param1text = A {{tag|binding}} element as a node object.&lt;br /&gt;
|param2 = module&lt;br /&gt;
|param2text = Optional string specifying a module to run Nasal scripts in if the command is &amp;lt;code&amp;gt;nasal&amp;lt;/code&amp;gt;. This argument will not override any {{tag|module}} element in the '''node'''&lt;br /&gt;
|example1 = var tree = {&lt;br /&gt;
    &amp;quot;command&amp;quot;: &amp;quot;dialog-show&amp;quot;,&lt;br /&gt;
    &amp;quot;dialog-name&amp;quot;: &amp;quot;map&amp;quot; # open map&lt;br /&gt;
};&lt;br /&gt;
var binding = props.Node.new(tree);&lt;br /&gt;
props.runBinding(binding);&lt;br /&gt;
|example2 = var tree = {&lt;br /&gt;
    &amp;quot;command&amp;quot;: &amp;quot;nasal&amp;quot;,&lt;br /&gt;
    &amp;quot;script&amp;quot;: 'print(pi)' # prints value of math.pi&lt;br /&gt;
};&lt;br /&gt;
var binding = props.Node.new(tree);&lt;br /&gt;
props.runBinding(binding, &amp;quot;math&amp;quot;);&lt;br /&gt;
|example3 = var tree = {&lt;br /&gt;
    &amp;quot;command&amp;quot;: &amp;quot;nasal&amp;quot;,&lt;br /&gt;
    &amp;quot;script&amp;quot;: 'print(pi)', # prints value of math.pi&lt;br /&gt;
    &amp;quot;module&amp;quot;: &amp;quot;math&amp;quot; # this is used&lt;br /&gt;
};&lt;br /&gt;
var binding = props.Node.new(tree);&lt;br /&gt;
props.runBinding(binding, &amp;quot;debug&amp;quot;);&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== setAll() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.setAll(base, child, value);&lt;br /&gt;
|text = Sets indexed subnodes in the Property Tree with the same name to the same value.&lt;br /&gt;
|param1 = base&lt;br /&gt;
|param1text = Base path to the nodes.&lt;br /&gt;
|param2 = child&lt;br /&gt;
|param2text = Path to child nodes.&lt;br /&gt;
|param3 = value&lt;br /&gt;
|param3text = Value to set the subnodes to.&lt;br /&gt;
|example1 = # apply 50% throttle to all engines&lt;br /&gt;
props.setAll(&amp;quot;/controls/engines/engine&amp;quot;, &amp;quot;throttle&amp;quot;, 0.5);&lt;br /&gt;
|example2 = var nodes = props.globals.addChildren(&amp;quot;/test&amp;quot;, 3);&lt;br /&gt;
foreach(var node; nodes){&lt;br /&gt;
    node.addChild(&amp;quot;a&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
props.setAll(&amp;quot;/test&amp;quot;, &amp;quot;a&amp;quot;, &amp;quot;Hi&amp;quot;); # set all children (test[*]/a) to &amp;quot;Hi&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== wrap() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.wrap(node);&lt;br /&gt;
|text = Turns &amp;lt;code&amp;gt;prop&amp;lt;/code&amp;gt; ghosts, either in a vector or single, into &amp;lt;code&amp;gt;props.Node&amp;lt;/code&amp;gt; objects.&lt;br /&gt;
|param1 = node&lt;br /&gt;
|param1text = &amp;lt;code&amp;gt;prop&amp;lt;/code&amp;gt; ghost or vector of such ghosts.&lt;br /&gt;
|example1 = var ghost = canvas._newCanvasGhost();&lt;br /&gt;
var node = props.wrap(ghost._node_ghost);&lt;br /&gt;
props.dump(node);&lt;br /&gt;
|example2 = var vector = [canvas._newCanvasGhost()._node_ghost, props.Node.new()._g];&lt;br /&gt;
var nodes = props.wrap(vector);&lt;br /&gt;
foreach(var node; nodes){&lt;br /&gt;
    props.dump(node);&lt;br /&gt;
    print(&amp;quot;----&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== wrapNode() ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.wrapNode(node);&lt;br /&gt;
|text = Turns a &amp;lt;code&amp;gt;prop&amp;lt;/code&amp;gt; ghost into a &amp;lt;code&amp;gt;props.Node&amp;lt;/code&amp;gt; object.&lt;br /&gt;
|param1 = node&lt;br /&gt;
|param1text = &amp;lt;code&amp;gt;prop&amp;lt;/code&amp;gt; ghost to convert.&lt;br /&gt;
|example1 = var ghost = canvas._newCanvasGhost();&lt;br /&gt;
var node = props.wrapNode(ghost._node_ghost);&lt;br /&gt;
props.dump(node);&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Variable ==&lt;br /&gt;
=== globals ===&lt;br /&gt;
{{Nasal doc&lt;br /&gt;
|syntax = props.globals;&lt;br /&gt;
|text = Exposes the [[Property Tree]] as a &amp;lt;code&amp;gt;props.Node&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
|example1 = print(&amp;quot;Current aircraft: &amp;quot;, props.globals.getNode(&amp;quot;/sim/aircraft&amp;quot;).getValue());&lt;br /&gt;
|example2text = Alternative using {{func link|getprop()}}.&lt;br /&gt;
|example2 = print(&amp;quot;Current aircraft: &amp;quot;, getprop(&amp;quot;/sim/aircraft&amp;quot;));&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Nasal namespaces}}&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=FlightGear_wiki:Village_pump&amp;diff=143152</id>
		<title>FlightGear wiki:Village pump</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=FlightGear_wiki:Village_pump&amp;diff=143152"/>
		<updated>2025-12-03T14:44:53Z</updated>

		<summary type="html">&lt;p&gt;Rominet: /* Beware of shortened Git commit IDs */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NEWSECTIONLINK__&lt;br /&gt;
{{Archives|[[/Archive 2012|2012]]|[[/Archive 2013|2013]]|[[/Archive 2014|2014]]|[[/Archive 2015|2015]]|[[/Archive 2016|2016]]|[[/Archive 2017|2017]]|[[/Archive 2018|2018]]|[[/Archive 2019|2019]]|[[/Archive 2020|2020]]|[[/Archive 2021|2021]]|[[/Archive 2022|2022]]}}&lt;br /&gt;
{{shortcut|FGW:VP}}&lt;br /&gt;
&lt;br /&gt;
Welcome to the '''Village Pump'''. This page is used to discuss the technical issues, operations and guidelines of the [[FlightGear wiki]].&lt;br /&gt;
&lt;br /&gt;
Please &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[{{fullurl:{{FULLPAGENAME}}|action=edit&amp;amp;section=new}} add new topics]&amp;lt;/span&amp;gt; to the '''bottom''' of this page.&lt;br /&gt;
&lt;br /&gt;
Old discussions should be moved to a [[FlightGear wiki:Village pump/Archive YEAR]]. These discussions can then be moved to a relevant talk page if appropriate.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== MediaWiki updated to 1.39.6 ==&lt;br /&gt;
&lt;br /&gt;
We have updated MediaWiki to its latest LTS version 1.39.6 today. Although we've tested the update, chances are that we've missed certain scenarios or features. Please report any issues that you may encounter.&lt;br /&gt;
&lt;br /&gt;
[[User:Gijs|Gijs]] ([[User talk:Gijs|talk]]) 09:31, 30 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Embedded YouTube videos broken ==&lt;br /&gt;
&lt;br /&gt;
It seems that the [[mw:Extension:EmbedVideo|EmbedVideo extension]] was removed at some point. Consequently, pages such as [[Howto:Creating FlightGear Promo Videos]] are broken. At present, the best replacements seems to be [[mw:Extension:EmbedVideo_(fork)|a fork]] and [[mw:Extension:YouTube|Extension:YouTube]].&lt;br /&gt;
&lt;br /&gt;
—'''''[[User:Red Leader|&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Red Leader&amp;lt;/span&amp;gt;]]''''' ([[User talk:Red Leader|talk]], [[Special:Contributions/Red Leader|contribs]]) 19:21, 30 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Hi,&lt;br /&gt;
: Thanks for the report. It was introduced by today's update, but should be fixed now.&lt;br /&gt;
: [[User:Gijs|Gijs]] ([[User talk:Gijs|talk]]) 21:21, 30 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: Confirmed, thanks. And I’d completely forgotten about {{[[Template:Wikipedia|wikipedia]]}}. 😅&lt;br /&gt;
:: '''''[[User:Red Leader|&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Red Leader&amp;lt;/span&amp;gt;]]''''' ([[User talk:Red Leader|talk]], [[Special:Contributions/Red Leader|contribs]]) 21:57, 30 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Forum registration problem ==&lt;br /&gt;
&lt;br /&gt;
Hello,&lt;br /&gt;
I would like to register on the forum, but I tried several times without success. I sent an email to the administrator some time ago, but it seems to have been lost. I don't know what to do, is there somebody here who could help? Please tell me if you need additional information.&lt;br /&gt;
Thanks very much in advance. [[User:Kestrel|Kestrel]] ([[User talk:Kestrel|talk]]) 13:14, 25 March 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Hi,&lt;br /&gt;
: That's unfortunate! You can find my email address at https://forum.flightgear.org/contact.php Please try again if you've done that before, I'll actively monitor the address for any incoming messages, and let me know if you don't get a reply.&lt;br /&gt;
: [[User:Gijs|Gijs]] ([[User talk:Gijs|talk]]) 15:01, 25 March 2024 (UTC) (forum admin)&lt;br /&gt;
&lt;br /&gt;
== Sidebar link for &amp;quot;Build server&amp;quot; is broken ==&lt;br /&gt;
&lt;br /&gt;
Hello, &lt;br /&gt;
&lt;br /&gt;
Just wanted to bring to someones attention that the URL for &amp;quot;Build server&amp;quot; currently 404s. Not sure if this resource still exists or if its URL has changed.&lt;br /&gt;
&lt;br /&gt;
Cheers!&lt;br /&gt;
-Joshua&lt;br /&gt;
&lt;br /&gt;
: Hi Joshua,&lt;br /&gt;
: The URL is still correct, but the build server is temporarily down due to a server failure. It's being worked on, so should be back up &amp;quot;soon&amp;quot;.&lt;br /&gt;
: [[User:Gijs|Gijs]] ([[User talk:Gijs|talk]]) 12:29, 3 September 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
== FlightGear Wikipedia article image needs correctly sourced Flightgear wiki screenshot ==&lt;br /&gt;
https://en.wikipedia.org/wiki/FlightGear&lt;br /&gt;
&lt;br /&gt;
The image used for the Flightgear Wikipedia article appears to have been deleted, because it was sourced from the following Flightgear-wiki screenshot page:&lt;br /&gt;
&lt;br /&gt;
[[:File:Bo 105 over Sint Marteen.png]]&lt;br /&gt;
&lt;br /&gt;
which referred to an imgur link instead of the following thread, which gives a CC license based on a google search of the file name:&lt;br /&gt;
&lt;br /&gt;
https://forum.flightgear.org/viewtopic.php?f=88&amp;amp;t=32163&amp;amp;start=0&lt;br /&gt;
&lt;br /&gt;
Discussion on Wikipedia:&lt;br /&gt;
&lt;br /&gt;
https://en.wikipedia.org/wiki/Wikipedia:Files_for_discussion/2024_December_7#File:FlightGear_Flight_Sim_Bo_105_over_Sint_Marteen.png&lt;br /&gt;
&lt;br /&gt;
&amp;gt; ''Subsequent comments should be made on the appropriate discussion page (such as the file's talk page or in a [https://en.wikipedia.org/wiki/Wikipedia:Deletion_review deletion review]).''&lt;br /&gt;
&lt;br /&gt;
The person who uploaded it, or someone from the wiki, should ideally fix the FlightGear wiki page, and do a deletion review for the Wikipedia file. The file may have been used in multiple pages since screenshots are uncommon on Wikipedia due to proprietary apps. Feel free to remove this comment once it's taken care of. Good luck&lt;br /&gt;
&lt;br /&gt;
== Issues with three templates ==&lt;br /&gt;
&lt;br /&gt;
Hi,&lt;br /&gt;
&lt;br /&gt;
The [[Template:Fgmeta_commit|fgmeta commit]] template appears to be broken. It used to work in the first ''Note'' [[Scripted_Compilation_on_Linux_Debian/Ubuntu#For_the_curious:_the_SSH_way|here]] (see the URL).&lt;br /&gt;
&lt;br /&gt;
Also, I tried to use [[Template:Repo_link#Site:_Generic]] to create a link to the [https://gitlab.kitware.com/cmake/cmake.git CMake repo], but didn't manage: IIRC, the link text was empty.&lt;br /&gt;
&lt;br /&gt;
Finally, [[Template:Fgmeta_source]] doesn't seem to to what the doc. says for ''simplepath'': with&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;{{fgmeta source&lt;br /&gt;
| path = download_and_compile.sh&lt;br /&gt;
| simplepath = 1&lt;br /&gt;
}}&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the link text starts with a slash, so I used&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;{{fgmeta source&lt;br /&gt;
| path = download_and_compile.sh&lt;br /&gt;
| text = download_and_compile.sh&lt;br /&gt;
}}&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
which is of course more redundant.&lt;br /&gt;
&lt;br /&gt;
Thanks for considering! :-)&lt;br /&gt;
&lt;br /&gt;
[[User:Rominet|Rominet]] ([[User talk:Rominet|talk]])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
: Good catch.  I need to look into that one.  I may not have coded the commit part of GitLab into the master {{tl|repo_link}} template.&lt;br /&gt;
&lt;br /&gt;
: [[User:Bugman|Bugman]] ([[User talk:Bugman|talk]]) 15:41, 13 March 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: All fixed.  It was quite simple - the {{tl|fgmeta_source}} template was missing the &amp;lt;code&amp;gt;proj&amp;lt;/code&amp;gt; parameter.  I've also fixed {{tl|fgmeta_clone}}.&lt;br /&gt;
&lt;br /&gt;
:: [[User:Bugman|Bugman]] ([[User talk:Bugman|talk]]) 15:53, 13 March 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
::: Thanks for the reply and fixes, Bugman! (And sorry for the delay, I didn't see any notification...) I see the first item is indeed addressed. Regarding the second item, well, I see no place where I'd really want to use this now on the d&amp;amp;c page, so didn't test it. As for the third one, I still get &amp;lt;code&amp;gt;/download_and_compile.sh&amp;lt;/code&amp;gt; in the Preview when I try the above {{tl|fgmeta_source}} snippet with &amp;lt;code&amp;gt;simplepath = 1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
::: I looked at {{tl|fgmeta_clone}} too; it looks nice but seems to default to the &amp;lt;code&amp;gt;git://&amp;lt;/code&amp;gt; protocol. Would it be possible to make it default to using &amp;lt;code&amp;gt;https://&amp;lt;/code&amp;gt;? Thanks again. :-)&lt;br /&gt;
 &lt;br /&gt;
::: [[User:Rominet|Rominet]] ([[User talk:Rominet|talk]])&lt;br /&gt;
&lt;br /&gt;
:::: Not a problem.  For the &amp;lt;code&amp;gt;simplepath&amp;lt;/code&amp;gt; parameter, that is the designed behaviour in the {{tl|repo link}} template.  In most cases our repositories have complex directory structures and the desired output is the absolute file path, removing the protocol and URL parts of the path.  Do you wish to simply have the file name there?  No one had asked for that before, so I never added an option for that.  In the case of the source repositories, you often want to remove the first part of the absolute path so that for example in SimGear, {{simgear source|path=simgear/scene/util/QuadTreeBuilder.hxx|simplepath=1}} (&amp;lt;nowiki&amp;gt;{{simgear source|path=simgear/scene/util/QuadTreeBuilder.hxx|simplepath=1}}&amp;lt;/nowiki&amp;gt;) would be shown as {{simgear source|path=simgear/scene/util/QuadTreeBuilder.hxx|text=scene/util/QuadTreeBuilder.hxx}} (&amp;lt;nowiki&amp;gt;{{simgear source|path=simgear/scene/util/QuadTreeBuilder.hxx|text=scene/util/QuadTreeBuilder.hxx}}&amp;lt;/nowiki&amp;gt;.  This is not scriptable in MediaWiki so I left it all for the text parameter.&lt;br /&gt;
&lt;br /&gt;
:::: For the protocol, I have now added the &amp;lt;code&amp;gt;protocol&amp;lt;/code&amp;gt; parameter.  E.g. &amp;lt;nowiki&amp;gt;{{fgmeta clone | protocol = https}}&amp;lt;/nowiki&amp;gt;.  That will give &amp;lt;code&amp;gt;{{fgmeta clone | protocol = https}}&amp;lt;/code&amp;gt; (as of today generated as &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;git clone https://gitlab.com/flightgear/fgmeta.git&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
:::: [[User:Bugman|Bugman]] ([[User talk:Bugman|talk]]) 08:51, 24 March 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
::::: Thanks Bugman, I've updated the [[Scripted_Compilation_on_Linux_Debian/Ubuntu|download_and_compile.sh page]] to use &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{fgmeta clone | protocol = https}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; as you proposed; it works great. For the link to download_and_compile.sh, I can continue to use &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{fgmeta source | path = download_and_compile.sh | text = download_and_compile.sh}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, no problem.&lt;br /&gt;
&lt;br /&gt;
::::: As far as I'm concerned, everything is resolved here, so this thread/section can be deleted if someone wants to “clean up”.&lt;br /&gt;
&lt;br /&gt;
::::: ''Other subject:'' the only remaining thing is that I didn't receive any notification, neither for your replies here nor for the January changes by [[User:Jebba|Jebba]] to the [[Scripted_Compilation_on_Linux_Debian/Ubuntu|download_and_compile.sh page]] that is on my watchlist. I used to receive email notifications for these things years ago, haven't changed my preferences regarding this and don't see any setting that would explain why I don't receive these notifications anymore. Maybe email sending by the wiki software is not quite well configured according to current standards (SPF, DKIM, DMARC)?&lt;br /&gt;
&lt;br /&gt;
::::: [[User:Rominet|Rominet]] ([[User talk:Rominet|talk]])&lt;br /&gt;
&lt;br /&gt;
== Improve the 'simgear clone', 'flightgear clone' and 'fgdata clone' templates ==&lt;br /&gt;
&lt;br /&gt;
Hi,&lt;br /&gt;
&lt;br /&gt;
In order to improve [[Fedora_Packages_and_Compiling]], it would be nice to have the &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{simgear clone}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{flightgear clone}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{fgdata clone}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; templates on par with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{fgmeta clone}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (support for the &amp;lt;code&amp;gt;protocol&amp;lt;/code&amp;gt; parameter, etc.). I tried&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;{{simgear clone | protocol = https | opt = --single-branch --branch release/2024.1 | post = simgear}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
but it doesn't seem to work, as the preview shows this:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;git clone --single-branch --branch release/2024.1 git://gitlab.com simgear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(ditto with &amp;lt;code&amp;gt;flightear clone&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;fgdata clone&amp;lt;/code&amp;gt;). Thanks in advance :-)&lt;br /&gt;
&lt;br /&gt;
[[User:Rominet|Rominet]] ([[User talk:Rominet|talk]])&lt;br /&gt;
&lt;br /&gt;
: I needed a while to work out the best strategy for these changes.  I've now gone through all of the {{tl|repo link}} cloning subtemplates listed on {{tl|repo link/doc related}} and added the &amp;lt;code&amp;gt;project&amp;lt;/code&amp;gt; parameter to the templates and the optional &amp;lt;code&amp;gt;protocol&amp;lt;/code&amp;gt; parameter.  These changes were required as the &amp;lt;code&amp;gt;gl&amp;lt;/code&amp;gt; section of the {{tl|repo_link}} template is constructed differently to the &amp;lt;code&amp;gt;sf&amp;lt;/code&amp;gt; section.  I've also updated the git cloning documentation {{tl|repo link/doc git clone}}.  I hope this covers everything you need.&lt;br /&gt;
&lt;br /&gt;
: [[User:Bugman|Bugman]] ([[User talk:Bugman|talk]]) 07:48, 1 April 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: Thanks a lot, Bugman, this works great! Your changes allowed me to perform [https://wiki.flightgear.org/w/index.php?title=Fedora_Packages_and_Compiling&amp;amp;type=revision&amp;amp;diff=141687&amp;amp;oldid=141513 this edit] in [[Fedora_Packages_and_Compiling]]. The only remaining &amp;lt;code&amp;gt;git clone&amp;lt;/code&amp;gt; command written in full on that page is for FG's fork of OpenSceneGraph at GitLab. I understand that choosing a proper name for an applicable &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{... clone}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; template probably requires some careful thinking... ;-)&lt;br /&gt;
&lt;br /&gt;
:: [[User:Rominet|Rominet]] ([[User talk:Rominet|talk]])&lt;br /&gt;
&lt;br /&gt;
== Default text in Template:Repo link ==&lt;br /&gt;
&lt;br /&gt;
Hi,&lt;br /&gt;
&lt;br /&gt;
The default ''text'' in {{tl|Repo link}} gives somewhat pleasant link texts such as&lt;br /&gt;
 flightgear/flightgear/src/Scripting/NasalSys.cxx&lt;br /&gt;
when the ''site'' is &amp;lt;code&amp;gt;sourceforge&amp;lt;/code&amp;gt;, however the result looks like a bug for other sites (though I understand this may be as intended). To be clear, the URLs are correct but the default link texts look weird because they start with the unqualified site name rather than the fully-qualified domain name. For instance,&lt;br /&gt;
 {{obr}}fgmeta source{{cbr}}&lt;br /&gt;
yields [https://gitlab.com/flightgear/fgmeta gitlab/flightgear/fgmeta/next] rather than [https://gitlab.com/flightgear/fgmeta gitlab.com/flightgear/fgmeta/next]. I suggest to replace &amp;lt;code&amp;gt;gitlab&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;gitlab.com&amp;lt;/code&amp;gt; in the default text (where the HTML comment says “Site advertising”) and do the same for &amp;lt;code&amp;gt;github&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Note: the Gitorious web site doesn't exist anymore, maybe that should be removed from the template?&lt;br /&gt;
&lt;br /&gt;
Thanks for considering; I can do the replacement if you wish.&lt;br /&gt;
&lt;br /&gt;
[[User:Rominet|Rominet]] ([[User talk:Rominet|talk]]) 10:38, 12 November 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Sounds sensible, so please go ahead!&lt;br /&gt;
: Regarding Gitorious, it may be nice to link to an archived version of the repos, such as https://archive.softwareheritage.org/browse/origin/directory/?origin_url=https://gitorious.org/flightgear/fgdata.git&amp;amp;visit_type=git Altough this only makes sense for repos or branches that are not part of our current GitLab...&lt;br /&gt;
: [[User:Gijs|Gijs]] ([[User talk:Gijs|talk]]) 13:58, 12 November 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: [https://wiki.flightgear.org/w/index.php?title=Template:Repo_link&amp;amp;action=history Done], thanks Gijs!&lt;br /&gt;
::&lt;br /&gt;
&lt;br /&gt;
:: One should be careful using this, though, because the resulting link ''texts'' may be non-existing URLs (after prepending the protocol) despite looking like valid ones, as shown by the first example in [[User:Rominet/Sandbox#FGMeta-Python repo templates]]!&lt;br /&gt;
&lt;br /&gt;
:: So, to avoid people getting trapped by this, maybe the default link text should start with something like &amp;lt;code&amp;gt;[GitLab]/...&amp;lt;/code&amp;gt; rather than the &amp;lt;code&amp;gt;gitlab.com/...&amp;lt;/code&amp;gt; I just put (to make it clear that such link texts are not supposed to be “Internet addresses”).&lt;br /&gt;
:: [[User:Rominet|Rominet]] ([[User talk:Rominet|talk]]) 16:20, 12 November 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
::: This is now implemented. For instance, &amp;lt;code&amp;gt;{{obr}}fgmeta-python source {{!}} path = pyproject.toml {{!}} tag  = 1.0.0b1 {{cbr}}&amp;lt;/code&amp;gt; results in {{fgmeta-python source | path = pyproject.toml | tag  = 1.0.0b1 }}. This also holds for GitHub and GitoriousIsNowClosed. SourceForge has no such prefix for now (it initially didn't, and editing its part of {{tl|Repo link}} requires a bit more temerity than what I have at the moment :-)).&lt;br /&gt;
::: [[User:Rominet|Rominet]] ([[User talk:Rominet|talk]]) 09:15, 14 November 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
: That's a good idea.  Note for Gitorious - I added this because there are a number of historical documents/pages that refer to developments that occurred on Gitorious which were not migrated to SourceForge.  I originally made the Gitorious links work by pointing to the archive by the Internet Archive (see [[Gitorious]]).  However that archive has been offline for a few years now.  The Internet Archive are storing all the data so it may return one day.&lt;br /&gt;
&lt;br /&gt;
: [[User:Bugman|Bugman]] ([[User talk:Bugman|talk]]) 22:06, 13 November 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Beware of shortened Git commit IDs ==&lt;br /&gt;
&lt;br /&gt;
While fixing broken links due to the {{tl|foo commit}} templates not specifying &amp;lt;code&amp;gt;proj=flightgear&amp;lt;/code&amp;gt; (this was implicit with &amp;lt;code&amp;gt;site=sf&amp;lt;/code&amp;gt; but isn't with &amp;lt;code&amp;gt;site=gl&amp;lt;/code&amp;gt;), I found that URLs at GitLab don't accept the same shortened Git commit IDs as those at SourceForge:&lt;br /&gt;
 https://sourceforge.net/p/flightgear/fgdata/ci/807062 - OK&lt;br /&gt;
 https://gitlab.com/flightgear/fgdata/-/commit/807062  - NOK&lt;br /&gt;
 https://gitlab.com/flightgear/fgdata/-/commit/807062d - OK&lt;br /&gt;
 https://gitlab.com/flightgear/fgdata/-/commit/807062d0b6f858885547f27325e829c2bf42a12b - OK&lt;br /&gt;
&lt;br /&gt;
As a consequence, there are probably a lot of broken links in the wiki due to shortened commit IDs. Better always use the long ones...&lt;br /&gt;
&lt;br /&gt;
{{Note|Commit ID 807062 in FGData is not ambiguous.}}&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Template:Windows-3rd-party_commit&amp;diff=143151</id>
		<title>Template:Windows-3rd-party commit</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Template:Windows-3rd-party_commit&amp;diff=143151"/>
		<updated>2025-12-03T14:23:31Z</updated>

		<summary type="html">&lt;p&gt;Rominet: Add missing 'proj=flightgear' in 'repo link' call (this was implicit with site=sf but isn't with site=gl)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{repo link&lt;br /&gt;
| site   = {{project infrastructure|abbrev}}&lt;br /&gt;
| proj   = flightgear&lt;br /&gt;
| repo   = windows-3rd-party&lt;br /&gt;
| commit = {{{1|master}}}&lt;br /&gt;
| view   = commit&lt;br /&gt;
| text   = {{#if: {{{1|}}}&lt;br /&gt;
  | {{{text|{{{t|{{{2|Windows-3rd-Party commit {{{1}}} }}} }}} }}}&lt;br /&gt;
  | {{error|Missing parameter '''commit'''|windows-3rd-party commit}}&lt;br /&gt;
  }}&lt;br /&gt;
}}&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{repo link/doc commit&lt;br /&gt;
| label     = Windows-3rd-Party&lt;br /&gt;
| repo      = windows-3rd-party&lt;br /&gt;
| git       = 1&lt;br /&gt;
| svn       = 0&lt;br /&gt;
| eg1commit = 5e28234&lt;br /&gt;
| eg2intro  = Initial&lt;br /&gt;
| eg2commit = 5e28234&lt;br /&gt;
| eg2text   = VS2013 support&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Template:Terrafs_commit&amp;diff=143150</id>
		<title>Template:Terrafs commit</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Template:Terrafs_commit&amp;diff=143150"/>
		<updated>2025-12-03T14:21:34Z</updated>

		<summary type="html">&lt;p&gt;Rominet: Terrafs is still at SourceForge, not GitLab. Also use explicit 'proj=flightgear' in 'repo link' call.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{repo link&lt;br /&gt;
| site   = sf&lt;br /&gt;
| proj   = flightgear&lt;br /&gt;
| repo   = terrafs&lt;br /&gt;
| commit = {{{1|master}}}&lt;br /&gt;
| view   = commit&lt;br /&gt;
| text   = {{#if: {{{1|}}}&lt;br /&gt;
  | {{{text|{{{t|{{{2|Terrafs commit {{{1}}} }}} }}} }}}&lt;br /&gt;
  | {{error|Missing parameter '''commit'''|terrafs commit}}&lt;br /&gt;
  }}&lt;br /&gt;
}}&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{repo link/doc commit&lt;br /&gt;
| label     = TerraFS&lt;br /&gt;
| repo      = terrafs&lt;br /&gt;
| git       = 1&lt;br /&gt;
| svn       = 0&lt;br /&gt;
| eg1commit = 63631a5&lt;br /&gt;
| eg2intro  = The &lt;br /&gt;
| eg2commit = 63631a5&lt;br /&gt;
| eg2text   = README file&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Template:Terragear_commit&amp;diff=143149</id>
		<title>Template:Terragear commit</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Template:Terragear_commit&amp;diff=143149"/>
		<updated>2025-12-03T14:18:11Z</updated>

		<summary type="html">&lt;p&gt;Rominet: Use full commit IDs in examples because GitLab URLs don't support shortened ones&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{repo link&lt;br /&gt;
| site   = {{project infrastructure|abbrev}}&lt;br /&gt;
| proj   = flightgear&lt;br /&gt;
| repo   = terragear&lt;br /&gt;
| commit = {{{1|master}}}&lt;br /&gt;
| view   = commit&lt;br /&gt;
| text   = {{#if: {{{1|}}}&lt;br /&gt;
  | {{{text|{{{t|{{{2|TerraGear commit {{{1}}} }}} }}} }}}&lt;br /&gt;
  | &amp;lt;big style=&amp;quot;color:red;&amp;quot;&amp;gt;Missing parameter '''commit'''&amp;lt;/big&amp;gt;&lt;br /&gt;
  }}&lt;br /&gt;
}}&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{repo link/doc commit&lt;br /&gt;
| label     = TerraGear&lt;br /&gt;
| repo      = terragear&lt;br /&gt;
| git       = 1&lt;br /&gt;
| svn       = 0&lt;br /&gt;
| eg1commit = 86aa9261ca6b38bf14257ae45fc7c6c1120d17d2&lt;br /&gt;
| eg2intro  = We now have&lt;br /&gt;
| eg2commit = 5e8137af2b9c93d0cbb133ef2954377ef7630949&lt;br /&gt;
| eg2text   = robust reading of untrusted input&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Template:Terragear_commit&amp;diff=143148</id>
		<title>Template:Terragear commit</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Template:Terragear_commit&amp;diff=143148"/>
		<updated>2025-12-03T14:15:19Z</updated>

		<summary type="html">&lt;p&gt;Rominet: Add missing 'proj=flightgear' in 'repo link' call (this was implicit with site=sf but isn't with site=gl)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{repo link&lt;br /&gt;
| site   = {{project infrastructure|abbrev}}&lt;br /&gt;
| proj   = flightgear&lt;br /&gt;
| repo   = terragear&lt;br /&gt;
| commit = {{{1|master}}}&lt;br /&gt;
| view   = commit&lt;br /&gt;
| text   = {{#if: {{{1|}}}&lt;br /&gt;
  | {{{text|{{{t|{{{2|TerraGear commit {{{1}}} }}} }}} }}}&lt;br /&gt;
  | &amp;lt;big style=&amp;quot;color:red;&amp;quot;&amp;gt;Missing parameter '''commit'''&amp;lt;/big&amp;gt;&lt;br /&gt;
  }}&lt;br /&gt;
}}&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{repo link/doc commit&lt;br /&gt;
| label     = TerraGear&lt;br /&gt;
| repo      = terragear&lt;br /&gt;
| git       = 1&lt;br /&gt;
| svn       = 0&lt;br /&gt;
| eg1commit = 86aa92&lt;br /&gt;
| eg2intro  = We now have&lt;br /&gt;
| eg2commit = 5e8137&lt;br /&gt;
| eg2text   = robust reading of untrusted input&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Template:Sceneryweb_commit&amp;diff=143147</id>
		<title>Template:Sceneryweb commit</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Template:Sceneryweb_commit&amp;diff=143147"/>
		<updated>2025-12-03T14:13:20Z</updated>

		<summary type="html">&lt;p&gt;Rominet: Sceneryweb is still at SourceForge, not GitLab. Also use explicit 'proj=flightgear' in 'repo link' call.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{repo link&lt;br /&gt;
| site   = sf&lt;br /&gt;
| proj   = flightgear&lt;br /&gt;
| repo   = sceneryweb&lt;br /&gt;
| commit = {{{1|master}}}&lt;br /&gt;
| view   = commit&lt;br /&gt;
| text   = {{#if: {{{1|}}}&lt;br /&gt;
  | {{{text|{{{t|{{{2|SceneryWeb commit {{{1}}} }}} }}} }}}&lt;br /&gt;
  | &amp;lt;big style=&amp;quot;color:red;&amp;quot;&amp;gt;Missing parameter '''commit'''&amp;lt;/big&amp;gt;&lt;br /&gt;
  }}&lt;br /&gt;
}}&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{repo link/doc commit&lt;br /&gt;
| label     = SceneryWeb&lt;br /&gt;
| repo      = sceneryweb&lt;br /&gt;
| git       = 1&lt;br /&gt;
| svn       = 0&lt;br /&gt;
| eg1commit = b4380d&lt;br /&gt;
| eg2intro  = The&lt;br /&gt;
| eg2commit = 8359ec&lt;br /&gt;
| eg2text   = Captcha is now disabled&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rominet</name></author>
	</entry>
</feed>