From cf41a135284c778645c87b7fee2eb35913ac0332 Mon Sep 17 00:00:00 2001 From: foxyz Date: Fri, 16 Oct 2026 06:42:20 +0300 Subject: [PATCH] CI: add the C++ ATL component on the Windows runner (notifications plugin needs atlbase.h) Co-Authored-By: Claude Opus 5.5 --- docs/DEVELOPMENT.md | 3 ++- tool/setup_flutter_windows.ps1 | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md index 6fbdf0f..9dfb547 100644 --- a/docs/DEVELOPMENT.md +++ b/docs/DEVELOPMENT.md @@ -250,7 +250,8 @@ User pushes tags; CI does the rest. 2. Review, then `git push --follow-tags`. 3. `.gitea/workflows/release.yml` runs one job per platform: Linux builds with `tool/package_linux.sh`, Windows (runner `yuuka-windows`, host mode, - PowerShell only) with `tool/package_windows.ps1`. Each then runs + PowerShell only; `tool/setup_flutter_windows.ps1` also adds Visual + Studio's C++ ATL component once, which the notifications plugin needs) with `tool/package_windows.ps1`. Each then runs `dart tool/release_publish.dart vX.Y.Z `, which creates the release if the other job hasn't yet and uploads (or replaces) its asset. By hand: package, then the same `dart tool/release_publish.dart` line. diff --git a/tool/setup_flutter_windows.ps1 b/tool/setup_flutter_windows.ps1 index 7866cc3..b5f7147 100644 --- a/tool/setup_flutter_windows.ps1 +++ b/tool/setup_flutter_windows.ps1 @@ -13,3 +13,14 @@ Add-Content $env:GITHUB_PATH "$F\bin" & "$F\bin\flutter.bat" config --no-analytics | Out-Null & "$F\bin\flutter.bat" --version if ($LASTEXITCODE) { exit 1 } + +# flutter_local_notifications_windows includes atlbase.h: the Build Tools +# need the C++ ATL component. Added once on the host (runs as SYSTEM). +$Vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" +$Vs = & $Vswhere -products * -latest -property installationPath +if (-not (Get-ChildItem "$Vs\VC\Tools\MSVC\*\atlmfc\include\atlbase.h" -ErrorAction SilentlyContinue)) { + Write-Host "adding the C++ ATL component to $Vs" + $p = Start-Process -Wait -PassThru "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\setup.exe" ` + -ArgumentList "modify --installPath `"$Vs`" --add Microsoft.VisualStudio.Component.VC.ATL --quiet --norestart --nocache" + if ($p.ExitCode -notin 0, 3010) { Write-Host "ATL install failed: $($p.ExitCode)"; exit 1 } +}