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.

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

Postby Hooray » Wed Nov 18, 2015 12:52 pm

The JA37 by Necolatis was mentioned in the wiki article, and I checked out its code, send a heads-up to Necolatis, because it is much more flexible than what we are currently doing:

Hooray wrote:Referring to this: https://github.com/NikolaiVChr/flightge ... 1105-L1203

That looks pretty good to me, and it is touching on a debate we're currently having on the forum - and I was wondering if you'd like to get involved in the discussion/development of a corresponding GENERIC feature for ALL aircraft:

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

Thread: viewtopic.php?f=6&t=28020
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 Necolatis » Wed Nov 18, 2015 2:02 pm

I find this thread very interesting. I kinda wish we had had that feature since FG 2.8. For example I have a version of the JA37 that should only be flown on FG 2.8, no higher, no lower.
I guess the only way to make this feature backwards compatible is to provide some code to the aircraft themselves, instead of putting it into the $FGDATA. But I guess that's not the direction this is going in, which I can understand. :)

Since the JA37 has been mentioned here, let me explain what is done there:

I basically do a FG version check, and then disable features that is not supported on that version, in some cases put a notice on the screen saying this or that is disabled, for example custom HUD or Radar. In some cases I switch systems out depending on FG version. For example, I have 3 failure systems installed which one will be activated depends on which FG the user is using. The plane is in that way compatible with FG 2.10 to 3.6, and I then provide a separate aircraft for users of FG 2.8. It can be very tedious though, as I have to be very aware of which features of IE. nasal or canvas that works in which versions.
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2233
Joined: Mon Oct 29, 2012 1:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2020.3.19
OS: Windows 10

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

Postby Hooray » Wed Nov 18, 2015 2:08 pm

To be backward compatible/back-ported, it would indeed need to be explicitly included by aircraft developers - which is possible, but would require more work than what I suggested.

I especially like the fact that you are using this for dynamical feature scaling to enable/disable features
And I would like to provide this as a framework for aircraft devs, so that they can emulate what the JA37 is doing, which should be considered the "best practice" - and preferable over having separate -set.xml files
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 Johan G » Wed Nov 18, 2015 11:19 pm

Hooray wrote in Wed Nov 18, 2015 2:08 pm:...I would like to provide this as a framework for aircraft devs, so that they can emulate what the JA37 is doing, which should be considered the "best practice" - and preferable over having separate -set.xml files

Can such a framework be added in a way that allows it can be used with older versions of FlightGear? Can it be done in a way that would make it easier to use with an aircraft than the way things are done now (I guess by PropertyList and Nasal conditionals depending on the FlightGear version)?

Edit: More positive phrasing.
Edit 2: Spelling
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Some YouTube videos
Johan G
Moderator
 
Posts: 6629
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

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

Postby Hooray » Wed Nov 18, 2015 11:57 pm

It is like Necolatis explained already: if you cannot ship the corresponding module with FlightGear, you would need to ship it with the corresponding aircraft, which involves touching possibly dozens of aircraft.

However, we've had http/xml support for a few years now, so such a module could be loaded via http using the approach detailed at: http://wiki.flightgear.org/Howto:Making ... from_Nasal

Technically, this would mean that people would add 5 lines of Nasal code to their aircraft to load/execute a portion of XML/Nasal code loaded from the official fgdata repository:

Image

Obviously, that would assume that people are online when starting fgfs (which may apply to MP users, but ...)

Otherwise, it would need to be a standalone Nasal file that does not depend on external stuff, including translations and PUI dialogs - which is possible obviously, but I don't quite see many people actually using such a framework. I mean, there only seem to be handful of aircraft using the JA37 approach - so why should we believe that people are suddenly going to adopt such a framework, given that there are so few aircraft doing startup-version checking currently ?
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 Hooray » Sun Jul 02, 2017 12:47 pm

This is now implemented in the form of C++ logic: https://sourceforge.net/p/flightgear/fl ... 8a19be750/
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

Previous

Return to New features

Who is online

Users browsing this forum: No registered users and 8 guests