Het forum

[Script] HeartStone Heroes of Warcraft

Card game from Blizzard Entertainment, Inc.

Auteur Antwoorden
Nesuko Woensdag 20 Mei 2015 om 23:51
NesukoAnonymous

HeartStone Heroes of Warcraft card game from Blizzard Entertainment, Inc.

The current script gives me audio problems, so i created one with wine 1.7.43 set to the minimum requirements of the game and it seems to work better.
Notable changes to the current version:
    wine updated
    configured wine
    flashplayer removed
    .dlls not replaced
    install method local or download
 

Errors:

No.

Script:

#!/usr/bin/env playonlinux-bash
# Date : 2015-06-03
# Last revision : 2015-06-03
# Wine version used : 1.7.43 x86
# Distribution used to test : Ubuntu 14.04 x86_64 (Trusty), Linux kernel 3.13.0-48-generic
# Author : Nesuko
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

TITLE="HearthStone installer"
PREFIX="HeartStone"

POL_SetupWindow_Init
POL_Debug_Init

POL_SetupWindow_presentation "HeartStone Heroes of Warcraft" "Blizzard Entertainment, Inc." "http://battle.net/hearthstone" "Nesuko" "$PREFIX"
POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "1.7.43"
Set_OS "winxp" "sp3"

POL_SetupWindow_InstallMethod "LOCAL,DOWNLOAD"
if [ "$INSTALL_METHOD" = "LOCAL" ]; then
    POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run.')" "$TITLE"
    INSTALLER="$APP_ANSWER"
elif [ "$INSTALL_METHOD" = "DOWNLOAD" ]; then
    POL_SetupWindow_menu "$(eval_gettext 'Please select language.')" "$(eval_gettext 'Language options')" " |deDE|enGB|enUS|esES|esMX|frFR|itIT|koKR|plPL|ptBR|ptPT|ruRU|zhCN|zhTW" "|"
    if [ "$APP_ANSWER" != " " ]; then
        POL_System_TmpCreate "$PREFIX"
        cd "$POL_System_TmpDir"
        POL_Download "http://dist.blizzard.com/downloads/hs-installers/a6029a1d625c79252defff3914fb6e67/retail.1/Hearthstone-Setup-$APP_ANSWER.exe"
        INSTALLER="$POL_System_TmpDir/Hearthstone-Setup-$APP_ANSWER.exe"
    else
        POL_Debug_Fatal "No language selected."
    fi
fi

POL_SetupWindow_wait "$(eval_gettext 'Installation in progress.')" "$TITLE"
POL_Wine "$INSTALLER"
POL_Shortcut "Battle.net Launcher.exe" "$PREFIX"
POL_System_TmpDelete
POL_Wine_reboot
POL_SetupWindow_Close
exit

 

Images:

Aangepast door Nesuko

spycrab0 Woensdag 27 Mei 2015 om 14:41
spycrab0Anonymous

Use

MD5 = "md5sum"

instead of

$MD5 = "md5sum"

I tried running your script (with the fix above) and i got a MD5 mismatch on the following versions:

  • deDE
  • esMX
  • itIT
  • koKR
  • plPL
  • ruRU
  • zhCN

I'd suggest that you don't use MD5Sums in this case, as the launcher binaries seem to be updated every now and then.

Also please take a look at this wiki page about Translation

Nesuko Woensdag 3 Juni\ 2015 om 18:32
NesukoAnonymous

Thanks, md5 updated and added some images.

The translation does not work in all fields
  for example: POL_SetupWindow_wait
and the title in POL_SetupWindow_menu ("Language options") crashes

anyway i'm done, thanks

petch Woensdag 3 Juni\ 2015 om 18:47
petch
Developer

 

POL_Wine_PrefixCreate "1.7.43"
POL_System_SetArch "x86"

You can't change the architecture once the virtual drive ("prefix") has been created. Luckyly "x86" is the default so it works.

You can either remove POL_System_SetArch statement, or put it before POL_Wine_PrefixCreate if you want to keep it for documentation purpose (as a reminder that the installation did not work with 64bit Wine).

POL_SetupWindow_wait "$(eval_gettext 'Installation in progress.')" "$TITLE"

You can use POL_Wine_WaitBefore "$TITLE" instead, that's one less translation

The translation does not work in all fields

  for example: POL_SetupWindow_wait and the title in POL_SetupWindow_menu ("Language options") crashes

I'm not sure what you mean by "crashes", if you mean "the text is not translated", indeed any non-standard text will stay as-is until somebody takes the time to translate it.

It can't be anything else, given that the statements are unaware of the translations taking place (substitution is done before they're called).

Nesuko Vrijdag 5 Juni\ 2015 om 9:21
NesukoAnonymous

I think I'm wrong.
I can not reproduce the bug now.
anyway I think the script is not very useful since the md5 have changed again.
I fix it but I leave here
thanks greetings