Add translatepath support

This commit is contained in:
Andrew Eikum 2018-02-02 14:21:35 -06:00
parent 836a2ac537
commit de529b4d05
2 changed files with 13 additions and 3 deletions

13
proton
View File

@ -173,7 +173,16 @@ if not vr_runtime is None:
except:
pass
#start target app
run_wine([wine_path] + sys.argv[1:])
#determine mode
if sys.argv[1] == "run":
#start target app
run_wine([wine_path] + sys.argv[2:])
elif sys.argv[1] == "translatepath":
#get windows path equivalent
path = subprocess.check_output([wine_path, "winepath", "-w", sys.argv[2]], env=env, stderr=open("/dev/null", "w"))
stdout.write(path)
else:
#???
sys.exit(1)
sys.exit(0)

View File

@ -1,4 +1,5 @@
"manifest"
{
"commandline" "/proton"
"commandline" "/proton run"
"commandline_translatepath" = "/proton winepath"
}