mirror of
https://github.com/ValveSoftware/Proton.git
synced 2024-12-27 07:05:46 +03:00
proton: Use new translatepath API
This commit is contained in:
parent
ad6468dd6d
commit
c32f46cf00
8
proton
8
proton
@ -290,10 +290,14 @@ if sys.argv[1] == "run":
|
||||
dump_dbg_script("/tmp/proton_run", ["$@"], "Run an arbitrary command")
|
||||
else:
|
||||
run_wine([wine_path] + sys.argv[2:])
|
||||
elif sys.argv[1] == "translatepath":
|
||||
#get windows path equivalent
|
||||
elif sys.argv[1] == "getcompatpath":
|
||||
#linux -> windows path
|
||||
path = subprocess.check_output([wine_path, "winepath", "-w", sys.argv[2]], env=env, stderr=open("/dev/null", "w"))
|
||||
stdout.write(path)
|
||||
elif sys.argv[1] == "getnativepath":
|
||||
#windows -> linux path
|
||||
path = subprocess.check_output([wine_path, "winepath", sys.argv[2]], env=env, stderr=open("/dev/null", "w"))
|
||||
stdout.write(path)
|
||||
else:
|
||||
log("Need a verb.")
|
||||
sys.exit(1)
|
||||
|
@ -1,5 +1,6 @@
|
||||
"manifest"
|
||||
{
|
||||
"commandline" "/proton run"
|
||||
"commandline_translatepath" = "/proton translatepath"
|
||||
"commandline_getnativepath" = "/proton getnativepath"
|
||||
"commandline_getcompatpath" = "/proton getcompatpath"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user