mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 01:05:34 +08:00
Add isVatsimVersion to build configuration
This build configuration enables Vatsim specific features. refs #860
This commit is contained in:
committed by
Mathew Sutcliffe
parent
2616f94f2d
commit
f5058574d0
@@ -69,6 +69,9 @@ namespace BlackConfig
|
||||
//! Shipped version?
|
||||
static bool isShippedVersion();
|
||||
|
||||
//! Vatsim enabled version?
|
||||
static bool isVatsimVersion();
|
||||
|
||||
//! Running on Windows NT platform?
|
||||
static bool isRunningOnWindowsNtPlatform();
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ $$DEFINE_WITH_FS9#define WITH_FS9
|
||||
$$DEFINE_WITH_XPLANE#define WITH_XPLANE
|
||||
$$DEFINE_SWIFT_BETA#define SWIFT_BETA
|
||||
$$DEFINE_SWIFT_SHIPPED#define SWIFT_SHIPPED
|
||||
$$DEFINE_SWIFT_VATSIM_SUPPORT#define SWIFT_VATSIM_SUPPORT
|
||||
|
||||
bool BlackConfig::CBuildConfig::isCompiledWithBlackCore()
|
||||
{
|
||||
@@ -105,6 +106,15 @@ bool BlackConfig::CBuildConfig::isShippedVersion()
|
||||
#endif
|
||||
}
|
||||
|
||||
bool BlackConfig::CBuildConfig::isVatsimVersion()
|
||||
{
|
||||
#ifdef SWIFT_VATSIM_SUPPORT
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
const QDateTime &BlackConfig::CBuildConfig::getEol()
|
||||
{
|
||||
static const QString eol(\"$$BLACK_EOL\");
|
||||
|
||||
@@ -117,7 +117,8 @@ namespace BlackCore
|
||||
clientKey = CBuildConfig::vatsimPrivateKey();
|
||||
}
|
||||
|
||||
m_net.reset(Vat_CreateNetworkSession(vatServerLegacyFsd, sApp->swiftVersionChar(),
|
||||
VatServerType serverType = CBuildConfig::isVatsimVersion() ? vatServerVatsim : vatServerLegacyFsd;
|
||||
m_net.reset(Vat_CreateNetworkSession(serverType, sApp->swiftVersionChar(),
|
||||
CVersion::versionMajor(), CVersion::versionMinor(),
|
||||
"None", clientId, clientKey.toLocal8Bit().constData(),
|
||||
clientCapabilities));
|
||||
|
||||
Reference in New Issue
Block a user