Skip to content

Instantly share code, notes, and snippets.

@divadsn
Created September 19, 2019 23:53
Show Gist options
  • Save divadsn/00ed5b4a96e13d2e7fa8a7daedec39ec to your computer and use it in GitHub Desktop.
Save divadsn/00ed5b4a96e13d2e7fa8a7daedec39ec to your computer and use it in GitHub Desktop.
Script to run GTA IV with older Wine version. Usage: runscript.sh LaunchGTAIV.exe
#!/bin/bash
export WINEPREFIX=~/.local/share/wineprefixes/GTAIV
export WINEARCH=win32
winepath=$(readlink -f ~/.local/share/wine/4.11_win32)
if [ ! -d $winepath ]; then
echo "Could not find wine-4.11 installation at $winepath, quitting..."
exit 1
fi
export PATH="$winepath/bin:$PATH"
export LD_LIBRARY_PATH="$winepath/lib:$LD_LIBRARY_PATH"
export WINEDLLOVERRIDES="winemenubuilder.exe=d"
export WINESERVER="$winepath/bin/wineserver"
export WINELOADER="$winepath/bin/wine"
export WINEDLLPATH="$winepath/lib/wine"
if [ -z "$1" ]; then
echo "No file to run supplied! Usage: runscript.sh <executable_name>"
exit 1
fi
cd $WINEPREFIX
echo "Searching for $1 inside wineprefix..."
LAUNCHER=$(find ./drive_c -name $1 -print -quit)
BASEDIR=$(dirname "$LAUNCHER")
echo "Found: $BASEDIR"
cd "$BASEDIR"
DXVK_HUD=1 wine $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment