mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-10 09:19:01 +00:00
Fixed: getInstallerCurrentDirPath() returns bundle parent directory under OS X
This commit is contained in:
parent
681d3b5c73
commit
a307601382
1 changed files with 13 additions and 1 deletions
|
@ -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(); // .. = <parent>
|
||||
|
||||
// return absolute path
|
||||
appDir = dir.absolutePath();
|
||||
#endif
|
||||
|
||||
return appDir;
|
||||
}
|
||||
|
||||
QString CConfigFile::getInstallerInstalledFilePath() const
|
||||
|
|
Loading…
Reference in a new issue