Skip to content

Commit bc2abf9

Browse files
committed
Build Windows presets with the newest Visual Studio installed
The Windows presets named the Visual Studio 2022 generator. GitHub's windows-11-arm image moved to Visual Studio 2026 in September 2026 (actions/runner-images#14602), so CMake found no Visual Studio there and the ARM64 job failed before building anything. The presets no longer name a generator, so CMake uses the newest Visual Studio installed: 2022 on a machine with only 2022, 2026 on the ARM64 runner. The architecture is still set per preset. Prior art: actions/runner-images README and Windows11-Arm64 readme (windows-11-arm label moved to the Visual Studio 2026 image); CMake picks the newest Visual Studio when no generator is given.
1 parent f1b1b80 commit bc2abf9

3 files changed

Lines changed: 2 additions & 5 deletions

File tree

‎CMakePresets.json‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@
8080
{
8181
"name": "windows-x64",
8282
"displayName": "Windows x64, with tests",
83-
"generator": "Visual Studio 17 2022",
8483
"architecture": {
8584
"value": "x64",
8685
"strategy": "set"
@@ -95,7 +94,6 @@
9594
{
9695
"name": "windows-arm64",
9796
"displayName": "Windows ARM64, with tests",
98-
"generator": "Visual Studio 17 2022",
9997
"architecture": {
10098
"value": "ARM64",
10199
"strategy": "set"
@@ -110,7 +108,6 @@
110108
{
111109
"name": "windows-x64-bench",
112110
"displayName": "Windows x64, optimised audio benchmark",
113-
"generator": "Visual Studio 17 2022",
114111
"architecture": {
115112
"value": "x64",
116113
"strategy": "set"

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ cmake --build --preset dev
5555

5656
The plugin is built at `build/dev/VST3/Debug/Sineless.vst3`. To work on the interface in a browser, without the plugin, run `npm run dev`; a built-in mock replaces the audio engine.
5757

58-
On Windows, you need Visual Studio 2022 with the "Desktop development with C++" workload (add the ARM64 build tools to build for ARM64), Node.js 22 and LLVM (`winget install LLVM.LLVM`, for `clang-format`). In a PowerShell window:
58+
On Windows, you need Visual Studio 2022 or 2026 with the "Desktop development with C++" workload (the presets use the newest one installed) (add the ARM64 build tools to build for ARM64), Node.js 22 and LLVM (`winget install LLVM.LLVM`, for `clang-format`). In a PowerShell window:
5959

6060
```powershell
6161
npm.cmd ci

‎scripts/windows-env.ps1‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ $hostIsArm = $env:PROCESSOR_ARCHITECTURE -eq 'ARM64'
77
if (-not (Get-Command cmake -ErrorAction SilentlyContinue)) {
88
$vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
99
$vs = & $vswhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath
10-
if (-not $vs) { throw 'Visual Studio 2022 with the C++ tools is required.' }
10+
if (-not $vs) { throw 'Visual Studio 2022 or later with the C++ tools is required.' }
1111
Import-Module "$vs\Common7\Tools\Microsoft.VisualStudio.DevShell.dll"
1212
$arch = if ($hostIsArm) { 'arm64' } else { 'amd64' }
1313
# -Arch/-HostArch lack arm64; the underlying VsDevCmd accepts it.

0 commit comments

Comments
 (0)