20,741
edits
| Line 40: | Line 40: | ||
Knowing that [[PUI]] contains legacy OpenGL code and knowing it's scheduled to be removed anyway because it isn't compatible with modern OpenGL, we will disable it completely without | Knowing that [[PUI]] contains legacy OpenGL code and knowing it's scheduled to be removed anyway because it isn't compatible with modern OpenGL, we will disable it completely without | ||
reviewing/porting individual PUI files. This means opening $FG_SRC/CMakeLists.txt to add a new option to disable PUI: | reviewing/porting individual PUI files. This means opening $FG_SRC/CMakeLists.txt to add a new option to disable PUI. | ||
https://sourceforge.net/p/flightgear/flightgear/ci/next/tree/CMakeLists.txt | |||
<syntaxhighlight lang="cmake"> | <syntaxhighlight lang="cmake"> | ||
option(SYSTEM_CPPUNIT "Set to ON to build Flightgear with the system's CppUnit library") | |||
option(DISABLE_PUI "Set to ON to build Flightgear without PUI support") | |||
</syntaxhighlight> | </syntaxhighlight> | ||
| Line 47: | Line 51: | ||
Ideally, in conjunction with a feature-specific build option to disable the corresponding feature (think [[PUI]] or the [[HUD]]). | Ideally, in conjunction with a feature-specific build option to disable the corresponding feature (think [[PUI]] or the [[HUD]]). | ||
Thus, after editing CMakeLists.txt, we need to open fg_init.cxx to prevent initalization of PUI: | |||
https://sourceforge.net/p/flightgear/flightgear/ci/next/tree/src/Main/fg_init.cxx#l1043 | |||
<syntaxhighlight lang="cpp"> | |||
//////////////////////////////////////////////////////////////////// | |||
// Create and register the XML GUI. | |||
//////////////////////////////////////////////////////////////////// | |||
#if 0 | |||
globals->add_subsystem("gui", new NewGUI, SGSubsystemMgr::INIT); | |||
#endif | |||
</syntaxhighlight> | |||
So, after editing fg_init.cxx to prevent the PUI GUI from getting initialized by FlightGear, we will need to find remaining hard-coded references to it, to fix those up and deal with PUI not being available. | So, after editing fg_init.cxx to prevent the PUI GUI from getting initialized by FlightGear, we will need to find remaining hard-coded references to it, to fix those up and deal with PUI not being available. | ||