diff --git a/build.sh b/build.sh index 34be0d13dbe558f05b075feb2c12d3001a0d8956..fbd3523ad3bf34340f7c63ba240080272999b3c1 100755 --- a/build.sh +++ b/build.sh @@ -1,5 +1,9 @@ #! /bin/bash +CACHE=/tmp/fggl/ +LOG=$CACHE/demo.log +EXE="../build/demo/FgglDemo" + if [[ ! -d "build/" ]] then mkdir build @@ -10,13 +14,30 @@ sudo dnf install -y wayland-devel libxkbcommon-devel wayland-protocols-devel ext sudo dnf install -y glew-devel glm-devel # if doing shader development, disable the cache to make sure changes take affect -rm -rf /tmp/fggl/ +rm -rf $CACHE +# +# build step +# pushd build cmake .. make popd +# +# additional stuff +# + +# gamemoderun +if [ -x "$(command -v gamemoderun)" ]; then + EXE="gamemoderun $EXE" +fi + +# mangohud +if [ -x "$(command -v mangohud)" ]; then + EXE="mangohud --dlsym $EXE" +fi + pushd demo -../build/demo/FgglDemo > /tmp/fggl.log 2>&1 & +$EXE ../build/demo/FgglDemo > /tmp/fggl.log 2>&1 & popd