$FG AIRCRAFT: Difference between revisions

Jump to navigation Jump to search
Add link to environment variables article
m (+-cat: Environment variables → Environment variables)
(Add link to environment variables article)
Line 1: Line 1:
<code>'''$FG_AIRCRAFT'''</code> is referred to as the aircraft directory or directories of [[FlightGear]]. It is available since FlightGear 2.4.
<code>'''$FG_AIRCRAFT'''</code> is a '''setting''' referred to as the aircraft directory or directories of [[FlightGear]]. It is available since FlightGear 2.4.


It can be set on the [[FlightGear Launch Control#Page One - Paths|first page]] of [[FGRun]] (before the default aircraft selection page). <tt>[[$FG_ROOT]]/Aircraft</tt> should never be added to <code>$FG_AIRCRAFT</code>, otherwise aircraft will be listed twice in FGRun.
It can be set on the [[FlightGear Launch Control#Page One - Paths|first page]] of [[FGRun]] (before the default aircraft selection page). <tt>[[$FG_ROOT]]/Aircraft</tt> should never be added to <code>$FG_AIRCRAFT</code>, otherwise aircraft will be listed twice in FGRun.
Line 7: Line 7:


== Relation between <tt>FG_AIRCRAFT</tt>/<tt>--fg-aircraft</tt> and <tt>--aircraft-dir</tt> ==
== Relation between <tt>FG_AIRCRAFT</tt>/<tt>--fg-aircraft</tt> and <tt>--aircraft-dir</tt> ==
The <tt>fgfs</tt> <tt>--fg-aircraft</tt> [[Command_line_options|command line option]] and the <tt>FG_AIRCRAFT</tt> environment variable have the same purpose: each of them can specify a list of one or more aircraft directories, separated with a semicolon (<tt>;</tt>) on Windows, and a colon (<tt>:</tt>) on other operating systems. Each directory of the list in question should contain directories that themselves contain aircraft <tt>-set.xml</tt> files (i.e., each component of <tt>FG_AIRCRAFT</tt> or <tt>--fg-aircraft</tt> can list many different aircrafts, not only variants of the same aircraft).
The <tt>fgfs</tt> <tt>--fg-aircraft</tt> [[Command_line_options|command line option]] and the <tt>FG_AIRCRAFT</tt> [[Environment variables|environment variable]] have the same purpose: each of them can specify a list of one or more aircraft directories, separated with a semicolon (<tt>;</tt>) on Windows, and a colon (<tt>:</tt>) on other operating systems. Each directory of the list in question should contain directories that themselves contain aircraft <tt>-set.xml</tt> files (i.e., each component of <tt>FG_AIRCRAFT</tt> or <tt>--fg-aircraft</tt> can list many different aircrafts, not only variants of the same aircraft).


Typically, directories listed in <tt>FG_AIRCRAFT</tt> or in the value for <tt>--fg-aircraft</tt> options are called <tt>Aircraft</tt>. Prime examples are the <tt>Aircraft</tt> top-level directories of [[$FG_ROOT]] and [[FGAddon]]. They will themselves contain subdirectories named for instance <tt>c172p</tt>, <tt>ufo</tt>, <tt>707</tt>, etc.
Typically, directories listed in <tt>FG_AIRCRAFT</tt> or in the value for <tt>--fg-aircraft</tt> options are called <tt>Aircraft</tt>. Prime examples are the <tt>Aircraft</tt> top-level directories of [[$FG_ROOT]] and [[FGAddon]]. They will themselves contain subdirectories named for instance <tt>c172p</tt>, <tt>ufo</tt>, <tt>707</tt>, etc.


The differences between <tt>FG_AIRCRAFT</tt> and <tt>--fg-aircraft</tt> are:
The differences between <tt>FG_AIRCRAFT</tt> and <tt>--fg-aircraft</tt> are:
* <tt>FG_AIRCRAFT</tt> is an environment variable, and as such cannot be specified several times like a command-line option (the variable may be <i>set</i> or <i>unset</i> in FlightGear's environment, that's all). By the way, customarily, <tt><code>$FG_AIRCRAFT</code></tt> refers to the <em>value</em> of the <tt>FG_AIRCRAFT</tt> environment variable (this is the POSIX shell syntax used to expand an environment variable).
* <tt>FG_AIRCRAFT</tt> is an [[Environment variables|environment variable]], and as such cannot be specified several times like a command-line option (the variable may be <i>set</i> or <i>unset</i> in FlightGear's environment, that's all). By the way, customarily, <tt><code>$FG_AIRCRAFT</code></tt> refers to the <em>value</em> of the <tt>FG_AIRCRAFT</tt> environment variable (this is the POSIX shell syntax used to expand an environment variable).
* <tt>--fg-aircraft</tt> is an <tt>fgfs</tt> [[Command_line_options|command line option]]. It may be passed several times on the same <tt>fgfs</tt> command line, and the directories listed therein have higher precedence than those listed in <tt>FG_AIRCRAFT</tt> (from a code inspection of FlightGear's development version from January 2016).
* <tt>--fg-aircraft</tt> is an <tt>fgfs</tt> [[Command_line_options|command line option]]. It may be passed several times on the same <tt>fgfs</tt> command line, and the directories listed therein have higher precedence than those listed in <tt>FG_AIRCRAFT</tt> (from a code inspection of FlightGear's development version from January 2016).


1,746

edits

Navigation menu