mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-08-11 12:15:36 +08:00
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
This commit is contained in:
@@ -83,3 +83,9 @@ blackmisc {
|
||||
LIBS *= -lShell32
|
||||
}
|
||||
}
|
||||
|
||||
blackconfig {
|
||||
win32-msvc*: PRE_TARGETDEPS += $$DestRoot/lib/blackconfig.lib
|
||||
else: PRE_TARGETDEPS += $$DestRoot/lib/libblackconfig.a
|
||||
LIBS *= -lblackconfig
|
||||
}
|
||||
|
||||
23
src/blackconfig/blackconfig.pro
Normal file
23
src/blackconfig/blackconfig.pro
Normal file
@@ -0,0 +1,23 @@
|
||||
load(common_pre)
|
||||
|
||||
TARGET = blackconfig
|
||||
TEMPLATE = lib
|
||||
CONFIG += staticlib
|
||||
|
||||
buildconfig_gen.input = buildconfig_gen.cpp.in
|
||||
buildconfig_gen.output = $$DestRoot/buildconfig_gen.cpp
|
||||
GENERATED_SOURCES += $$DestRoot/buildconfig_gen.cpp
|
||||
QMAKE_SUBSTITUTES += buildconfig_gen
|
||||
|
||||
INCLUDEPATH += ..
|
||||
precompile_header:!isEmpty(PRECOMPILED_HEADER) {
|
||||
DEFINES += USING_PCH
|
||||
}
|
||||
|
||||
DEFINES += LOG_IN_FILE
|
||||
HEADERS += *.h
|
||||
SOURCES += *.cpp
|
||||
DESTDIR = $$DestRoot/lib
|
||||
OTHER_FILES += buildconfig_gen.cpp.in
|
||||
|
||||
load(common_post)
|
||||
@@ -9,10 +9,7 @@
|
||||
|
||||
//! \cond PRIVATE
|
||||
|
||||
#include "buildconfig.h"
|
||||
#include "blackmisc/buildconfig.h"
|
||||
#include "blackmisc/fileutils.h"
|
||||
#include "blackmisc/stringutils.h"
|
||||
#include "blackconfig/buildconfig.h"
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QDateTime>
|
||||
@@ -23,7 +20,7 @@
|
||||
#include <QStringList>
|
||||
#include <QtGlobal>
|
||||
|
||||
namespace BlackMisc
|
||||
namespace BlackConfig
|
||||
{
|
||||
bool CBuildConfig::isCompiledWithP3DSupport()
|
||||
{
|
||||
@@ -181,7 +178,7 @@ namespace BlackMisc
|
||||
{
|
||||
const QString d(CBuildConfig::getSwiftResourceDir());
|
||||
if (d.isEmpty()) { return ""; }
|
||||
const QFile file(CFileUtils::appendFilePaths(d, "shared/boostrap/boostrap.json"));
|
||||
const QFile file(QDir::cleanPath(d + QDir::separator() + "shared/boostrap/boostrap.json"));
|
||||
Q_ASSERT_X(file.exists(), Q_FUNC_INFO, "missing dir");
|
||||
return QFileInfo(file).absoluteFilePath();
|
||||
}
|
||||
@@ -196,7 +193,7 @@ namespace BlackMisc
|
||||
{
|
||||
const QString d(CBuildConfig::getSwiftResourceDir());
|
||||
if (d.isEmpty()) { return ""; }
|
||||
QDir dir(CFileUtils::appendFilePaths(d, "shared/dbdata"));
|
||||
QDir dir(QDir::cleanPath(d + QDir::separator() + "shared/dbdata"));
|
||||
Q_ASSERT_X(dir.exists(), Q_FUNC_INFO, "missing dir");
|
||||
return dir.absolutePath();
|
||||
}
|
||||
@@ -211,7 +208,7 @@ namespace BlackMisc
|
||||
{
|
||||
const QString d(CBuildConfig::getSwiftResourceDir());
|
||||
if (d.isEmpty()) { return ""; }
|
||||
QDir dir(CFileUtils::appendFilePaths(d, "sounds"));
|
||||
QDir dir(QDir::cleanPath(d + QDir::separator() + "sounds"));
|
||||
Q_ASSERT_X(dir.exists(), Q_FUNC_INFO, "missing dir");
|
||||
return dir.absolutePath();
|
||||
}
|
||||
@@ -226,7 +223,7 @@ namespace BlackMisc
|
||||
{
|
||||
const QString d(CBuildConfig::getSwiftResourceDir());
|
||||
if (d.isEmpty()) { return ""; }
|
||||
QDir dir(CFileUtils::appendFilePaths(d, "qss"));
|
||||
QDir dir(QDir::cleanPath(d + QDir::separator() + "qss"));
|
||||
Q_ASSERT_X(dir.exists(), Q_FUNC_INFO, "missing dir");
|
||||
return dir.absolutePath();
|
||||
}
|
||||
@@ -240,7 +237,7 @@ namespace BlackMisc
|
||||
QString getImagesDirImpl()
|
||||
{
|
||||
const QString d(CBuildConfig::getSwiftResourceDir());
|
||||
QDir dir(CFileUtils::appendFilePaths(d, "images"));
|
||||
QDir dir(QDir::cleanPath(d + QDir::separator() + "images"));
|
||||
Q_ASSERT_X(dir.exists(), Q_FUNC_INFO, "missing dir");
|
||||
return dir.absolutePath();
|
||||
}
|
||||
@@ -261,7 +258,7 @@ namespace BlackMisc
|
||||
{
|
||||
QStringList pathes(QStandardPaths::standardLocations(QStandardPaths::DocumentsLocation));
|
||||
QString d = pathes.first();
|
||||
d = CFileUtils::appendFilePaths(d, "/swift");
|
||||
d = QDir::cleanPath(d + QDir::separator() + "swift");
|
||||
QDir dir(d);
|
||||
if (dir.exists()) { return dir.absolutePath(); }
|
||||
return pathes.first();
|
||||
@@ -273,6 +270,11 @@ namespace BlackMisc
|
||||
return d;
|
||||
}
|
||||
|
||||
QString boolToYesNo(bool v)
|
||||
{
|
||||
return v ? "yes" : "no";
|
||||
}
|
||||
|
||||
const QString &CBuildConfig::compiledWithInfo(bool shortVersion)
|
||||
{
|
||||
if (shortVersion)
|
||||
@@ -299,15 +301,15 @@ namespace BlackMisc
|
||||
static QString infoLong;
|
||||
if (infoLong.isEmpty())
|
||||
{
|
||||
infoLong = infoLong.append("BlackCore: ").append(BlackMisc::boolToYesNo(isCompiledWithBlackCore()));
|
||||
infoLong = infoLong.append(" BlackInput: ").append(BlackMisc::boolToYesNo(isCompiledWithBlackInput()));
|
||||
infoLong = infoLong.append(" BlackSound: ").append(BlackMisc::boolToYesNo(isCompiledWithBlackSound()));
|
||||
infoLong = infoLong.append(" GUI: ").append(BlackMisc::boolToYesNo(isCompiledWithGui()));
|
||||
infoLong = infoLong.append("BlackCore: ").append(boolToYesNo(isCompiledWithBlackCore()));
|
||||
infoLong = infoLong.append(" BlackInput: ").append(boolToYesNo(isCompiledWithBlackInput()));
|
||||
infoLong = infoLong.append(" BlackSound: ").append(boolToYesNo(isCompiledWithBlackSound()));
|
||||
infoLong = infoLong.append(" GUI: ").append(boolToYesNo(isCompiledWithGui()));
|
||||
|
||||
infoLong = infoLong.append(" FS9: ").append(BlackMisc::boolToYesNo(isCompiledWithFs9Support()));
|
||||
infoLong = infoLong.append(" FSX: ").append(BlackMisc::boolToYesNo(isCompiledWithFsxSupport()));
|
||||
infoLong = infoLong.append(" P3D: ").append(BlackMisc::boolToYesNo(isCompiledWithP3DSupport()));
|
||||
infoLong = infoLong.append(" XPlane: ").append(BlackMisc::boolToYesNo(isCompiledWithXPlaneSupport()));
|
||||
infoLong = infoLong.append(" FS9: ").append(boolToYesNo(isCompiledWithFs9Support()));
|
||||
infoLong = infoLong.append(" FSX: ").append(boolToYesNo(isCompiledWithFsxSupport()));
|
||||
infoLong = infoLong.append(" P3D: ").append(boolToYesNo(isCompiledWithP3DSupport()));
|
||||
infoLong = infoLong.append(" XPlane: ").append(boolToYesNo(isCompiledWithXPlaneSupport()));
|
||||
}
|
||||
return infoLong;
|
||||
}
|
||||
@@ -9,10 +9,8 @@
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKMISC_BUILDCONFIG_H
|
||||
#define BLACKMISC_BUILDCONFIG_H
|
||||
|
||||
#include "blackmisc/blackmiscexport.h"
|
||||
#ifndef BLACKCONFIG_BUILDCONFIG_H
|
||||
#define BLACKCONFIG_BUILDCONFIG_H
|
||||
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
@@ -20,10 +18,10 @@
|
||||
class QDateTime;
|
||||
class QStringList;
|
||||
|
||||
namespace BlackMisc
|
||||
namespace BlackConfig
|
||||
{
|
||||
//! Build configuration
|
||||
class BLACKMISC_EXPORT CBuildConfig
|
||||
class CBuildConfig
|
||||
{
|
||||
public:
|
||||
//! with BlackCore?
|
||||
@@ -137,7 +135,7 @@ namespace BlackMisc
|
||||
};
|
||||
|
||||
//! Version
|
||||
class BLACKMISC_EXPORT CVersion
|
||||
class CVersion
|
||||
{
|
||||
public:
|
||||
//! Version info
|
||||
@@ -7,7 +7,7 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include \"blackmisc/buildconfig.h\"
|
||||
#include \"blackconfig/buildconfig.h\"
|
||||
#include <QString>
|
||||
#include <QDateTime>
|
||||
|
||||
@@ -24,7 +24,7 @@ $$DEFINE_WITH_XPLANE#define WITH_XPLANE
|
||||
$$DEFINE_SWIFT_BETA#define SWIFT_BETA
|
||||
$$DEFINE_SWIFT_SHIPPED#define SWIFT_SHIPPED
|
||||
|
||||
bool BlackMisc::CBuildConfig::isCompiledWithBlackCore()
|
||||
bool BlackConfig::CBuildConfig::isCompiledWithBlackCore()
|
||||
{
|
||||
#ifdef WITH_BLACKCORE
|
||||
return true;
|
||||
@@ -33,7 +33,7 @@ bool BlackMisc::CBuildConfig::isCompiledWithBlackCore()
|
||||
#endif
|
||||
}
|
||||
|
||||
bool BlackMisc::CBuildConfig::isCompiledWithBlackSound()
|
||||
bool BlackConfig::CBuildConfig::isCompiledWithBlackSound()
|
||||
{
|
||||
#ifdef WITH_BLACKSOUND
|
||||
return true;
|
||||
@@ -42,7 +42,7 @@ bool BlackMisc::CBuildConfig::isCompiledWithBlackSound()
|
||||
#endif
|
||||
}
|
||||
|
||||
bool BlackMisc::CBuildConfig::isCompiledWithBlackInput()
|
||||
bool BlackConfig::CBuildConfig::isCompiledWithBlackInput()
|
||||
{
|
||||
#ifdef WITH_BLACKINPUT
|
||||
return true;
|
||||
@@ -51,7 +51,7 @@ bool BlackMisc::CBuildConfig::isCompiledWithBlackInput()
|
||||
#endif
|
||||
}
|
||||
|
||||
bool BlackMisc::CBuildConfig::isCompiledWithFs9Support()
|
||||
bool BlackConfig::CBuildConfig::isCompiledWithFs9Support()
|
||||
{
|
||||
#ifdef WITH_FS9
|
||||
return true;
|
||||
@@ -60,7 +60,7 @@ bool BlackMisc::CBuildConfig::isCompiledWithFs9Support()
|
||||
#endif
|
||||
}
|
||||
|
||||
bool BlackMisc::CBuildConfig::isCompiledWithFsxSupport()
|
||||
bool BlackConfig::CBuildConfig::isCompiledWithFsxSupport()
|
||||
{
|
||||
#ifdef WITH_FSX
|
||||
return true;
|
||||
@@ -69,7 +69,7 @@ bool BlackMisc::CBuildConfig::isCompiledWithFsxSupport()
|
||||
#endif
|
||||
}
|
||||
|
||||
bool BlackMisc::CBuildConfig::isCompiledWithXPlaneSupport()
|
||||
bool BlackConfig::CBuildConfig::isCompiledWithXPlaneSupport()
|
||||
{
|
||||
#ifdef WITH_XPLANE
|
||||
return true;
|
||||
@@ -78,7 +78,7 @@ bool BlackMisc::CBuildConfig::isCompiledWithXPlaneSupport()
|
||||
#endif
|
||||
}
|
||||
|
||||
bool BlackMisc::CBuildConfig::isCompiledWithGui()
|
||||
bool BlackConfig::CBuildConfig::isCompiledWithGui()
|
||||
{
|
||||
#ifdef WITH_BLACKGUI
|
||||
return true;
|
||||
@@ -87,7 +87,7 @@ bool BlackMisc::CBuildConfig::isCompiledWithGui()
|
||||
#endif
|
||||
}
|
||||
|
||||
bool BlackMisc::CBuildConfig::isBetaTest()
|
||||
bool BlackConfig::CBuildConfig::isBetaTest()
|
||||
{
|
||||
#ifdef SWIFT_BETA
|
||||
return true;
|
||||
@@ -96,7 +96,7 @@ bool BlackMisc::CBuildConfig::isBetaTest()
|
||||
#endif
|
||||
}
|
||||
|
||||
bool BlackMisc::CBuildConfig::isShippedVersion()
|
||||
bool BlackConfig::CBuildConfig::isShippedVersion()
|
||||
{
|
||||
#ifdef SWIFT_SHIPPED
|
||||
return true;
|
||||
@@ -105,32 +105,32 @@ bool BlackMisc::CBuildConfig::isShippedVersion()
|
||||
#endif
|
||||
}
|
||||
|
||||
const QDateTime &BlackMisc::CBuildConfig::getEol()
|
||||
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 BlackMisc::CBuildConfig::vatsimClientId()
|
||||
int BlackConfig::CBuildConfig::vatsimClientId()
|
||||
{
|
||||
static const int id { $$VATSIM_CLIENT_ID };
|
||||
return id;
|
||||
}
|
||||
|
||||
const QString &BlackMisc::CBuildConfig::vatsimPrivateKey()
|
||||
const QString &BlackConfig::CBuildConfig::vatsimPrivateKey()
|
||||
{
|
||||
static const auto pk = QString { \"$$VATSIM_CLIENT_PRIVATE_KEY\" };
|
||||
return pk;
|
||||
}
|
||||
|
||||
const QString &BlackMisc::CVersion::version()
|
||||
const QString &BlackConfig::CVersion::version()
|
||||
{
|
||||
static const QString version(\"$$BLACK_VERSION\");
|
||||
Q_ASSERT(!version.isEmpty());
|
||||
return version;
|
||||
}
|
||||
|
||||
int BlackMisc::CVersion::versionMajor() { return $$BLACK_VER_MAJ; }
|
||||
int BlackMisc::CVersion::versionMinor() { return $$BLACK_VER_MIN; }
|
||||
int BlackMisc::CVersion::versionPatch() { return $$BLACK_VER_PAT; }
|
||||
int BlackConfig::CVersion::versionMajor() { return $$BLACK_VER_MAJ; }
|
||||
int BlackConfig::CVersion::versionMinor() { return $$BLACK_VER_MIN; }
|
||||
int BlackConfig::CVersion::versionPatch() { return $$BLACK_VER_PAT; }
|
||||
@@ -7,6 +7,7 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "blackconfig/buildconfig.h"
|
||||
#include "blackcore/application.h"
|
||||
#include "blackcore/contextapplication.h"
|
||||
#include "blackcore/cookiemanager.h"
|
||||
@@ -15,7 +16,6 @@
|
||||
#include "blackcore/registermetadata.h"
|
||||
#include "blackcore/setupreader.h"
|
||||
#include "blackcore/webdataservices.h"
|
||||
#include "blackmisc/buildconfig.h"
|
||||
#include "blackmisc/datacache.h"
|
||||
#include "blackmisc/dbusserver.h"
|
||||
#include "blackmisc/filelogger.h"
|
||||
@@ -53,6 +53,7 @@
|
||||
#include <QtGlobal>
|
||||
#include <cstdlib>
|
||||
|
||||
using namespace BlackConfig;
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackMisc::Network;
|
||||
using namespace BlackMisc::Aviation;
|
||||
|
||||
@@ -6,7 +6,7 @@ QT += network dbus xml multimedia
|
||||
|
||||
TARGET = blackcore
|
||||
TEMPLATE = lib
|
||||
CONFIG += blackmisc blackinput blacksound
|
||||
CONFIG += blackconfig blackmisc blackinput blacksound
|
||||
|
||||
contains(BLACK_CONFIG, Static) {
|
||||
CONFIG += staticlib
|
||||
|
||||
@@ -23,13 +23,13 @@
|
||||
|
||||
//! @}
|
||||
|
||||
#include "blackconfig/buildconfig.h"
|
||||
#include "blackcore/blackcoreexport.h"
|
||||
#include "blackcore/context.h"
|
||||
#include "blackcore/corefacade.h"
|
||||
#include "blackcore/corefacadeconfig.h"
|
||||
#include "blackcore/simulator.h"
|
||||
#include "blackmisc/aviation/airportlist.h"
|
||||
#include "blackmisc/buildconfig.h"
|
||||
#include "blackmisc/pixmap.h"
|
||||
#include "blackmisc/pq/length.h"
|
||||
#include "blackmisc/pq/time.h"
|
||||
@@ -175,7 +175,7 @@ namespace BlackCore
|
||||
virtual BlackMisc::PhysicalQuantities::CTime getTimeSynchronizationOffset() const = 0;
|
||||
|
||||
//! Simulator avialable (driver available)?
|
||||
bool isSimulatorAvailable() const { return BlackMisc::CBuildConfig::isCompiledWithFlightSimulatorSupport() && !getSimulatorPluginInfo().isUnspecified(); }
|
||||
bool isSimulatorAvailable() const { return BlackConfig::CBuildConfig::isCompiledWithFlightSimulatorSupport() && !getSimulatorPluginInfo().isUnspecified(); }
|
||||
|
||||
//! Icon representing the model
|
||||
virtual BlackMisc::CPixmap iconForModel(const QString &modelString) const = 0;
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "blackconfig/buildconfig.h"
|
||||
#include "blackcore/data/globalsetup.h"
|
||||
#include "blackmisc/buildconfig.h"
|
||||
#include "blackmisc/json.h"
|
||||
#include "blackmisc/network/server.h"
|
||||
#include "blackmisc/network/user.h"
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <QJsonObject>
|
||||
#include <QStringList>
|
||||
|
||||
using namespace BlackConfig;
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackMisc::Json;
|
||||
using namespace BlackMisc::Network;
|
||||
|
||||
@@ -7,11 +7,12 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "blackconfig/buildconfig.h"
|
||||
#include "blackcore/data/updateinfo.h"
|
||||
#include "blackmisc/buildconfig.h"
|
||||
|
||||
#include <QStringList>
|
||||
|
||||
using namespace BlackConfig;
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackMisc::Network;
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
//! \cond PRIVATE
|
||||
|
||||
#include "blackconfig/buildconfig.h"
|
||||
#include "blackcore/application.h"
|
||||
#include "blackcore/networkvatlib.h"
|
||||
#include "blackmisc/aviation/aircraftsituation.h"
|
||||
@@ -19,7 +20,6 @@
|
||||
#include "blackmisc/aviation/informationmessage.h"
|
||||
#include "blackmisc/aviation/livery.h"
|
||||
#include "blackmisc/aviation/transponder.h"
|
||||
#include "blackmisc/buildconfig.h"
|
||||
#include "blackmisc/compare.h"
|
||||
#include "blackmisc/geo/coordinategeodetic.h"
|
||||
#include "blackmisc/geo/latitude.h"
|
||||
@@ -60,6 +60,7 @@
|
||||
static_assert(! std::is_abstract<BlackCore::CNetworkVatlib>::value, "Must implement all pure virtuals");
|
||||
static_assert(VAT_LIBVATLIB_VERSION == 905, "Wrong vatlib header installed");
|
||||
|
||||
using namespace BlackConfig;
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackMisc::Aviation;
|
||||
using namespace BlackMisc::Geo;
|
||||
|
||||
@@ -4,7 +4,7 @@ QT += network dbus gui svg widgets
|
||||
|
||||
TARGET = blackgui
|
||||
TEMPLATE = lib
|
||||
CONFIG += blackmisc blackcore
|
||||
CONFIG += blackconfig blackmisc blackcore
|
||||
|
||||
contains(BLACK_CONFIG, Static) {
|
||||
CONFIG += staticlib
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "blackconfig/buildconfig.h"
|
||||
#include "blackcore/webdataservices.h"
|
||||
#include "blackgui/components/datainfoareacomponent.h"
|
||||
#include "blackgui/components/dbaircrafticaocomponent.h"
|
||||
@@ -16,7 +17,6 @@
|
||||
#include "blackgui/components/dbliverycomponent.h"
|
||||
#include "blackgui/components/dbmodelcomponent.h"
|
||||
#include "blackgui/guiapplication.h"
|
||||
#include "blackmisc/buildconfig.h"
|
||||
#include "blackmisc/icons.h"
|
||||
#include "blackmisc/logmessage.h"
|
||||
#include "blackmisc/network/entityflags.h"
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <QTabWidget>
|
||||
#include <QtGlobal>
|
||||
|
||||
using namespace BlackConfig;
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackMisc::Network;
|
||||
using namespace BlackGui;
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "blackconfig/buildconfig.h"
|
||||
#include "blackcore/contextapplication.h"
|
||||
#include "blackcore/contextaudio.h"
|
||||
#include "blackcore/contextnetwork.h"
|
||||
@@ -16,7 +17,6 @@
|
||||
#include "blackgui/guiapplication.h"
|
||||
#include "blackgui/led.h"
|
||||
#include "blackmisc/audio/audioutils.h"
|
||||
#include "blackmisc/buildconfig.h"
|
||||
#include "blackmisc/network/server.h"
|
||||
#include "blackmisc/simulation/simulatorplugininfo.h"
|
||||
#include "ui_infobarstatuscomponent.h"
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <Qt>
|
||||
#include <QtGlobal>
|
||||
|
||||
using namespace BlackConfig;
|
||||
using namespace BlackCore;
|
||||
using namespace BlackGui;
|
||||
using namespace BlackMisc;
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "blackconfig/buildconfig.h"
|
||||
#include "blackcore/contextaudio.h"
|
||||
#include "blackcore/contextnetwork.h"
|
||||
#include "blackcore/contextownaircraft.h"
|
||||
@@ -24,7 +25,6 @@
|
||||
#include "blackmisc/aviation/aircrafticaocode.h"
|
||||
#include "blackmisc/aviation/airlineicaocode.h"
|
||||
#include "blackmisc/aviation/airporticaocode.h"
|
||||
#include "blackmisc/buildconfig.h"
|
||||
#include "blackmisc/icons.h"
|
||||
#include "blackmisc/logmessage.h"
|
||||
#include "blackmisc/network/entityflags.h"
|
||||
@@ -45,6 +45,7 @@
|
||||
#include <QToolButton>
|
||||
#include <QtGlobal>
|
||||
|
||||
using namespace BlackConfig;
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackMisc::Aviation;
|
||||
using namespace BlackMisc::Network;
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "blackconfig/buildconfig.h"
|
||||
#include "blackcore/contextapplication.h"
|
||||
#include "blackcore/data/globalsetup.h"
|
||||
#include "blackgui/components/serverform.h"
|
||||
#include "blackgui/components/settingsnetworkserverscomponent.h"
|
||||
#include "blackgui/guiapplication.h"
|
||||
#include "blackgui/views/serverview.h"
|
||||
#include "blackmisc/buildconfig.h"
|
||||
#include "blackmisc/logmessage.h"
|
||||
#include "blackmisc/network/server.h"
|
||||
#include "blackmisc/network/serverlist.h"
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <QString>
|
||||
#include <QTableView>
|
||||
|
||||
using namespace BlackConfig;
|
||||
using namespace BlackCore;
|
||||
using namespace BlackCore::Data;
|
||||
using namespace BlackGui;
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "blackconfig/buildconfig.h"
|
||||
#include "blackcore/data/globalsetup.h"
|
||||
#include "blackcore/data/updateinfo.h"
|
||||
#include "blackgui/guiapplication.h"
|
||||
#include "blackgui/guiutility.h"
|
||||
#include "blackgui/registermetadata.h"
|
||||
#include "blackmisc/buildconfig.h"
|
||||
#include "blackmisc/datacache.h"
|
||||
#include "blackmisc/logcategory.h"
|
||||
#include "blackmisc/logcategorylist.h"
|
||||
@@ -42,6 +42,7 @@
|
||||
#include <QWidget>
|
||||
#include <QtGlobal>
|
||||
|
||||
using namespace BlackConfig;
|
||||
using namespace BlackMisc;
|
||||
|
||||
BlackGui::CGuiApplication *sGui = nullptr; // set by constructor
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "blackconfig/buildconfig.h"
|
||||
#include "blackgui/stylesheetutility.h"
|
||||
#include "blackmisc/buildconfig.h"
|
||||
#include "blackmisc/fileutils.h"
|
||||
#include "blackmisc/restricted.h"
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <QWidget>
|
||||
#include <QtGlobal>
|
||||
|
||||
using namespace BlackConfig;
|
||||
using namespace BlackMisc;
|
||||
|
||||
namespace BlackGui
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "blackconfig/buildconfig.h"
|
||||
#include "blackgui/menus/menuaction.h"
|
||||
#include "blackgui/models/atcstationlistmodel.h"
|
||||
#include "blackgui/views/atcstationview.h"
|
||||
#include "blackmisc/aviation/atcstationlist.h"
|
||||
#include "blackmisc/aviation/callsign.h"
|
||||
#include "blackmisc/buildconfig.h"
|
||||
#include "blackmisc/icons.h"
|
||||
|
||||
#include <QFlags>
|
||||
@@ -49,7 +49,7 @@ namespace BlackGui
|
||||
|
||||
void CAtcStationView::customMenu(CMenuActions &menuActions)
|
||||
{
|
||||
if (BlackMisc::CBuildConfig::isDebugBuild())
|
||||
if (BlackConfig::CBuildConfig::isDebugBuild())
|
||||
{
|
||||
if (this->m_debugActions.isEmpty()) { this->m_actions = QList<QAction *>({nullptr, nullptr}); }
|
||||
this->m_actions[0] = menuActions.addAction(this->m_actions[0], CIcons::tableSheet16(), "Test: 1k ATC online stations", CMenuAction::pathClientCom(), { this, &CAtcStationView::ps_testRequest1kAtcOnlineDummies });
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "blackconfig/buildconfig.h"
|
||||
#include "blackgui/models/simulatedaircraftlistmodel.h"
|
||||
#include "blackgui/menus/menuaction.h"
|
||||
#include "blackgui/views/simulatedaircraftview.h"
|
||||
#include "blackmisc/aviation/callsign.h"
|
||||
#include "blackmisc/buildconfig.h"
|
||||
#include "blackmisc/icons.h"
|
||||
#include "blackmisc/simulation/simulatedaircraft.h"
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace BlackGui
|
||||
|
||||
void CSimulatedAircraftView::customMenu(CMenuActions &menuActions)
|
||||
{
|
||||
if (BlackMisc::CBuildConfig::isDebugBuild())
|
||||
if (BlackConfig::CBuildConfig::isDebugBuild())
|
||||
{
|
||||
// tbd
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "blackconfig/buildconfig.h"
|
||||
#include "blackgui/dockwidgetinfoarea.h"
|
||||
#include "blackgui/filters/filterdialog.h"
|
||||
#include "blackgui/filters/filterwidget.h"
|
||||
@@ -28,7 +29,6 @@
|
||||
#include "blackmisc/aviation/atcstationlist.h"
|
||||
#include "blackmisc/aviation/livery.h"
|
||||
#include "blackmisc/aviation/liverylist.h"
|
||||
#include "blackmisc/buildconfig.h"
|
||||
#include "blackmisc/country.h"
|
||||
#include "blackmisc/countrylist.h"
|
||||
#include "blackmisc/fileutils.h"
|
||||
@@ -78,6 +78,7 @@
|
||||
#include <QWidget>
|
||||
#include <limits>
|
||||
|
||||
using namespace BlackConfig;
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackGui;
|
||||
using namespace BlackGui::Menus;
|
||||
|
||||
@@ -7,12 +7,14 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "audioutils.h"
|
||||
#include "blackmisc/buildconfig.h"
|
||||
#include "blackconfig/buildconfig.h"
|
||||
#include "blackmisc/audio/audioutils.h"
|
||||
|
||||
#include <QProcess>
|
||||
#include <QStringList>
|
||||
|
||||
using namespace BlackConfig;
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
namespace Audio
|
||||
|
||||
@@ -4,17 +4,12 @@ QT += network dbus xml
|
||||
|
||||
TARGET = blackmisc
|
||||
TEMPLATE = lib
|
||||
CONFIG += c++11
|
||||
CONFIG += blackconfig
|
||||
|
||||
contains(BLACK_CONFIG, Static) {
|
||||
CONFIG += staticlib
|
||||
}
|
||||
|
||||
buildconfig.input = buildconfig.cpp.in
|
||||
buildconfig.output = $$DestRoot/buildconfig_gen.cpp
|
||||
GENERATED_SOURCES += $$DestRoot/buildconfig_gen.cpp
|
||||
QMAKE_SUBSTITUTES += buildconfig
|
||||
|
||||
INCLUDEPATH += ..
|
||||
# DEPENDPATH += . .. // BlackMisc should be independent
|
||||
# PRECOMPILED_HEADER = stdpch.h
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "blackmisc/buildconfig.h"
|
||||
#include "blackconfig/buildconfig.h"
|
||||
#include "blackmisc/fileutils.h"
|
||||
#include "blackmisc/worker.h"
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
#include <QtGlobal>
|
||||
#include <algorithm>
|
||||
|
||||
using namespace BlackConfig;
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
const QString &CFileUtils::jsonAppendix()
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
//! \cond PRIVATE
|
||||
|
||||
#include "blackmisc/buildconfig.h"
|
||||
#include "blackconfig/buildconfig.h"
|
||||
#include "blackmisc/fileutils.h"
|
||||
#include "blackmisc/icons.h"
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
#include <QSize>
|
||||
#include <QtGlobal>
|
||||
|
||||
using namespace BlackConfig;
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
*/
|
||||
|
||||
#include "blackmisc/processctrl.h"
|
||||
#include "blackmisc/buildconfig.h"
|
||||
#include "blackmisc/logmessage.h"
|
||||
|
||||
#include <array>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "blackmisc/buildconfig.h"
|
||||
#include "blackconfig/buildconfig.h"
|
||||
#include "blackmisc/simulation/fscommon/fscommonutil.h"
|
||||
|
||||
#include <QDir>
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <QStringList>
|
||||
#include <QVariant>
|
||||
|
||||
using namespace BlackConfig;
|
||||
using namespace BlackMisc;
|
||||
|
||||
namespace BlackMisc
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "blackmisc/buildconfig.h"
|
||||
#include "blackconfig/buildconfig.h"
|
||||
#include "blackmisc/simulation/fscommon/fscommonutil.h"
|
||||
#include "blackmisc/simulation/fsx/fsxsimulatorsetup.h"
|
||||
#include "blackmisc/simulation/fsx/simconnectutilities.h"
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
#include <QString>
|
||||
|
||||
using namespace BlackConfig;
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackMisc::Simulation::FsCommon;
|
||||
using namespace BlackMisc::Simulation;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "blackmisc/buildconfig.h"
|
||||
#include "blackconfig/buildconfig.h"
|
||||
#include "blackmisc/comparefunctions.h"
|
||||
#include "blackmisc/datastoreutility.h"
|
||||
#include "blackmisc/simulation/fscommon/fscommonutil.h"
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <QtGlobal>
|
||||
#include <algorithm>
|
||||
|
||||
using namespace BlackConfig;
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackMisc::Simulation::FsCommon;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ QT += network dbus gui multimedia
|
||||
|
||||
TARGET = blacksound
|
||||
TEMPLATE = lib
|
||||
CONFIG += blackmisc
|
||||
CONFIG += blackconfig blackmisc
|
||||
|
||||
contains(BLACK_CONFIG, Static) {
|
||||
CONFIG += staticlib
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "blackconfig/buildconfig.h"
|
||||
#include "blacksound/soundgenerator.h"
|
||||
#include "blackmisc/filedeleter.h"
|
||||
#include "blackmisc/buildconfig.h"
|
||||
#include <QtCore/qendian.h>
|
||||
#include <math.h>
|
||||
#include <qmath.h>
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <QFile>
|
||||
#include <QDir>
|
||||
|
||||
using namespace BlackConfig;
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackMisc::Aviation;
|
||||
using namespace BlackMisc::PhysicalQuantities;
|
||||
|
||||
@@ -3,6 +3,7 @@ load(common_pre)
|
||||
TEMPLATE = subdirs
|
||||
CONFIG += ordered
|
||||
|
||||
SUBDIRS += blackconfig
|
||||
SUBDIRS += blackmisc
|
||||
contains(BLACK_CONFIG,BlackSound) {
|
||||
SUBDIRS += blacksound
|
||||
|
||||
@@ -10,7 +10,7 @@ TEMPLATE = app
|
||||
SOURCES += *.cpp
|
||||
HEADERS += *.h
|
||||
FORMS += *.ui
|
||||
CONFIG += blackmisc blacksound blackinput blackcore blackgui
|
||||
CONFIG += blackconfig blackmisc blacksound blackinput blackcore blackgui
|
||||
|
||||
DEPENDPATH += . $$SourceRoot/src/blackmisc \
|
||||
$$SourceRoot/src/blacksound \
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "blackconfig/buildconfig.h"
|
||||
#include "blackgui/components/datainfoareacomponent.h"
|
||||
#include "blackgui/components/datamaininfoareacomponent.h"
|
||||
#include "blackgui/components/dbmappingcomponent.h"
|
||||
#include "blackgui/guiapplication.h"
|
||||
#include "blackmisc/buildconfig.h"
|
||||
#include "blackmisc/icons.h"
|
||||
#include "swiftdata.h"
|
||||
#include "ui_swiftdata.h"
|
||||
@@ -24,6 +24,7 @@
|
||||
#include <QString>
|
||||
#include <QtGlobal>
|
||||
|
||||
using namespace BlackConfig;
|
||||
using namespace BlackGui;
|
||||
using namespace BlackCore;
|
||||
using namespace BlackGui::Components;
|
||||
|
||||
@@ -10,7 +10,7 @@ TEMPLATE = app
|
||||
SOURCES += *.cpp
|
||||
HEADERS += *.h
|
||||
FORMS += *.ui
|
||||
CONFIG += blackmisc blacksound blackinput blackcore blackgui
|
||||
CONFIG += blackconfig blackmisc blacksound blackinput blackcore blackgui
|
||||
|
||||
DEPENDPATH += . $$SourceRoot/src/blackmisc \
|
||||
$$SourceRoot/src/blacksound \
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "blackconfig/buildconfig.h"
|
||||
#include "blackcore/contextnetwork.h"
|
||||
#include "blackgui/components/aircraftcomponent.h"
|
||||
#include "blackgui/components/atcstationcomponent.h"
|
||||
@@ -26,7 +27,6 @@
|
||||
#include "blackgui/managedstatusbar.h"
|
||||
#include "blackgui/overlaymessagesframe.h"
|
||||
#include "blackgui/stylesheetutility.h"
|
||||
#include "blackmisc/buildconfig.h"
|
||||
#include "blackmisc/loghandler.h"
|
||||
#include "blackmisc/logmessage.h"
|
||||
#include "blackmisc/logpattern.h"
|
||||
@@ -45,6 +45,7 @@
|
||||
|
||||
class QHBoxLayout;
|
||||
|
||||
using namespace BlackConfig;
|
||||
using namespace BlackCore;
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackMisc::Input;
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
|
||||
#include "swiftlauncher.h"
|
||||
#include "ui_swiftlauncher.h"
|
||||
#include "blackconfig/buildconfig.h"
|
||||
#include "blackgui/guiapplication.h"
|
||||
#include "blackgui/stylesheetutility.h"
|
||||
#include "blackcore/setupreader.h"
|
||||
#include "blackmisc/dbusserver.h"
|
||||
#include "blackmisc/network/networkutils.h"
|
||||
#include "blackmisc/icons.h"
|
||||
#include "blackmisc/buildconfig.h"
|
||||
#include "blackmisc/logmessage.h"
|
||||
#include "blackmisc/loghandler.h"
|
||||
#include <QPixmap>
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <QShortcut>
|
||||
#include <qcompilerdetection.h>
|
||||
|
||||
using namespace BlackConfig;
|
||||
using namespace BlackGui;
|
||||
using namespace BlackCore;
|
||||
using namespace BlackCore::Data;
|
||||
|
||||
@@ -10,7 +10,7 @@ TEMPLATE = app
|
||||
SOURCES += *.cpp
|
||||
HEADERS += *.h
|
||||
FORMS += *.ui
|
||||
CONFIG += blackmisc blacksound blackinput blackcore blackgui
|
||||
CONFIG += blackconfig blackmisc blacksound blackinput blackcore blackgui
|
||||
|
||||
DEPENDPATH += . $$SourceRoot/src/blackmisc \
|
||||
$$SourceRoot/src/blacksound \
|
||||
|
||||
@@ -7,6 +7,7 @@ TEMPLATE = app
|
||||
|
||||
CONFIG += console
|
||||
CONFIG -= app_bundle
|
||||
CONFIG += blackconfig
|
||||
CONFIG += blackmisc
|
||||
CONFIG += testcase
|
||||
CONFIG += no_testcase_installs
|
||||
|
||||
@@ -15,14 +15,14 @@
|
||||
*/
|
||||
|
||||
#include "testlibrarypath.h"
|
||||
#include "blackconfig/buildconfig.h"
|
||||
#include "blackmisc/librarypath.h"
|
||||
#include "blackmisc/buildconfig.h"
|
||||
|
||||
namespace BlackMiscTest
|
||||
{
|
||||
void CTestLibraryPath::libraryPath()
|
||||
{
|
||||
if (!BlackMisc::CBuildConfig::isRunningOnWindowsNtPlatform()) { return; }
|
||||
if (!BlackConfig::CBuildConfig::isRunningOnWindowsNtPlatform()) { return; }
|
||||
|
||||
auto emptyPath = BlackMisc::getCustomLibraryPath();
|
||||
QVERIFY2(emptyPath.isEmpty(), "Default path should be empty");
|
||||
|
||||
Reference in New Issue
Block a user