Das Forum

[Script] StarCraft II : Heart of the Swarm

Script to install popular RTS Game: Starcraft 2, the 2nd expansion

Autor Antworten
Jump to the page: 1 - 2
RedSoxFan13 Wednesday 5 October 2016 at 2:52
RedSoxFan13Anonymous

Has anyone had any success running Legacy of the Void with PlayOnLinux? Or are no changes necesary aside from using shark's script?

Editiert von: RedSoxFan13

jwp Thursday 3 November 2016 at 22:19
jwp

I had to make a few changes, this is my POL:

#!/bin/bash
# Date : (2016-11-03 10-00)
# Last revision : (2016-11-03 21:00)
# Wine version used : 1.9.21-staging
# Distribution used to test : Debian Testing x64
# Author : JWP
# Licence : Retail
# Only For : http://www.playonlinux.com
## Staging version is now required for battle.net as per: http://thomas.randle.id.au/blog/2016/01/04/starcraft-2-legacy-void-ubuntu-1404-wine-and-linux-problems-solved/ - Bug 2

[ "$PLAYONLINUX" == "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
  
TITLE="StarCraft II"
DEVELOPER="Activision / Blizzard Entertainment"
AUTHOR="JWP"
PREFIX="SC2"
WINEVERSION="1.9.21-staging"
WINEARCH="x86"
WINEOS="win7"
DLURLBASE="http://dist.blizzard.com/downloads/sc2-installers/full/"
GAME_VMS="2048"

# Starting the script
cfg_check
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/starcraft2_wol/top.jpg" "http://files.playonlinux.com/resources/setups/starcraft2_wol/left.jpg" "$TITLE"
POL_SetupWindow_Init

# Starting debugging API
POL_Debug_Init

POL_SetupWindow_presentation "$TITdLE" "$DEVELOPER" "http://www.starcraft2.com" "$AUTHOR" "$PREFIX"
  
# Setting prefix path
POL_Wine_SelectPrefix "$PREFIX"

# Downloading wine if necessary and creating prefix
POL_System_SetArch "$WINEARCH"
Set_OS "$WINEOS"
POL_Wine_PrefixCreate "$WINEVERSION"

# Installing (mandatory - considering Diablo as well) dependencies
POL_install_corefonts
POL_install_dotnet40
POL_install_dxfullsetup
POL_install_gdiplus
POL_install_gecko
POL_install_msxml3 , 4 , and 6
POL_install RegisterFonts
POL_install riched20
POL_install riched30
POL_install tahoma
POL_install tahoma2
POL_install vcrun2010
POL_install_vcrun2012
POL_Install_vcrun2005 # Fix "Zeratul Missions" crash
POL_Wine_InstallFonts # Fix "Custom map" crash

POL_Wine_OverrideDLL "native,builtin" "dnsapi"
POL_Wine_OverrideDLL "native,builtin" "mshtml" # Fix "Updater" crash - part 2
POL_Wine_OverrideDLL "native,builtin" "msvcr80"
#####
POL_Wine_OverrideDLL "native,builtin" "api-ms-win-crt-runtime-l1-1-0"
POL_Wine_OverrideDLL "native,builtin" "api-ms-win-crt-stdio-l1-1-0"
POL_Wine_OverrideDLL "native,builtin" "api-ms-win-crt-heap-l1-1-0"
POL_Wine_OverrideDLL "native,builtin" "api-ms-win-crt-math-l1-1-0" # Fix "Call from to unimplemented function"
POL_Wine_OverrideDLL "native,builtin" "ucrtbase"
POL_Wine_OverrideDLL "native,builtin" "vcruntime140"
#####
POL_Wine_OverrideDLL "native,builtin""d3dx11"
POL_Wine_OverrideDLL "native,builtin""directmusic"
POL_Wine_OverrideDLL "native,builtin""directplay"
POL_Wine_OverrideDLL "native,builtin""dotnet40"
POL_System_TmpCreate "$PREFIX"
  
POL_SetupWindow_menu "Please Select your language/region" "$TITLE" "English (US)~Español (AL)~Português (BR)~English (EU)~English (SG)~Español (EU)~Deutsch~Français~Italiano~Polski~Русский~한국어~繁體中文~简体中文" "~"
    if [ "$APP_ANSWER" == "English (US)" ]
      then INSTNAME="StarCraft-II-Setup-enUS.exe"
    elif [ "$APP_ANSWER" == "Español (AL)" ]
      then INSTNAME="StarCraft-II-Setup-esMX.exe"
    elif [ "$APP_ANSWER" == "Português (BR)" ]
      then INSTNAME="StarCaft-II-Setup-ptBR.exe"
    elif [ "$APP_ANSWER" == "English (EU)" ]
      then INSTNAME="StarCraft-II-Setup-enGB.exe"
    elif [ "$APP_ANSWER" == "English (SG)" ]
      then INSTNAME="StarCraft-II-Setup-enSG.exe"
    elif [ "$APP_ANSWER" == "Español (EU)" ]
      then INSTNAME="StarCraft-II-Setup-esES.exe"
    elif [ "$APP_ANSWER" == "Deutsch" ]
      then INSTNAME="StarCraft-II-Setup-deDE.exe"
    elif [ "$APP_ANSWER" == "Français" ]
      then INSTNAME="StarCraft-II-Setup-frFR.exe"
    elif [ "$APP_ANSWER" == "Italiano" ]
      then INSTNAME="StarCraft-II-Setup-itIT.exe"
    elif [ "$APP_ANSWER" == "Polski" ]
      then INSTNAME="StarCraft-II-Setup-plPL.exe"
    elif [ "$APP_ANSWER" == "Русский" ]
      then INSTNAME="StarCraft-II-Setup-ruRU.exe"
    elif [ "$APP_ANSWER" == "한국어" ]
      then INSTNAME="StarCraft-II-Setup-koKR.exe"
    elif [ "$APP_ANSWER" == "繁體中文" ]
      then INSTNAME="StarCraft-II-Setup-zhTW.exe"
    elif [ "$APP_ANSWER" == "简体中文" ]
      then INSTNAME="StarCraft-II-Setup-zhCN.exe"
    fi
DLURL="$DLURLBASE""$INSTNAME"

# Choose between DVD, Digital LOCAL and DOWNLOAD version
POL_SetupWindow_InstallMethod "DVD,LOCAL,DOWNLOAD"
if [ "$INSTALL_METHOD" == "LOCAL" ]
then
    cd "$HOME"
    POL_SetupWindow_browse "Please select the installation file to run." "$INSTNAME"
    POL_SetupWindow_wait "Installing $TITLE." "$TITLE"
    POL_Wine start /unix "$APP_ANSWER"
elif [ "$INSTALL_METHOD" == "DOWNLOAD" ]
then
    cd "$POL_System_TmpDir"
    POL_Download "$DLURL"
    POL_SetupWindow_wait "Installing $TITLE." "$TITLE"
    POL_Wine start /unix "$POL_System_TmpDir/$INSTNAME"
elif [ "$INSTALL_METHOD" == "DVD" ]
then
    INSTNAME="StarCraft II Setup.exe"
    POL_SetupWindow_message "$(eval_gettext 'Please insert game media into your disk drive\nif not already done.')" "$TITLE"
    POL_SetupWindow_cdrom
    POL_SetupWindow_check_cdrom "$INSTNAME"
    POL_Wine start /unix "$CDROM/$INSTNAME"
fi
  
POL_Wine_WaitExit "$TITLE"
  
POL_System_TmpDelete

# Asking about memory size of graphic card
POL_SetupWindow_VMS $GAME_VMS

# Set Graphic Card information keys for wine
POL_Wine_SetVideoDriver

# Making shortcut
POL_Shortcut "StarCraft II.exe" "$TITLE"
POL_Shortcut "StarCraft II Editor.exe" "$TITLE Editor"

POL_SetupWindow_message "$(eval_gettext 'If you have a runtime error when running the game, open a terminal and type:\nsudo sed -i 's/kernel.yama.ptrace_scope = 1/kernel.yama.ptrace_scope = 0/' /etc/sysctl.d/10-ptrace.conf\nsysctl -p /etc/sysctl.d/10-ptrace.conf\n
There also some other errors in the log file that can be fixed with:\nsudo apt-get install p11-kit-modules:i386 libp11-kit-gnome-keyring:i386')"

POL_SetupWindow_Close
exit

 


Jhonny Oliveira
Ubuntu 21.10 | GeForce GTX 1060
https://xtradeb.net