From c6d1b45bfbee393b45b40f360f08a297f8b48943 Mon Sep 17 00:00:00 2001 From: Alex Smith Date: Sat, 13 Jul 2019 09:50:25 +0100 Subject: [PATCH] Use the appropriate library path for whether the app is 32- or 64-bit in gamemoderun (#156) --- data/gamemoderun.in | 9 ++++----- data/meson.build | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/data/gamemoderun.in b/data/gamemoderun.in index 9704d4d..dd83ba6 100755 --- a/data/gamemoderun.in +++ b/data/gamemoderun.in @@ -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 "$@" diff --git a/data/meson.build b/data/meson.build index 0715c17..3062d40 100644 --- a/data/meson.build +++ b/data/meson.build @@ -1,7 +1,7 @@ data_conf = configuration_data() data_conf.set('BINDIR', path_bindir) data_conf.set('LIBEXECDIR', path_libexecdir) -data_conf.set('GAMEMODE_LIB_DIR', path_libdir) +data_conf.set('GAMEMODE_PREFIX', path_prefix) # Pull in the example config config_example = run_command(