protonscr

Arguments do not work as expected

protonopen
ValveSoftware/Proton#3984 · opened 2020-06-14 by allencch · updated 2020-06-15 · 1 comments · github
Aallencch 2020-06-14 github

Proton 5.0-1
OS: Linux

I am doing some testing on the Proton script. And found that, when the line

self.run_proc([g_proton.wine_bin, "steam"] + sys.argv[2:] + self.cmdlineappend)

is invoked, if the sys.argv[2:] is more than one argument, then the process doesn't run. This is not happening in 4.11-2 version.

Looks like the steam argument after wine (g_proton.wine_bin) causes the issue in 5.0-1. Removing the steam, then the process can run with argument.

Steps to re-produce

  1. Create a directory /tmp/proton_test
  2. Run the following script,
#!/bin/bash

export STEAM_COMPAT_DATA_PATH="/tmp/proton_test"
export WINEPREFIX="/tmp/proton_test/pfx"
export PATH="$HOME/.steam/steam/steamapps/common/Proton 5.0/dist/bin:$PATH"
export LD_LIBRARY_PATH="$HOME/.steam/steam/steamapps/common/Proton 5.0/dist/lib:$HOME/.steam/steam/steamapps/common/Proton 5.0/dist/lib64:$LD_LIBRARY_PATH"
export WINEDLLPATH="$HOME/.steam/steam/steamapps/common/Proton 5.0/dist/lib/wine/fakedlls:$HOME/.steam/steam/steamapps/common/Proton 5.0/dist/lib64/wine/fakedlls"

"$HOME/.steam/steam/steamapps/common/Proton 5.0/proton" run notepad test.txt
  1. Nothing shown.

If change to Proton 4.11, the test.txt will be open by notepad.

Aaeikum 2020-06-15 github

Looks like our call to ShellExecute in steam_helper/steam.cpp is at fault here. We should be splitting off the arguments and passing them in lpParameters. Instead we're passing the whole string in lpFile, so ShellExecute is trying to run notepad test.txt, which obviously isn't a valid executable.

Proton versions

Launch options