From 1267b2a985e431031220737b653accc09a059c0e Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Tue, 27 Apr 2021 12:35:12 +0100 Subject: [PATCH] build: Fix installing vkd3d-proton when Wine is built without vkd3d This would fail previously as Wine does not have d3d12.dll for us to make .old Closes: #559 Signed-off-by: Joshua Ashton --- setup_vkd3d_proton.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/setup_vkd3d_proton.sh b/setup_vkd3d_proton.sh index eca3b605..9280eb63 100644 --- a/setup_vkd3d_proton.sh +++ b/setup_vkd3d_proton.sh @@ -120,11 +120,10 @@ installFile() { else rm -v "${dstfile}" fi - $file_cmd "${srcfile}" "${dstfile}" else - echo "${dstfile}: File not found in wine prefix" >&2 - return 1 + touch "${dstfile}.old_none" fi + $file_cmd "${srcfile}" "${dstfile}" fi return 0 } @@ -148,6 +147,10 @@ uninstallFile() { rm -v "${dstfile}" mv -v "${dstfile}.old" "${dstfile}" return 0 + elif [ -f "${dstfile}.old_none" ]; then + rm -v "${dstfile}.old_none" + rm -v "${dstfile}" + return 0 else return 1 fi