mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-08-10 11:36:08 +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
@@ -42,6 +42,7 @@ include(vatsim.pri)
|
||||
!contains(BLACK_CONFIG, XPlane) { DEFINE_WITH_XPLANE = "//" }
|
||||
!contains(BLACK_CONFIG, SwiftBeta) { DEFINE_SWIFT_BETA = "//" }
|
||||
!contains(BLACK_CONFIG, SwiftShipped) { DEFINE_SWIFT_SHIPPED = "//" }
|
||||
!contains(BLACK_CONFIG, SwiftVatsimSupport) { DEFINE_SWIFT_VATSIM_SUPPORT = "//" }
|
||||
|
||||
# Global compiler Macros
|
||||
contains(BLACK_CONFIG, Static) { DEFINES *= WITH_STATIC }
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
# This is in a separate file to allow easy patching.
|
||||
|
||||
# VATSIM client id as assigned by VATSIM Network team. The one below is a test key.
|
||||
# It is working only with VATGER test server.
|
||||
VATSIM_CLIENT_ID = "0xb9ba"
|
||||
|
||||
# VATSIM private key, which belongs to the id above.
|
||||
VATSIM_CLIENT_PRIVATE_KEY = "727d1efd5cb9f8d2c28372469d922bb4"
|
||||
|
||||
# Uncomment the section below to build a version with VATSIM features enabled
|
||||
#BLACK_CONFIG *= SwiftVatsimSupport
|
||||
|
||||
@@ -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