Skip to content

Commands entered in the Advanced Options (Environment Variables) are not executed anymore #1357

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
toniwe opened this issue May 22, 2022 · 9 comments

Comments

@toniwe
Copy link

toniwe commented May 22, 2022

Describe the bug

Since v2.3.0 commands entered in the Advanced Options like "stranglevk 60" (a frame limiter) are not executed anymore on game start.
Instead both strings (stranglevk and 60) are converted to empty variables and appended to the game launch command (see log).

I see that these are technically not environment variables and heroic has integration for other tools already (like mangohud or gamemode) but on v2.2.6 this was still working and allowed per-game-tweaks.

Is there any other place these kind of commands should be configured since 2.3.0?

Add logs

Launch Command: 60= STEAM_COMPAT_CLIENT_INSTALL_PATH=/home/toni/.steam/steam STEAM_COMPAT_DATA_PATH=/home/toni/.local/share/heroic/prefixes/ShadowoftheTombRaider DXVK_HUD=fps stranglevk= = /usr/bin/gamemoderun /opt/Heroic/resources/app.asar.unpacked/build/bin/linux/legendary launch 890d9cf396d04922a1559333df419fed --no-wine --wrapper "/home/toni/.local/share/Steam/steamapps/common/SteamLinuxRuntime_soldier/_v2-entry-point -- '/home/toni/.steam/steam/steamapps/common/Proton 7.0/proton' waitforexitandrun"

System Info:

  Heroic Version: 2.3.3 Brook
  Legendary Version:  0.20.25 Our Benefactors
  OS: Arch KERNEL: 5.15.41-1-lts ARCH: x64
  CPU: Intel Core™ i5-6600 @3.3 GOVERNOR: performance
  RAM: Total: 15.58 GiB Available: 12.07 GiB
  GRAPHICS: GPU0: Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] VRAM: 256MB DRIVER:  
  PROTOCOL: x11

Steps to reproduce

  1. Go to game settings (any game)
  2. Fill the "Advanced Options (Environment Variables)" field with a command (e.g. strangle 60)
  3. Start the game
  4. Notice the command is being ignored
  5. Notice in the log the command was converted into multiple variables

Expected behavior

The given commands are still executed as typed (prepended to the game command)

Screenshots

No response

System Information

  • OS: Arch linux (5.15.41-1-lts)
  • Heroic Version 2.3.3

Additional information

Though i did not test it in detail, i suppose the new behaviour was introduced by #1044 since v2.3.0

I guess it makes sense to assume all environment variables are stated as "var=value" but at the same time entered commands should still work somehow

@CommandMC
Copy link
Collaborator

Hm, I see. Honestly I did not think that people would be using the env vars to add extra wrappers
For now you can use DXVK_FRAME_RATE=60 to limit the framerate that way, but I agree that adding wrappers should be possible too

@CommandMC
Copy link
Collaborator

I've now created #1358 to re-implement this feature
Could you try out the AppImage build once it's ready?

@SaschaVasarrhelyi
Copy link

I don't know but i think i have a similar problem since this Heroic version 2.3.0 on my ubuntu mate 20.04.
I don't can start GOG Adventures with the Advanced Options to run it with native scummvm or dosbox (games from GOG they dosn't have a Linux Prot). Heroic start just Wine or proton and not my start.sh script.
I paste the Log.
1405562076-lastPlay.log

Thanks in advance
and just no stress

Sascha

@toniwe
Copy link
Author

toniwe commented May 23, 2022

Nice, @CommandMC that was fast 👍
Tested something like a=b stranglevk 10 c=d with the appimage and it works just fine for me.
Also, thanks for the tip about DXVK_FRAME_RATE!

@SaschaVasarrhelyi I think yours should work as well, as long as that start.sh is a proper wrapper script

@GenocideStomper
Copy link

Hi,

This might be exceeding @toniwe's request by a lot, but is there any possibility to expand this feature re-implementation to include something closer to Lutris' "Pre-launch script" and especially "Post-exit script" support?

My use case here is to increase the vibrancy when launching a game, and resetting the vibrancy to the default level after exiting the game.

In Lutris I would link to a script, where I feed the vibrancy value as its argument. In Steam I can get this functionality too, by doing something like /path/to/pre-launch-script.sh ; %command% ; /path/to/post-exit-script.sh in a game's launch options.

@CommandMC
Copy link
Collaborator

@GenocideStomper as you already noted, that's a big addition to this. Yes it's possible, but it would definitely take some more work
I'll see how much time I'll have in the coming days

@flavioislima
Copy link
Member

Fixed since 2.3.5

@SaschaVasarrhelyi
Copy link

Hi flavioslima, sorry for the long delay. I coudn't find the time.
In my case that Fix don't work. I couldn't start a skript with this versio 2.3.5, i am sorry to say.
I coudn't start ScummVM and couldn't start dosbox skripts and have try many different ways to set the skript but it don't work.
Greetings
Sascha

@SaschaVasarrhelyi
Copy link

Hi flavioslima, can you tell me how you set the path for the skript in Heroic? Eventually i have the wrong parameter or do something wrong and dosn't know about.
That would be nice :)
Enjoy your weekend and just no stress ;)
Sascha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants