aboutsummaryrefslogtreecommitdiff
path: root/launcher/Launcher.in
diff options
context:
space:
mode:
authorSefa Eyeoglu <contact@scrumplex.net>2022-06-24 17:54:01 +0200
committerSefa Eyeoglu <contact@scrumplex.net>2022-07-19 18:07:58 +0200
commit2d53c7c5b2dfb4e7172d105a54dcdbc723e7cda0 (patch)
tree88445d72353aec4656a40a1948eebb9624915669 /launcher/Launcher.in
parentc86610b917d2935426c0813bead01b610b913fae (diff)
downloadPrismLauncher-2d53c7c5b2dfb4e7172d105a54dcdbc723e7cda0.tar.gz
PrismLauncher-2d53c7c5b2dfb4e7172d105a54dcdbc723e7cda0.tar.bz2
PrismLauncher-2d53c7c5b2dfb4e7172d105a54dcdbc723e7cda0.zip
refactor: filter values in environment variables
Before this change, you had to specify custom LD_* variables using the prefix GAME_LD_*. Now instead of dropping all LD_* variables by default, we should just filter them and remove the values we *know* are from our start script. Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
Diffstat (limited to 'launcher/Launcher.in')
-rwxr-xr-xlauncher/Launcher.in18
1 files changed, 11 insertions, 7 deletions
diff --git a/launcher/Launcher.in b/launcher/Launcher.in
index 528e360e..68fac26a 100755
--- a/launcher/Launcher.in
+++ b/launcher/Launcher.in
@@ -18,13 +18,17 @@ LAUNCHER_NAME=@Launcher_APP_BINARY_NAME@
LAUNCHER_DIR="$(dirname "$(readlink -f "$0")")"
echo "Launcher Dir: ${LAUNCHER_DIR}"
-# Set up env - filter out input LD_ variables but pass them in under different names
-export GAME_LIBRARY_PATH=${GAME_LIBRARY_PATH-${LD_LIBRARY_PATH}}
-export GAME_PRELOAD=${GAME_PRELOAD-${LD_PRELOAD}}
-export LD_LIBRARY_PATH="${LAUNCHER_DIR}/lib@LIB_SUFFIX@":$LAUNCHER_LIBRARY_PATH
-export LD_PRELOAD=$LAUNCHER_PRELOAD
-export QT_PLUGIN_PATH="${LAUNCHER_DIR}/plugins"
-export QT_FONTPATH="${LAUNCHER_DIR}/fonts"
+# Set up env.
+# Pass our custom variables separately so that the launcher can remove them for child processes
+export LAUNCHER_LD_LIBRARY_PATH="${LAUNCHER_DIR}/lib@LIB_SUFFIX@"
+export LAUNCHER_LD_PRELOAD=""
+export LAUNCHER_QT_PLUGIN_PATH="${LAUNCHER_DIR}/plugins"
+export LAUNCHER_QT_FONTPATH="${LAUNCHER_DIR}/fonts"
+
+export LD_LIBRARY_PATH="$LAUNCHER_LD_LIBRARY_PATH:$LD_LIBRARY_PATH"
+export LD_PRELOAD="$LAUNCHER_LD_PRELOAD:$LD_PRELOAD"
+export QT_PLUGIN_PATH="$LAUNCHER_QT_PLUGIN_PATH:$QT_PLUGIN_PATH"
+export QT_FONTPATH="$LAUNCHER_QT_FONTPATH:$QT_FONTPATH"
# Detect missing dependencies...
DEPS_LIST=`ldd "${LAUNCHER_DIR}"/plugins/*/*.so 2>/dev/null | grep "not found" | sort -u | awk -vORS=", " '{ print $1 }'`