FlightGear version check: Difference between revisions

Jump to navigation Jump to search
m
titles, etc.
m (titles, etc.)
Line 1: Line 1:
{{Stub}}
{{Stub}}
{{-}}
{{note|When installing/using aircraft the FlightGear version and the aircraft version must match. Otherwise strange bugs should be expected and the version-mismatch combination will not be supported by the FlightGear community.}}
{{note|When installing/using aircraft the FlightGear version and the aircraft version must match. Otherwise strange bugs should be expected and the version-mismatch combination will not be supported by the FlightGear community.}}


Line 21: Line 20:
The [[Saab JA-37 Viggen]] is a good example of using Nasal and properties to provide backwards-compatibility. See [{{github url|NikolaiVChr/flightgear-saab-ja-37-viggen|Aircraft/JA37/Nasal/ja37.nas|l=1105/1203}} ja37.nas] for the relevant code.
The [[Saab JA-37 Viggen]] is a good example of using Nasal and properties to provide backwards-compatibility. See [{{github url|NikolaiVChr/flightgear-saab-ja-37-viggen|Aircraft/JA37/Nasal/ja37.nas|l=1105/1203}} ja37.nas] for the relevant code.


== Fgdata ==
== FGData ==
{{Note|This is currently just proof-of-concept code which will need to be refined/reviewed to be committed to FGData.}}
{{Note|This is currently just proof-of-concept code which will need to be refined/reviewed to be committed to FGData.}}


[[File:Property-browser-showing-version-info.png|thumb|Property browser showing the <code>/sim/version</code> properties.]]
[[File:Property-browser-showing-version-info.png|thumb|Property browser showing the <code>/sim/version</code> properties.]]


=== translations ===
=== Translations ===
A critical error dialog should preferably support localized error messages. However, [[PUI]] XML dialogs cannot directly support translations, so we need to emulate that using Property overlays.
A critical error dialog should preferably support localized error messages. However, [[PUI]] XML dialogs cannot directly support translations, so we need to emulate that using property overlays.
 
{{FGCquote
{{FGCquote
|1= names/strings would need to be resolved by using translations as an overlay
|1= names/strings would need to be resolved by using translations as an overlay
Line 62: Line 62:
<PropertyList>
<PropertyList>


                <version-mismatch>
<version-mismatch>
                        <error-version-conflict>Error: Version Conflict !</error-version-conflict>
  <error-version-conflict>Error: Version Conflict !</error-version-conflict>
                        <flightgear-version>FlightGear Version</flightgear-version>
  <flightgear-version>FlightGear Version</flightgear-version>
                        <aircraft>Aircraft</aircraft>
  <aircraft>Aircraft</aircraft>
                        <aircraft-version>Aircraft Version</aircraft-version>
  <aircraft-version>Aircraft Version</aircraft-version>
                        <required-flightgear-version>Required FlightGear Version</required-flightgear-version>
  <required-flightgear-version>Required FlightGear Version</required-flightgear-version>
                        <incompatibility-reason>Reason for incompatibility</incompatibility-reason>
  <incompatibility-reason>Reason for incompatibility</incompatibility-reason>
                        <solution>Solution</solution>
  <solution>Solution</solution>
                </version-mismatch>
</version-mismatch>


</PropertyList>
</PropertyList>
</syntaxhighlight>
</syntaxhighlight>


=== dialog ===
=== Dialog ===
$FG_ROOT/gui/dialogs/version-mismatch.xml
$FG_ROOT/gui/dialogs/version-mismatch.xml
<syntaxhighlight lang="xml">
<syntaxhighlight lang="xml">
Line 226: Line 225:
=== Nasal module ===
=== Nasal module ===
This script ensures that the check will be executed for each loaded aircraft, without having to touch any [[aircraft-set.xml]] files, and it will also work with [[reset & re-init]].
This script ensures that the check will be executed for each loaded aircraft, without having to touch any [[aircraft-set.xml]] files, and it will also work with [[reset & re-init]].
<syntaxhighlight lang="nasal">
<syntaxhighlight lang="nasal">
# $FG_ROOT/Nasal/version_check.nas
# $FG_ROOT/Nasal/version_check.nas
Line 253: Line 253:
</syntaxhighlight>
</syntaxhighlight>


== Why is this necessary ? ==
== Why is this necessary? ==
(copy forum responses here)
<!-- (copy forum responses here) -->
 
== Related content ==
== Related content ==
=== Forum topics ===
=== Forum topics ===
* [http://forum.flightgear.org/viewtopic.php?f=6&t=28020 version checking for matching fgfs and -set.xml files]
* [http://forum.flightgear.org/viewtopic.php?f=6&t=28020 version checking for matching fgfs and -set.xml files]

Navigation menu