1 // 2 // fg_init.hxx -- Flight Gear top level initialization routines 3 // 4 // Written by Curtis Olson, started August 1997. 5 // 6 // Copyright (C) 1997 Curtis L. Olson - http://www.flightgear.org/~curt 7 // 8 // This program is free software; you can redistribute it and/or 9 // modify it under the terms of the GNU General Public License as 10 // published by the Free Software Foundation; either version 2 of the 11 // License, or (at your option) any later version. 12 // 13 // This program is distributed in the hope that it will be useful, but 14 // WITHOUT ANY WARRANTY; without even the implied warranty of 15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 // General Public License for more details. 17 // 18 // You should have received a copy of the GNU General Public License 19 // along with this program; if not, write to the Free Software 20 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 // 22 // $Id$ 23 24 25 #ifndef _FG_INIT_HXX 26 #define _FG_INIT_HXX 27 28 #include <string> 29 #include <simgear/misc/sg_path.hxx> 30 31 // forward decls 32 class SGPropertyNode; 33 class SGPath; 34 35 // Return the current base package version 36 std::string fgBasePackageVersion(const SGPath& path); 37 38 SGPath fgHomePath(); 39 40 enum InitHomeResult 41 { 42 InitHomeOkay, 43 InitHomeReadOnly, 44 InitHomeExplicitReadOnly, 45 InitHomeAbort 46 }; 47 48 InitHomeResult fgInitHome(); 49 void fgShutdownHome(); 50 void fgDeleteLockFile(); 51 52 // Read in configuration (file and command line) 53 int fgInitConfig ( int argc, char **argv, bool reinit ); 54 55 void fgInitAircraftPaths(bool reinit); 56 57 int fgInitAircraft(bool reinit); 58 59 // log various settings / configuration state 60 void fgOutputSettings(); 61 62 // Initialize the localization 63 SGPropertyNode *fgInitLocale(const char *language); 64 65 // Init navaids and waypoints 66 bool fgInitNav (); 67 68 69 // General house keeping initializations 70 bool fgInitGeneral (); 71 72 73 // Create all the subsystems needed by the sim 74 void fgCreateSubsystems(bool duringReset); 75 76 // called after the subsystems have been bound and initialised, 77 // to peform final init 78 void fgPostInitSubsystems(); 79 80 // Re-position: when only location is changing, we can do considerably 81 // less work than a full re-init. 82 void fgStartReposition(); 83 84 void fgStartNewReset(); 85 86 // setup the package system including the global root 87 void fgInitPackageRoot(); 88 89 // wipe FG_HOME. (The removing of the program data is assumed to be done 90 // by the real installer). 91 int fgUninstall(); 92 93 #endif // _FG_INIT_HXX 94 95 96 97