-
-
Save Ligh7bringer/ebf67c36a6999f000facef9d355d20bd to your computer and use it in GitHub Desktop.
Wine setup script for creating a minimalist gaming environment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| TRICKS=() | |
| TRICKS+=(corefonts) | |
| TRICKS+=(dotnet452) | |
| #TRICKS+=(dotnet462) | |
| #TRICKS+=(dotnet472) | |
| TRICKS+=(vcrun2005) | |
| TRICKS+=(vcrun2008) | |
| TRICKS+=(vcrun2015) | |
| test -z "$WINEPREFIX" && WINEPREFIX="${1:-$HOME/.wine}" | |
| test -z "$WINEARCH" && WINEARCH="${2:-win64}" | |
| 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 winetricks, wineasio and dxvk are installed before proceeding!" | |
| echo "WARNING!" | |
| echo | |
| fi | |
| echo "WINEARCH=${WINEARCH} WINEPREFIX=${WINEPREFIX}" | |
| echo | |
| read -p "Hit enter to continue..." ans; wineserver -ks | |
| test -d "${WINEPREFIX}" && rm -rf "${WINEPREFIX}" | |
| [[ "${WINEARCH}" == "win64" ]] && wine64 wineboot -i || wine wineboot -i | |
| wineboot -r -f | |
| test -w $(command -v winetricks) &>/dev/null && winetricks --self-update | |
| set -e | |
| for trick in "${TRICKS[@]}"; do | |
| echo -n "Installing $trick, please wait..." | |
| if winetricks --country=US --force -q "${trick}" 1>>/tmp/winetricks.log 2>>/tmp/winetricks.err; then | |
| echo " ok" | |
| else | |
| echo " err" | |
| fi | |
| done | |
| env WINEPREFIX="${WINEPREFIX}" regsvr32 wineasio.dll | |
| env WINEPREFIX="${WINEPREFIX}" setup_dxvk install | |
| wineserver -ks | |
| echo "Configuring wine..." | |
| echo | |
| winecfg | |
| setup="/tmp/Battle.net-Setup.exe" | |
| test -f "$setup" || wget -c -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