2021-03-10 22:46:51 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -ex
|
|
|
|
|
2022-03-29 10:59:11 +08:00
|
|
|
VKD3D_PROTON_VERSION="2.6"
|
|
|
|
VKD3D_PROTON_COMMIT="3e5aab6fb3e18f81a71b339be4cb5cdf55140980"
|
2021-03-10 22:46:51 +08:00
|
|
|
|
|
|
|
VKD3D_PROTON_DST_DIR="/vkd3d-proton-tests"
|
|
|
|
VKD3D_PROTON_SRC_DIR="/vkd3d-proton-src"
|
|
|
|
VKD3D_PROTON_BUILD_DIR="/vkd3d-proton-$VKD3D_PROTON_VERSION"
|
|
|
|
|
|
|
|
function build_arch {
|
|
|
|
local arch="$1"
|
|
|
|
shift
|
|
|
|
|
|
|
|
meson "$@" \
|
|
|
|
-Denable_tests=true \
|
|
|
|
--buildtype release \
|
2022-06-09 19:37:33 +08:00
|
|
|
--prefix "$VKD3D_PROTON_DST_DIR" \
|
2021-03-10 22:46:51 +08:00
|
|
|
--strip \
|
|
|
|
--bindir "x${arch}" \
|
|
|
|
--libdir "x${arch}" \
|
|
|
|
"$VKD3D_PROTON_BUILD_DIR/build.${arch}"
|
|
|
|
|
|
|
|
ninja -C "$VKD3D_PROTON_BUILD_DIR/build.${arch}" install
|
|
|
|
|
2022-06-09 19:37:33 +08:00
|
|
|
install -D -m755 -t "${VKD3D_PROTON_DST_DIR}/x${arch}/bin" "$VKD3D_PROTON_BUILD_DIR/build.${arch}/tests/d3d12"
|
2021-03-10 22:46:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
git clone https://github.com/HansKristian-Work/vkd3d-proton.git --single-branch -b "v$VKD3D_PROTON_VERSION" --no-checkout "$VKD3D_PROTON_SRC_DIR"
|
|
|
|
pushd "$VKD3D_PROTON_SRC_DIR"
|
|
|
|
git checkout "$VKD3D_PROTON_COMMIT"
|
|
|
|
git submodule update --init --recursive
|
|
|
|
git submodule update --recursive
|
2022-06-09 19:37:33 +08:00
|
|
|
build_arch 64
|
|
|
|
build_arch 86
|
2021-03-10 22:46:51 +08:00
|
|
|
popd
|
|
|
|
|
|
|
|
rm -rf "$VKD3D_PROTON_BUILD_DIR"
|
|
|
|
rm -rf "$VKD3D_PROTON_SRC_DIR"
|