Skip to content

Commit

Permalink
proton: Populate NVIDIA_WINE_DLL_DIR when available
Browse files Browse the repository at this point in the history
NVIDIA-software may check the environment variable `NVIDIA_WINE_DLL_DIR`
for a path where DLLs provided by the NVIDIA Linux driver can be found.
This needs to be set by `proton` script, as it is ran inside of the
pressure-vessel environment, so the paths returned will be valid within
the environment.

Tested with an application that reads `NVIDIA_WINE_DLL_DIR` from the
environment and tries to load a known DLL from it. As expected manually
setting the environment variable to the on-disk location did not work,
as the path is not accurate within the pressure-vessel environment.

ValveSoftware#8087
  • Loading branch information
liam-middlebrook authored and vinifmor committed Oct 3, 2024
1 parent e259392 commit 4680fc4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions proton
Original file line number Diff line number Diff line change
Expand Up @@ -1461,6 +1461,12 @@ class Session:
if "PROTON_CRASH_REPORT_DIR" in self.env:
self.env["WINE_CRASH_REPORT_DIR"] = self.env["PROTON_CRASH_REPORT_DIR"]

# NVIDIA software may check NVIDIA_WINE_DLL_DIR as a search-path for
# driver-provided DLLs for use by Proton/Wine.
nvidia_wine_dll_dir = find_nvidia_wine_dll_dir()
if nvidia_wine_dll_dir:
self.env["NVIDIA_WINE_DLL_DIR"] = nvidia_wine_dll_dir

if "PROTON_LOG" in self.env and nonzero(self.env["PROTON_LOG"]):
if self.setup_logging(append_forever=False):
self.log_file.write("======================\n")
Expand Down

0 comments on commit 4680fc4

Please sign in to comment.