applications icon indicating copy to clipboard operation
applications copied to clipboard

WIP: [com.blizzard.Hearthstone] Add Hearthstone

Open TLATER opened this issue 5 years ago • 10 comments

The branch is in a much better state, the game runs quite nicely :)

The sed hack works after some adjustments, but ultimately I think it's still too hacky for production use - currently, after the installer runs, the user has to close battle.net before signing in, so that we have time to go fiddle with the config file. If the user fails to do so, Hearthstone will end up not running with directx, which causes graphical glitches.

Other than that, the game seems to run fine. My main annoyance is having to run battle.net, especially during installation - is there any chance we can get that to run headless, like some winetricks installations do? That would be a massive UX improvement.

The branch could do with someone confirming that the various metadata files look correct in normal UIs too - I use a fairly barebones, custom DE, so I can't see much of the fancy images.

TLATER avatar Jul 14 '18 01:07 TLATER

Thanks for the comments! I'll make the changes you suggest over the next day or so.

I feel the bigger issue is that this doesn't actually run yet ;)

TLATER avatar Jul 14 '18 02:07 TLATER

Yah I just finished downloading it, it launches and I can hear the music and what sounds like me toggling menu items, and the cursor is visable but the screen is black. I'm going to take a guess and say it needs d3dx9 installed.

Also I believe you can force the game to launch in window mode, never played it but I see everyone play it in window mode. Assumingly so they can do other things when it's the opponents turn.

julianrichen avatar Jul 14 '18 02:07 julianrichen

Yup, need to add the d3dx9 extension and a launch option of -force-d3d9 for Battle.Net. I'm not sure how we can append to the existing json file that the battlenet-installer writes with bash. Bash is kind of limited in that regard. Maybe a sed command.

sed -i '$s/}/,"Games": { "hs_beta": { "AdditionalLaunchArguments": "-force-d3d9" } } }/' "${WINEPREFIX}/dosdevices/c:/users/${USER}/Application Data/Battle.net/Battle.net.config"'

julianrichen avatar Jul 14 '18 03:07 julianrichen

This sed command should make it work

sed -i s'/}$/,"Games": { "hs_beta": { "AdditionalLaunchArguments": "-force-d3d9" } } }/' "${WINEPREFIX}/dosdevices/c:/users/${USER}/Application Data/Battle.net/Battle.net.config"

julianrichen avatar Jul 14 '18 03:07 julianrichen

Oh and no rush, whenever you find time to work on this. I kind threw a bunch of change request on you... sorry.

julianrichen avatar Jul 14 '18 03:07 julianrichen

Haha, s'alright, I'm pretty excited to see this project actually going somewhere. This is the most awesome use of flatpak I've seen so far :)

s/Hearthstone/WTCG/ seems to have fixed most issues for me, seems like directx 9 isn't strictly required with my graphics card. That said, lots of card art is broken, so I'll try and see if that fixes it.

I'll go to sleep after, nearing 6 am here... Why do I always start these things so late at night?

TLATER avatar Jul 14 '18 03:07 TLATER

Other than that, the game seems to run fine. My main annoyance is having to run battle.net, especially during installation - is there any chance we can get that to run headless, like some winetricks installations do? That would be a massive UX improvement.

Unfortunately no, you can run the Hearstone.exe directly but it won't get updates unless you run Battle.net and it won't auto log you in.

Some of these arguments work if you prefix with --.

Install Options

  • install - Start a package installation
  • tomepath - Manual override of installation tome path
  • game - Game registration/installation uid
  • migrate - Game path of pre-0.5 installation
  • torrentinstall - Set package installation mode to torrent install
  • diskinstall - Set package installation mode to disk install
  • webinstall - Set package installation mode to web install
  • encrypted - Set encryption enabled
  • gamepath - Game registration path
  • installlocale - Set package installation locale
  • installregion - Set package installation region
  • majorinstallver - Set package installation max version
  • repair - Start a repair for a given uid

Internal Options

  • updatepid - Pid to wait for before initializing
  • bnetarg - Pass argument straight to battle.net
  • autostarted - Indicates program was started automatically
  • redirected - Indicates program was just redirected

Runtime Options

  • exec,e - Execute a command
  • unattendedpatch - Start with unattendedpatch mode
  • setlanguage - Set the application language
  • setregion - Set the application region
  • session - Analytics Session Hash
  • setgamelanguage - Set language for a game

For example

$PATH/Battle.Net Launcher.exe --game h3_beta --install

Will actually pull-up the installer for Heartsone directly but you can't pass the switch through the Battle.Net Setup.exe, only Battle.Net Launcher.exe or Battle.net.exe -_-

Which doesn't sound like a problem, except that Battle.Net Setup.exe auto-launches the client after install and you can't launch them with the correct arguments, EVEN THOUGH Battle.net Setup.exe PASS SOME OF THE OPTIONS TO THE CLIENT. So it'll pass the generic --install argument but no --game <game uuid>, so --install becomes pointless... And it's pointless after the fact because /app/bin/heartstone-launcher already did most of the setup and running --game --installin/app/bin/heartstone` would be bad ux.

Also battlenet://WTCG --install doesn't seem to work... because the battlenet:// protocol don't mix with argument flags. But yet you can mix --game & --uuid. Also --bnetargs seems to be totally ignored.

IDK if Blizzard would help but maybe shooting off an email to Blizzard support asking for advice and a proper list might help. But disguise the email as something like

I work for an Internet Cafe and we're looking to automate our Battle.net & Blizzard Game installation via some install scripts. Can you auto install games from the setup.exe? Can you provide advice?

They might be more willing to expose more info.


Sorry this turned into a rant and seems quickly typed. I'm leave soon and wanted give you some information regarding you question if you want to look into over the weekend.

julianrichen avatar Jul 20 '18 19:07 julianrichen

Also see https://github.com/winepak/applications/pull/73#issuecomment-406680058 regarding sed and json issue.

julianrichen avatar Jul 20 '18 19:07 julianrichen

Any news?

AsciiWolf avatar Sep 18 '18 10:09 AsciiWolf

@AsciiWolf Sorry, I have been to busy to push this further - I'm not sure when I will get enough time, unfortunately. I have received no reply from Blizzard so far.

If anyone else wants to continue the branch, feel free to. I recommend following the discussions on #73 and #101.

TLATER avatar Sep 18 '18 10:09 TLATER