From a307601382114916cb3c13d6018d2a57f5f08660 Mon Sep 17 00:00:00 2001 From: kervala Date: Mon, 17 Oct 2016 11:19:11 +0200 Subject: [PATCH] Fixed: getInstallerCurrentDirPath() returns bundle parent directory under OS X --- .../client/ryzom_installer/src/configfile.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/code/ryzom/tools/client/ryzom_installer/src/configfile.cpp b/code/ryzom/tools/client/ryzom_installer/src/configfile.cpp index 2ff5abd05..86c99278c 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/configfile.cpp +++ b/code/ryzom/tools/client/ryzom_installer/src/configfile.cpp @@ -752,7 +752,19 @@ QString CConfigFile::getInstallerCurrentFilePath() const QString CConfigFile::getInstallerCurrentDirPath() const { // installer is always run from TEMP under Windows - return QApplication::applicationDirPath(); + QString appDir = QApplication::applicationDirPath(); + +#ifdef Q_OS_MAC + QDir dir(appDir); + dir.cdUp(); // .. = Contents + dir.cdUp(); // .. = .app + dir.cdUp(); // .. = + + // return absolute path + appDir = dir.absolutePath(); +#endif + + return appDir; } QString CConfigFile::getInstallerInstalledFilePath() const