Files
openroller/tools/run_gc_game471.sh
tsuki 831d96e562 Initial public source release
Split reusable rendering and format support into vectorail-core and vectorail-gc.
2026-08-02 17:05:27 +02:00

38 lines
1.1 KiB
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
GC_DIR="$ROOT/GC"
PROTON_DIR="${PROTON_DIR:-}"
if [[ -n "$PROTON_DIR" ]]; then
WINE="${WINE:-$PROTON_DIR/files/bin/wine}"
WINESERVER="${WINESERVER:-$PROTON_DIR/files/bin/wineserver}"
else
WINE="${WINE:-$(command -v wine || true)}"
WINESERVER="${WINESERVER:-$(command -v wineserver || true)}"
fi
WINEPREFIX_DIR="$ROOT/.proton-gc/pfx"
LOCALE_ROOT="/tmp/gc-locale"
if [[ -z "$WINE" || ! -x "$WINE" ]]; then
echo "Wine was not found; set WINE or PROTON_DIR" >&2
exit 1
fi
if [[ ! -d "$LOCALE_ROOT/usr/lib/locale/ja_JP.utf8" ]]; then
mkdir -p "$LOCALE_ROOT/usr/lib/locale"
localedef --no-archive --prefix="$LOCALE_ROOT" -i ja_JP -f UTF-8 ja_JP.UTF-8
fi
export WINEPREFIX="$WINEPREFIX_DIR"
export LOCPATH="$LOCALE_ROOT/usr/lib/locale"
export LANG=ja_JP.UTF-8
export LC_ALL=ja_JP.UTF-8
export DXVK_LOG_LEVEL="${DXVK_LOG_LEVEL:-none}"
if [[ -n "$WINESERVER" && -x "$WINESERVER" ]]; then
"$WINESERVER" -k >/dev/null 2>&1 || true
fi
cd "$GC_DIR"
exec "$WINE" "$GC_DIR/game471.exe"