diff options
Diffstat (limited to 'launcher')
-rw-r--r-- | launcher/Application.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/launcher/Application.cpp b/launcher/Application.cpp index 2d0c81bb..c1849b4e 100644 --- a/launcher/Application.cpp +++ b/launcher/Application.cpp @@ -308,7 +308,13 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv) } else { -#if defined(Q_OS_MAC) +#ifdef LAUNCHER_LINUX_DATADIR + QString xdgDataHome = QFile::decodeName(qgetenv("XDG_DATA_HOME")); + if (xdgDataHome.isEmpty()) + xdgDataHome = QDir::homePath() + QLatin1String("/.local/share"); + dataPath = xdgDataHome + "/devlauncher"; + adjustedBy += "XDG standard " + dataPath; +#elif defined(Q_OS_MAC) QDir foo(FS::PathCombine(applicationDirPath(), "../../Data")); dataPath = foo.absolutePath(); adjustedBy += "Fallback to special Mac location " + dataPath; @@ -524,6 +530,10 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv) FS::updateTimestamp(m_rootPath); #endif +#ifdef MULTIMC_JARS_LOCATION + m_jarsPath = TOSTRING(MULTIMC_JARS_LOCATION); +#endif + qDebug() << BuildConfig.LAUNCHER_DISPLAYNAME << ", (c) 2013-2021 " << BuildConfig.LAUNCHER_COPYRIGHT; qDebug() << "Version : " << BuildConfig.printableVersionString(); qDebug() << "Git commit : " << BuildConfig.GIT_COMMIT; |