From dd0f1ab72baab95ca3fb41b0a86fab3f3eeb9fc3 Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 15 Oct 2016 17:13:51 +0200 Subject: [PATCH] Changed: Install shorcuts in Applications instead of /Applications --- .../tools/client/ryzom_installer/src/configfile.cpp | 11 ++++++++++- 1 file changed, 10 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 1ec7364cc..20accba68 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/configfile.cpp +++ b/code/ryzom/tools/client/ryzom_installer/src/configfile.cpp @@ -307,7 +307,16 @@ QString CConfigFile::getDesktopDirectory() const QString CConfigFile::getMenuDirectory() const { - return QStandardPaths::writableLocation(QStandardPaths::ApplicationsLocation) + "/" + QApplication::applicationName(); + QString applicationLocation; + +#ifdef O_OS_MAC + // QStandardPaths::ApplicationsLocation returns read-only location so fix it, will be installed in ~/Applications + applicationLocation = QStandardPaths::writableLocation(QStandardPaths::HomeLocation) + "/Applications"; +#else + applicationLocation = QStandardPaths::writableLocation(QStandardPaths::ApplicationsLocation); +#endif + + return applicationLocation + "/" + QApplication::applicationName(); } bool CConfigFile::has64bitsOS()