fix mac application path

This commit is contained in:
dante ruiz 2019-10-08 10:23:13 -07:00
parent 7c15500b77
commit 4179ef3391
3 changed files with 6 additions and 2 deletions

View file

@ -21,6 +21,7 @@ bool replaceDirectory(const QString& orginalDirectory, const QString& newDirecto
void closeInterfaceIfRunning();
void waitForInterfaceToClose();
bool isLauncherAlreadyRunning();
QString getBundlePath();
#endif
#ifdef Q_OS_WIN

View file

@ -42,6 +42,10 @@ void launchClient(const QString& clientPath, const QString& homePath, const QStr
}
QString getBundlePath() {
return QString::fromNSString([[NSBundle mainBundle] bundlePath]);
}
void launchAutoUpdater(const QString& autoUpdaterPath) {
NSException *exception;

View file

@ -79,7 +79,6 @@ QString LauncherState::getClientExecutablePath() const {
#endif
}
QString LauncherState::getConfigFilePath() const {
QDir clientDirectory = getClientDirectory();
return clientDirectory.absoluteFilePath("config.json");
@ -89,7 +88,7 @@ QString LauncherState::getLauncherFilePath() const {
#if defined(Q_OS_WIN)
return _launcherDirectory.absoluteFilePath("launcher.exe");
#elif defined(Q_OS_MACOS)
return _launcherDirectory.absoluteFilePath("launcher.app");
return getBundlePath() + "/Contents/MacOS/HQ Launcher";
#endif
}