You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
[Misc] Check for the available and installed Vulkan SDK versions before downloading and installing.
(cherry picked from commit db1c1d43e3)
This commit is contained in:
@@ -3,6 +3,28 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
IFS=$'\n\t'
|
IFS=$'\n\t'
|
||||||
|
|
||||||
|
# Check currently installed and latest available Vulkan SDK versions.
|
||||||
|
if [ -d "$HOME/VulkanSDK" ]; then
|
||||||
|
if command -v jq 2>&1 >/dev/null; then
|
||||||
|
curl -L "https://sdk.lunarg.com/sdk/download/latest/mac/config.json" -o /tmp/vulkan-sdk.json
|
||||||
|
|
||||||
|
new_ver=`jq -r '.version' /tmp/vulkan-sdk.json`
|
||||||
|
new_ver=`echo "$new_ver" | awk -F. '{ printf("%d%02d%04d%02d\n", $1,$2,$3,$4); }';`
|
||||||
|
|
||||||
|
rm -f /tmp/vulkan-sdk.json
|
||||||
|
|
||||||
|
for f in $HOME/VulkanSDK/*; do
|
||||||
|
if [ -d "$f" ]; then
|
||||||
|
f=`echo "${f##*/}" | awk -F. '{ printf("%d%02d%04d%02d\n", $1,$2,$3,$4); }';`
|
||||||
|
if [ $f -ge $new_ver ]; then
|
||||||
|
echo 'Latest or newer Vulkan SDK is already installed. Skipping installation.'
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Download and install the Vulkan SDK.
|
# 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 "https://sdk.lunarg.com/sdk/download/latest/mac/vulkan-sdk.zip" -o /tmp/vulkan-sdk.zip
|
||||||
unzip /tmp/vulkan-sdk.zip -d /tmp
|
unzip /tmp/vulkan-sdk.zip -d /tmp
|
||||||
|
|||||||
Reference in New Issue
Block a user