From c32f46cf00377634e93f3728d4814ab6bc405ea7 Mon Sep 17 00:00:00 2001 From: Andrew Eikum Date: Tue, 20 Feb 2018 07:41:39 -0600 Subject: [PATCH] proton: Use new translatepath API --- proton | 8 ++++++-- toolmanifest.vdf | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/proton b/proton index 884d7b8e..2dc0457e 100755 --- a/proton +++ b/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) diff --git a/toolmanifest.vdf b/toolmanifest.vdf index 6ae2526a..0da5efcb 100644 --- a/toolmanifest.vdf +++ b/toolmanifest.vdf @@ -1,5 +1,6 @@ "manifest" { "commandline" "/proton run" - "commandline_translatepath" = "/proton translatepath" + "commandline_getnativepath" = "/proton getnativepath" + "commandline_getcompatpath" = "/proton getcompatpath" }