aboutsummaryrefslogtreecommitdiff
path: root/launcher
diff options
context:
space:
mode:
authortxtsd <thexerothermicsclerodermoid@gmail.com>2022-02-12 09:16:22 +0530
committertxtsd <thexerothermicsclerodermoid@gmail.com>2022-02-23 16:22:23 +0530
commit1e3b896fdaa8b557b648397d10166a52a284c4c7 (patch)
tree0807c948f991918ec94b4a02559c542b8d6909b4 /launcher
parent9e35560554eb089370ba487e5b6265b4bd8e739a (diff)
downloadPrismLauncher-1e3b896fdaa8b557b648397d10166a52a284c4c7.tar.gz
PrismLauncher-1e3b896fdaa8b557b648397d10166a52a284c4c7.tar.bz2
PrismLauncher-1e3b896fdaa8b557b648397d10166a52a284c4c7.zip
Replace layouts with LAUNCH_PORTABLE
Diffstat (limited to 'launcher')
-rw-r--r--launcher/Application.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/launcher/Application.cpp b/launcher/Application.cpp
index e33df252..16fd612e 100644
--- a/launcher/Application.cpp
+++ b/launcher/Application.cpp
@@ -294,16 +294,11 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
}
else
{
-#ifdef LAUNCHER_LINUX_DATADIR
- QString xdgDataHome = QFile::decodeName(qgetenv("XDG_DATA_HOME"));
- if (xdgDataHome.isEmpty())
- xdgDataHome = QDir::homePath() + QLatin1String("/.local/share");
- dataPath = xdgDataHome + "/polymc";
- adjustedBy += "XDG standard " + dataPath;
-#elif defined(Q_OS_MAC)
+ // qDebug() << LAUNCHER_PORTABLE;
+#if !LAUNCHER_PORTABLE || defined(Q_OS_MAC)
QDir foo(FS::PathCombine(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation), ".."));
dataPath = foo.absolutePath();
- adjustedBy += "Fallback to special Mac location " + dataPath;
+ adjustedBy += dataPath;
#else
dataPath = applicationDirPath();
adjustedBy += "Fallback to binary path " + dataPath;
@@ -505,8 +500,10 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
#elif defined(Q_OS_WIN32)
m_rootPath = binPath;
#elif defined(Q_OS_MAC)
- QDir foo(FS::PathCombine(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation), ".."));
+ QDir foo(FS::PathCombine(binPath, "../.."));
m_rootPath = foo.absolutePath();
+ // on macOS, touch the root to force Finder to reload the .app metadata (and fix any icon change issues)
+ FS::updateTimestamp(m_rootPath);
#endif
#ifdef MULTIMC_JARS_LOCATION