mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-13 15:45:42 +08:00
Utility method to get XPlane root directory
This commit is contained in:
@@ -91,6 +91,13 @@ namespace BlackMisc
|
|||||||
return getLastExistingPathFromFile(xplaneInstallFilePath);
|
return getLastExistingPathFromFile(xplaneInstallFilePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString CXPlaneUtil::xplaneRootDir()
|
||||||
|
{
|
||||||
|
if (!xplane10Dir().isEmpty()) { return xplane10Dir(); }
|
||||||
|
else if (!xplane9Dir().isEmpty()) { return xplane9Dir(); }
|
||||||
|
else { return {}; }
|
||||||
|
}
|
||||||
|
|
||||||
QString CXPlaneUtil::xbusLegacyDir()
|
QString CXPlaneUtil::xbusLegacyDir()
|
||||||
{
|
{
|
||||||
QString legacyPath("/Resources/plugins/xbus/LegacyData");
|
QString legacyPath("/Resources/plugins/xbus/LegacyData");
|
||||||
|
|||||||
@@ -36,6 +36,10 @@ namespace BlackMisc
|
|||||||
//! \todo Test on OSX
|
//! \todo Test on OSX
|
||||||
static QString xplane10Dir();
|
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
|
//! XBus legacy directory
|
||||||
static QString xbusLegacyDir();
|
static QString xbusLegacyDir();
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user