feat: Add scripts and systemd services for SteamOS session management and game launching

This commit is contained in:
2025-10-31 19:57:42 +01:00
parent 7a7f2711fe
commit d42d717f6c
18 changed files with 63 additions and 13 deletions
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
set -euo pipefail
LOGFILE="$HOME/.local/logs/retroarch-ppsspp.log"
log() { echo "[$(date --iso-8601=seconds)] $*" | tee -a "$LOGFILE"; }
RETROARCH_HOME="$HOME/.local/share/Steam/steamapps/common/RetroArch"
if [ ! -d "$RETROARCH_HOME" ]; then
log "ERROR: RetroArch directory not found at $RETROARCH_HOME, install it via Steam"
exit 127
fi
RETROARCH_BIN="$RETROARCH_HOME/retroarch"
RETROARCH_CORE=ppsspp_libretro.so
if [ ! -f "$RETROARCH_BIN" ] || [ ! -f "$RETROARCH_HOME/cores/$RETROARCH_CORE" ]; then
log "ERROR: retroarch or core not found, install it via Steam"
exit 127
fi
log "Launching RetroArch: $RETROARCH_BIN -L \"$RETROARCH_HOME/cores/$RETROARCH_CORE\" \"${@}\""
"$RETROARCH_BIN" -L "$RETROARCH_HOME/cores/$RETROARCH_CORE" "${@}" >>"$LOGFILE"