Files
pilotclient/src/blackconfig/buildconfig_gen.cpp.in
Klaus Basan 0390ed83f8 Ref T210, removed branch flags
Our distribution concept allows dynamic assigments of the distribution.
So a particular version can change its stability.
2017-12-21 19:49:41 +01:00

163 lines
3.6 KiB
C++

/* Copyright (C) 2016
* swift project Community / Contributors
*
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
* including this file, may be copied, modified, propagated, or distributed except according to the terms
* contained in the LICENSE file.
*/
#include \"blackconfig/buildconfig.h\"
#include <QString>
#include <QDateTime>
$$DEFINE_WITH_BLACKCORE#define WITH_BLACKCORE
$$DEFINE_WITH_BLACKSOUND#define WITH_BLACKSOUND
$$DEFINE_WITH_BLACKINPUT#define WITH_BLACKINPUT
$$DEFINE_WITH_BLACKGUI#define WITH_BLACKGUI
$$DEFINE_WITH_SWIFTDATA#define WITH_SWIFTDATA
$$DEFINE_WITH_SWIFTGUI#define WITH_SWIFTGUI
$$DEFINE_WITH_SWIFTCORE#define WITH_SWIFTCORE
$$DEFINE_WITH_FSX#define WITH_FSX
$$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_VATSIM_SUPPORT#define SWIFT_VATSIM_SUPPORT
bool BlackConfig::CBuildConfig::isCompiledWithBlackCore()
{
#ifdef WITH_BLACKCORE
return true;
#else
return false;
#endif
}
bool BlackConfig::CBuildConfig::isCompiledWithBlackSound()
{
#ifdef WITH_BLACKSOUND
return true;
#else
return false;
#endif
}
bool BlackConfig::CBuildConfig::isCompiledWithBlackInput()
{
#ifdef WITH_BLACKINPUT
return true;
#else
return false;
#endif
}
bool BlackConfig::CBuildConfig::isCompiledWithFs9Support()
{
#ifdef WITH_FS9
return true;
#else
return false;
#endif
}
bool BlackConfig::CBuildConfig::isCompiledWithP3DSupport()
{
#ifdef WITH_P3D
return true;
#else
return false;
#endif
}
bool BlackConfig::CBuildConfig::isCompiledWithFsxSupport()
{
#ifdef WITH_FSX
return true;
#else
return false;
#endif
}
bool BlackConfig::CBuildConfig::isCompiledWithFsuipcSupport()
{
#ifdef WITH_FSUIPC
return true;
#else
return false;
#endif
}
bool BlackConfig::CBuildConfig::isCompiledWithXPlaneSupport()
{
#ifdef WITH_XPLANE
return true;
#else
return false;
#endif
}
bool BlackConfig::CBuildConfig::isCompiledWithGui()
{
#ifdef WITH_BLACKGUI
return true;
#else
return false;
#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\"); // config.pri
static const QDateTime dt(eol.isEmpty() ? QDateTime() : QDateTime::fromString(eol, \"yyyyMMdd\"));
return dt;
}
int BlackConfig::CBuildConfig::vatsimClientId()
{
static const int id { $$VATSIM_CLIENT_ID };
return id;
}
const QString &BlackConfig::CBuildConfig::vatsimPrivateKey()
{
static const auto pk = QString { \"$$VATSIM_CLIENT_PRIVATE_KEY\" };
return pk;
}
const QString &BlackConfig::CBuildConfig::gitHeadSha1()
{
static const QString gitHeadSha1(\"$$GIT_HEAD_SHA1\");
Q_ASSERT(!gitHeadSha1.isEmpty());
return gitHeadSha1;
}
namespace Private
{
const QDateTime lastCommitTimestampImpl()
{
QDateTime dt = QDateTime::fromString(\"$$GIT_COMMIT_TS\", \"yyyyMMddHHmm\");
dt.setTimeSpec(Qt::UTC);
return dt;
}
}
const QDateTime &BlackConfig::CBuildConfig::lastCommitTimestamp()
{
static const QDateTime dt = Private::lastCommitTimestampImpl();
return dt;
}
int BlackConfig::CBuildConfig::versionMajor() { return $$BLACK_VER_MAJ; }
int BlackConfig::CBuildConfig::versionMinor() { return $$BLACK_VER_MIN; }
int BlackConfig::CBuildConfig::versionMicro() { return $$BLACK_VER_MIC; }