Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Gcenx/34b3c62da744e181fa221518987ff073 to your computer and use it in GitHub Desktop.
Save Gcenx/34b3c62da744e181fa221518987ff073 to your computer and use it in GitHub Desktop.
Simple install and download of Path of Diablo for Mac OS
#!/bin/bash
# Author: Brett Reinhard
# Date: 1/13/2019
# Description:
# Create Folder called 'd2' in your Home directory, aka /Users/profile_name/d2
# Download Windows Game Clients, Class and LOD. Rename the exe files as vanilla.exe and lod.exe respectively
mkdir ~/wine_cellar
locale_found=`defaults read .GlobalPreferences AppleLanguages | grep '"*"' | sed 's/"//g' | sed 's/-//g' | sed 's/ //g'`
/bin/mkdir ~/d2
brew_installed=$(/usr/bin/stat /usr/local/bin/brew)
wine_installed=$(/usr/bin/stat /usr/local/bin/wine)
wine_tricks_installed=$(stat /usr/local/bin/winetricks)
if [ "$brew_installed" = "stat: /usr/local/bin/brew: stat: No such file or directory" ]
then
echo Installing Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
else
echo Home Brew Detected
fi
echo Installing xquartz
/usr/local/bin/brew cask install xquartz
if [ "$wine_installed" = "stat: /usr/local/bin/wine: stat: No such file or directory" ]
then
echo Installing Wine
/usr/local/bin/brew install wine
else
echo Wine Detected
fi
export WINEPREFIX=~/wine_cellar
/usr/local/bin/wine winecfg
if [ "$wine_tricks_installed" = "stat: /usr/local/bin/winetricks: stat: No such file or directory" ]
then
echo Installing WineTricks
/usr/local/bin/brew install winetricks
else
echo WineTricks Detected
fi
echo Installing .NET Core
/usr/local/bin/winetricks dotnet452 corefonts -q
echo "Installing Vanilla"
/usr/local/bin/wine ~/Downloads/"Downloader_Diablo2_$locale_found.exe"
echo "Installing Lord of Destruction"
/usr/local/bin/wine ~/Downloads/"Downloader_Diablo2_Lord_of_Destruction_$locale_found.exe"
echo "Downloading Path of Diablo";
/usr/local/bin/wget "https://s0.seedboxws.com/ddl/sws02233/pathofdiablolauncher.msi" -P ~/Downloads/path_of_diablo
echo "Installing Path of Diablo"
/usr/local/bin/wine msiexec /i ~/Downloads/path_of_diablo/pathofdiablolauncher.msi
echo "Creating Launcher on Desktop"
/bin/cat <<EOT > ~/Desktop/Path_Of_Diablo_Launcher.command
#!/bin/bash
cd ~/wine_cellar/drive_c/Program\ Files/Diablo\ II/Path\ of\ Diablo
/usr/local/bin/wine Path\ of\ Diablo\ Launcher.exe
EOT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment