fix(windows): bundle vc_redist in client installer and download in release workflow
This commit is contained in:
1 parent
fb1762caf7
commit
d7d38af631
6 files changed
+103
-10
No files matched your search
@@ -341,6 +341,33 @@ jobs:
|
||||
$releaseDir = "build\windows\x64\runner\Release"
|
||||
Get-ChildItem -Path "$releaseDir\*.dll" | Select-Object Name, Length
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Visual C++ Redistributable Dependency
|
||||
# ------------------------------------------------------------
|
||||
- name: Download Microsoft Visual C++ Redistributable
|
||||
working-directory: frontend
|
||||
shell: pwsh
|
||||
run: |
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
$vcRedistUrl = "https://aka.ms/vs/17/release/vc_redist.x64.exe"
|
||||
$vcRedistFile = "vc_redist.x64.exe"
|
||||
|
||||
Write-Host "Downloading Microsoft Visual C++ 2015-2022 Redistributable (x64) from $vcRedistUrl..."
|
||||
$ProgressPreference = 'SilentlyContinue'
|
||||
Invoke-WebRequest -Uri $vcRedistUrl -OutFile $vcRedistFile
|
||||
|
||||
if (-not (Test-Path $vcRedistFile)) {
|
||||
throw "Downloaded vc_redist.x64.exe was not found."
|
||||
}
|
||||
|
||||
$fileSize = (Get-Item $vcRedistFile).Length
|
||||
Write-Host "vc_redist.x64.exe downloaded successfully. Size: $fileSize bytes."
|
||||
|
||||
if ($fileSize -lt 10000000) {
|
||||
throw "Downloaded vc_redist.x64.exe appears incomplete or corrupted (size: $fileSize bytes)."
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Windows Installer
|
||||
# ------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user