ruby/win32/install-buildtools.cmd
Nobuyoshi Nakada b839989fd2 win32: Add CR to all batch files.
This reverts commit 23f9a0d655c4d405bb2397a147a1523436205486, "win32:
Strip CR from batch files", and add CR to the other batch files too.

`cmd.exe` seems to work well with LF at a glance, but sometimes `goto`
jumps to an unexpected line.  This is probably because it is looking
for the beginning of a line, assuming that all lines end with CRLF,
and as a result mistaking the `goto` operand for a label.
2026-01-26 18:17:45 +09:00

15 lines
541 B
Batchfile
Executable File

@echo off
@setlocal EnableExtensions DisableDelayedExpansion || exit /b -1
set components=VC.Tools.x86.x64 VC.Redist.14.Latest CoreBuildTools
set components=%components% Windows11SDK.26100
if /i "%PROCESSOR_ARCHITECTURE%" == "ARM64" (
set components=%components% VC.Tools.ARM64 VC.Tools.ARM64EC
)
set override=--passive
for %%I in (%components%) do (
call set override=%%override%% --add Microsoft.VisualStudio.Component.%%I
)
echo on
winget install --id Microsoft.VisualStudio.2022.BuildTools --override "%override%"