Skip to content

Commit 2118bdf

Browse files
committed
patch 3 --no-bump
1 parent a5c6601 commit 2118bdf

1 file changed

Lines changed: 47 additions & 2 deletions

File tree

.github/workflows/debugbuild.yml

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,9 +399,54 @@ jobs:
399399
cache: true
400400

401401
- name: Install Visual Studio ATL components
402+
shell: pwsh
402403
run: |
403-
choco install visualstudio2022-workload-nativedesktop --package-parameters "--add Microsoft.VisualStudio.Component.VC.ATL --includeRecommended" -y
404-
continue-on-error: true
404+
Write-Host "Searching for Visual Studio 2022 installations..."
405+
406+
# Common VS 2022 installation paths to check
407+
$possiblePaths = @(
408+
"C:\Program Files\Microsoft Visual Studio\2022\Enterprise",
409+
"C:\Program Files\Microsoft Visual Studio\2022\Professional",
410+
"C:\Program Files\Microsoft Visual Studio\2022\Community",
411+
"C:\Program Files\Microsoft Visual Studio\2022\BuildTools",
412+
"C:\Program Files (x86)\Microsoft Visual Studio\2022\Enterprise",
413+
"C:\Program Files (x86)\Microsoft Visual Studio\2022\Professional",
414+
"C:\Program Files (x86)\Microsoft Visual Studio\2022\Community",
415+
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools"
416+
)
417+
418+
$vsInstallPath = $null
419+
foreach ($path in $possiblePaths) {
420+
if (Test-Path $path) {
421+
Write-Host "Found Visual Studio at: $path"
422+
$vsInstallPath = $path
423+
break
424+
}
425+
}
426+
427+
if ($null -eq $vsInstallPath) {
428+
Write-Host "ERROR: Could not find Visual Studio 2022 installation"
429+
exit 1
430+
}
431+
432+
$vsInstallerPath = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vs_installer.exe"
433+
if (-not (Test-Path $vsInstallerPath)) {
434+
Write-Host "ERROR: VS Installer not found at $vsInstallerPath"
435+
exit 1
436+
}
437+
438+
Write-Host "Using VS Installer: $vsInstallerPath"
439+
Write-Host "Modifying installation at: $vsInstallPath"
440+
Write-Host "Adding component: Microsoft.VisualStudio.Component.VC.ATL"
441+
442+
& $vsInstallerPath modify --installPath "$vsInstallPath" --add Microsoft.VisualStudio.Component.VC.ATL --quiet --norestart
443+
444+
if ($LASTEXITCODE -ne 0) {
445+
Write-Host "ERROR: VS Installer modify command failed with exit code $LASTEXITCODE"
446+
exit 1
447+
}
448+
449+
Write-Host "ATL component installation completed successfully"
405450
406451
- name: Install Flutter dependencies
407452
run: flutter pub get

0 commit comments

Comments
 (0)