[ci/windows] install-vulkan-sdk need adm rights

* need to be checked on CI

Signed-off-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
This commit is contained in:
Caio Oliveira 2025-09-09 18:28:08 -03:00 committed by crueter
parent ad6045d9a4
commit 69c30443cb
2 changed files with 55 additions and 0 deletions

49
.ci/windows/install-msvc.ps1 Executable file
View file

@ -0,0 +1,49 @@
# SPDX-FileCopyrightText: 2025 Eden Emulator Project
# SPDX-License-Identifier: GPL-3.0-or-later
$ErrorActionPreference = "Stop"
# Check if running as administrator
if (-not ([bool](net session 2>$null))) {
Write-Host "This script must be run with administrator privileges!"
Exit 1
}
$VSVer = "17"
$ExeFile = "vs_BuildTools.exe"
$Uri = "https://aka.ms/vs/$VSVer/release/$ExeFile"
$Destination = "./$ExeFile"
Write-Host "Downloading Visual Studio Build Tools from $Uri"
$WebClient = New-Object System.Net.WebClient
$WebClient.DownloadFile($Uri, $Destination)
Write-Host "Finished downloading $ExeFile"
$VSROOT = "C:/VSBuildTools/$VSVer"
$Arguments = @(
"--installPath `"$VSROOT`"", # set custom installation path
"--quiet", # suppress UI
"--wait", # wait for installation to complete
"--norestart", # prevent automatic restart
"--add Microsoft.VisualStudio.Workload.VCTools", # add C++ build tools workload
"--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64", # add core x86/x64 C++ tools
"--add Microsoft.VisualStudio.Component.Windows10SDK.19041" # add specific Windows SDK
)
Write-Host "Installing Visual Studio Build Tools"
$InstallProcess = Start-Process -FilePath $Destination -NoNewWindow -PassThru -Wait -ArgumentList $Arguments
$ExitCode = $InstallProcess.ExitCode
if ($ExitCode -ne 0) {
Write-Host "Error installing Visual Studio Build Tools (Error: $ExitCode)"
Exit $ExitCode
}
Write-Host "Finished installing Visual Studio Build Tools"
# Add paths to GitHub Actions environment if running in CI
if ("$env:GITHUB_ACTIONS" -eq "true") {
$VSPath = Join-Path $VSROOT "VC\Tools\MSVC"
Write-Host "Adding Visual Studio paths to GitHub Actions environment"
echo "$VSPath\bin\Hostx64\x64" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
}

View file

@ -3,6 +3,12 @@
$ErrorActionPreference = "Stop"
# Check if running as administrator
if (-not ([bool](net session 2>$null))) {
Write-Host "This script must be run with administrator privileges!"
Exit 1
}
$VulkanSDKVer = "1.4.321.1"
$ExeFile = "vulkansdk-windows-X64-$VulkanSDKVer.exe"
$Uri = "https://sdk.lunarg.com/sdk/download/$VulkanSDKVer/windows/$ExeFile"