proton: Use new translatepath API

This commit is contained in:
Andrew Eikum 2018-02-20 07:41:39 -06:00
parent ad6468dd6d
commit c32f46cf00
2 changed files with 8 additions and 3 deletions

8
proton
View File

@ -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)

View File

@ -1,5 +1,6 @@
"manifest"
{
"commandline" "/proton run"
"commandline_translatepath" = "/proton translatepath"
"commandline_getnativepath" = "/proton getnativepath"
"commandline_getcompatpath" = "/proton getcompatpath"
}