Skip to content

Instantly share code, notes, and snippets.

@tonylambiris
Created March 16, 2019 07:07
Show Gist options
  • Select an option

  • Save tonylambiris/237de56180c1f8db8ae196b4817f1869 to your computer and use it in GitHub Desktop.

Select an option

Save tonylambiris/237de56180c1f8db8ae196b4817f1869 to your computer and use it in GitHub Desktop.
Setup wine-staging for gaming support
#!/bin/bash
TRICKS=()
TRICKS+=(corefonts)
TRICKS+=(dotnet462)
TRICKS+=(vcrun2005)
TRICKS+=(vcrun2008)
TRICKS+=(vcrun2015)
test -z $WINEPREFIX && WINEPREFIX="${1:-$HOME/.wine}"
test -z $WINEARCH && WINEARCH="${2:-win64}"
function initialize() {
if test -d "${WINEPREFIX}"; then
echo
echo "WARNING!"
echo "WARNING! This will wipe all data from \$WINEPREFIX to ensure a clean setup!"
echo "WARNING! Ensure wineasio and dxvk-bin are installed before proceeding."
echo "WARNING!"
echo
fi
echo "WINEPREFIX=${WINEPREFIX} WINEARCH=${WINEARCH}"
echo
read -p "Hit enter to continue..." ans; wineserver -ks
test -d "${WINEPREFIX}" && rm -rf "${WINEPREFIX}"
[[ "${WINEARCH}" == "win64" ]] && wine64 wineboot -i || wine wineboot -i
}
initialize
regsvr32 wineasio.dll
setup_dxvk install
wineboot -r -f
winetricks --self-update
set -e
for trick in "${TRICKS[@]}"; do
echo -n "Installing $trick, please wait..."
if winetricks -q "${trick}" 1>>/tmp/winetricks.log 2>>/tmp/winetricks.err; then
echo " ok"
else
echo " err"
fi
done
wineserver -ks
echo "Configure wine before setup..."
echo
winecfg
#setup="/tmp/Battle.net-Setup.exe"
#test -f "$setup" || axel -a -o "$setup" \
# 'https://www.battle.net/download/getInstallerForGame?os=win&locale=enUS&version=LIVE&gameProgram=BATTLENET_APP'
#wine "$setup"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment