mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 09:15:34 +08:00
Ref T135, moved TDistributionSetting to BlackCore::Application::TDistribution
* own file * can use loaded distribution info in sApp
This commit is contained in:
committed by
Mathew Sutcliffe
parent
97f687077c
commit
f07bdc204a
@@ -131,32 +131,6 @@ namespace BlackMisc
|
||||
BLACK_METAMEMBER(platformVersions, 0, DisabledForComparison | DisabledForHashing)
|
||||
);
|
||||
};
|
||||
//! Distribution settings: channel/platform
|
||||
struct TDistributionSetting : public BlackMisc::TSettingTrait<QStringList>
|
||||
{
|
||||
//! \copydoc BlackMisc::TSettingTrait::key
|
||||
static const char *key() { return "distribution"; }
|
||||
|
||||
//! \copydoc BlackMisc::TSettingTrait::defaultValue
|
||||
static const QStringList &defaultValue()
|
||||
{
|
||||
// guessing / preseting some default values
|
||||
static const QStringList d{"ALPHA", platformString()};
|
||||
return d;
|
||||
}
|
||||
|
||||
//! Guessed platform string
|
||||
//! \todo this hardcoded stuff here is useful right now, but needs to go
|
||||
static QString platformString()
|
||||
{
|
||||
QString p;
|
||||
if (BlackConfig::CBuildConfig::isRunningOnWindowsNtPlatform()) { p = "win-64"; }
|
||||
else if (BlackConfig::CBuildConfig::isRunningOnMacOSXPlatform()) { p = "macos-64"; }
|
||||
else if (BlackConfig::CBuildConfig::isRunningOnLinuxPlatform()) { p = "linux-64"; }
|
||||
if (!p.isEmpty() && BlackConfig::CBuildConfig::isVatsimVersion()) { p += "-vatsim"; }
|
||||
return p;
|
||||
}
|
||||
};
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
|
||||
Reference in New Issue
Block a user