mirror of
https://github.com/ValveSoftware/Proton.git
synced 2025-08-01 01:51:45 +03:00
proton: Don't exit early if NVIDIA Wine DLLs cannot be found
Reviewed-by: Adam Moss <amoss@nvidia.com>
This commit is contained in:
parent
8b92fe08ba
commit
f7b8a814cb
11
proton
11
proton
@ -77,7 +77,7 @@ def makedirs(path):
|
|||||||
#already exists
|
#already exists
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def try_copy(src, dst, add_write_perm=True):
|
def try_copy(src, dst, add_write_perm=True, optional=False):
|
||||||
try:
|
try:
|
||||||
if os.path.isdir(dst):
|
if os.path.isdir(dst):
|
||||||
dstfile = dst + "/" + os.path.basename(src)
|
dstfile = dst + "/" + os.path.basename(src)
|
||||||
@ -94,6 +94,12 @@ def try_copy(src, dst, add_write_perm=True):
|
|||||||
new_mode = os.lstat(dstfile).st_mode | stat.S_IWUSR | stat.S_IWGRP
|
new_mode = os.lstat(dstfile).st_mode | stat.S_IWUSR | stat.S_IWGRP
|
||||||
os.chmod(dstfile, new_mode)
|
os.chmod(dstfile, new_mode)
|
||||||
|
|
||||||
|
except FileNotFoundError as e:
|
||||||
|
if optional:
|
||||||
|
log('Error while copying to \"' + dst + '\": ' + e.strerror)
|
||||||
|
else:
|
||||||
|
raise
|
||||||
|
|
||||||
except PermissionError as e:
|
except PermissionError as e:
|
||||||
if e.errno == errno.EPERM:
|
if e.errno == errno.EPERM:
|
||||||
#be forgiving about permissions errors; if it's a real problem, things will explode later anyway
|
#be forgiving about permissions errors; if it's a real problem, things will explode later anyway
|
||||||
@ -708,7 +714,8 @@ class CompatData:
|
|||||||
if nvidia_wine_dll_dir:
|
if nvidia_wine_dll_dir:
|
||||||
for dll in ["_nvngx.dll", "nvngx.dll"]:
|
for dll in ["_nvngx.dll", "nvngx.dll"]:
|
||||||
try_copy(nvidia_wine_dll_dir + "/" + dll,
|
try_copy(nvidia_wine_dll_dir + "/" + dll,
|
||||||
self.prefix_dir + "drive_c/windows/system32/" + dll)
|
self.prefix_dir + "drive_c/windows/system32/" + dll,
|
||||||
|
optional=True)
|
||||||
|
|
||||||
try_copy(g_proton.lib64_dir + "wine/vkd3d-proton/d3d12.dll",
|
try_copy(g_proton.lib64_dir + "wine/vkd3d-proton/d3d12.dll",
|
||||||
self.prefix_dir + "drive_c/windows/system32/d3d12.dll")
|
self.prefix_dir + "drive_c/windows/system32/d3d12.dll")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user