Heroic-Games-Launcher / HeroicGamesLauncher

A games launcher for GOG, Amazon and Epic Games for Linux, Windows and macOS.
https://heroicgameslauncher.com
GNU General Public License v3.0
7.6k stars 408 forks source link

Export command #3836

Open Anuskuss opened 1 week ago

Anuskuss commented 1 week ago

Problem description

I'd like to have the ability to export the command that Heroic would normally run so I can run it manually. Right now if I want the full command I have to launch a game and grab the cmdline/env by hand.

Feature description

Export command would look like this:

__GL_SHADER_DISK_CACHE_PATH=/home/USER/Games/GAME VKD3D_SHADER_CACHE_PATH=/home/USER/Games/GAME STEAM_COMPAT_CLIENT_INSTALL_PATH=/home/USER/.steam/steam STEAM_COMPAT_DATA_PATH=/home/USER/Games/GAME WINE_FULLSCREEN_FSR=0 PROTON_ENABLE_NVAPI=1 DXVK_NVAPI_ALLOW_OTHER_DRIVERS=1 PROTON_EAC_RUNTIME=/home/USER/.config/heroic/tools/runtimes/eac_runtime PROTON_BATTLEYE_RUNTIME=/home/USER/.config/heroic/tools/runtimes/battleye_runtime STEAM_COMPAT_APP_ID=0 SteamAppId=0 SteamGameId=heroic-0 PROTON_LOG_DIR=/home/USER python3 /usr/share/steam/compatibilitytools.d/proton-ge-custom/proton waitforexitandrun "/home/USER/Games/GAME/pfx/drive_c/Program Files/GAME/game.exe"

That's user env + heroic env + python + proton/wine + game.

Alternatives

No response

Additional information

No response

CommandMC commented 1 week ago

Heroic can already be told to launch a game via the CLI/protocol (this is how Desktop/Steam shortcuts work). There's currently not a way to generate a protocol URL directly, although it should be fairly easy to write out by hand (it's heroic://launch/<runner>/<appName>; your runner will be legendary/gog/nile/sideload depending on the game type, the appName can be found in the footer of the game settings)

Exporting just the launch command has a few issues. Of course changes to Heroic's settings would not auto-update the command, and we would not be able to do game update checks / save sync / general sanity checks before launching the game

Anuskuss commented 1 week ago

There's currently not a way to generate a protocol URL directly

Then I'd also like to also request the ability to export the URI as well.

Of course changes to Heroic's settings would not auto-update the command

That doesn't matter, the command is a one-time thing. Imagine if one wants to run a game in a different tty (e.g. for use with gamescope). You just right-click the game, export the command (either in an inputfield or directly into the clipboard), switch tty's and paste. If I need to do that again, I just export it again.