Ref T103, moved directory functions from CBuildConfig to CDirectoryUtils

getApplicationDir renamed to getBinDir() as it works different on MacOs
see https://dev.swift-project.org/w/dev/swiftpc/dirstructure/
This commit is contained in:
Klaus Basan
2017-07-06 22:35:55 +02:00
committed by Mathew Sutcliffe
parent eaac4dacd6
commit debd9c802f
23 changed files with 301 additions and 322 deletions

View File

@@ -1189,7 +1189,7 @@ namespace BlackCore
if (isUnitTest()) { return CStatusMessage(this).info("No crash handler for unit tests"); }
static const QString crashpadHandler(CBuildConfig::isRunningOnWindowsNtPlatform() ? "swift_crashpad_handler.exe" : "swift_crashpad_handler");
static const QString handler = CFileUtils::appendFilePaths(CDirectoryUtils::applicationDirectoryPath(), crashpadHandler);
static const QString handler = CFileUtils::appendFilePaths(CDirectoryUtils::getBinDir(), crashpadHandler);
static const QString crashpadPath = CDirectoryUtils::getCrashpadDirectory();
static const QString database = CFileUtils::appendFilePaths(crashpadPath, "/database");
static const QString metrics = CFileUtils::appendFilePaths(crashpadPath, "/metrics");

View File

@@ -52,7 +52,7 @@ namespace BlackCore
QString IPluginManager::pluginDirectory() const
{
return CDirectoryUtils::applicationDirectoryPath() % QStringLiteral("/plugins");
return CDirectoryUtils::getBinDir() % QStringLiteral("/plugins");
}
bool IPluginManager::isValid(const QJsonObject &metadata) const

View File

@@ -105,7 +105,7 @@ namespace BlackCore
QString CPluginManagerSimulator::pluginDirectory() const
{
return CDirectoryUtils::applicationDirectoryPath() % QStringLiteral("/plugins/simulator");
return CDirectoryUtils::getBinDir() % QStringLiteral("/plugins/simulator");
}
}

View File

@@ -67,7 +67,7 @@ namespace BlackCore
QString CPluginManagerWeatherData::pluginDirectory() const
{
return CDirectoryUtils::applicationDirectoryPath() % QStringLiteral("/plugins/weatherdata");
return CDirectoryUtils::getBinDir() % QStringLiteral("/plugins/weatherdata");
}
}

View File

@@ -20,7 +20,6 @@
#include "blackmisc/network/networkutils.h"
#include "blackmisc/network/url.h"
#include "blackmisc/statusmessage.h"
#include "blackconfig/buildconfig.h"
#include <QByteArray>
#include <QFile>
@@ -31,7 +30,6 @@
#include <QUrl>
#include <QtGlobal>
using namespace BlackConfig;
using namespace BlackMisc;
using namespace BlackMisc::Db;
using namespace BlackMisc::Network;
@@ -518,7 +516,7 @@ namespace BlackCore
CLogMessage(this).info("Setup (bootstrap already cached, no prefill needed");
return false;
}
const QString fn = CBuildConfig::getBootstrapResourceFile();
const QString fn = CDirectoryUtils::getBootstrapResourceFile();
const CStatusMessageList msgs = this->readLocalBootstrapFile(fn);
CLogMessage::preformatted(msgs);
return true;