FlightGear Qt launcher: Difference between revisions

Cleanup, more is still required
No edit summary
(Cleanup, more is still required)
Line 1: Line 1:
{{Cleanup}}
{{-}}
{{infobox subsystem
{{infobox subsystem
| name          = FlightGear Qt launcher
| name          = FlightGear Qt launcher
Line 15: Line 13:
{{Package Management}}
{{Package Management}}
The '''Qt launcher''' is an integrated launcher for [[FlightGear]], replacing [[FGRun]] in the official distributions as of version 2016.4. Initially designed as a stop-gap solution in FlightGear 3.4 for the problem of support for the [[FlightGear Mac OS X Launcher|old FlightGear Mac launcher]] ending with OS X Yosemite, it has become FlightGear's main launcher for all platforms, and is shipped with all official FlightGear releases (however, users building from source may need to separately configure/rebuild FlightGear).  
The '''Qt launcher''' is an integrated launcher for [[FlightGear]], replacing [[FGRun]] in the official distributions as of version 2016.4. Initially designed as a stop-gap solution in FlightGear 3.4 for the problem of support for the [[FlightGear Mac OS X Launcher|old FlightGear Mac launcher]] ending with OS X Yosemite, it has become FlightGear's main launcher for all platforms, and is shipped with all official FlightGear releases (however, users building from source may need to separately configure/rebuild FlightGear).  
== Usage ==
To run the launcher:
* '''Microsoft Windows''': double-click the ''FlightGear <version>'' icon on the Desktop or click on ''Start'' > ''All Programs'' > ''FlightGear <version>'' > ''FlightGear Launcher''.
* '''OS X and Linux''': open a terminal and run <tt>fgfs</tt> with the option <code>--launcher</code>:<syntaxhighlight lang="shell">
$ fgfs --launcher
</syntaxhighlight>
Note that the launcher is an optional feature for the reasons explained below in the [[#Dependencies|Dependencies]] section. As a result, if you are on Linux and have installed the version of FlightGear provided by your distribution, it might not be available because the packagers might have not enabled it. In that case, ask your distribution to enable the feature.
<gallery mode="packed">
Qt launcher for FlightGear 2018.2 on Windows 10 aircraft.jpg|Aircraft page of Qt launcher in FG 2018.2 on Windows 10
Qt launcher for FlightGear 2018.2 on Windows 10 location.jpg|Location page of Qt launcher in FG 2018.2 on Windows 10
Qt launcher for FlightGear 2018.2 on Windows 10 environment.jpg|Environment page of Qt launcher in FG 2018.2 on Windows 10
Qt launcher for FlightGear 2018.2 on Windows 10 settings.jpg|Settings page of Qt launcher in FG 2018.2 on Windows 10
Qt launcher for FlightGear 2018.2 on Windows 10 addons.jpg|Addons page of Qt launcher in FG 2018.2 on Windows 10
</gallery>
=== Installing Scenery ===
{{#ev:youtube|lJG3lL1vLDU}}
=== Enabling console display on Windows systems ===
To enable console display on Windows, right-click on the FlightGear shortcut on the Desktop and click '''Properties'''. In the '''Target''' box under the '''Shortcut''' tab, add <tt>--console</tt> at the end and click '''OK'''.
=== Aircraft/TerraSync download directory ===
As of FlightGear 2016.2, the location used by the launcher to store downloaded aircraft and TerraSync scenery can be specified in the '''Add-ons''' tab. Specifying the TerraSync download directory manually has, thus, become unnecessary.<ref name="LauncherChanges">{{cite web
| url    = http://sourceforge.net/p/flightgear/mailman/message/35001457/
| title  = <nowiki>[Flightgear-devel] Launcher add-on handling changes</nowiki>
| author = <nowiki>James Turner</nowiki>
| date  = Apr 8th, 2016
| added  = Apr 8th, 2016
| script_version = 0.25
}}</ref>
=== Preferences ===
In FlightGear 2016.2 and later, the preferences are stored in ''[[$FG_HOME]]/flightgear.org/FlightGear.ini''.<ref name="LauncherChanges" /> Older versions make use of the default location used by Qt:
* the Registry on Microsoft Windows;
* ''~/Library/Preferences'' on OS X;
* the default preferences location on Linux (usually ''~/.config/FlightGear/FlightGear.conf'').
Preferences can be reset to their default values by holding down the {{key press|Alt}} key while starting the launcher.<ref name="LauncherPreferences">{{cite web
| url    = http://sourceforge.net/p/flightgear/mailman/message/34642397/
| title  = <nowiki>Re: [Flightgear-devel] Qt launcher and phi-utility FGFS 3.6.0 RC
to 3.7.0</nowiki>
| author = <nowiki>James Turner</nowiki>
| date  = Nov 23rd, 2015
| added  = Nov 23rd, 2015
| script_version = 0.23
}}</ref>
== History and status ==
In October 2014, Apple released OS X 10.10 Yosemite. Unfortunately, one of the frameworks the [[FlightGear Mac OS X Launcher|old FlightGear Mac launcher]] relied upon, called {{wikipedia|RubyCocoa}}, was removed, making it incompatible with OS X Yosemite. James Turner started work on a solution for the then-upcoming 3.4 release. He added a simple built-in launcher using Qt, run before the main window would be created. It was released with FlightGear 3.4 as a Mac-only feature.
After FlightGear 3.4, it was decided to that this temporary Mac-only launcher would be developed into a replacement for [[FGRun]] and that it would become part of the plan for updating the FlightGear user interface. In FlightGear 3.6, it became available for all platforms, and has continued to be developed, enhanced, and refined.
As of May 2016, the Qt launcher is under active development. This includes the adding of new features, fixing bugs, and refining existing features.
As of mid 2016, the Qt UI is now also available  at runtime; however, this needs a lot of testing, but aircraft can be installed / changed and location adjusted from within the sim. After some number of times the sim will crash.<ref>https://sourceforge.net/p/flightgear/fgdata/ci/654a343bbb7eb51b387060515e3415e152d12c2a/</ref>
The Options which don't work are things like setting scenery / aircraft paths, and initial position, because those interfere with the values the launcher is passing itself.<ref>https://sourceforge.net/p/flightgear/mailman/message/35689137/</ref>
As of version 2016.4, FGRun has been removed from the official distributions.
== Background ==
{{Cleanup}}
In addition, this was also motivated by [[The FlightGear Front-End Situation|the plethora of 3rd party GUI launchers/frontends]] developed by numerous contributors over the years <ref>[[The FlightGear Front-End Situation]]</ref>.
In addition, this was also motivated by [[The FlightGear Front-End Situation|the plethora of 3rd party GUI launchers/frontends]] developed by numerous contributors over the years <ref>[[The FlightGear Front-End Situation]]</ref>.


Line 55: Line 118:
   }}</ref>
   }}</ref>


== History and status ==
In October 2014, Apple released OS X 10.10 Yosemite. Unfortunately, one of the frameworks the [[FlightGear Mac OS X Launcher|old FlightGear Mac launcher]] relied upon, called {{wikipedia|RubyCocoa}}, was removed, making it incompatible with OS X Yosemite. James Turner started work on a solution for the then-upcoming 3.4 release. He added a simple built-in launcher using Qt, run before the main window would be created. It was released with FlightGear 3.4 as a Mac-only feature.
After FlightGear 3.4, it was decided to that this temporary Mac-only launcher would be developed into a replacement for [[FGRun]] and that it would become part of the plan for updating the FlightGear user interface. In FlightGear 3.6, it became available for all platforms, and has continued to be developed, enhanced, and refined.
As of May 2016, the Qt launcher is under active development. This includes the adding of new features, fixing bugs, and refining existing features.
As of mid 2016, the Qt UI is now also available  at runtime; however, this needs a lot of testing, but aircraft can be installed / changed and location adjusted from within the sim. After some number of times the sim will crash.<ref>https://sourceforge.net/p/flightgear/fgdata/ci/654a343bbb7eb51b387060515e3415e152d12c2a/</ref>
The Options which don't work are things like setting scenery / aircraft paths, and initial position, because those interfere with the values the launcher is passing itself.<ref>https://sourceforge.net/p/flightgear/mailman/message/35689137/</ref>
As of version 2016.4, FGRun has been removed from the official distributions.
== Background ==
{{Main article|QtQuick use in FlightGear}}
{{Main article|QtQuick use in FlightGear}}
In accordance with the [[FlightGear 4.xx Roadmap]], FlightGear's current graphical interface (based on the [[PUI]] library of [[PLIB]]) will be replaced by one based on Qt. In addition, a browser-based UI (called [[Phi]]) will continue to be developed in parallel.<ref>{{cite web
In accordance with the [[FlightGear 4.xx Roadmap]], FlightGear's current graphical interface (based on the [[PUI]] library of [[PLIB]]) will be replaced by one based on Qt. In addition, a browser-based UI (called [[Phi]]) will continue to be developed in parallel.<ref>{{cite web
Line 99: Line 146:
   }}</ref>
   }}</ref>


== Usage ==
To run the launcher:
* Microsoft Windows users can double-click the '''FlightGear <version>''' icon on the Desktop or click on '''Start''' -> '''All Programs''' -> '''FlightGear <version>''' -> '''FlightGear Launcher''';
* OS X and Linux users must open a terminal and run <tt>fgfs</tt> with the option <code>--launcher</code>:<syntaxhighlight lang="shell">
$ fgfs --launcher
</syntaxhighlight>
{{note|The launcher is an optional feature for the reasons explained below in the [[#Dependencies|Dependencies]] section. As a result, if you are on Linux and have installed the version of FlightGear provided by your distribution, it might not be available because the packagers might have not enabled it. In that case, ask your distribution to enable the feature.}}
<gallery mode="packed">
Qt launcher for FlightGear 2018.2 on Windows 10 aircraft.jpg|Aircraft page of Qt launcher in FG 2018.2 on Windows 10
Qt launcher for FlightGear 2018.2 on Windows 10 location.jpg|Location page of Qt launcher in FG 2018.2 on Windows 10
Qt launcher for FlightGear 2018.2 on Windows 10 environment.jpg|Environment page of Qt launcher in FG 2018.2 on Windows 10
Qt launcher for FlightGear 2018.2 on Windows 10 settings.jpg|Settings page of Qt launcher in FG 2018.2 on Windows 10
Qt launcher for FlightGear 2018.2 on Windows 10 addons.jpg|Addons page of Qt launcher in FG 2018.2 on Windows 10
</gallery>
=== Installing Scenery ===
{{#ev:youtube|lJG3lL1vLDU}}
=== Enabling console display on Windows systems ===
To enable console display on Windows, right-click on the FlightGear shortcut on the Desktop and click '''Properties'''. In the '''Target''' box under the '''Shortcut''' tab, add <tt>--console</tt> at the end and click '''OK'''.
=== Aircraft/TerraSync download directory ===
As of FlightGear 2016.2, the location used by the launcher to store downloaded aircraft and TerraSync scenery can be specified in the '''Add-ons''' tab. Specifying the TerraSync download directory manually has, thus, become unnecessary.<ref name="LauncherChanges">{{cite web
| url    = http://sourceforge.net/p/flightgear/mailman/message/35001457/
| title  = <nowiki>[Flightgear-devel] Launcher add-on handling changes</nowiki>
| author = <nowiki>James Turner</nowiki>
| date  = Apr 8th, 2016
| added  = Apr 8th, 2016
| script_version = 0.25
}}</ref>
=== Preferences ===
In FlightGear 2016.2 and later, the preferences are stored in ''[[$FG_HOME]]/flightgear.org/FlightGear.ini''.<ref name="LauncherChanges" /> Older versions make use of the default location used by Qt:
* the Registry on Microsoft Windows;
* ''~/Library/Preferences'' on OS X;
* the default preferences location on Linux (usually ''~/.config/FlightGear/FlightGear.conf'').
Preferences can be reset to their default values by holding down the {{key press|Alt}} key while starting the launcher.<ref name="LauncherPreferences">{{cite web
| url    = http://sourceforge.net/p/flightgear/mailman/message/34642397/
| title  = <nowiki>Re: [Flightgear-devel] Qt launcher and phi-utility FGFS 3.6.0 RC
to 3.7.0</nowiki>
| author = <nowiki>James Turner</nowiki>
| date  = Nov 23rd, 2015
| added  = Nov 23rd, 2015
| script_version = 0.23
}}</ref>
== Repercussions ==
=== Dependencies ===
=== Dependencies ===
There is 100% agreement that FlightGear will never require Qt<ref>{{cite web
There is 100% agreement that FlightGear will never require Qt<ref>{{cite web
Line 223: Line 219:
|date  = Jan 11th, 2015
|date  = Jan 11th, 2015
}}</ref>
}}</ref>
=== Segmentation faults and race conditions ===
{{Note|Also see {{Issue|1819}}, {{Issue|1870}} }}
{{FGCquote|1= Should installing an aircraft to the proper aircraft folder be allowed to crash the launcher if that plane has an error the launcher can detect or should maybe the launcher load and report an error somewhere visible in the launchers gui?|2= {{cite web  | url    = http://sourceforge.net/p/flightgear/mailman/message/34430800/  | title  = <nowiki>Re: [Flightgear-devel] fgaddon c310 typos??</nowiki>  | author = <nowiki>Ray St. Marie</nowiki>  | date  = Sep 3rd, 2015  }}}}
{{FGCquote|1= The problem with GUI coding is that it is very, very hard - it is much more problematic than normal coding and causes far more headaches (from all the banging of your head against the wall trying to work out why it is racing and segfaulting on one system and not another). |2= {{cite web  | url    = http://sourceforge.net/p/flightgear/mailman/message/34430850/  | title  = <nowiki>Re: [Flightgear-devel] fgaddon c310 typos??</nowiki>  | author = <nowiki>Edward d'Auvergne</nowiki>  | date  = Sep 3rd, 2015  }}}}
{{FGCquote|1= Note that as the QtLauncher transitions into a full GUI to replace the PUI GUI, many of these issues will disappear, and new ones will appear. In any case, debugging a modern GUI is much harder than debugging the non-GUI parts. A basic knowledge of threading, locks, and racing is quite useful for understanding and catching these bugs.|2= {{cite web  | url    = http://sourceforge.net/p/flightgear/mailman/message/34431801/  | title  = <nowiki>Re: [Flightgear-devel] Debug build / crash on exit</nowiki>  | author = <nowiki>Edward d'Auvergne</nowiki>  | date  = Sep 4th, 2015  }}}}
{{FGCquote
|1= One concern I have though, from the discussions over the last year, is that the PUI->Qt migration plan is not a direct one-to-one migration. I.e. to have a main Qt window providing the main FlightGear window by containing a top menu bar followed by a QtWindow GL widget underneath, in which the FG main execution loop is run as a thread from within the Qt main loop. My impression was that the GUI will be a secondary window or dialog that you have to switch to. But one problem I see with this design is that all modern GUI toolkits (Qt, GTK, metro, Cacoa, Carbon, etc.) suffer from racing and segfaulting issues if the GUI main thread or main loop/event handler is not thread number 1.
|2= {{cite web
  | url    = http://sourceforge.net/p/flightgear/mailman/message/34536197/
  | title  = <nowiki>Re: [Flightgear-devel] GUI questions (again)</nowiki>
  | author = <nowiki>Edward d'Auvergne</nowiki>
  | date  = Oct 13th, 2015
  }}
}}
=== Canvas ===
{{Note|Building a QT based GUI is not in any way meant to obstruct the further development of a Canvas based GUI. We did voice some concerns as to whether the need to re-implement a complete widget is worth the cost is terms of development effort. The beauty of open source is that there's more than one way to do things, however. Especially in a completely modular environment (via [[HLA]]) [http://sourceforge.net/p/flightgear/mailman/message/34196458/].
}}
{{FGCquote
|1= Canvas works fine in this scenario, we can embed the texture or image a Canvas produces into a QtQuick dialog just fine. (It would be possible to reimplement Canvas using Qt but I don’t see any benefit there - the non-Qt builds still need Canvas support for flight-displays and the like)
|2= {{cite web
  | url    = http://sourceforge.net/p/flightgear/mailman/message/34532040/
  | title  = <nowiki>[Flightgear-devel]  GUI questions (again)</nowiki>
  | author = <nowiki>James Turner</nowiki>
  | date  = Oct 11th, 2015
  | added  = Oct 11th, 2015
  | script_version = 0.23
  }}
}}
James isn't expecting many issues integrating Canvas layers with a Qt GUI, so there is no wasted development effort there (there is the possibility to make a [[Canvas]] backend based upon QPainter, which might be a great way to use spare CPU cycles to unload the GPU, however, as Canvas rendering becomes more intensive).<ref name="GUItech">{{cite web
|url    = http://sourceforge.net/p/flightgear/mailman/message/33245028/
|title  = <nowiki>[Flightgear-devel] Gui technologies</nowiki>
|author = James Turner
|date  = Jan 20th, 2015
}}</ref> However, at least for the time being, the Qt5 GUI is not even available at run-time, but will be shut down after handing over control to the main FlightGear initialization routines.
Originally, one of the main motivations for adopting Canvas and using it for UI purposes was to help getting rid of PUI (our legacy GUI engine), while coming up with a GUI that would be compatible with other important use-cases (think modern MFDs showing GUI dialogs and vice versa).
The latter is an increasingly important use-case in real life avionics (on jets/airliners) - as can be seen by  [[ARINC 661]]. Such use-cases aren't easily supported by a distributed approach involving for example a browser, HTML5 and ECMAScript/JavaScript.
In addition, the idea is to keep modernizing and [[Unifying_the_2D_rendering_backend_via_canvas|unifying the 2D rendering back-end]] in FlightGear by getting rid of legacy GL code to hopefully use modern OSG code in more and more places.<ref>{{cite web
|url    = http://forum.flightgear.org/viewtopic.php?p=229311#p229311
|title  = <nowiki>Re: New Canvas GUI</nowiki>
|author = Hooray
|date  = Jan 8th, 2015
}}</ref> At least for now, it isn't even clear if/how and when Canvas-based MFDs may support HTML5/Qt5-based UI components or vice versa (e.g. a Qt5 based dialog showing Canvas-based features, such as a [[MapStructure]] layer or MFD instances like the [[NavDisplay]]). Unlike Canvas-based efforts like the [[Aircraft Center]], the Qt5 effort is also adding a rather significant build-time dependency for those wanting to use the new built-in launcher.
=== Duplicating existing functionality ===
{{FGCquote
|1= While Qt5 would still be an awesome feature from a Canvas perspective, it is simply not an option as long as it is entirely optional, because at that point,  some Canvas-based MFD features would no longer work for FlightGear versions without Qt5 support included.
|2= {{cite web
  | url    = http://forum.flightgear.org/viewtopic.php?p=272314#p272314
  | title  = <nowiki>Re: Aircraft reselection </nowiki>
  | author = <nowiki>Hooray</nowiki>
  | date  = Jan 10th, 2016
  }}
}}
There's also the issue of code duplication and maintenance, too. As can be seen by functionality that is now getting added/re-implemented in Qt5/C++ space, despite already existing elsewhere:
<gallery widths="400">
Qt launcher for FlightGear 3.5 on Windows 7 location.jpg|This is the location tab of the new Qt5-based launcher, which is entirely hard-coded in C++
Airport-selection-dialog.png|A [[Canvas]]/[[MapStructure]] based view of airports with runways/taxiways
</gallery>
As can be seen, there's currently no code reuse taking place when it comes to the Qt5-based location tab, and the Canvas/MapStructure-based airport/taxiway layers are very much superior in comparison, too (as well as being much better maintainable (living in fgdata)) - so it would make sense to work out a way to reuse existing code instead.
{{FGCquote
|1= The main motivation why some people want to have a Nasal/Canvas-based GUI is to ensure that aircraft avionics can make use of the GUI toolkit, but also so that the integrated GUI can deal with existing Canvas based features (think avionics).
In layman's terms, all this comes down to being able to render a MFD (PFD/ND) in a dialog box, but also to render GUI widgets to a Canvas, i.e. true recursion - as long as this use-case is supported, it does not matter whether Qt5 is used for this or not, the only thing that matters is that it would be possible to create an integrated GUI for editing/maintaining MFD avionics, but also other Canvas-feature (think having a built-in HUD or 2D panels editor).
|2= {{cite web
  | url    = http://forum.flightgear.org/viewtopic.php?p=272314#p272314
  | title  = <nowiki>Re: Aircraft reselection </nowiki>
  | author = <nowiki>Hooray</nowiki>
  | date  = Jan 10th, 2016
  }}
}}
Once the [[Canvas Development#The_Future_of_Canvas_in_FlightGear|PropertyBasedElement/CanvasElement wrappers]] are fully exposed to scripting space, we could easily register MapStructure as a new Canvas element for directly making the corresponding layers available to C++ code, without introducing any direct Nasal dependencies - i.e. the corresponding airports/runway and taxiways diagrams would be transparently created by Nasal-based Canvas elements, with the Qt5/C++ code only ever having to set a handful of properties (airport ICAO id, styling, range etc).
The main obstacle preventing us from doing this right now is that we're not yet [[Initializing Nasal early]], so that the corresponding Nasal/Canvas bindings (via [[Nasal/CppBind]]) are not yet available when the Qt5 UI is running.
=== PLIB/PUI (legacy GUI) ===
{{Main article|Howto:Processing legacy PUI dialogs using Canvas}}
Up to now - only a simple replacement for the Mac Launcher has been introduced (and enabled by default only on OSX). This is not related to the internal user interface of FlightGear (which is mainly based on [[PUI]] and increasingly Canvas these days), at least for now.<ref name="GUIhell"/>
However, the goal is to make an '''optional''' Qt dependency to replace PLIB PUI.<ref>{{cite web
|url    = http://sourceforge.net/blog/november-2015-community-choice-project-of-the-month-flightgear/
|title  = November 2015, "Community Choice" Project of the Month – FlightGear
|author = SourceForge Community Team
|date  = Nov 1st, 2015
}}</ref>
Except of course PUI will have to remain for some awkward use cases in the short term (aircraft dialogs, potentially). When compiled without Qt support, you’ll get a fully functional FG (i.e., '''Qt will never be a requirement to build FG'''), but without the GUI functions – which is indeed what some people want anyway (e.g., in some home cockpit setups).
Any in-sim GUI using Qt will exist in parallel to the PLIB/PUI one for at least one major release, although this may mean maintaining two sets of dialogs, unless the XML-translation-tool is good enough that we can use it at run-time for aircraft dialogs.<ref name="GUIquestions"/>
Expect to see a test branch in Git in the next month or so, and hopefully something usable for 3.6. The PLIB code will remain so hopefully it can be a gradual transition.<ref name="GUItech"/>
{{FGCquote
|1= From what I've seen, I don't see any reason why there cannot be a direct one-to-one migration of the PUI GUI main window to a Qt main window, including dynamically generating the aircraft menu and submenus by parsing the XML unmodified. This can be done incrementally as it is developed, and probably in a way that requiresero changes to the aircraft PUI GUI XML (though changes could be made later, as you can do far, far more with Qt than with PUI). So I personally think that targeting dialogs for the PUI GUI would be the best way to go as this can be directly translated by the GUI developers into Qt dialogs requiring the aircraft developers to do nothing
|2= {{cite web
  | url    = http://sourceforge.net/p/flightgear/mailman/message/34536197/
  | title  = <nowiki>Re: [Flightgear-devel] GUI questions (again)</nowiki>
  | author = <nowiki>Edward d'Auvergne</nowiki>
  | date  = Oct 13th, 2015
  }}
}}
{{FGCquote
|1= At least for the time being, PUI  doesn't seem to become obsolete anytime soon, according to James Turner's continuing preference to hack/extend and maaintain custom PUI widgets:
http://sourceforge.net/p/flightgear/mailman/message/34747786/
This observation is also in line with numerous PUI related commits that he made despite his ongoing Qt5 work: http://wiki.flightgear.org/Canvas_GUI#PUI_Widgets
For a more recent example, look at the waypointlist commits that are using neither Qt5, Phi or Canvas at all: http://sourceforge.net/p/flightgear/flightgear/ci/846fd2
|2= {{cite web
  | url    = http://forum.flightgear.org/viewtopic.php?p=272148#p272148
  | title  = <nowiki>Re: Can't install FGRun package (+ rant about Qt5 launcher)</nowiki>
  | author = <nowiki>Hooray</nowiki>
  | date  = Jan 9th, 2016
  | added  = Jan 9th, 2016
  | script_version = 0.23
  }}
}}
{{FGCquote
|1= I am strongly against using a very non-standard UI (a text box + slider) to achieve that interaction. I’d much rather we add a spin-box to PUI, which is not especially hard, and give it the ‘click and drag’ mouse interaction which some spinboxes in other apps have, to give similar UI to the sliders without the visual clutter.
|2= {{cite web
  | url    = http://sourceforge.net/p/flightgear/mailman/message/34747786/
  | title  = <nowiki>Re: [Flightgear-devel] Speed-up vs time-warp</nowiki>
  | author = <nowiki>James Turner</nowiki>
  | date  = Jan 7th, 2016
  | added  = Jan 7th, 2016
  | script_version = 0.23
  }}
}}
=== Python in FlightGear ===
{{See also|Python in FlightGear}}
{{See also|FGPythonSys}}
{{FGCquote
|1= depending on how much progress bugman is going to make with his "python-integration-in-FlightGear" experiments  (FGPythonSys), we may at some point even be able to ship FFGo as part of FGData (e.g. $FG_ROOT/Python/Apps/FFGo) and run it via FGPythonSys directly
|2= {{cite web
  | url    = http://forum.flightgear.org/viewtopic.php?p=275910#p275910
  | title  = <nowiki>Re: Announcing </nowiki>
  | author = <nowiki>Hooray</nowiki>
  | date  = Feb 12th, 2016
  | added  = Feb 12th, 2016
  | script_version = 0.25
  }}
}}
{{FGCquote
|1= if this FGPythonSys were integrated into FG, doing things in Python that are directly committed to the core (properly reviewed---well, as the C++ code) as opposed to coming from various uncontrolled external places would certainly be pretty interesting
|2= {{cite web
  | url    = http://forum.flightgear.org/viewtopic.php?p=275923#p275923
  | title  = <nowiki>Re: Announcing </nowiki>
  | author = <nowiki>rominet</nowiki>
  | date  = Feb 13th, 2016
  | added  = Feb 13th, 2016
  | script_version = 0.25
  }}
}}
{{FGCquote
|1= The built-in launcher that James is writing would seem to me to be a good candidate for doing things in Python (assuming there are good bindings to the C++ data structures): you need high-level access to FG aircraft and airport data, it is not performance critical, the need for threading is certainly rather limited, the code does not come from a random hangar and can be audited just like the C++ code when committed, probably by more people actually. Add to this that PyQt works very well (I have had a very pleasant experience with PyQt 3&amp;4 under Python 2&amp;3, and if I get enough time, I'll maybe port FFGo to PyQt---Tk is useful, clearly, but frustrating; for example Qt's QAbstractItemModel and QAbstractItemView were great to manage non-trivial tablular data; with Tk, table/tree cells are just strings and your program has to manage on its own to link that to the nice high-level Python data structures).
(and I have tried other toolkits before Qt and Tk, namely GTK+ 1.2 and wxWidgets [around 2003] Bottom line: for me, Qt is the best)
|2= {{cite web
  | url    = http://forum.flightgear.org/viewtopic.php?p=275923#p275923
  | title  = <nowiki>Re: Announcing </nowiki>
  | author = <nowiki>rominet</nowiki>
  | date  = Feb 13th, 2016
  | added  = Feb 13th, 2016
  | script_version = 0.25
  }}
}}


== Cross compiling using MinGW64 ==
== Cross compiling using MinGW64 ==
Line 413: Line 228:
}}</ref>
}}</ref>


== Community Feedback ==
== Related content ==
{{FGCquote
* [[FlightGear Qt launcher wish list]]
|1= My issues are:
* I can't use a different FGDATA path, which was a very handy feature of FGRun. Even adding <nowiki>--fg-root=/path/to/fgdata</nowiki> to the "Additional options" field doesn't work. - when trying to add Aircraft and Scenery paths, I am presented with a dialog to find them, but I can't see hidden folders there, and Ctrl+H doesn't affect it
* seems to have much fewer options than FGRun, some of which were handy (for instance, where can I set texture compression now?)
* I love the airport view but I would expect I could position and rotate my aircraft anywhere by clicking around instead of being able to only select runways (which would be a handy feature to start at a parking position if it's not defined for a given airport)
|2= {{cite web
  | url    = http://sourceforge.net/p/flightgear/mailman/message/34752316/
  | title  = <nowiki>[Flightgear-devel] Issues with Qt5 launcher</nowiki>
  | author = <nowiki>Gilberto Agostinho</nowiki>
  | date  = Jan 9th, 2016
  | added  = Jan 9th, 2016
  | script_version = 0.23
  }}
}}
 
== Development ==
{{FGCquote|1= The problem is the initialisation sequence. The QtLauncher starts before the 'dynamic airports'. Therefore the park positions are not available (unless they have been added to the NavDataCache by previous runs of FG, and the NavDataCache is not rebuilt).|2= {{cite web  | url    = http://sourceforge.net/p/flightgear/mailman/message/34560946/  | title  = <nowiki>Re: [Flightgear-devel] FGFS Launcher -->selecting Parkpositions ???</nowiki>  | author = <nowiki>Edward d'Auvergne</nowiki>  | date  = Oct 22nd, 2015  }}}}
 
 
== Wish List ==
Proposition for the new content / organisation of the QtLauncher.
 
rem: each first-level item in the following list represents an icon in the vertical icon box, on the left side of the mainwindow. The sub-level items could be organised by tabs, groups, panels in separated pages.
 
rem2: some of these items don't exist yet, or are unstable. This list could be a starting point to develop some ideas...
 
* '''Summary'''
** Select:
*** Mission
**** (ex: tutorials, carrier mission, volcanic ash mission, engine failure mission, military mission, fire mission...)
**** Rem: selecting ''Mission'' disables the ''Aircraft/Location/Time/Weather'' icons
*** Custom Flight Plan
*** UFO (sandbox mode)
*** Saved flights
** ''Fly!'' = starts the simulation.
 
* '''Aircraft'''
** Search box + List of the installed aircrafts
*** Rem: maybe better to download the addons manually and copying them in the add-ons directory?
** Properties box (description, author, copyright, date, version, website, stable or unstable) with screenshots
** Option: Hide aircraft based on completeness
** Aircraft settings
*** (ex: weight, CoG, crew and passengers, bagages, fuel)
*** Enable System Failures
*** Enable Crash/Damages
*** Autostart engine(s)
** HTML Aircraft documentation
 
* '''Location'''
** Search box + List of the installed locations
** 2D Map
*** Show/hide roads, rivers, Show/hide heightmap, zoom in/out...
*** Show the downloaded locations (with option to restrict the list to the downloaded scenaries only)
*** Show the points of interest
*** Show the NOTAM
*** Show the CTA, CTR and restricted areas
** Toolbox to prepare the Flight Plan (departure, arrival, route, distance calculation, fuel calculation)
** Enable NOTAM (with a select list of NOTAM)
 
* '''Time'''
** Season (local or custom)
** Hour/Time (local or custom)
 
* '''Weather'''
** 2D Map (satellite weather map, forecast charts)
*** with the flight route previsouly defined
** Basic settings: Sun/Snow/Rain/Icing/Storm
** Advanced:
*** Clouds layers
*** Real online weather
*** Volumic clouds generation
 
* '''Pilot's Logbook'''
** Logbook
** Missions completed
** Replay a flight
 
* '''Settings'''
** Language
*** (default (english) or locale or custom)
** Joystick/Keyboard/Mouse
** AI
*** Traffic density
*** Dogfighting bots
** Path settings
*** Choose another ''FG_ROOT'' (default or custom)
*** Choose another ''FG_HOME''
*** Choose another ''FG_DATA''...
*** Screenshots directory
*** Replays directory
** Network settings
*** Main switch to open/close the internet connexion
*** LAN or Internet connexion settings
*** IP address of the scenary server (terrasync)
*** IP address of the weather / METAR server
*** IP address of the aircrafts catalog server
*** IP address of the multiplayer server(s) (with username / login)
** Screen settings
*** Multi-screen
*** Option: Fullscreen
*** PHI (instructor screen)
**** Port number (ex: --httpd=8080)
**** Button to open the web broser "localhost:8080"
** Graphics
*** GPU Driver options (antialiasing, shaders,...)
*** Rendering method : ALS, Rembrandt...
*** Stereography...
** Audio
*** Sound device
*** Volume
*** Microphone
** Scenary
*** Mesh quality, Level of Details
*** Textures quality
*** AutoGen settings (buildings, cars, objects, trees,...)
*** Procedural cities settings
*** Bombable (animations, scenary damages...)
*** Wildfire
** Debug
*** Enable debug mode (debug menu, console, fps and stats display)
*** Path to the debug logs directory
 
* '''Help'''
** HTML Documentation
 
* '''Credits'''
** link to FG wiki
** link to FG website
** Build / version number
** Copyright
 
 
 
== Issues and limitations ==
Note that even in the optimistic case, there will be some limitations – e.g., multi-window setup will not work in Qt builds without further work<ref name="GUItech"/>.
 
* [http://forum.flightgear.org/viewtopic.php?f=22&t=26504#p246868 Airplane is in FG root, can't see in flightgear wizard]
* {{ticket|1772|bug}}


{{Appendix}}
{{Appendix}}