From de529b4d058bcb4f59f2f039990b03d1e0e235f4 Mon Sep 17 00:00:00 2001 From: Andrew Eikum Date: Fri, 2 Feb 2018 14:21:35 -0600 Subject: [PATCH] Add translatepath support --- proton | 13 +++++++++++-- toolmanifest.vdf | 3 ++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/proton b/proton index 541324de..acb4c1c2 100755 --- a/proton +++ b/proton @@ -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) diff --git a/toolmanifest.vdf b/toolmanifest.vdf index 26ef1c28..1be3703c 100644 --- a/toolmanifest.vdf +++ b/toolmanifest.vdf @@ -1,4 +1,5 @@ "manifest" { - "commandline" "/proton" + "commandline" "/proton run" + "commandline_translatepath" = "/proton winepath" }