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

@@ -197,7 +197,7 @@ void CSwiftLauncher::loadAbout()
// workaround:
// 1) Only reading as HTML gives proper formatting
// 2) Reading the file resource fails (likely because of the style sheet)
static const QString html = CFileUtils::readFileToString(CBuildConfig::getAboutFileLocation());
static const QString html = CFileUtils::readFileToString(CDirectoryUtils::getAboutFileLocation());
static const QString legalDir = sGui->getGlobalSetup().getLegalDirectoryUrl().getFullUrl();
// make links absolute
@@ -265,7 +265,7 @@ void CSwiftLauncher::startSwiftCore()
// I set this for debug purpose only
m_executableArgs = args;
m_executable.clear();
m_executable = CFileUtils::appendFilePaths(CDirectoryUtils::applicationDirectoryPath(), CBuildConfig::swiftCoreExecutableName());
m_executable = CFileUtils::appendFilePaths(CDirectoryUtils::getBinDir(), CBuildConfig::swiftCoreExecutableName());
if (CBuildConfig::isRunningOnMacOSXPlatform())
{
m_executable += QLatin1String(".app/Contents/MacOS/");
@@ -281,7 +281,7 @@ void CSwiftLauncher::startSwiftCore()
void CSwiftLauncher::setSwiftDataExecutable()
{
m_executable.clear();
m_executable = CFileUtils::appendFilePaths(CDirectoryUtils::applicationDirectoryPath(), CBuildConfig::swiftDataExecutableName());
m_executable = CFileUtils::appendFilePaths(CDirectoryUtils::getBinDir(), CBuildConfig::swiftDataExecutableName());
if (CBuildConfig::isRunningOnMacOSXPlatform())
{
m_executable += QLatin1String(".app/Contents/MacOS/");
@@ -293,7 +293,7 @@ void CSwiftLauncher::setSwiftDataExecutable()
bool CSwiftLauncher::setSwiftGuiExecutable()
{
m_executable.clear();
m_executable = CFileUtils::appendFilePaths(CDirectoryUtils::applicationDirectoryPath(), CBuildConfig::swiftGuiExecutableName());
m_executable = CFileUtils::appendFilePaths(CDirectoryUtils::getBinDir(), CBuildConfig::swiftGuiExecutableName());
if (CBuildConfig::isRunningOnMacOSXPlatform())
{
m_executable += QLatin1String(".app/Contents/MacOS/");