HeroicGamesLauncher
HeroicGamesLauncher copied to clipboard
GOG games with custom Windows executables not being respected
Describe the bug
Setting a custom Windows exe in the settings of a GOG game doesn't launch the game at all, and instead executes ~/.config/heroic/tools/wine/Wine-GE-Proton7-29/bin/wine" wineboot --init. Should be ~/.config/heroic/tools/wine/Wine-GE-Proton7-29/bin/wine" [path/to/custom.exe] [--arguments]
Add logs
Ran HGL through the Terminal, and I'm running Diablo + Hellfire, but specifying "devilutionx.exe" as the custom executable:
(16:57:15) INFO: [Backend]: Launching Diablo + Hellfire (1412601690)
(16:57:15) INFO: [Legendary]: Running command: /opt/Heroic/resources/app.asar.unpacked/build/bin/linux/legendary --version
(16:57:17) DEBUG: [Legendary]: Running Wine command: "/home/redacted/.config/heroic/tools/wine/Wine-GE-Proton7-29/bin/wine" wineboot --init
(16:57:18) DEBUG: [Legendary]: Ran Wine command: "/home/redacted/.config/heroic/tools/wine/Wine-GE-Proton7-29/bin/wine" wineboot --init
(16:57:18) ERROR: [Backend]: Error: Got EOF while in an escape sequence
at [Symbol.iterator] (/opt/Heroic/resources/app.asar/node_modules/shlex/shlex.js:170:30)
at Generator.next (<anonymous>)
at Function.from (<anonymous>)
at exports.split (/opt/Heroic/resources/app.asar/node_modules/shlex/shlex.js:270:16)
at GOGGame.launch (/opt/Heroic/resources/app.asar/build/gog/games.js:284:36)
at async node:electron/js2c/browser_init:189:563
(16:57:18) INFO: [Backend]: Stopping Display Power Saver Blocker
(16:57:18) INFO: [Frontend]: Refreshing Library
(16:57:18) INFO: [Gog]: Getting GOG library
(16:57:19) INFO: [Gog]: Number of library pages: 1
(16:57:20) INFO: [Gog]: Saved games data
(16:57:20) INFO: [Frontend]: No cache found, getting data from legendary...
(16:57:20) INFO: [Legendary]: Refreshing library...
(16:57:20) INFO: [Gog]: Found 0 game(s) to update
Configured the game to launch a custom executable (see below). Set the Win64 version of DevilutionX as the target, with the --save-dir ..\dx\ because that's where my saves are.

Dragging and dropping the executable into the field that says "Run EXE on Prefix" does execute the correct command, and the executable launches normally.
Steps to reproduce
- Choose a custom EXE in the game settings.
- Click play.
- Game will stop immediately before launching.
Expected behavior
Custom executable should launch as exepected.
Screenshots
No response
System Information
- OS [e. g. "Ubuntu"]: Manjaro Linux (5.15.65-1 kernel)
- Heroic Version [e. g. 2.1.1]: 2.4.3 from the AUR
Additional information
No response
Just tested here and it working good. Tested with oblivion:

It works if you dont use the game arguments?
Yes, it works without arguments. It takes forever to launch, but it ends up launching eventually.
It's still a bug, because parameters are important for certain configurations in the case of these kinds of settings. In the case of DevilutionX, to load the saves and the configuration of the Diablo executable that's downloaded from GOG.
As @flavioislima already pointed out, the issue here does not relate to the alternative EXE at all and is in reality caused by the backslashes (\) you have in your path. If you want to use the actual backslash character and not an escape sequence, you can add two backslashes (\\) into the arguments text box, that should escape the \
On another note, using the native version of DevilutionX might be preferable here (you can then also just use / as a path separator)
Lastly, a bit of clarification: Since you're running a Wine game, the first thing Heroic does is run that wineboot command. As you can see from the log:
(16:57:18) DEBUG: [Legendary]: Ran Wine command,
that's now done ("Ran" = command exited). The next thing Heroic now tries to do is running the actual game, with whatever custom settings you provided. It is there where this error happens:
(16:57:18) ERROR: [Backend]: Error: Got EOF while in an escape sequence
...
at GOGGame.launch (/opt/Heroic/resources/app.asar/build/gog/games.js:284:36)