mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 21:56:43 +08:00
Utility method to get XPlane root directory
This commit is contained in:
@@ -91,6 +91,13 @@ namespace BlackMisc
|
||||
return getLastExistingPathFromFile(xplaneInstallFilePath);
|
||||
}
|
||||
|
||||
QString CXPlaneUtil::xplaneRootDir()
|
||||
{
|
||||
if (!xplane10Dir().isEmpty()) { return xplane10Dir(); }
|
||||
else if (!xplane9Dir().isEmpty()) { return xplane9Dir(); }
|
||||
else { return {}; }
|
||||
}
|
||||
|
||||
QString CXPlaneUtil::xbusLegacyDir()
|
||||
{
|
||||
QString legacyPath("/Resources/plugins/xbus/LegacyData");
|
||||
|
||||
@@ -36,6 +36,10 @@ namespace BlackMisc
|
||||
//! \todo Test on OSX
|
||||
static QString xplane10Dir();
|
||||
|
||||
//! XPlane root directory
|
||||
//! In case more then one XPlane version is found, the path to the highest version is used
|
||||
static QString xplaneRootDir();
|
||||
|
||||
//! XBus legacy directory
|
||||
static QString xbusLegacyDir();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user