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 <joshua@froggi.es>
This commit is contained in:
Joshua Ashton 2021-04-27 12:35:12 +01:00 committed by Joshie
parent 68d5510bdf
commit 1267b2a985
1 changed files with 6 additions and 3 deletions

View File

@ -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