1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 18:53:28 +01:00

Add SHA256 hash verification

Amended 3 times because of my stupidity...
This commit is contained in:
Roberto Anić Banić 2018-05-23 21:36:47 +02:00 committed by Ivan
parent fed94e3823
commit 2bfafe4b0d

View File

@ -11,6 +11,7 @@ environment:
VULKAN_SDK: "C:\\VulkanSDK\\1.1.73.0"
VULKAN_SDK_URL: https://sdk.lunarg.com/sdk/download/1.1.73.0/windows/VulkanSDK-1.1.73.0-Installer.exe
VULKAN_SDK_MIRROR: https://obk.ee/rpcs3/VulkanSDK-1.1.73.0-Installer.exe
VULKAN_SDK_SHA: a5d193f97db4de97e6b4fdd81f00ff6a603f66bb17dc3cf8ac0fe9aec58497c7
cache:
- glslang.7z -> appveyor.yml
@ -66,26 +67,28 @@ build:
verbosity: normal
before_build:
- ps: | # fetch precompiled build dependencies
- ps: | # initialize mirror arrays and fetch precompiled build dependencies
$VULKAN_SDK_URLS = @(
$env:VULKAN_SDK_MIRROR;
$env:VULKAN_SDK_URL;
"$($env:VULKAN_SDK_URL)?Human=true";
)
if (!(test-path llvmlibs.7z)) { irm $env:LLVMLIBS -outfile llvmlibs.7z }
if (!(test-path glslang.7z)) { irm $env:GLSLANG -outfile glslang.7z }
7z x llvmlibs.7z -aos -o"." | out-null
7z x glslang.7z -aos -o".\lib\$env:CONFIGURATION-$env:PLATFORM" | out-null
if (!(test-path vulkan-sdk.exe))
{
Try
foreach ($url in $VULKAN_SDK_URLS) {
irm $url -outfile vulkan-sdk.exe
if ($env:VULKAN_SDK_SHA -eq $(Get-FileHash .\vulkan-sdk.exe).Hash)
{
irm $env:VULKAN_SDK_MIRROR -outfile vulkan-sdk.exe
echo "Successfully downloaded and verified vulkan-sdk.exe!"
break
}
Catch
else
{
Try
{
irm $env:VULKAN_SDK_URL -outfile vulkan-sdk.exe
}
Catch
{
irm "$($env:VULKAN_SDK_URL)?Human=true" -outfile vulkan-sdk.exe
echo "Invalid file hash, Vulkan SDK Setup was possibly tampered with, retrying with a different mirror..."
}
}
}