19 lines
1.3 KiB
Bash
Executable File
19 lines
1.3 KiB
Bash
Executable File
#!/bin/bash
|
|
# OctoWoW on Linux: updates from the patch channel, then starts the game under GE-Proton (via umu-run).
|
|
# Needs: umu-launcher, a GE-Proton build (set PROTONPATH, default GE-Proton latest), Vulkan drivers.
|
|
# Several clients at once: run this again while one is open. umu/Proton would hold a second launch in the same prefix
|
|
# until the first game exits, so extra instances start WowB.exe with Proton's wine and the running client's Wine
|
|
# environment (same prefix and wineserver). Updates install when all clients are closed.
|
|
D="$(cd "$(dirname "$0")" && pwd)"; GAME="$D/_classic_beta_"; cd "$GAME" || exit 1
|
|
export WINEPREFIX="${WINEPREFIX:-$HOME/.local/share/octowow-prefix}" GAMEID=umu-0 WINEDEBUG=-all
|
|
export PROTONPATH="${PROTONPATH:-GE-Proton}"
|
|
for p in $(pgrep -x WowB.exe); do
|
|
tr '\0' '\n' < /proc/$p/environ 2>/dev/null | grep -qxE "STEAM_COMPAT_INSTALL_PATH=($GAME|${GAME%/*})/?" || continue
|
|
while IFS= read -r line; do
|
|
case "$line" in WINESERVERSOCKET=*|WINELOADERNOEXEC=*|WINEPRELOADRESERVE=*|PROTON_VERB=*) ;;
|
|
WINE*|DXVK*|VKD3D*|PROTON*|STEAM_COMPAT*|LD_LIBRARY_PATH=*) export "$line";; esac
|
|
done < <(tr '\0' '\n' < /proc/$p/environ)
|
|
exec "$PROTONPATH/files/bin/wine" ./WowB.exe
|
|
done
|
|
mkdir -p "$WINEPREFIX"; exec umu-run ../OctoUpdater.exe
|