Snippets

Maxime Pasquier Blizzard Battle.net via Wine

Updated by Maxime Pasquier

File blizzardBattleNet.sh Modified

  • Ignore whitespace
  • Hide word diff
     fi
  
     winetricks fonts corefonts
-    winetricks dlls vcrun2015
-    winetricks settings win7
+    winetricks dlls vcrun2017
+    winetricks settings win10
     
     wget -O "$installFile" "https://www.battle.net/download/getInstallerForGame?os=win&locale=enUS&version=LIVE&gameProgram=BlizzardBattleNet_APP"
     wine "$installFile"
Updated by Maxime Pasquier

File blizzardBattleNet.sh Modified

  • Ignore whitespace
  • Hide word diff
File contents unchanged.
Created by Maxime Pasquier

File blizzardBattleNet.sh Added

  • Ignore whitespace
  • Hide word diff
+#!/bin/bash
+ 
+if [ $# -lt 1 ] ; then
+    echo "[error] you need to specify an options: run, config, fix-hearthstone-fireside-gathering or install"
+    exit
+fi
+ 
+# initialize
+argument=$1
+export WINEPREFIX=~/.winehq/blizzardBattleNet
+programFiles="$WINEPREFIX/drive_c/Program Files (x86)"
+installFile="$WINEPREFIX/install.exe"
+runFile="Battle.net Launcher.exe"
+ 
+# create prefix
+if [ ! -d $WINEPREFIX ]; then
+    mkdir -p $WINEPREFIX
+fi
+ 
+# boot
+wineboot
+ 
+# install
+if [ "$argument" = "install" ]; then
+    if [ -d "$programFiles/Battle.net" ]; then
+        echo "[error] application already exists, remove it before install"
+        exit
+    fi
+ 
+    winetricks fonts corefonts
+    winetricks dlls vcrun2015
+    winetricks settings win7
+    
+    wget -O "$installFile" "https://www.battle.net/download/getInstallerForGame?os=win&locale=enUS&version=LIVE&gameProgram=BlizzardBattleNet_APP"
+    wine "$installFile"
+# config
+elif [ "$argument" = "config" ]; then
+    winecfg
+# fix
+elif [ "$argument" = "fix-hearthstone-fireside-gathering" ]; then
+    echo "[info] removing the file $programFiles/Hearthstone/Hearthstone_Data/Plugins/LocationAPI.dll"
+    rm "$programFiles/Hearthstone/Hearthstone_Data/Plugins/LocationAPI.dll"
+else
+    cd "$programFiles/Battle.net"
+    wine "$runFile"
+fi