FlightGear Qt launcher
The aircraft page of the Qt launcher for FlightGear 2018.2 as rendered on Windows 10 | |
Started in | 01/2015 |
---|---|
Description | Integrated launcher for FlightGear |
Maintainer(s) | James Turner |
Contributor(s) | James Turner |
Status | Under active development |
Folders | flightgear/flightgear/next/src/GUI |
Changelog | flightgear/flightgear/next/src/GUI log view |
Package management |
---|
Background |
Implementation |
Front Ends
|
Related efforts |
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 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 fgfs with the option
--launcher
:$ fgfs --launcher
Note that the launcher is an optional feature for the reasons explained below in the 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.
Enabling console display on Windows systems
To enable console display in Windows along with Launcher startup, right-click on the FlightGear shortcut on the Desktop and click Properties. In the Target box under the Shortcut tab, add --console
at the end and click OK.
If you don't need the console when Launcher is running but only when the simulator is running, then in the Launcher go to the Settings page, expand the General section by clicking on the Show more link and check Show debugging console.
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.[1]
Preferences
In FlightGear 2016.2 and later, the preferences are stored in $FG_HOME/FlightGear/FlightGear.ini on Unix-like systems and for Windows in %UserProfile%/AppData/Roaming/flightgear.org/FlightGear/FlightGear.ini.[1] 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 defaults values by selecting the menu in Launcher with the three dots in the upper left corner and then the Restore defaults settings... item. In older versions, this was done by holding down the Alt key while starting the launcher.[2]
History and status
In October 2014, Apple released OS X 10.10 Yosemite. Unfortunately, one of the frameworks the old FlightGear Mac launcher relied upon, called 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.[3]
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.[4]
As of version 2016.4, FGRun has been removed from the official distributions.
Background
This article may require cleanup to meet the quality standards of the wiki. Please improve this article if you can. |
In addition, this was also motivated by the plethora of 3rd party GUI launchers/frontends developed by numerous contributors over the years [5].
As for why the change, because the old one was Windows-only - the Qt5 thing works for Mac and Linux as well and allows to do things OS-independently, which is really conceptually superior as we don't need to deal with dedicated Win, Mac and Linux issues.[6]
James Turner (primarily) is working on developing a built-in launcher which is intended to completely replace fgrun. This new launcher is pretty mature, runs nicely on every supported OS, and is already available in the current release. Fred B. (who was the primary developer for fgrun hasn't been involved with FlightGear for quite some time, and fgrun is built on a pretty old gui library called "fltk". Any changes that have been made to fgrun in the past couple years have been band-aids by people just trying to keep it limping along with modern os updates, newer compilers, newer osg libraries, etc. There will come a time (probably fairly soon) where we will stop supporting, compiling and distributing fgrun with FlightGear. (Fgrun of course will always exist and anyone can compile it and use it and maintain it if they wish, it just will stop being distributed with the core FlightGear package in favor of the newer launcher.)[7]
The longer term goals include (1) improving the process for aircraft authors' work to be included in the default distribution, and b) make it easier for groups like FGUK to integrate their own hangars into the Qt launcher aircraft management tools. For developers who wish to opt-in, being part of the default distribution would offer far wider exposure of your work. From an end user perspective, this will provide an easy/integrated point and click way to install (and update) the aircraft they are interested in. An aircraft author (or 3rd party hangar maintainer) can publish an 'addon' url that is copy/pasted into the add on page of the Qt launcher and all the new aircraft show up immediately. James has done some really nice work on the Qt side to pull all this together for the end-users. This will be another step forward in the larger process we laid out a while back. [8]
The ultimate goal is to make it easy for hangar maintainers to distribute and integrate their work with the 'new' flightgear launcher (which has now been around long enough that it's hard to call new.) James's aircraft catalog system makes aircraft searching, selecting, and updating really easy and seamless for the end users. Aircraft [hangar] maintainers simply publish their catalog.xml (which is generated by the script.) A side effect is this system moves us away from dependency on fgaddon (or other even more massive repositories) and promotes smaller and more focused 3rd party repositories and a higher degree of decentraliation and scalability.[9]
See QtQuick use in FlightGear for the main article about this subject. |
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.[10] This will result in the following user interface:
- Qt launcher
- Internal UI based possibly with Qt/Canvas integration
- External browser-based UI (Phi)
However, it should be made clear that Qt will always remain an optional dependency.[11]
As of 05/2017, James is still very much undecided about which technology to use for in-sim GUI, he is somewhat inclined towards using the Canvas, because it avoids some rendering issues (but exposes a few more, + some performance ones) but the problem is James is fairly unhappy with the GUI / widget API in the Canvas right now - it does not satisfy his ideas about how simple + robust such an API should be, James needs to evaluate if the current API can be improved or needs to be drastically changed. The other issue is to use QtQuick rendered into OpenGL, which has a very nice robust and well-designed API, but adds some dependencies and complicates the rendering architecture, which makes him nervous about multi-window setups and other more esoteric OSG configs.[12]
Dependencies
There is 100% agreement that FlightGear will never require Qt[13], the intention is we’re adding integrated convenience features but the command line / shell environment won’t change and the default mode of ‘fgfs’ even in a Qt-enabled build is unchanged. You need set an env var or pass an argument to get the launcher, even if the feature was selected at compile time. We have the advantage that the Windows and Mac pre-built builds, it’s easy to ensure Qt is available, and those users are less likely to want complex command-line control than Linux users.[14]
And even if Qt is selected at compile time, it will still be possible to disable it at run time. That’s important because /initially/ it’s likely that some window-setup features won’t work when using Qt. Especially the multi-window options for handling different projectors side-by-side. [15] When the launcher was introduced, there were significant divergences of opinion regarding whether it was appropriate to require the dependency on Qt; the core developers concluded that it was undesirable, unless it had a specific benefit.[16] Since, for the time being, Qt is only needed for the launcher, it has been made an optional dependency, and people can continue using other frontends should they wish so.
If CMake is not able to find Qt 5.1 (the minimum required version) or later, the launcher is not compiled,[17][18] and the following message will be printed:
-- Qt launcher enabled, checking for Qt 5.1 / qmake
CMake Warning at CMakeLists.txt:303 (find_package):
By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Qt5", but
CMake did not find one.
Could not find a package configuration file provided by "Qt5" (requested
version 5.1) with any of the following names:
Qt5Config.cmake
qt5-config.cmake
Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR"
to a directory containing one of the above files. If "Qt5" provides a
separate development package or SDK, be sure it has been installed.
If CMake outputs the following warning you need to install qtdeclarative5-dev
Target "fgqmlui" links to target "Qt5::Quick" but the target was not found.
As of May 2015, the Qt launcher is the default on Microsoft Windows and OS X: in the case of Linux, it's up to the distribution packagers whether to include it or not.
If, how and when the internal GUI can leverage Qt is under investigation and in such an early state that those responsible preferred to not announce anything yet. If this ever happens, this will be discussed on the mailing list.[19]
Community video walkthroughs
Aircraft tab: Installing, filtering by ratings