summaryrefslogtreecommitdiffstats
path: root/logic
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-06-15 22:08:13 +0200
committerPetr Mrázek <peterix@gmail.com>2015-06-30 07:16:20 +0200
commitf86a39c21c9898c0b5966abb2b4907eb0b5bac1d (patch)
tree027638dd9d08e37160b4d6a325c6b04ef0adfe35 /logic
parent34ddfc7ecc2b0450b3d501e65cb4203ac747ed42 (diff)
downloadMultiMC-f86a39c21c9898c0b5966abb2b4907eb0b5bac1d.tar
MultiMC-f86a39c21c9898c0b5966abb2b4907eb0b5bac1d.tar.gz
MultiMC-f86a39c21c9898c0b5966abb2b4907eb0b5bac1d.tar.lz
MultiMC-f86a39c21c9898c0b5966abb2b4907eb0b5bac1d.tar.xz
MultiMC-f86a39c21c9898c0b5966abb2b4907eb0b5bac1d.zip
SCRATCH fix BaseLauncher
Diffstat (limited to 'logic')
-rw-r--r--logic/BaseLauncher.cpp23
1 files changed, 19 insertions, 4 deletions
diff --git a/logic/BaseLauncher.cpp b/logic/BaseLauncher.cpp
index 96cb2b93..41bccb68 100644
--- a/logic/BaseLauncher.cpp
+++ b/logic/BaseLauncher.cpp
@@ -21,6 +21,8 @@
#include <QDir>
#include <QEventLoop>
+#define IBUS "@im=ibus"
+
BaseLauncher::BaseLauncher(InstancePtr instance): m_instance(instance)
{
}
@@ -56,7 +58,7 @@ void BaseLauncher::initializeEnvironment()
qDebug() << "Env: ignoring" << key << value;
continue;
}
-#ifdef LINUX
+#ifdef Q_OS_LINUX
// Do not pass LD_* variables to java. They were intended for MultiMC
if(key.startsWith("LD_"))
{
@@ -71,13 +73,26 @@ void BaseLauncher::initializeEnvironment()
value.replace(IBUS, "");
qDebug() << "Env: stripped" << IBUS << "from" << save << ":" << value;
}
+ if(key == "GAME_PRELOAD")
+ {
+ m_env.insert("LD_PRELOAD", value);
+ continue;
+ }
+ if(key == "GAME_LIBRARY_PATH")
+ {
+ m_env.insert("LD_LIBRARY_PATH", value);
+ continue;
+ }
#endif
qDebug() << "Env: " << key << value;
m_env.insert(key, value);
}
-#ifdef LINUX
- // HACK: Workaround for QTBUG-42500
- m_env.insert("LD_LIBRARY_PATH", "");
+#ifdef Q_OS_LINUX
+ // HACK: Workaround for QTBUG42500
+ if(!m_env.contains("LD_LIBRARY_PATH"))
+ {
+ m_env.insert("LD_LIBRARY_PATH", "");
+ }
#endif
// export some infos