You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-13 13:31:48 +00:00
Update MoltenVK install script to include version number in installer name.
(cherry picked from commit c63955b3eb)
This commit is contained in:
committed by
Rémi Verschelde
parent
0a76ad1fed
commit
c0a795be81
@@ -2,37 +2,40 @@
|
|||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
IFS=$'\n\t'
|
IFS=$'\n\t'
|
||||||
|
new_ver_full=''
|
||||||
|
|
||||||
# Check currently installed and latest available Vulkan SDK versions.
|
# Check currently installed and latest available Vulkan SDK versions.
|
||||||
if [ -d "$HOME/VulkanSDK" ]; then
|
if command -v jq 2>&1 >/dev/null; 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
|
||||||
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_full=`jq -r '.version' /tmp/vulkan-sdk.json`
|
||||||
new_ver=`echo "$new_ver" | awk -F. '{ printf("%d%02d%04d%02d\n", $1,$2,$3,$4); }';`
|
new_ver=`echo "$new_ver_full" | awk -F. '{ printf("%d%02d%04d%02d\n", $1,$2,$3,$4); }';`
|
||||||
|
|
||||||
rm -f /tmp/vulkan-sdk.json
|
rm -f /tmp/vulkan-sdk.json
|
||||||
|
|
||||||
for f in $HOME/VulkanSDK/*; do
|
for f in $HOME/VulkanSDK/*; do
|
||||||
if [ -d "$f" ]; then
|
if [ -d "$f" ]; then
|
||||||
f=`echo "${f##*/}" | awk -F. '{ printf("%d%02d%04d%02d\n", $1,$2,$3,$4); }';`
|
f=`echo "${f##*/}" | awk -F. '{ printf("%d%02d%04d%02d\n", $1,$2,$3,$4); }';`
|
||||||
if [ $f -ge $new_ver ]; then
|
if [ $f -ge $new_ver ]; then
|
||||||
echo 'Latest or newer Vulkan SDK is already installed. Skipping installation.'
|
echo 'Latest or newer Vulkan SDK is already installed. Skipping installation.'
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
done
|
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
|
||||||
/tmp/InstallVulkan.app/Contents/MacOS/InstallVulkan \
|
|
||||||
--accept-licenses --default-answer --confirm-command install
|
|
||||||
|
|
||||||
|
if [ -d "/tmp/InstallVulkan-$new_ver_full.app" ]; then
|
||||||
|
/tmp/InstallVulkan-$new_ver_full.app/Contents/MacOS/InstallVulkan-$new_ver_full --accept-licenses --default-answer --confirm-command install
|
||||||
|
rm -rf /tmp/InstallVulkan-$new_ver_full.app
|
||||||
|
elif [ -d "/tmp/InstallVulkan.app" ]; then
|
||||||
|
/tmp/InstallVulkan.app/Contents/MacOS/InstallVulkan --accept-licenses --default-answer --confirm-command install
|
||||||
|
rm -rf /tmp/InstallVulkan.app
|
||||||
|
fi
|
||||||
|
|
||||||
rm -rf /tmp/InstallVulkan.app
|
|
||||||
rm -f /tmp/vulkan-sdk.zip
|
rm -f /tmp/vulkan-sdk.zip
|
||||||
|
|
||||||
echo 'Vulkan SDK installed successfully! You can now build Godot by running "scons".'
|
echo 'Vulkan SDK installed successfully! You can now build Godot by running "scons".'
|
||||||
|
|||||||
Reference in New Issue
Block a user