#!/usr/bin/env bash # Generated by the nix-config-umu-game skill -- re-run its script to regenerate. set -euo pipefail # The host must never execute this game-writable file: launch it with # `umu-sandbox `, as the desktop entry does. This check only catches # mistakes; the sandbox is the boundary. if [ "${UMU_SANDBOX:-}" != 1 ]; then echo "run this inside the umu sandbox: umu-sandbox" @GAME_DIR@"/run" >&2 exit 1 fi HERE="$(cd "$(dirname "$(readlink -f "$0")")" && pwd)" # Defaults; ~/Games/global.conf and this game conf/ override them. WINEPREFIX=@WINEPREFIX@ DEFAULT_PROTONPATH=@PROTONPATH@ PROTONPATH="${PROTONPATH:-${UMU_PROTONPATH:-$DEFAULT_PROTONPATH}}" GAMEID=@GAMEID@ LAUNCHER=@LAUNCHER@ ENABLE_GAMEMODE=0 ENABLE_GAMESCOPE=0 GAMESCOPE_ARGS="-f" ENABLE_LOG=0 ENABLE_MANGOHUD=1 MANGOHUD_CONFIG="fps=1,frametime=1,position=top-left" # shellcheck source=/dev/null if [ -f "$HERE/../global.conf" ]; then . "$HERE/../global.conf"; fi # shellcheck source=/dev/null if [ -f "$HERE/conf" ]; then . "$HERE/conf"; fi export WINEPREFIX PROTONPATH GAMEID MANGOHUD_CONFIG export VKD3D_SHADER_CACHE_PATH="$HERE/shader-cache" mkdir -p "$VKD3D_SHADER_CACHE_PATH" PRE="" if [ "$ENABLE_GAMEMODE" = "1" ] && command -v gamemoderun >/dev/null 2>&1; then PRE="gamemoderun"; fi if [ "$ENABLE_GAMESCOPE" = "1" ] && command -v gamescope >/dev/null 2>&1; then PRE="$PRE gamescope $GAMESCOPE_ARGS --"; fi if [ "$ENABLE_MANGOHUD" = "1" ] && command -v mangohud >/dev/null 2>&1; then PRE="$PRE mangohud"; fi if [ -x "$HERE/prelaunch" ]; then "$HERE/prelaunch"; fi if [ "$ENABLE_LOG" = "1" ]; then set -o pipefail $PRE umu-run "$WINEPREFIX/$LAUNCHER" "$@" 2>&1 | tee "$HERE/last-run.log" else exec $PRE umu-run "$WINEPREFIX/$LAUNCHER" "$@" fi