FlightGear next
fg_init.cxx File Reference
#include <config.h>
#include <simgear/compiler.h>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include "cJSON.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/file.h>
#include <string>
#include <osgViewer/Viewer>
#include <simgear/canvas/Canvas.hxx>
#include <simgear/constants.h>
#include <simgear/debug/logstream.hxx>
#include <simgear/structure/commands.hxx>
#include <simgear/structure/exception.hxx>
#include <simgear/structure/event_mgr.hxx>
#include <simgear/structure/SGPerfMon.hxx>
#include <simgear/misc/sg_path.hxx>
#include <simgear/misc/sg_dir.hxx>
#include <simgear/io/iostreams/sgstream.hxx>
#include <simgear/misc/strutils.hxx>
#include <simgear/embedded_resources/EmbeddedResourceManager.hxx>
#include <simgear/props/props_io.hxx>
#include <simgear/scene/tsync/terrasync.hxx>
#include <simgear/timing/sg_time.hxx>
#include <simgear/scene/material/Effect.hxx>
#include <simgear/scene/material/matlib.hxx>
#include <simgear/scene/model/modellib.hxx>
#include <simgear/scene/model/particles.hxx>
#include <simgear/scene/tgdb/TreeBin.hxx>
#include <simgear/scene/tgdb/userdata.hxx>
#include <simgear/scene/tgdb/VPBTechnique.hxx>
#include <simgear/package/Root.hxx>
#include <simgear/package/Package.hxx>
#include <simgear/package/Install.hxx>
#include <simgear/package/Catalog.hxx>
#include <Add-ons/AddonManager.hxx>
#include <Aircraft/controls.hxx>
#include <Aircraft/replay.hxx>
#include <Aircraft/FlightHistory.hxx>
#include <Aircraft/initialstate.hxx>
#include <Airports/runways.hxx>
#include <Airports/airport.hxx>
#include <Airports/dynamics.hxx>
#include <Airports/airportdynamicsmanager.hxx>
#include <ATC/atc_mgr.hxx>
#include <Autopilot/route_mgr.hxx>
#include <Autopilot/autopilotgroup.hxx>
#include <Canvas/canvas_mgr.hxx>
#include <Canvas/gui_mgr.hxx>
#include <Canvas/FGCanvasSystemAdapter.hxx>
#include <GUI/new_gui.hxx>
#include <GUI/Highlight.hxx>
#include <GUI/MessageBox.hxx>
#include <Input/input.hxx>
#include <Instrumentation/instrument_mgr.hxx>
#include <Model/acmodel.hxx>
#include <Model/modelmgr.hxx>
#include <AIModel/submodel.hxx>
#include <AIModel/AIManager.hxx>
#include <AIModel/performancedb.hxx>
#include <Main/locale.hxx>
#include <Navaids/navdb.hxx>
#include <Navaids/navlist.hxx>
#include <Scenery/scenery.hxx>
#include <Scenery/SceneryPager.hxx>
#include <Scripting/NasalSys.hxx>
#include <Sound/voice.hxx>
#include <Sound/soundmanager.hxx>
#include <Systems/system_mgr.hxx>
#include <Time/tide.hxx>
#include <Time/light.hxx>
#include <Time/TimeManager.hxx>
#include <Traffic/TrafficMgr.hxx>
#include <MultiPlayer/multiplaymgr.hxx>
#include <Environment/environment_mgr.hxx>
#include <Environment/ephemeris.hxx>
#include <FDM/fdm_shell.hxx>
#include <Navaids/NavDataCache.hxx>
#include <Network/DNSClient.hxx>
#include <Network/HTTPClient.hxx>
#include <Network/fgcom.hxx>
#include <Network/http/httpd.hxx>
#include <Viewer/CameraGroup.hxx>
#include <Viewer/FGEventHandler.hxx>
#include <Viewer/GraphicsPresets.hxx>
#include <Viewer/renderer.hxx>
#include <Viewer/splash.hxx>
#include <Viewer/viewmgr.hxx>
#include "AircraftDirVisitorBase.hxx"
#include "FGInterpolator.hxx"
#include "fg_init.hxx"
#include "fg_io.hxx"
#include "fg_props.hxx"
#include "globals.hxx"
#include "logger.hxx"
#include "main.hxx"
#include "options.hxx"
#include "positioninit.hxx"
#include "util.hxx"
#include <Main/ErrorReporter.hxx>
#include <Main/sentryIntegration.hxx>

Go to the source code of this file.

Classes

class  FindAndCacheAircraft
 
struct  SimLogFileLine
 

Functions

string fgBasePackageVersion (const SGPath &base_path)
 
std::optional< FGBasePackageInfofgBasePackageInfo (const SGPath &path)
 Parse the base package info JSON.
 
static SGPath platformDefaultDataPath ()
 
SGPath fgHomePath ()
 
InitHomeResult fgInitHome ()
 
void fgShutdownHome ()
 
void fgDeleteLockFile ()
 
static void createBaseStorageDirForAddons (const SGPath &exportDir)
 
int fgInitConfig (int argc, char **argv, bool reinit)
 
static void initAircraftDirsNasalSecurity ()
 
void fgInitAircraftPaths (bool reinit)
 
int fgInitAircraft (bool reinit, bool didUseLauncher)
 
bool fgInitNav ()
 Initialize vor/ndb/ils/fix list management and query systems (as well as simple airport db list) This is called multiple times in the case of a cache rebuild, to allow lengthy caching to take place in the background, without blocking the main/UI thread.
 
bool fgInitGeneral ()
 
void fgOutputSettings ()
 
void fgCreateSubsystems (bool duringReset)
 
void fgPostInitSubsystems ()
 
void fgStartReposition ()
 
void fgStartNewReset ()
 
void fgInitPackageRoot ()
 
int fgUninstall ()
 

Function Documentation

◆ createBaseStorageDirForAddons()

static void createBaseStorageDirForAddons ( const SGPath & exportDir)
static

Definition at line 661 of file fg_init.cxx.

◆ fgBasePackageInfo()

std::optional< FGBasePackageInfo > fgBasePackageInfo ( const SGPath & path)

Parse the base package info JSON.

Parameters
path
Returns
std::optional<FGBasePackageInfo>

Definition at line 174 of file fg_init.cxx.

◆ fgBasePackageVersion()

string fgBasePackageVersion ( const SGPath & base_path)

Definition at line 156 of file fg_init.cxx.

◆ fgCreateSubsystems()

void fgCreateSubsystems ( bool duringReset)

Definition at line 997 of file fg_init.cxx.

◆ fgDeleteLockFile()

void fgDeleteLockFile ( )

Definition at line 651 of file fg_init.cxx.

◆ fgHomePath()

SGPath fgHomePath ( )

Definition at line 524 of file fg_init.cxx.

◆ fgInitAircraft()

int fgInitAircraft ( bool reinit,
bool didUseLauncher )
Parameters
reinit: is this a second(+) call of the function, i.e after reset
didUseLauncher: allow adjusting UI feedback if we used the launcher or not
Returns
int : an Options result to indicate if we should continue, quit, etc

Definition at line 803 of file fg_init.cxx.

◆ fgInitAircraftPaths()

void fgInitAircraftPaths ( bool reinit)

Definition at line 788 of file fg_init.cxx.

◆ fgInitConfig()

int fgInitConfig ( int argc,
char ** argv,
bool reinit )

Definition at line 688 of file fg_init.cxx.

◆ fgInitGeneral()

bool fgInitGeneral ( )

Definition at line 937 of file fg_init.cxx.

◆ fgInitHome()

InitHomeResult fgInitHome ( )

Definition at line 529 of file fg_init.cxx.

◆ fgInitNav()

bool fgInitNav ( )

Initialize vor/ndb/ils/fix list management and query systems (as well as simple airport db list) This is called multiple times in the case of a cache rebuild, to allow lengthy caching to take place in the background, without blocking the main/UI thread.

Definition at line 892 of file fg_init.cxx.

◆ fgInitPackageRoot()

void fgInitPackageRoot ( )

Definition at line 1496 of file fg_init.cxx.

◆ fgOutputSettings()

void fgOutputSettings ( )

Definition at line 972 of file fg_init.cxx.

◆ fgPostInitSubsystems()

void fgPostInitSubsystems ( )

Definition at line 1171 of file fg_init.cxx.

◆ fgShutdownHome()

void fgShutdownHome ( )

Definition at line 637 of file fg_init.cxx.

◆ fgStartNewReset()

void fgStartNewReset ( )

Definition at line 1283 of file fg_init.cxx.

◆ fgStartReposition()

void fgStartReposition ( )

Definition at line 1204 of file fg_init.cxx.

◆ fgUninstall()

int fgUninstall ( )

Definition at line 1513 of file fg_init.cxx.

◆ initAircraftDirsNasalSecurity()

static void initAircraftDirsNasalSecurity ( )
static

Definition at line 770 of file fg_init.cxx.

◆ platformDefaultDataPath()

static SGPath platformDefaultDataPath ( )
static

Definition at line 514 of file fg_init.cxx.