aboutsummaryrefslogtreecommitdiff
path: root/launcher
diff options
context:
space:
mode:
authorswirl <roachh@protonmail.com>2021-12-17 12:52:13 -0500
committerLenny McLennington <lennymclennington@protonmail.com>2021-12-18 14:29:33 +0000
commit7912e0f32ba3c465cb564e4c17ab73effeebfefb (patch)
tree9819b2fd79b88f4dd779b2650a98d0d5fe9fb871 /launcher
parent7d047f92236f398b38a49bf2fc99b0714343f780 (diff)
downloadPrismLauncher-7912e0f32ba3c465cb564e4c17ab73effeebfefb.tar.gz
PrismLauncher-7912e0f32ba3c465cb564e4c17ab73effeebfefb.tar.bz2
PrismLauncher-7912e0f32ba3c465cb564e4c17ab73effeebfefb.zip
Apply patches
Re-add lin-system, and fix Linux datadir fix jar paths allow for modern java
Diffstat (limited to 'launcher')
-rw-r--r--launcher/Application.cpp12
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;