Introduce build config template buildconfig.h.in

refs #625
This commit is contained in:
Roland Winklmeier
2016-03-31 17:12:01 +02:00
parent 4e9c34b04a
commit d379f14133
45 changed files with 279 additions and 317 deletions

View File

@@ -16,6 +16,7 @@
#include "blackmisc/icons.h"
#include "blackmisc/logmessage.h"
#include "blackmisc/verify.h"
#include "blackmisc/buildconfig.h"
using namespace BlackMisc;
using namespace BlackMisc::Network;
@@ -78,7 +79,7 @@ namespace BlackGui
}
// write to disk
bool s = sGui->getWebDataServices()->writeDbDataToDisk(CProject::getSwiftStaticDbFilesDir());
bool s = sGui->getWebDataServices()->writeDbDataToDisk(CBuildConfig::getSwiftStaticDbFilesDir());
if (s)
{
CLogMessage(this).info("Written DB data");
@@ -93,12 +94,12 @@ namespace BlackGui
bool CDataInfoAreaComponent::readDbDataFromResourceDir()
{
bool s = sGui &&
sGui->getWebDataServices()->readDbDataFromDisk(CProject::getSwiftStaticDbFilesDir(), true);
sGui->getWebDataServices()->readDbDataFromDisk(CBuildConfig::getSwiftStaticDbFilesDir(), true);
// info
if (s)
{
CLogMessage(this).info("Read DB data from directory: %1") << CProject::getSwiftStaticDbFilesDir();
CLogMessage(this).info("Read DB data from directory: %1") << CBuildConfig::getSwiftStaticDbFilesDir();
this->ui->comp_DbAircraftIcao->showLoadIndicator();
this->ui->comp_DbAirlineIcao->showLoadIndicator();
this->ui->comp_DbCountries->showLoadIndicator();

View File

@@ -8,7 +8,6 @@
*/
#include "blackgui/guiapplication.h"
#include "blackmisc/project.h"
#include "dbdebugdatabasesetup.h"
#include "ui_dbdebugdatabasesetup.h"

View File

@@ -16,7 +16,7 @@
#include "blackcore/contextaudio.h"
#include "blackcore/simulator.h"
#include "blackmisc/audio/audioutils.h"
#include "blackmisc/project.h"
#include "blackmisc/buildconfig.h"
#include "blackmisc/icons.h"
#include <QPoint>
@@ -159,7 +159,7 @@ namespace BlackGui
QMenu menuAudio(this);
menuAudio.addAction("Toogle mute");
if (CProject::isRunningOnWindowsNtPlatform())
if (CBuildConfig::isRunningOnWindowsNtPlatform())
{
menuAudio.addAction("Mixer");
}

View File

@@ -18,6 +18,7 @@
#include "blackcore/network.h"
#include "blackcore/simulator.h"
#include "blackmisc/logmessage.h"
#include "blackmisc/buildconfig.h"
#include <QIntValidator>
using namespace BlackMisc;
@@ -106,7 +107,7 @@ namespace BlackGui
CServerList otherServers(this->m_otherTrafficNetworkServers.get());
// add a testserver when no servers can be loaded
if (otherServers.isEmpty() && (sGui->isRunningInDeveloperEnvironment() || CProject::isBetaTest()))
if (otherServers.isEmpty() && (sGui->isRunningInDeveloperEnvironment() || CBuildConfig::isBetaTest()))
{
otherServers.push_back(sGui->getGlobalSetup().getFsdTestServersPlusHardcodedServers());
CLogMessage(this).info("Added servers for testing");

View File

@@ -14,7 +14,7 @@
#include "blackcore/setupreader.h"
#include "blackcore/contextapplication.h"
#include "blackmisc/logmessage.h"
#include "blackmisc/project.h"
#include "blackmisc/buildconfig.h"
#include <QModelIndex>
using namespace BlackCore;
@@ -53,7 +53,7 @@ namespace BlackGui
// add swift test servers in case we have no servers:
// this is debug/bootstrap feature we can continue to test when something goes wrong
if (serverList.isEmpty() && (CProject::isBetaTest() || sGui->isRunningInDeveloperEnvironment()))
if (serverList.isEmpty() && (CBuildConfig::isBetaTest() || sGui->isRunningInDeveloperEnvironment()))
{
serverList.push_back(sGui->getGlobalSetup().getFsdTestServersPlusHardcodedServers());
this->ui->tvp_Servers->updateContainer(serverList);