Advertisement
Guest User

hearthstone.sh

a guest
Feb 1st, 2017
1,111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.83 KB | None | 0 0
  1. #!/bin/bash
  2. # Date : 2014-02-08 14:54
  3. # Last revision : 2016-08-07 13:41
  4. # Wine version used : 2.0-staging
  5. # Distribution used to test : Ubuntu 13.10 x64, Debian Jessie, Arch Linux
  6. # Author : kweepeer2, m1kc (+ contributions by many others, thanks!)
  7. # Depend :
  8.  
  9. [ "$PLAYONLINUX" = "" ] && exit 0
  10. source "$PLAYONLINUX/lib/sources"
  11.  
  12. TITLE="Hearthstone"
  13. PREFIX="hearthstone"
  14.  
  15. POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
  16. POL_SetupWindow_Init
  17. POL_SetupWindow_SetID 1950
  18. POL_Debug_Init
  19.  
  20. POL_SetupWindow_presentation "$TITLE" "Blizzard" "http://us.battle.net/hearthstone/en/" "kweepeer2" "$PREFIX"
  21. POL_Wine_SelectPrefix "$PREFIX"
  22. POL_Wine_PrefixCreate "2.0-staging"
  23.  
  24. # Fix "Battle.net Helper.exe" crash on startup.
  25. POL_Call POL_Install_corefonts
  26. POL_Call POL_Install_RegisterFonts
  27. POL_Wine_OverrideDLL "native,builtin" "msvcp140"
  28. POL_Wine_OverrideDLL "native,builtin" "vcruntime140"
  29.  
  30. # Download & Install the game.
  31. # Multiple Language support. See https://eu.battle.net/account/download/?show=hearthstone&style=hearthstone
  32. POL_SetupWindow_menu "$(eval_gettext 'What language do you want to install?')" "Language Selection" \
  33. "English (US)|Español (AL)|Português (BR)|English (EU)|Deutsch|Español (EU)|Português (EU)|Français|Russian|Italiano|Polski|Korean|Chinese (Taiwan)|Chinese (China)" "|"
  34. case "$APP_ANSWER" in
  35. "English (US)")
  36. EXE_FILE="Hearthstone-Setup-enUS.exe";;
  37. "Español (AL)")
  38. EXE_FILE="Hearthstone-Setup-esMX.exe";;
  39. "Português (BR)")
  40. EXE_FILE="Hearthstone-Setup-ptBR.exe";;
  41. "English (EU)")
  42. EXE_FILE="Hearthstone-Setup-enGB.exe";;
  43. "Deutsch")
  44. EXE_FILE="Hearthstone-Setup-deDE.exe";;
  45. "Español (EU)")
  46. EXE_FILE="Hearthstone-Setup-esES.exe";;
  47. "Português (EU)")
  48. EXE_FILE="Hearthstone-Setup-ptPT.exe";;
  49. "Français")
  50. EXE_FILE="Hearthstone-Setup-frFR.exe";;
  51. "Russian")
  52. EXE_FILE="Hearthstone-Setup-ruRU.exe";;
  53. "Italiano")
  54. EXE_FILE="Hearthstone-Setup-itIT.exe";;
  55. "Polski")
  56. EXE_FILE="Hearthstone-Setup-plPL.exe";;
  57. "Korean")
  58. EXE_FILE="Hearthstone-Setup-koKR.exe";;
  59. "Chinese (Taiwan)")
  60. EXE_FILE="Hearthstone-Setup-zhTW.exe";;
  61. "Chinese (China)")
  62. EXE_FILE="Hearthstone-Setup-zhCN.exe";;
  63. *)
  64. exit 1;;
  65. esac
  66.  
  67. POL_System_TmpCreate "$PREFIX"
  68. cd "$POL_System_TmpDir"
  69. POL_Download "http://dist.blizzard.com/downloads/hs-installers/a6029a1d625c79252defff3914fb6e67/retail.1/${EXE_FILE}"
  70. POL_Wine "$POL_System_TmpDir/${EXE_FILE}"
  71. POL_Wine_WaitExit "$TITLE" --allow-kill
  72. POL_System_TmpDelete
  73.  
  74. POL_SetupWindow_VMS "64"
  75. POL_Wine_reboot
  76.  
  77. POL_Shortcut "Battle.net Launcher.exe" "$TITLE" "$TITLE.png" ""
  78. POL_SetupWindow_Close
  79.  
  80. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement