mirror of
https://github.com/ValveSoftware/Proton.git
synced 2025-01-14 15:48:11 +03:00
proton: Change waitforexit to waitforexitandrun
This commit is contained in:
parent
b217d71c8e
commit
9cae619993
17
proton
17
proton
@ -447,9 +447,7 @@ def dump_dbg_scripts():
|
|||||||
f.write("\t\"" + wine_path + "\" \"${@:-${DEF_CMD[@]}}\"\n")
|
f.write("\t\"" + wine_path + "\" \"${@:-${DEF_CMD[@]}}\"\n")
|
||||||
os.chmod("/tmp/proton_run", 0755)
|
os.chmod("/tmp/proton_run", 0755)
|
||||||
|
|
||||||
#determine mode
|
def run():
|
||||||
if sys.argv[1] == "run":
|
|
||||||
#start target app
|
|
||||||
# if "PROTON_DUMP_DEBUG_COMMAND" in os.environ: #for now, we are always dumping the debug scripts
|
# if "PROTON_DUMP_DEBUG_COMMAND" in os.environ: #for now, we are always dumping the debug scripts
|
||||||
dump_dbg_scripts()
|
dump_dbg_scripts()
|
||||||
# else: #see above
|
# else: #see above
|
||||||
@ -458,6 +456,16 @@ if sys.argv[1] == "run":
|
|||||||
run_wine([wine_path, "start", "/unix"] + sys.argv[2:])
|
run_wine([wine_path, "start", "/unix"] + sys.argv[2:])
|
||||||
else:
|
else:
|
||||||
run_wine([wine_path] + sys.argv[2:])
|
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":
|
elif sys.argv[1] == "getcompatpath":
|
||||||
#linux -> windows path
|
#linux -> windows path
|
||||||
path = subprocess.check_output([wine_path, "winepath", "-w", sys.argv[2]], env=env, stderr=lfile)
|
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
|
#windows -> linux path
|
||||||
path = subprocess.check_output([wine_path, "winepath", sys.argv[2]], env=env, stderr=lfile)
|
path = subprocess.check_output([wine_path, "winepath", sys.argv[2]], env=env, stderr=lfile)
|
||||||
sys.stdout.write(path)
|
sys.stdout.write(path)
|
||||||
elif sys.argv[1] == "waitforexit":
|
|
||||||
#wait for wineserver to shut down
|
|
||||||
run_wine([bindir + "/wineserver", "-w"])
|
|
||||||
else:
|
else:
|
||||||
log("Need a verb.")
|
log("Need a verb.")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
@ -3,4 +3,5 @@
|
|||||||
"commandline" "/proton run"
|
"commandline" "/proton run"
|
||||||
"commandline_getnativepath" "/proton getnativepath"
|
"commandline_getnativepath" "/proton getnativepath"
|
||||||
"commandline_getcompatpath" "/proton getcompatpath"
|
"commandline_getcompatpath" "/proton getcompatpath"
|
||||||
|
"commandline_waitforexitandrun" "/proton waitforexitandrun"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user