Board index FlightGear Development New features

version checking for matching fgfs and -set.xml files

Discussion and requests for new features. Please note that FlightGear developers are volunteers and may or may not be able to consider these requests.

version checking for matching fgfs and -set.xml files

Postby Hooray » Tue Nov 17, 2015 11:57 am

thread was split from: viewtopic.php?f=4&t=28010


we could introduce a corresponding <version-check> property at the -set.xml level which is processed by a Nasal script in $FG_ROOT/Nasal, and which shows a message/warning (error) via the console or GUI, so that people are aware that their downloaded aircraft version and the version of FlightGear they are using don't match.
Last edited by Hooray on Tue Nov 17, 2015 3:15 pm, edited 1 time in total.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: f-14 new version cockpit

Postby bugman » Tue Nov 17, 2015 1:52 pm

I've updated the FGAddon instructions so that the warning about these such problems is more obvious. See the new CAUTION message box at:


Regards,
Edward
bugman
Moderator
 
Posts: 1808
Joined: Thu Mar 19, 2015 10:01 am
Version: next

Re: f-14 new version cockpit

Postby Hooray » Tue Nov 17, 2015 2:09 pm

thank you, but we should probably explore introducing a new set of tags for this, and adding a corresponding script (10-15 LOC) to run a version check.
The help/about dialog should be extended to also show the version of fgdata vs. fgaddon/aircraft assets, i.e. if there is a mismatch that should be shown using a bold red warning.
For compatibility checking, we could also use the md5() API - givent that the fgfs binary is going to have a different checksum on each supported platform, we could use /sim/version, $FG_ROOT/version and $FG_ROOT/preferences.xml which are likely to sufficiently differ for each release - i.e. someone would need to know how to circumvent these checks, and at that point, it would be safe to assume that they know what they are doing.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: f-14 new version cockpit

Postby legoboyvdlp » Tue Nov 17, 2015 2:16 pm

Hooray, several aircraft already show a warning, which is quite visible right bang in the middle of the screen. I'm not sure, but possibly the PBY CATLINA used to be or is one.
I believe this is mentioned in the paper cut topic.
User avatar
legoboyvdlp
 
Posts: 7981
Joined: Sat Jul 26, 2014 2:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

Re: f-14 new version cockpit

Postby bugman » Tue Nov 17, 2015 2:18 pm

There is already a version checking infrastructure in place for aircraft. See all of the GRTux aircraft, for example in the PBY-Catalina:

Code: Select all
   <model>
       <path>Aircraft/PBY-Catalina/Models/Catalina_pelican-J.xml</path>
       <fg-ver_min type="string">2.12</fg-ver_min>
       <fg-ver_max type="string">3.00</fg-ver_max>


This requires individual aircraft maintainers to keep track of the effects/features they are using and in which FG version the effect/feature was introduced, or invalidated, as an aircraft version would be compatible across a number of FG versions. I think the task would end up being too much effort, and it is easier to just point out the mistake, and pointing them to documentation explaining the problems such as FGAddon#Obtaining_aircraft.

Regards,
Edward
Last edited by bugman on Tue Nov 17, 2015 2:20 pm, edited 1 time in total.
bugman
Moderator
 
Posts: 1808
Joined: Thu Mar 19, 2015 10:01 am
Version: next

Re: f-14 new version cockpit

Postby legoboyvdlp » Tue Nov 17, 2015 2:20 pm

Thank you for confirming, Edward!
User avatar
legoboyvdlp
 
Posts: 7981
Joined: Sat Jul 26, 2014 2:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

Re: f-14 new version cockpit

Postby Hooray » Tue Nov 17, 2015 2:36 pm

lol, I didn't check the forum, and just prototyped the whole feature from scratch - any pointers where the existing system is implemented, so that we can check how it works ?

I believe that this should be much better documented, and that aircraft missing this tag should show a warning, too - because this is causing so much work on the forum

I was also going to make this more generic, to check for other dependencies (properties), e.g. jsbsim/osg - in case there are known incomatibilities, we did run into this with one osg release shipped with distros that was missing png support

http://wiki.flightgear.org/FlightGear_Version_Check
Image

EDIT: looking at the quoted code above, it looks like a custom thing - the whole property naming scheme is highly obscure/suspicious and does not look like an official tag/infrastructure
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: f-14 new version cockpit

Postby bugman » Tue Nov 17, 2015 2:48 pm

Hooray wrote in Tue Nov 17, 2015 2:36 pm:lol, I didn't check the forum, and just prototyped the whole feature from scratch - any pointers where the existing system is implemented, so that we can check how it works ?

I believe that this should be much better documented, and that aircraft missing this tag should show a warning, too - because this is causing so much work on the forum


I seriously believe that it'll be far more work to maintain in FGAddon. With every FG release, hundreds of aircraft in the collection will be out of date and show a warning. The current system works well as the old aircraft tend to keep working. The number of people complaining about version warnings from aircraft on the official download pages will be orders of magnitude larger than the number of people downloading the latest aircraft for their old FG version without carefully reading the instructions and complaining about version mismatches. The easiest might be to have a stock response such as:

Please carefully read the instructions at FGAddon#Obtaining_aircraft to understand what you did wrong.


Regards,
Edward
bugman
Moderator
 
Posts: 1808
Joined: Thu Mar 19, 2015 10:01 am
Version: next

Re: f-14 new version cockpit

Postby Hooray » Tue Nov 17, 2015 3:07 pm

you are assuming that people actually RTF* (manual, website, wiki, forum, mailing list, issue tracker, commit logs) - honestly, "backward compatibility" is not exactly our strongest point. And it does make sense to even just document this much better, and introduce the corresponding hooks to ensure that aircraft developers can much better target certain binaries, or at least make it blatantly obvious that a certain combination of "assets" is not supported.

Given the free-form nature of XML, the property tree and Nasal, we are already seeing so much stuff that is causing tons of challenges, and we should work out a way to provide the mechanisms to allow aircraft developers to tell if their "runtime environment" is explicitly supported or not.

In the mid term, that would also help have a positive impact on the relationship between aircraft developers and core developers.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: f-14 new version cockpit

Postby bugman » Tue Nov 17, 2015 3:12 pm

Don't get me wrong, I think it is a good idea. But at the same time I see it being a very high maintenance burden compared to the current zero maintenance (excluding the GRTux aircraft).

Regards,
Edward
bugman
Moderator
 
Posts: 1808
Joined: Thu Mar 19, 2015 10:01 am
Version: next

Re: version checking for matching fgfs and -set.xml files

Postby Hooray » Tue Nov 17, 2015 3:26 pm

the way it is currently prototyped on the wiki, it is just a quiet warning added to the log file, this could be configurable by aircraft developers - i.e. the default being "quiet".

By tolerating the current situation, we are not solving the problem, just hiding it - so that it ends up being discussed in the support forum instead
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: version checking for matching fgfs and -set.xml files

Postby Thorsten » Tue Nov 17, 2015 4:24 pm

I'm with Edward on that one.

Maintenance load is high, and if we print a very bright text on screen, we'll get forum posts 'There is a version mismatch pointed out and my cockpit windows are opaque - how do I run the latest version of the F-14b on FG 2.4?' for our trouble.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: version checking for matching fgfs and -set.xml files

Postby Hooray » Tue Nov 17, 2015 4:32 pm

Just look at the number of threads where we are discussing backward compatibility, and explaining why the opposite ("forward compatibility") cannot work.

And next, look at existing cases where we expect a certain updated file format/version (e.g. jsbsim) and show the corresponding messages.

The other option would be introducing a separate dialog with its own "logwidget" that collects aircraft related debug messages (info, warnings, errors), and maybe categorized using tabs, so that aircraft developers, and end-users, can more easily review if something is supported or not.

Note that it would also be possible to allow aircraft developers to encode/use conventional SGConditions, i.e. conditions in the form of property checks (analogous to effects), including even embedded bindings (fgcommands/Nasal), which would require 30 lines of Nasal code that already exists elsewhere - at which point it would be possible for an aircraft developer to decide if fgversion <= 2.00 fgcommand("exit") - maybe in combination with an actual dialog explaining what he is trying to do (aka: playing a MP3 file on a Walkman)

I don't think there are too many people trying to use USB flash disks on 8086 PCs these days, but that is basically what end-users are doing once they are trying to use the f15/shuttle in fg 1.0x :roll:
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: version checking for matching fgfs and -set.xml files

Postby bugman » Tue Nov 17, 2015 4:46 pm

The current <fg-ver_min> and <fg-ver_max> tags already allow aircraft authors to control this, with huge orange text printed on the middle of the screen saying:

    WRONG FLIGHTGEAR VERSION
    YOU WANT AT LEAST FG VERSION IN THE RANGE: MIN 2.12 MAX 3.00

You see this when running:

Code: Select all
fgfs --aircraft=Catalina


It disappears after a while, but it should be enough to cause the user to realise their mistake. So a committer could add these to some of the aircraft, if desired. Especially the <fg-ver_min> for the opaque grey window problem. So if the min version is used but not the max version, then the maintenance issue is gone :)

Regards,
Edward
bugman
Moderator
 
Posts: 1808
Joined: Thu Mar 19, 2015 10:01 am
Version: next

Re: version checking for matching fgfs and -set.xml files

Postby bugman » Tue Nov 17, 2015 4:49 pm

Oh, I just noticed that this is aircraft specific! See the file $FGADDON/Aircraft/PBY-Catalina/Inputs/sys_controls.nas where the warning text is implemented.

Regards,
Edward
bugman
Moderator
 
Posts: 1808
Joined: Thu Mar 19, 2015 10:01 am
Version: next

Next

Return to New features

Who is online

Users browsing this forum: No registered users and 8 guests