FlightGear Qt launcher: Difference between revisions

Jump to navigation Jump to search
m
trying to clean up / restructure the article
No edit summary
m (trying to clean up / restructure the article)
Line 13: Line 13:


== Announcement ==
== Announcement ==
James Turner is currently (03/2015) prototyping (at the suggestion/encouragement of Curt, Torsten D & others) a GUI integration for FlightGear based on Qt 5. This would overlap some areas other folks are working on, so we felt it best to make an announcement to avoid anyone expending their time on areas that might be affected<ref name="a">http://sourceforge.net/p/flightgear/mailman/message/33245028/</ref>.
There is currently (03/2015) heavy activity towards a new UI. There will be the HTML5 based version (called [[Phi]]), TorstenD is currently working on and an internal implementation based on well supported libraries using Qt5 (which James Turner is working).  


The parallel development of HTML and Qt based UI happens by intention and is not the result of missing coordination<ref>http://forum.flightgear.org/viewtopic.php?p=229445#p229445</ref>. Most likely, both will use a common service layer to provide necessary data<ref>http://forum.flightgear.org/viewtopic.php?p=229303#p229303</ref>.
James Turner is currently prototyping (at the suggestion/encouragement of Curt, Torsten D & others) a GUI integration for FlightGear based on Qt 5. This would overlap some areas other folks are working on, so we felt it best to make an announcement to avoid anyone expending their time on areas that might be affected<ref name="a">http://sourceforge.net/p/flightgear/mailman/message/33245028/</ref>.
All of this would be a QtQuick 2 GUI, not a Qt widgets GUI. If you don’t know what that terminology means, don’t worry about it, the quick answer is it works the same ways as Canvas does at present (rendering to OpenGL).
== Initial Prototype ==
This will be an in-app launcher for Mac initially, based on Qt5. Primarily, because the old Mac launcher doesn’t work on Yosemite, so we are adding a tiny Qt-based launcher inside the main process (no need to fork / exec) which runs before the OSG window is created, this will be merged for 3.4, hopefully with no impact on other platforms.<ref>https://gitorious.org/fg/flightgear/commit/78e8f533124ad38c414d10470abcd2149b6d01e8#src/Main/main.cxx</ref>.
This will be an in-app launcher for Mac initially, based on Qt5. Primarily, because the old Mac launcher doesn’t work on Yosemite, so we are adding a tiny Qt-based launcher inside the main process (no need to fork / exec) which runs before the OSG window is created, this will be merged for 3.4, hopefully with no impact on other platforms.<ref>https://gitorious.org/fg/flightgear/commit/78e8f533124ad38c414d10470abcd2149b6d01e8#src/Main/main.cxx</ref>.


All of this would be a QtQuick 2 GUI, not a Qt widgets GUI. If you don’t know what that terminology means, don’t worry about it, the quick answer is it works the same ways as Canvas does at present (rendering to OpenGL).
The Qt5 stuff is currently only enabled for the Mac/OSX platforms because the corresponding launcher there had to be discontinued (well its dependencies got phased out by Apple) - and shouldn't be used anywhere else (yet)<ref>http://forum.flightgear.org/viewtopic.php?p=234090#p234090</ref>.


The replacement launcher is very young, so we apologise for any functionality gaps. In general it emphasises setting only the things that cannot be changed at runtime, and some common general settings (real weather, time of day, location). That’s why anti-aliasing and Rembrant are exposed but not multi-player settings, since the in-sim UI works perfectly for those features. The same is true for scenarios and AI traffic. <ref>http://sourceforge.net/p/flightgear/mailman/message/33464757/</ref>
The replacement launcher is very young, so we apologise for any functionality gaps. In general it emphasises setting only the things that cannot be changed at runtime, and some common general settings (real weather, time of day, location). That’s why anti-aliasing and Rembrant are exposed but not multi-player settings, since the in-sim UI works perfectly for those features. The same is true for scenarios and AI traffic. <ref>http://sourceforge.net/p/flightgear/mailman/message/33464757/</ref>
For now, the goal is to make an '''optional''' Qt dependency to replace PLIB PUI. 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).


Expect to see a test branch in Git in the next month or so, and hopefully something usable for 3.6. Note that even in this (slightly optimistic) case, there will be some limitations – e.g., multi-window setup will not work in Qt builds without further work. The PLIB code will remain so hopefully it can be a gradual transition<ref name="a">http://sourceforge.net/p/flightgear/mailman/message/33245028/</ref>.
Expect to see a test branch in Git in the next month or so, and hopefully something usable for 3.6. Note that even in this (slightly optimistic) case, there will be some limitations – e.g., multi-window setup will not work in Qt builds without further work. The PLIB code will remain so hopefully it can be a gradual transition<ref name="a">http://sourceforge.net/p/flightgear/mailman/message/33245028/</ref>.


Some code James has written in the 2014 will be obsolete, e.g. the native message box and menubar code. 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="a">http://sourceforge.net/p/flightgear/mailman/message/33245028/</ref>.
Some code James has written in the 2014 will be obsolete, e.g. the native message box and menubar code.  


== Background ==
== Dependencies ==
There is currently heavy activity towards a new UI. There will be the HTML5 based version, TorstenD is currently working on and an internal implementation based on well supported libraries using Qt5 (which James Turner is working). The parallel development of HTML and Qt based UI happens by intention and is not the result of missing coordination<ref>http://forum.flightgear.org/viewtopic.php?p=229445#p229445</ref>. Most likely, both will use a common service layer to provide necessary data<ref>http://forum.flightgear.org/viewtopic.php?p=229303#p229303</ref>.
For the time being, Qt is only needed for the launcher feature, which is automatically disabled if it is not found<ref>http://sourceforge.net/p/flightgear/mailman/message/33498614/</ref>.
If CMake does not find QT5 then it skips the QT launcher compilation<ref>http://sourceforge.net/p/flightgear/mailman/message/33498869/</ref>.
 
For now, the goal is to make an '''optional''' Qt dependency to replace PLIB PUI. 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).


The Qt5 stuff is currently only enabled for the Mac/OSX platforms because the corresponding launcher there had to be discontinued (well its dependencies got phased out by Apple) - and shouldn't be used anywhere else (yet)<ref>http://forum.flightgear.org/viewtopic.php?p=234090#p234090</ref>.


For the time being, Qt is only needed for the launcher feature, which is automatically disabled if it is not found<ref>http://sourceforge.net/p/flightgear/mailman/message/33498614/</ref>.
== Canvas ==
If CMake does not find QT5 then it skips the QT launcher compilation<ref>http://sourceforge.net/p/flightgear/mailman/message/33498869/</ref>.
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="a">http://sourceforge.net/p/flightgear/mailman/message/33245028/</ref>.


== PUI (legacy GUI) ==
Related to Qt, up to now - only a simple replacement for the Mac Launcher has been introduced. This is not related to the internal user interface of FlightGear, at least for now. 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<ref>http://forum.flightgear.org/viewtopic.php?p=229563#p229563</ref>
Related to Qt, up to now - only a simple replacement for the Mac Launcher has been introduced. This is not related to the internal user interface of FlightGear, at least for now. 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<ref>http://forum.flightgear.org/viewtopic.php?p=229563#p229563</ref>


== FGRun ==
The upcoming FlightGear 3.6 release is likely to contain an integrated, hard-coded, launcher based on Qt5 to work around the issue of the mac launcher no longer working on Yosemite<ref>http://forum.flightgear.org/viewtopic.php?p=228961#p228961</ref>, because James Turner is prototyping a Qt5 cross-platform GUI <ref>http://forum.flightgear.org/viewtopic.php?p=232593#p232593</ref>.
Once we have a built-in Qt launcher that's shipped by default on Mac it will probably be used on other OS in the coming release. FGRun will be gone by then, FGRun will be gone with the next release of FlightGear, in favour of a built-in launcher.<ref>http://code.google.com/p/flightgear-bugs/issues/detail?id=1591#c2</ref>.
== Testing ==
The launcher is not run by default, this is because it was created as a Mac only solution. We need to have the discussion if it should become the default launcher for Windows (Linux and other Unixes are less relevant, it’s up to the distribution packagers).
The launcher is not run by default, this is because it was created as a Mac only solution. We need to have the discussion if it should become the default launcher for Windows (Linux and other Unixes are less relevant, it’s up to the distribution packagers).


Line 44: Line 58:


Note the launcher on '''next''' will be in flux shortly as James will add some new features - support for the aircraft package manager especially, and for specifying some directory locations to support "code only" nightly builds which use an existing FGData download<ref>http://sourceforge.net/p/flightgear/mailman/message/33503142/</ref>.
Note the launcher on '''next''' will be in flux shortly as James will add some new features - support for the aircraft package manager especially, and for specifying some directory locations to support "code only" nightly builds which use an existing FGData download<ref>http://sourceforge.net/p/flightgear/mailman/message/33503142/</ref>.
However, the upcoming FlightGear 3.6 release is likely to contain an integrated, hard-coded, launcher based on Qt5 to work around this issue (of the mac launcher no longer working)<ref>http://forum.flightgear.org/viewtopic.php?p=228961#p228961</ref>, because James Turner is prototyping a Qt5 cross-platform GUI <ref>http://forum.flightgear.org/viewtopic.php?p=232593#p232593</ref>.
Once we have a built-in Qt launcher that's shipped by default on Mac it will probably be used on other OS in the coming release. FGRun will be gone by then, FGRun will be gone with the next release of FlightGear, in favour of a built-in launcher.<ref>http://code.google.com/p/flightgear-bugs/issues/detail?id=1591#c2</ref>.


== See also ==
== See also ==

Navigation menu