Use the appropriate library path for whether the app is 32- or 64-bit in gamemoderun (#156)

This commit is contained in:
Alex Smith
2019-07-13 09:50:25 +01:00
parent 3881b8b2c8
commit c6d1b45bfb
2 changed files with 5 additions and 6 deletions

View File

@@ -1,11 +1,10 @@
#!/bin/bash
# Helper script to launch games with gamemode
# Path to install gamemoded auto script
CONFIG_LIB_DIR="@GAMEMODE_LIB_DIR@/libgamemodeauto.so.0"
# Path to installed libgamemodeauto. ld.so will substitute "\$LIB" to get the
# appropriate path depending on whether the app is 32- or 64-bit.
GAMEMODEAUTO="@GAMEMODE_PREFIX@/\$LIB/libgamemodeauto.so.0"
# Set the ld preload path prefixed libgamemodeauto
export LD_PRELOAD="${CONFIG_LIB_DIR}${LD_PRELOAD:+:$LD_PRELOAD}"
export LD_PRELOAD="${GAMEMODEAUTO}${LD_PRELOAD:+:$LD_PRELOAD}"
# Launch
exec "$@"