Files
sync_replay_project/tool/setup_flutter_windows.ps1
T
foxyzandClaude Opus 5.5 cf41a13528
ci / core (push) Successful in 27s
ci / server (push) Successful in 52s
ci / updater-windows (push) Successful in 9m30s
CI: add the C++ ATL component on the Windows runner (notifications plugin needs atlbase.h)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 06:42:20 +03:00

27 lines
1.5 KiB
PowerShell

# CI only (yuuka-windows, host mode): put Flutter stable on PATH for the
# following steps. The SDK is cached on the host in
# %ProgramData%\flutter-ci and fast-forwarded each run; first run clones.
$ErrorActionPreference = 'Stop'
$F = "$env:ProgramData\flutter-ci"
if (Test-Path "$F\.git") {
git -C $F fetch -q --depth 1 origin stable; if ($LASTEXITCODE) { exit 1 }
git -C $F reset -q --hard FETCH_HEAD; if ($LASTEXITCODE) { exit 1 }
} else {
git clone -q https://github.com/flutter/flutter.git -b stable --depth 1 $F; if ($LASTEXITCODE) { exit 1 }
}
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 }
}