summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xapplication/package/linux/MultiMC7
-rw-r--r--logic/BaseProcess.cpp15
2 files changed, 19 insertions, 3 deletions
diff --git a/application/package/linux/MultiMC b/application/package/linux/MultiMC
index 2e44a3ac..c131cb36 100755
--- a/application/package/linux/MultiMC
+++ b/application/package/linux/MultiMC
@@ -17,8 +17,11 @@ fi
MMC_DIR="$(dirname "$(readlink -f "$0")")"
echo "MultiMC Dir: ${MMC_DIR}"
-# Set up env
-export LD_LIBRARY_PATH="${MMC_DIR}/bin":$LD_LIBRARY_PATH
+# Set up env - filter out input LD_ variables but pass them in under different names
+export GAME_LIBRARY_PATH=$LD_LIBRARY_PATH
+export GAME_PRELOAD=$LD_PRELOAD
+export LD_LIBRARY_PATH="${MMC_DIR}/bin":$MMC_LIBRARY_PATH
+export LD_PRELOAD=$MMC_PRELOAD
export QT_PLUGIN_PATH="${MMC_DIR}/plugins"
export QT_FONTPATH="${MMC_DIR}/fonts"
diff --git a/logic/BaseProcess.cpp b/logic/BaseProcess.cpp
index b9aa295c..852bec4c 100644
--- a/logic/BaseProcess.cpp
+++ b/logic/BaseProcess.cpp
@@ -100,12 +100,25 @@ void BaseProcess::init()
qDebug() << "Env: stripped" << IBUS << "from" << save << ":" << value;
}
#endif
+ if(key == "GAME_PRELOAD")
+ {
+ env.insert("LD_PRELOAD", value);
+ continue;
+ }
+ if(key == "GAME_LIBRARY_PATH")
+ {
+ env.insert("LD_LIBRARY_PATH", value);
+ continue;
+ }
qDebug() << "Env: " << key << value;
env.insert(key, value);
}
#ifdef Q_OS_LINUX
// HACK: Workaround for QTBUG-42500
- env.insert("LD_LIBRARY_PATH", "");
+ if(!env.contains("LD_LIBRARY_PATH"))
+ {
+ env.insert("LD_LIBRARY_PATH", "");
+ }
#endif
// export some infos