proton: Change waitforexit to waitforexitandrun

This commit is contained in:
Andrew Eikum 2018-08-08 08:01:55 -05:00
parent b217d71c8e
commit 9cae619993
2 changed files with 12 additions and 6 deletions

17
proton
View file

@ -447,9 +447,7 @@ def dump_dbg_scripts():
f.write("\t\"" + wine_path + "\" \"${@:-${DEF_CMD[@]}}\"\n")
os.chmod("/tmp/proton_run", 0755)
#determine mode
if sys.argv[1] == "run":
#start target app
def run():
# if "PROTON_DUMP_DEBUG_COMMAND" in os.environ: #for now, we are always dumping the debug scripts
dump_dbg_scripts()
# else: #see above
@ -458,6 +456,16 @@ if sys.argv[1] == "run":
run_wine([wine_path, "start", "/unix"] + sys.argv[2:])
else:
run_wine([wine_path] + sys.argv[2:])
#determine mode
if sys.argv[1] == "run":
#start target app
run()
elif sys.argv[1] == "waitforexitandrun":
#wait for wineserver to shut down
run_wine([bindir + "/wineserver", "-w"])
#then run
run()
elif sys.argv[1] == "getcompatpath":
#linux -> windows path
path = subprocess.check_output([wine_path, "winepath", "-w", sys.argv[2]], env=env, stderr=lfile)
@ -466,9 +474,6 @@ elif sys.argv[1] == "getnativepath":
#windows -> linux path
path = subprocess.check_output([wine_path, "winepath", sys.argv[2]], env=env, stderr=lfile)
sys.stdout.write(path)
elif sys.argv[1] == "waitforexit":
#wait for wineserver to shut down
run_wine([bindir + "/wineserver", "-w"])
else:
log("Need a verb.")
sys.exit(1)

View file

@ -3,4 +3,5 @@
"commandline" "/proton run"
"commandline_getnativepath" "/proton getnativepath"
"commandline_getcompatpath" "/proton getcompatpath"
"commandline_waitforexitandrun" "/proton waitforexitandrun"
}