mirror of
https://github.com/ValveSoftware/Proton.git
synced 2025-02-04 17:50:42 +03:00
proton: Allow Windows apps to write to stdout
This commit is contained in:
parent
f2c107dbe2
commit
53c0988fc1
9
proton
9
proton
@ -35,10 +35,7 @@ def upgrade_pfx(old_ver):
|
|||||||
#nothing to do, yet
|
#nothing to do, yet
|
||||||
|
|
||||||
def run_wine(args):
|
def run_wine(args):
|
||||||
if lfile == None:
|
subprocess.call(args, env=env, stderr=lfile)
|
||||||
subprocess.call(args, env=env)
|
|
||||||
else:
|
|
||||||
subprocess.call(args, env=env, stdout=lfile, stderr=subprocess.STDOUT)
|
|
||||||
|
|
||||||
def makedirs(path):
|
def makedirs(path):
|
||||||
try:
|
try:
|
||||||
@ -89,10 +86,10 @@ try:
|
|||||||
lfile_path = os.environ["HOME"] + "/steam-" + os.environ["SteamGameId"] + ".log"
|
lfile_path = os.environ["HOME"] + "/steam-" + os.environ["SteamGameId"] + ".log"
|
||||||
if os.path.exists(lfile_path):
|
if os.path.exists(lfile_path):
|
||||||
os.remove(lfile_path)
|
os.remove(lfile_path)
|
||||||
lfile = open(lfile_path, "w")
|
lfile = open(lfile_path, "w+")
|
||||||
except (NameError, KeyError): #WITH_WINEDEBUG is unset, or SteamGameId is unset
|
except (NameError, KeyError): #WITH_WINEDEBUG is unset, or SteamGameId is unset
|
||||||
env["WINEDEBUG"] = "-all"
|
env["WINEDEBUG"] = "-all"
|
||||||
lfile = open("/dev/null", "w")
|
lfile = None
|
||||||
|
|
||||||
if ld_path_var in os.environ:
|
if ld_path_var in os.environ:
|
||||||
env[ld_path_var] = lib64dir + ":" + libdir + ":" + os.environ[ld_path_var]
|
env[ld_path_var] = lib64dir + ":" + libdir + ":" + os.environ[ld_path_var]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user