mirror of
https://github.com/ValveSoftware/Proton.git
synced 2025-02-04 01:30:36 +03:00
proton: Use the right environment creating default prefix
This commit is contained in:
parent
d2cf7e08eb
commit
055e095af7
16
proton
16
proton
@ -122,14 +122,14 @@ class Proton:
|
|||||||
tar.close()
|
tar.close()
|
||||||
try_copy(self.version_file, self.dist_dir)
|
try_copy(self.version_file, self.dist_dir)
|
||||||
|
|
||||||
def make_default_prefix(self, env):
|
def make_default_prefix(self):
|
||||||
with self.dist_lock:
|
with self.dist_lock:
|
||||||
local_env = dict(env)
|
local_env = dict(g_session.env)
|
||||||
if not os.path.isdir(self.default_pfx_dir):
|
if not os.path.isdir(self.default_pfx_dir):
|
||||||
#make default prefix
|
#make default prefix
|
||||||
local_env["WINEPREFIX"] = self.default_pfx_dir
|
local_env["WINEPREFIX"] = self.default_pfx_dir
|
||||||
g_session.run_proc([self.wine, "wineboot"])
|
g_session.run_proc([self.wine, "wineboot"], local_env)
|
||||||
g_session.run_proc([self.wineserver, "-w"])
|
g_session.run_proc([self.wineserver, "-w"], local_env)
|
||||||
|
|
||||||
class CompatData:
|
class CompatData:
|
||||||
def __init__(self, compatdata):
|
def __init__(self, compatdata):
|
||||||
@ -646,8 +646,10 @@ class Session:
|
|||||||
f.write("\t\"" + g_proton.wine_bin + "\" steam.exe \"${@:-${DEF_CMD[@]}}\"\n")
|
f.write("\t\"" + g_proton.wine_bin + "\" steam.exe \"${@:-${DEF_CMD[@]}}\"\n")
|
||||||
os.chmod(tmpdir + "run", 0o755)
|
os.chmod(tmpdir + "run", 0o755)
|
||||||
|
|
||||||
def run_proc(self, args):
|
def run_proc(self, args, local_env=None):
|
||||||
subprocess.call(args, env=self.env, stderr=self.log_file, stdout=self.log_file)
|
if local_env == None:
|
||||||
|
local_env = self.env
|
||||||
|
subprocess.call(args, env=local_env, stderr=self.log_file, stdout=self.log_file)
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
if "PROTON_DUMP_DEBUG_COMMANDS" in self.env and nonzero(self.env["PROTON_DUMP_DEBUG_COMMANDS"]):
|
if "PROTON_DUMP_DEBUG_COMMANDS" in self.env and nonzero(self.env["PROTON_DUMP_DEBUG_COMMANDS"]):
|
||||||
@ -672,7 +674,7 @@ g_session = Session()
|
|||||||
|
|
||||||
g_session.init_wine()
|
g_session.init_wine()
|
||||||
|
|
||||||
g_proton.make_default_prefix(g_session.env)
|
g_proton.make_default_prefix()
|
||||||
|
|
||||||
g_session.init_session()
|
g_session.init_session()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user