[macOS] Pin Vulkan version in download script

This commit is contained in:
Justin Garcia 2024-10-10 14:44:17 +08:00
parent 4c4e673344
commit 015f0438d6
No known key found for this signature in database
GPG key ID: F05DEFB7EED54A05

View file

@ -3,8 +3,20 @@
set -euo pipefail
IFS=$'\n\t'
# These can be found in https://vulkan.lunarg.com/sdk/home/
SDK_URL="https://sdk.lunarg.com/sdk/download/1.3.296.0/mac/vulkansdk-macos-1.3.296.0.zip"
SDK_HASH="393fd11f65a4001f12fd34fdd009c38045220ca3f735bc686d97822152b0f33c"
# Download and install the Vulkan SDK.
curl -L "https://sdk.lunarg.com/sdk/download/latest/mac/vulkan-sdk.zip" -o /tmp/vulkan-sdk.zip
curl -L $SDK_URL -o /tmp/vulkan-sdk.zip
DL_HASH=$(shasum -a 256 /tmp/vulkan-sdk.zip | awk '{print $1}')
if [ "$SDK_HASH" != "$DL_HASH" ]; then
echo "SDK_HASH: $SDK_HASH";
echo "DL_HASH: $DL_HASH";
exit 1;
fi
unzip /tmp/vulkan-sdk.zip -d /tmp
/tmp/InstallVulkan.app/Contents/MacOS/InstallVulkan \
--accept-licenses --default-answer --confirm-command install