Add "gamemoderun", a wrapper bash script like "primusrun"

This should remove a point of failure currently where users fail to set LD_PRELOAD correctly, or the path is wrong somehow.

	FWIW: The old method still works, and I've noted that in the README.
This commit is contained in:
Marc Di Luzio
2019-02-05 21:13:16 +00:00
parent 89263ba6fd
commit 74e26d6f63
4 changed files with 35 additions and 4 deletions

11
data/gamemoderun.in Normal file
View File

@@ -0,0 +1,11 @@
#!/bin/bash
# Helper script to launch games with gamemode
# Path to install gamemoded auto script
CONFIG_LIB_DIR="@GAMEMODE_LIB_DIR@/libgamemodeauto.so.0"
# Set the ld library path prefixed libgamemodeauto
export LD_LIBRARY_PATH=${CONFIG_LIB_DIR}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
# Launch
exec "$@"