mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-06 10:15:38 +08:00
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:
committed by
Mathew Sutcliffe
parent
eaac4dacd6
commit
debd9c802f
@@ -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");
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -105,7 +105,7 @@ namespace BlackCore
|
||||
|
||||
QString CPluginManagerSimulator::pluginDirectory() const
|
||||
{
|
||||
return CDirectoryUtils::applicationDirectoryPath() % QStringLiteral("/plugins/simulator");
|
||||
return CDirectoryUtils::getBinDir() % QStringLiteral("/plugins/simulator");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ namespace BlackCore
|
||||
|
||||
QString CPluginManagerWeatherData::pluginDirectory() const
|
||||
{
|
||||
return CDirectoryUtils::applicationDirectoryPath() % QStringLiteral("/plugins/weatherdata");
|
||||
return CDirectoryUtils::getBinDir() % QStringLiteral("/plugins/weatherdata");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user