mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 17:35:34 +08:00
Ref T210, removed branch flags
Our distribution concept allows dynamic assigments of the distribution. So a particular version can change its stability.
This commit is contained in:
@@ -120,22 +120,30 @@ namespace BlackConfig
|
||||
#endif
|
||||
}
|
||||
|
||||
bool CBuildConfig::isLifetimeExpired()
|
||||
namespace Private
|
||||
{
|
||||
if (getEol().isValid())
|
||||
bool isLocalDeveloperBuildImpl()
|
||||
{
|
||||
return QDateTime::currentDateTime() > getEol();
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
const QString p = QCoreApplication::applicationDirPath().toLower();
|
||||
|
||||
// guessing, feel free to add path checks
|
||||
if (p.contains("build")) { return true; }
|
||||
if (p.contains("msvc")) { return true; }
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool CBuildConfig::canRunInDeveloperEnvironment()
|
||||
bool CBuildConfig::isLocalDeveloperDebugBuild()
|
||||
{
|
||||
if (CBuildConfig::isDevBranch()) { return true; }
|
||||
return !CBuildConfig::isStableBranch();
|
||||
if (!CBuildConfig::isDebugBuild()) { return false; }
|
||||
static const bool devBuild = Private::isLocalDeveloperBuildImpl();
|
||||
return devBuild;
|
||||
}
|
||||
|
||||
bool CBuildConfig::isLifetimeExpired()
|
||||
{
|
||||
if (!getEol().isValid()) { return true; }
|
||||
return QDateTime::currentDateTime() > getEol();
|
||||
}
|
||||
|
||||
QString boolToYesNo(bool v)
|
||||
@@ -263,18 +271,21 @@ namespace BlackConfig
|
||||
return parts;
|
||||
}
|
||||
|
||||
int buildWordSizeImpl()
|
||||
namespace Private
|
||||
{
|
||||
if (CBuildConfig::getBuildAbiParts().length() < 3) { return -1; }
|
||||
const QString abiWs = CBuildConfig::getBuildAbiParts()[2];
|
||||
if (abiWs.contains("32")) { return 32; }
|
||||
if (abiWs.contains("64")) { return 64; }
|
||||
return -1;
|
||||
int buildWordSizeImpl()
|
||||
{
|
||||
if (CBuildConfig::getBuildAbiParts().length() < 3) { return -1; }
|
||||
const QString abiWs = CBuildConfig::getBuildAbiParts()[2];
|
||||
if (abiWs.contains("32")) { return 32; }
|
||||
if (abiWs.contains("64")) { return 64; }
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
int CBuildConfig::buildWordSize()
|
||||
{
|
||||
static const int bws = buildWordSizeImpl();
|
||||
static const int bws = Private::buildWordSizeImpl();
|
||||
return bws;
|
||||
}
|
||||
} // ns
|
||||
|
||||
@@ -62,14 +62,8 @@ namespace BlackConfig
|
||||
//! Release build?
|
||||
static bool isReleaseBuild();
|
||||
|
||||
//! DEV. branch?
|
||||
static bool isDevBranch(); // defined in buildconfig_gen.cpp.in
|
||||
|
||||
//! STABLE branch?
|
||||
static bool isStableBranch(); // defined in buildconfig_gen.cpp.in
|
||||
|
||||
//! Can run in dev. environment?
|
||||
static bool canRunInDeveloperEnvironment();
|
||||
//! Local build for developers
|
||||
static bool isLocalDeveloperDebugBuild();
|
||||
|
||||
//! Vatsim enabled version?
|
||||
static bool isVatsimVersion(); // defined in buildconfig_gen.cpp.in
|
||||
|
||||
@@ -23,8 +23,6 @@ $$DEFINE_WITH_P3D#define WITH_P3D
|
||||
$$DEFINE_WITH_FS9#define WITH_FS9
|
||||
$$DEFINE_WITH_FSUIPC#define WITH_FSUIPC
|
||||
$$DEFINE_WITH_XPLANE#define WITH_XPLANE
|
||||
$$DEFINE_SWIFT_DEV_BRANCH#define SWIFT_DEV_BRANCH
|
||||
$$DEFINE_SWIFT_STABLE_BRANCH#define SWIFT_STABLE_BRANCH
|
||||
$$DEFINE_SWIFT_VATSIM_SUPPORT#define SWIFT_VATSIM_SUPPORT
|
||||
|
||||
bool BlackConfig::CBuildConfig::isCompiledWithBlackCore()
|
||||
@@ -108,24 +106,6 @@ bool BlackConfig::CBuildConfig::isCompiledWithGui()
|
||||
#endif
|
||||
}
|
||||
|
||||
bool BlackConfig::CBuildConfig::isDevBranch()
|
||||
{
|
||||
#ifdef SWIFT_DEV_BRANCH
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool BlackConfig::CBuildConfig::isStableBranch()
|
||||
{
|
||||
#ifdef SWIFT_STABLE_BRANCH
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool BlackConfig::CBuildConfig::isVatsimVersion()
|
||||
{
|
||||
#ifdef SWIFT_VATSIM_SUPPORT
|
||||
|
||||
Reference in New Issue
Block a user