DevourUnlocker/scripts/launch.sh
MiTHRAL 1e0f727ab7
Some checks failed
Build DevourUnlocker / windows-cross (push) Failing after 8s
Build DevourUnlocker / linux (push) Failing after 7s
Build DevourUnlocker / standalone (push) Successful in 5s
version.dll is now sole unlocker — full hooks, no user WINEDLLOVERRIDES needed
- UnityPlayer.dll imports VERSION.dll + WINHTTP.dll (objdump -p) — version.dll beside DEVOUR.exe is auto-loaded on Windows, installer now silently auto-sets WINEDLLOVERRIDES=version=n,b in Steam localconfig.vdf for Proton so user just presses Play
- src/main_version.cpp: now full HookThread (wait GameAssembly.dll + installPatches) linking devour_core (was minimal no-hooks 103K, now 14M full like winhttp) — unlocks all categories: robes/characters/perks/pets/flashlights/emotes/outfits via IsRobe/IsCharacter/HasPerk/HasOutfit + UpdateLocked* hooks
- CMakeLists.txt: version target links devour_core + winpthread static, primary = version.dll less flagged than winhttp; winhttp retained only as optional compat
- scripts/install.sh: copy version.dll primary (all categories), auto-set LaunchOptions silent, message no manual step; scripts/launch.sh: now uses version=n,b auto, checks version.dll
- standalone/injector.py: find_built_dlls prefers version.dll, ensure_mod_deployed deploys version primary; standalone/devour_unlocker.py: diagnose hints updated to version.dll
- .github/workflows/build.yml: runs-on docker (Forgejo runner media-server labels docker v6.4.0), package version.dll primary zip, linux job also docker
2026-08-24 00:29:51 -04:00

64 lines
2.6 KiB
Bash
Executable file

#!/usr/bin/env bash
# Launch Devour with DevourUnlocker via Proton (sets WINEDLLOVERRIDES so winhttp.dll is loaded)
# Usage: ./scripts/launch.sh or bash scripts/launch.sh --diagnose
set -euo pipefail
GAME_DIR="${GAME_DIR:-$HOME/.local/share/Steam/steamapps/common/Devour}"
PREFX="${WINEPREFIX:-$HOME/.local/share/Steam/steamapps/compatdata/1274570/pfx}"
PROTON="${PROTON:-$HOME/.local/share/Steam/compatibilitytools.d/GE-Proton10-34/proton}"
if [[ ! -f "$GAME_DIR/DEVOUR.exe" ]]; then
echo "[!] No DEVOUR.exe at $GAME_DIR — set GAME_DIR=/path"
exit 1
fi
if [[ ! -f "$GAME_DIR/version.dll" ]]; then
echo "[!] version.dll not found beside DEVOUR.exe — running injector --deploy-only..."
python3 "$(dirname "$0")/../standalone/injector.py" --deploy-only || true
fi
if [[ ! -f "$GAME_DIR/version.dll" ]]; then
echo "[!] Still no version.dll — build or run scripts/install.sh"
exit 1
fi
echo "[*] Game: $GAME_DIR"
echo "[*] Prefix: $PREFX"
echo "[*] Proton: $PROTON"
echo "[*] Launching with version.dll (primary unlocker) — no manual Steam Launch Options needed if installed via install.sh"
echo "[*] Check $GAME_DIR/DevourUnlocker.log after"
if [[ "${1:-}" == "--diagnose" ]]; then
python3 "$(dirname "$0")/../standalone/devour_unlocker.py" diagnose
exit 0
fi
export WINEPREFIX="$PREFX"
export STEAM_COMPAT_DATA_PATH="$HOME/.local/share/Steam/steamapps/compatdata/1274570"
export STEAM_COMPAT_CLIENT_INSTALL_PATH="$HOME/.local/share/Steam"
export SteamAppId=1274570
# version.dll is primary unlocker (UnityPlayer.dll imports VERSION.dll, so native version.dll in game dir is auto-loaded on Windows;
# on Proton/Wine we still set WINEDLLOVERRIDES silently so user never needs to set it manually)
if [[ -z "${WINEDLLOVERRIDES:-}" ]]; then
export WINEDLLOVERRIDES="version=n,b"
else
export WINEDLLOVERRIDES="version=n,b;${WINEDLLOVERRIDES}"
fi
export WINEDEBUG=-all
# Kill stale wineserver
wineserver -k 2>/dev/null || true
sleep 1
rm -f "$GAME_DIR/DevourUnlocker.log"
# Launch via proton (background, then wait 5s and show log)
timeout 30 "$PROTON" run "$GAME_DIR/DEVOUR.exe" &
PROTON_PID=$!
echo "[*] Proton pid $PROTON_PID — waiting 15s for DevourUnlocker.log..."
sleep 15
if [[ -f "$GAME_DIR/DevourUnlocker.log" ]]; then
echo "--- DevourUnlocker.log ---"
cat "$GAME_DIR/DevourUnlocker.log"
else
echo "[!] No DevourUnlocker.log — DLL not loaded. Check WINEDLLOVERRIDES and that libgcc etc are beside winhttp.dll"
ls -lh "$GAME_DIR"/*.dll 2>&1 | head -n 20
fi
echo "[*] Game should be running — press F6 for GUI, check in-game wardrobe. This script will exit but game keeps running."
wait $PROTON_PID 2>/dev/null || true