shark711 |
Tuesday 28 May 2013 at 0:24
|
shark711
|
This worked for me, hope it works for the next person too Save the following in a file (sc2.pol) and then open PlayOnLinux Then select Tools > Run a local script Next > Browse (select the sc2.pol file) > Next > I Agree > Next > Next
Hopefully everything works well
Post implimentation tasks: If Agent.exe fails during the install, the installer will still continue and complete, but once it has completed, PlayOnLinux will still wait for it to finnish (i.e. not crreate the Icon), this is because the agent.exe process has gone into limbo. Just kill this process for POL to register all processes has ended. You can use the following command that should work on all distros (it kills everything that matches "agent.exe"):
ps -ef | grep -v grep | grep -i Agent.exe | awk '{print $2}' | xargs kill -9
[code language=playonlinux]#!/bin/bash [ "$PLAYONLINUX" == "" ] && exit 0 source "$PLAYONLINUX/lib/sources" TITLE="StarCraft II : Heart of the Swarm" DEVELOPER="Activision / Blizzard Entertainment" PREFIX="StarcraftII" WINEVERSION="1.5.26" WINEARCH="x86" WINEOS="winxp" GAME_VMS="1024" DLURLBASE="http://dist.blizzard.com/downloads/sc2-installers/full/" cfg_check POL_SetupWindow_Init POL_SetupWindow_presentation "$TITLE" "$DEVELOPER" "http://www.starcraft2.com" "Shark 7-11" "$PREFIX" POL_Wine_SelectPrefix "$PREFIX" POL_Wine_PrefixCreate "$WINEVERSION" POL_System_SetArch "$WINEARCH" Set_OS "$WINEOS" POL_Wine_OverrideDLL "builtin" "dnsapi" POL_Wine_OverrideDLL "native,builtin" "mshtml" POL_Wine_OverrideDLL "native,builtin" "msvcr80" POL_System_TmpCreate "$PREFIX" POL_Call POL_Install_vcrun2010 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"
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 POL_SetupWindow_VMS $GAME_VMS POL_Wine_SetVideoDriver POL_Shortcut "StarCraft II.exe" "$TITLE" POL_Shortcut "StarCraft II Editor.exe" "$TITLE Editor"
POL_SetupWindow_Close exit [/code]
NOTE: None of these images are my own creations and are all under copyright by Blizzard Entertainment and associated companies. I claim none of these as my own Edited by shark711
|
Ronin DUSETTE |
Tuesday 28 May 2013 at 6:26
|
Ronin DUSETTE
|
Sorry. The formatting got messed up (for some reason BBcode tags do not work on our site with Google Chrome). I added the code brackets for it so that it would be more legible. Feel free to re-edit your post if its not formatted correctly. You will see some brackets with "code language=playonlinux" and "/code" at the beginning and end, respectively. Place your script in between those 2 lines of code. Then it will number everything. Also, check the folowing link. It will tell you how to add screenshots, icons, etc.. http://www.playonmac.com/en/topic-10187-Standards_for_script_publishing.html
|
shark711 |
Tuesday 28 May 2013 at 18:15
|
shark711
|
|
Ronin DUSETTE |
Tuesday 28 May 2013 at 18:33
|
Ronin DUSETTE
|
No problem. Thanks for your contribution.
|
shark711 |
Tuesday 28 May 2013 at 19:03
|
shark711
|
|
GNU_Raziel |
Tuesday 28 May 2013 at 20:02
|
GNU_Raziel
|
Your script actually install ONLY enGB version of the game...PoL is a multilanguage software, think about other countries, this game exist in several languages...
|
shark711 |
Tuesday 28 May 2013 at 21:35
|
shark711
|
|
Deleted |
Accidental post |
Ronin DUSETTE |
Tuesday 28 May 2013 at 22:10
|
Ronin DUSETTE
|
You will have to modify the if/fi/then statements to check for which one it is. You can have POL ask which language to install (or maybe even grep it from the system?), and save to a variable, and give it something like:
if $LANGUAGE = English then cd "$POL_System_TmpDir" POL_Download "http://dist.blizzard.com/downloads/sc2-installers/full/StarCraft-II-Setup-enGB.exe" POL_SetupWindow_wait "Installing $TITLE." "$TITLE" POL_Wine start /unix "$POL_System_TmpDir/StarCraft-II-Setup-enGB.exe" fi $LANGUAGE = Spanish then cd "$POL_System_TmpDir" POL_Download "http://dist.blizzard.com/downloads/sc2-installers/full/StarCraft-II-Setup-Span.exe" POL_SetupWindow_wait "Installing $TITLE." "$TITLE" POL_Wine start /unix "$POL_System_TmpDir/StarCraft-II-Setup-enGB.exe" fi
Im just paraphrasing, of course. The real code will be much better than mine. But as you can see, you are able to ask a question earlier in the install script, save it to $LANGUAGE or $GAMELANGUAGE, and tell the script to download the appropriate file.
|
shark711 |
Wednesday 29 May 2013 at 0:13
|
shark711
|
@DJYoshaBYD, seen you message to late, I've updated the script and tested it, for some reason I got a few errors with the installer itself (which i didnt get previously). It is now compatible with all the available regions available for SC2, it also sets a few api's (to resolve some issues). And also has a message box at the end, incase you get an issue which is random (1 out of 30 times or so).
|
Ronin DUSETTE |
Wednesday 29 May 2013 at 0:18
|
Ronin DUSETTE
|
Good work. Gotta if, fi, then statements. :)
|
Ronin DUSETTE |
Wednesday 29 May 2013 at 0:20
|
Ronin DUSETTE
|
|
shark711 |
Wednesday 29 May 2013 at 0:29
|
shark711
|
http://www.playonmac.com/en/app-1722.html Shouldn't some folks test it out first though? Thanks for the help much appreciated Edited by shark711
|
Ronin DUSETTE |
Wednesday 29 May 2013 at 0:42
|
Ronin DUSETTE
|
I dont have the game. If you are saying it tests well, and the script looks good, clean, and portable, then I dont see a problem. If there are issues after, we can always change them. That happens all of the time anyway. no script is perfect. :)
|
shark711 |
Wednesday 29 May 2013 at 10:28
|
shark711
|
The installer will download it for you, and as far as I know you can play a subset of the maps for free (as part of their way of getting you to buy it). Let me test it a few times and then i will upload it
|
achelis |
Sunday 14 July 2013 at 15:06
|
achelis
|
I'm currently testing it. Only issue I've had so far is with the Blizzard Installer - If you get the error "Failed to retrieve Blizzard updater properties" you may have to change your DNS. That worked for me at least - I'm using Googles DNS server now, but I imagine OpenDNS could work equally well. Now it's downloading.. I'll let you know how I fare.. And Thank a bunch for the script!
|
achelis |
Sunday 14 July 2013 at 17:10
|
achelis
|
Script and game works fine for me - only issue was the Agent.exe not exiting as you described. Killed it and everything finished as it should.
|
Volatile |
Friday 27 September 2013 at 10:15
|
Volatile
|
Game appears to be performing well. Thanks a lot!
|
ThomasCFR |
Saturday 28 December 2013 at 16:28
|
ThomasCFR
|
For what it is worth: - script worked like a charm. Installation was easy and everything went well. - I had to manually kill Agent.exe as suspected by Shark711 I have little issues with controls during the game... need to hit a key several times before the command is understood (really annoying during panic modes! :p ) and the screen is sliding to other positions of the map as if I was moving my mouse to the edge of the maps, from times to times without any explanation. But that's 100% out of the excellent POL script shark711 provided! Thanks a lot, Shark! Keep going, PlayOnLinux Team! :-) Edited by ThomasCFR
|
Kenairod |
Friday 14 March 2014 at 3:30
|
Kenairod
|
I've downloaded the installer (from the script) which has downloaded the game, then I've clicked on "Launch the game" and after having logged in, I've closed the game, but now it's blocked on the PoL window showing "Thanks for waiting while Starcraft 2 : Heart of the Swarm is installing..." Is it normal ? EDIT : Play on linux finally encountered an error : Error in POL_Shortcut Binary not found: StarCraft II.exe Have you installed the program to the default location? Now there are folders named Starcraft 2 on my desktop and in my /home, but nothing apear in PoL (it's actually the same as when I tried to install it with the official script of Wings of Liberty, with the downloaded client). EDIT 2 : I'm retrying, from the executable I've download on the official website, now, I'll try not to launch the game at the end of the downloading of the game, but I fear it's going to give me an error even if I quit the download manager... Could you tell me the way you install it from the downloader ? EDIT 3 : Actually, it appears the download manager directly downloads the game files into /home/<user>/Desktop/StarCraft II Edited by Kenairod
Free the world, take Linux.
|