#4 Check for vulkan before installing dxvk as best alternative
Closed 8 months ago by frantisekz. Opened 9 months ago by frantisekz.

file modified
+18 -6
@@ -10,7 +10,7 @@ 

  

  Name:           wine-dxvk

  Version:        1.7

- Release:        1%{?dist}

+ Release:        2%{?dist}

  Summary:        Vulkan-based D3D11 and D3D10 implementation for Linux / Wine

  

  License:        zlib
@@ -41,6 +41,7 @@ 

  BuildRequires:  mingw32-winpthreads-static

  %endif

  

+ Requires(pre):  vulkan-tools

  Requires:       wine >= 4.13

  Recommends:     wine-dxvk-dxgi%{?_isa} = %{version}-%{release}

  Requires:       vulkan-loader%{?_isa}
@@ -120,13 +121,24 @@ 

  mv %{buildroot}%{_libdir}/wine/d3d11.dll %{buildroot}%{_libdir}/wine/dxvk-d3d11.dll

  

  %posttrans

- %{_sbindir}/alternatives --install %{_libdir}/wine/d3d10.dll 'wine-d3d10%{?_isa}' %{_libdir}/wine/dxvk-d3d10.dll 20 \

- --slave %{_libdir}/wine/d3d10_1.dll 'wine-d3d10_1%{?_isa}' %{_libdir}/wine/dxvk-d3d10_1.dll \

- --slave %{_libdir}/wine/d3d10core.dll 'wine-d3d10core%{?_isa}' %{_libdir}/wine/dxvk-d3d10core.dll

- %{_sbindir}/alternatives --install %{_libdir}/wine/d3d11.dll 'wine-d3d11%{?_isa}' %{_libdir}/wine/dxvk-d3d11.dll 20

+ if vulkaninfo |& grep ERROR_INITIALIZATION_FAILED > /dev/null; then

+     %{_sbindir}/alternatives --install %{_libdir}/wine/d3d10.dll 'wine-d3d10%{?_isa}' %{_libdir}/wine/dxvk-d3d10.dll 5 \

+     --slave %{_libdir}/wine/d3d10_1.dll 'wine-d3d10_1%{?_isa}' %{_libdir}/wine/dxvk-d3d10_1.dll \

+     --slave %{_libdir}/wine/d3d10core.dll 'wine-d3d10core%{?_isa}' %{_libdir}/wine/dxvk-d3d10core.dll

+     %{_sbindir}/alternatives --install %{_libdir}/wine/d3d11.dll 'wine-d3d11%{?_isa}' %{_libdir}/wine/dxvk-d3d11.dll 5

+ else

+     %{_sbindir}/alternatives --install %{_libdir}/wine/d3d10.dll 'wine-d3d10%{?_isa}' %{_libdir}/wine/dxvk-d3d10.dll 20 \

+     --slave %{_libdir}/wine/d3d10_1.dll 'wine-d3d10_1%{?_isa}' %{_libdir}/wine/dxvk-d3d10_1.dll \

+     --slave %{_libdir}/wine/d3d10core.dll 'wine-d3d10core%{?_isa}' %{_libdir}/wine/dxvk-d3d10core.dll

+     %{_sbindir}/alternatives --install %{_libdir}/wine/d3d11.dll 'wine-d3d11%{?_isa}' %{_libdir}/wine/dxvk-d3d11.dll 20

+ fi

  

  %posttrans d3d9

- %{_sbindir}/alternatives --install %{_libdir}/wine/d3d9.dll 'wine-d3d9%{?_isa}' %{_libdir}/wine/dxvk-d3d9.dll 20

+ if vulkaninfo |& grep ERROR_INITIALIZATION_FAILED > /dev/null; then

+     %{_sbindir}/alternatives --install %{_libdir}/wine/d3d9.dll 'wine-d3d9%{?_isa}' %{_libdir}/wine/dxvk-d3d9.dll 5

+ else

+     %{_sbindir}/alternatives --install %{_libdir}/wine/d3d9.dll 'wine-d3d9%{?_isa}' %{_libdir}/wine/dxvk-d3d9.dll 20

+ fi

  

  %postun

  %{_sbindir}/alternatives --remove 'wine-d3d10%{?_isa}' %{_libdir}/wine/dxvk-d3d10.dll

no initial comment

1 new commit added

  • Silence grep output from vk check
9 months ago

Pull-Request has been closed by frantisekz

8 months ago