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")
|
dump_dbg_script("/tmp/proton_run", ["$@"], "Run an arbitrary command")
|
||||||
else:
|
else:
|
||||||
run_wine([wine_path] + sys.argv[2:])
|
run_wine([wine_path] + sys.argv[2:])
|
||||||
elif sys.argv[1] == "translatepath":
|
elif sys.argv[1] == "getcompatpath":
|
||||||
#get windows path equivalent
|
#linux -> windows path
|
||||||
path = subprocess.check_output([wine_path, "winepath", "-w", sys.argv[2]], env=env, stderr=open("/dev/null", "w"))
|
path = subprocess.check_output([wine_path, "winepath", "-w", sys.argv[2]], env=env, stderr=open("/dev/null", "w"))
|
||||||
stdout.write(path)
|
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:
|
else:
|
||||||
log("Need a verb.")
|
log("Need a verb.")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
"manifest"
|
"manifest"
|
||||||
{
|
{
|
||||||
"commandline" "/proton run"
|
"commandline" "/proton run"
|
||||||
"commandline_translatepath" = "/proton translatepath"
|
"commandline_getnativepath" = "/proton getnativepath"
|
||||||
|
"commandline_getcompatpath" = "/proton getcompatpath"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user