# include <Include/no_version.h>
#endif
-#ifdef __APPLE__
-# include <CoreFoundation/CoreFoundation.h>
-#endif
-
using std::string;
using std::sort;
using std::cout;
SG_LOG(SG_INPUT, SG_INFO, "No user specified aircraft, using default" );
}
+// persist across reset
+ SGPropertyNode* aircraftProp = fgGetNode("/sim/aircraft", true);
+ aircraftProp->setAttribute(SGPropertyNode::PRESERVE, true);
+
if (p->showAircraft) {
fgOptLogLevel( "alert" );
SGPath path( globals->get_fg_root() );
return "../data";
}
-#elif defined(_WIN32)
+#elif defined(SG_WINDOWS)
string Options::platformDefaultRoot() const
{
return "..\\data";
}
-#elif defined(__APPLE__)
-string Options::platformDefaultRoot() const
-{
- /*
- The following code looks for the base package inside the application
- bundle, in the standard Contents/Resources location.
- */
- CFURLRef resourcesUrl = CFBundleCopyResourcesDirectoryURL(CFBundleGetMainBundle());
-
- // look for a 'data' subdir
- CFURLRef dataDir = CFURLCreateCopyAppendingPathComponent(NULL, resourcesUrl, CFSTR("data"), true);
-
- CFURLRef absoluteDataUrl = CFURLCopyAbsoluteURL(dataDir);
-
- // now convert down to a path, and the a c-string
- CFStringRef path = CFURLCopyFileSystemPath(absoluteDataUrl, kCFURLPOSIXPathStyle);
- string root = CFStringGetCStringPtr(path, CFStringGetSystemEncoding());
-
- CFRelease(absoluteDataUrl);
- CFRelease(resourcesUrl);
- CFRelease(dataDir);
- CFRelease(path);
-
- return root;
-}
+#elif defined(SG_MAC)
+// platformDefaultRoot defined in CocoaHelpers.mm
#else
string Options::platformDefaultRoot() const
{