diff --git a/proton b/proton index c6a3738ff..37c16e4a3 100755 --- a/proton +++ b/proton @@ -16,6 +16,11 @@ import tarfile from filelock import FileLock from vkquery import is_vulkan_supported +try: + from subprocess import DEVNULL # Python 3.3 +except ImportError: + DEVNULL = open(os.devnull, 'wb') + #To enable debug logging, copy "user_settings.sample.py" to "user_settings.py" #and edit it if needed. @@ -429,14 +434,25 @@ else: check_environment("PROTON_USE_GALLIUM_NINE", "galliumnine") if "galliumnine" in config_opts: - run_wine([wine_path, "reg", "add", "HKEY_CURRENT_USER\\Software\\Wine\\DllRedirects", "/v", "d3d9", "/d", "d3d9-nine.dll", "/f"]) + subprocess.call([wine_path, "reg", "add", + "HKEY_CURRENT_USER\\Software\\Wine\\DllRedirects", + "/v", "d3d9", + "/d", "d3d9-nine.dll", + "/f"], env=env, stdout=DEVNULL, stderr=DEVNULL) if "PROTON_GALLIUM_NINE_MODULEPATH" in os.environ: env["PROTON_GALLIUM_NINE_MODULEPATH"] = os.environ["PROTON_GALLIUM_NINE_MODULEPATH"] elif not "PROTON_GALLIUM_NINE_MODULEPATH" in env: env["PROTON_GALLIUM_NINE_MODULEPATH"] = "/usr/lib32/d3d/d3dadapter9.so.1:/usr/lib64/d3d/d3dadapter9.so.1" - run_wine([wine_path, "reg", "add", "HKEY_CURRENT_USER\\Software\\Wine\\Direct3DNine", "/v", "ModulePath", "/d", env["PROTON_GALLIUM_NINE_MODULEPATH"], "/f"]) + subprocess.call([wine_path, "reg", "add", + "HKEY_CURRENT_USER\\Software\\Wine\\Direct3DNine", + "/v", "ModulePath", + "/d", env["PROTON_GALLIUM_NINE_MODULEPATH"], + "/f"], env=env, stdout=DEVNULL, stderr=DEVNULL) else: - run_wine([wine_path, "reg", "delete", "HKEY_CURRENT_USER\\Software\\Wine\\DllRedirects", "/v", "d3d9", "/f"]) + subprocess.call([wine_path, "reg", "delete", + "HKEY_CURRENT_USER\\Software\\Wine\\DllRedirects", + "/v", "d3d9", + "/f"], env=env, stdout=DEVNULL, stderr=DEVNULL) ARCH_UNKNOWN=0 ARCH_I386=1