From 1c518560205a8fe74a8f6704e400c8333b4ca78c Mon Sep 17 00:00:00 2001 From: Andrew Eikum Date: Fri, 9 Feb 2018 10:33:40 -0600 Subject: [PATCH] build dxvk --- build_dxvk.sh | 26 ++++++++++++++++++++++++++ build_proton.sh | 26 ++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100755 build_dxvk.sh diff --git a/build_dxvk.sh b/build_dxvk.sh new file mode 100755 index 00000000..1d7d25f4 --- /dev/null +++ b/build_dxvk.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +set -e + +if [ x"$1" == x ]; then + echo missing build type, give win32 or win64 + exit 1 +fi + +TOP="$PWD" +TYPE="$1" + +cd "$TOP"/dxvk + +meson --prefix="$TOP"/dxvk/dist.$TYPE --cross-file build-$TYPE.txt build.$TYPE + +cd build.$TYPE + +meson configure -Dprefix="$TOP"/dxvk +meson configure -Dbuildtype=release + +ninja +ninja install + +#mark as built +touch "$TOP"/dxvk/proton.$TYPE.built diff --git a/build_proton.sh b/build_proton.sh index 5a2c520e..55bf8928 100755 --- a/build_proton.sh +++ b/build_proton.sh @@ -143,6 +143,32 @@ fi cp -a vrclient.dll.so "$DST_DIR"/lib/wine/ cp -a vrclient.dll.fake "$DST_DIR"/lib/wine/fakedlls/vrclient.dll +#build dxvk + +#unfortunately the Steam runtime chroot is too old to build dxvk, so +#we have to build it in the host system + +#requires meson >= 0.43 and posix thread enabled mingw-w64, on debian: +# update-alternatives --config i686-w64-mingw32-g++ +# update-alternatives --config i686-w64-mingw32-gcc +# update-alternatives --config x86_64-w64-mingw32-g++ +# update-alternatives --config x86_64-w64-mingw32-gcc +cd "$TOP" +if [ ! -e dxvk/proton.win64.built ]; then + PATH="$TOP"/glslang/bin/:"$PATH" bash ./build_dxvk.sh win64 +fi +if [ ! -e dxvk/proton.win32.built ]; then + PATH="$TOP"/glslang/bin/:"$PATH" bash ./build_dxvk.sh win32 +fi + +mkdir -p "$DST_DIR"/lib/wine/dxvk +cp -a dxvk/dist.win32/bin/dxgi.dll "$DST_DIR"/lib/wine/dxvk/ +cp -a dxvk/dist.win32/bin/d3d11.dll "$DST_DIR"/lib/wine/dxvk/ + +mkdir -p "$DST_DIR"/lib64/wine/dxvk +cp -a dxvk/dist.win64/bin/dxgi.dll "$DST_DIR"/lib64/wine/dxvk/ +cp -a dxvk/dist.win64/bin/d3d11.dll "$DST_DIR"/lib64/wine/dxvk/ + echo "Packaging..." cd "$TOP"