mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 07:23:39 +02:00
fix mac application path
This commit is contained in:
parent
7c15500b77
commit
4179ef3391
3 changed files with 6 additions and 2 deletions
|
@ -21,6 +21,7 @@ bool replaceDirectory(const QString& orginalDirectory, const QString& newDirecto
|
||||||
void closeInterfaceIfRunning();
|
void closeInterfaceIfRunning();
|
||||||
void waitForInterfaceToClose();
|
void waitForInterfaceToClose();
|
||||||
bool isLauncherAlreadyRunning();
|
bool isLauncherAlreadyRunning();
|
||||||
|
QString getBundlePath();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
|
|
|
@ -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) {
|
void launchAutoUpdater(const QString& autoUpdaterPath) {
|
||||||
NSException *exception;
|
NSException *exception;
|
||||||
|
|
|
@ -79,7 +79,6 @@ QString LauncherState::getClientExecutablePath() const {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QString LauncherState::getConfigFilePath() const {
|
QString LauncherState::getConfigFilePath() const {
|
||||||
QDir clientDirectory = getClientDirectory();
|
QDir clientDirectory = getClientDirectory();
|
||||||
return clientDirectory.absoluteFilePath("config.json");
|
return clientDirectory.absoluteFilePath("config.json");
|
||||||
|
@ -89,7 +88,7 @@ QString LauncherState::getLauncherFilePath() const {
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
return _launcherDirectory.absoluteFilePath("launcher.exe");
|
return _launcherDirectory.absoluteFilePath("launcher.exe");
|
||||||
#elif defined(Q_OS_MACOS)
|
#elif defined(Q_OS_MACOS)
|
||||||
return _launcherDirectory.absoluteFilePath("launcher.app");
|
return getBundlePath() + "/Contents/MacOS/HQ Launcher";
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue