Files
pilotclient/src/blackconfig/buildconfig_gen.cpp.in
Roland Winklmeier 2d8f56a598 Link CBuildConfig and CVersion into static library blackconfig
CBuildConfig including private keys etc. should not be part of a
public library API. Therefore link it into a static library, which
is not available to end users.

refs #645
2016-05-24 13:12:23 +02:00

137 lines
3.0 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_FS9#define WITH_FS9
$$DEFINE_WITH_XPLANE#define WITH_XPLANE
$$DEFINE_SWIFT_BETA#define SWIFT_BETA
$$DEFINE_SWIFT_SHIPPED#define SWIFT_SHIPPED
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::isCompiledWithFsxSupport()
{
#ifdef WITH_FSX
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::isBetaTest()
{
#ifdef SWIFT_BETA
return true;
#else
return false;
#endif
}
bool BlackConfig::CBuildConfig::isShippedVersion()
{
#ifdef SWIFT_SHIPPED
return true;
#else
return false;
#endif
}
const QDateTime &BlackConfig::CBuildConfig::getEol()
{
static const QString eol(\"$$BLACK_EOL\");
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::CVersion::version()
{
static const QString version(\"$$BLACK_VERSION\");
Q_ASSERT(!version.isEmpty());
return version;
}
int BlackConfig::CVersion::versionMajor() { return $$BLACK_VER_MAJ; }
int BlackConfig::CVersion::versionMinor() { return $$BLACK_VER_MIN; }
int BlackConfig::CVersion::versionPatch() { return $$BLACK_VER_PAT; }