#include <simgear/misc/commands.hxx>
+#include <simgear/misc/sg_path.hxx>
#include <Environment/environment_mgr.hxx>
}
+// set the fg_root path
+void FGGlobals::set_fg_root (const string &root) {
+ fg_root = root;
+
+ // append /data to root if it exists
+ SGPath tmp( fg_root );
+ tmp.append( "data" );
+ tmp.append( "version" );
+ if ( ulFileExists( tmp.c_str() ) ) {
+ fg_root += "/data";
+ }
+}
+
+
FGSubsystemMgr *
FGGlobals::get_subsystem_mgr () const
{
inline void set_sim_time_sec (double t) { sim_time_sec = t; }
inline const string &get_fg_root () const { return fg_root; }
- inline void set_fg_root (const string &root) { fg_root = root; }
+ void set_fg_root (const string &root);
inline const string &get_fg_scenery () const { return fg_scenery; }
inline void set_fg_scenery (const string &scenery) {