mirror of
https://github.com/lutris/lutris
synced 2024-11-02 08:20:51 +00:00
Add D3D Extras to runtime
This commit is contained in:
parent
af6dd94e57
commit
14e34f0699
3 changed files with 45 additions and 1 deletions
|
@ -21,6 +21,7 @@ from lutris.util.wine.dxvk import DXVKManager
|
|||
from lutris.util.wine.dxvk_nvapi import DXVKNVAPIManager
|
||||
from lutris.util.wine.prefix import DEFAULT_DLL_OVERRIDES, WinePrefixManager, find_prefix
|
||||
from lutris.util.wine.vkd3d import VKD3DManager
|
||||
from lutris.util.wine.d3d_extras import D3DExtrasManager
|
||||
from lutris.util.wine.wine import (
|
||||
POL_PATH, WINE_DIR, WINE_PATHS, detect_arch, display_vulkan_error, esync_display_limit_warning,
|
||||
esync_display_version_warning, fsync_display_support_warning, fsync_display_version_warning, get_default_version,
|
||||
|
@ -231,6 +232,25 @@ class wine(Runner):
|
|||
"choices": VKD3DManager().version_choices,
|
||||
"default": VKD3DManager().version,
|
||||
},
|
||||
{
|
||||
"option": "d3d_extras",
|
||||
"label": _("Enable D3D Extras"),
|
||||
"type": "bool",
|
||||
"default": True,
|
||||
"advanced": True,
|
||||
"help": _(
|
||||
"Replace Wine's D3DX and D3DCOMPILER libraries with alternative ones. "
|
||||
"Needed for proper functionality of DXVK with some games."
|
||||
),
|
||||
},
|
||||
{
|
||||
"option": "d3d_extras_version",
|
||||
"label": _("D3D Extras version"),
|
||||
"advanced": True,
|
||||
"type": "choice_with_entry",
|
||||
"choices": D3DExtrasManager().version_choices,
|
||||
"default": D3DExtrasManager().version,
|
||||
},
|
||||
{
|
||||
"option": "dxvk_nvapi",
|
||||
"label": _("Enable DXVK-NVAPI / DLSS"),
|
||||
|
@ -703,6 +723,11 @@ class wine(Runner):
|
|||
bool(self.runner_config.get("dxvk_nvapi")),
|
||||
self.runner_config.get("dxvk_nvapi_version")
|
||||
)
|
||||
self.setup_dlls(
|
||||
D3DExtrasManager,
|
||||
bool(self.runner_config.get("d3d_extras")),
|
||||
self.runner_config.get("d3d_extras_version")
|
||||
)
|
||||
return True
|
||||
|
||||
def get_dll_overrides(self):
|
||||
|
|
|
@ -19,6 +19,7 @@ from lutris.util.system import create_folder
|
|||
from lutris.util.wine.dxvk import DXVKManager
|
||||
from lutris.util.wine.dxvk_nvapi import DXVKNVAPIManager
|
||||
from lutris.util.wine.vkd3d import VKD3DManager
|
||||
from lutris.util.wine.d3d_extras import D3DExtrasManager
|
||||
|
||||
|
||||
def init_dirs():
|
||||
|
@ -181,7 +182,7 @@ def update_runtime():
|
|||
if components_to_update:
|
||||
while runtime_updater.current_updates:
|
||||
time.sleep(0.3)
|
||||
for dll_manager_class in (DXVKManager, DXVKNVAPIManager, VKD3DManager):
|
||||
for dll_manager_class in (DXVKManager, DXVKNVAPIManager, VKD3DManager, D3DExtrasManager):
|
||||
dll_manager = dll_manager_class()
|
||||
dll_manager.upgrade()
|
||||
logger.info("Startup complete")
|
||||
|
|
18
lutris/util/wine/d3d_extras.py
Normal file
18
lutris/util/wine/d3d_extras.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
import os
|
||||
|
||||
from lutris.settings import RUNTIME_DIR
|
||||
from lutris.util.wine.dll_manager import DLLManager
|
||||
|
||||
|
||||
class D3DExtrasManager(DLLManager):
|
||||
component = "D3D Extras"
|
||||
base_dir = os.path.join(RUNTIME_DIR, "d3d_extras")
|
||||
versions_path = os.path.join(base_dir, "d3d_extras_versions.json")
|
||||
managed_dlls = ("d3dcompiler_42", "d3dcompiler_43", "d3dcompiler_46", "d3dcompiler_47",
|
||||
"d3dx10_33", "d3dx10_34", "d3dx10_35", "d3dx10_36", "d3dx10_37", "d3dx10_38",
|
||||
"d3dx10_39", "d3dx10_40", "d3dx10_41", "d3dx10_42", "d3dx10_43", "d3dx10",
|
||||
"d3dx11_42", "d3dx11_43", "d3dx9_24", "d3dx9_25", "d3dx9_26", "d3dx9_27",
|
||||
"d3dx9_28", "d3dx9_29", "d3dx9_30", "d3dx9_31", "d3dx9_32", "d3dx9_33",
|
||||
"d3dx9_34", "d3dx9_35", "d3dx9_36", "d3dx9_37", "d3dx9_38", "d3dx9_39",
|
||||
"d3dx9_40", "d3dx9_41", "d3dx9_42", "d3dx9_43", )
|
||||
releases_url = "https://api.github.com/repos/lutris/d3d_extras/releases"
|
Loading…
Reference in a new issue