mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Win: Add scripts to install and setup
This commit is contained in:
parent
9f91f3617b
commit
a333fb1ecc
Notes:
git
2025-05-30 10:58:56 +00:00
4 changed files with 43 additions and 30 deletions
14
win32/install-buildtools.cmd
Normal file
14
win32/install-buildtools.cmd
Normal file
|
@ -0,0 +1,14 @@
|
|||
@echo off
|
||||
setlocal
|
||||
|
||||
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 uninstall --id Microsoft.VisualStudio.2022.BuildTools --override "%override%"
|
24
win32/vssetup.cmd
Normal file
24
win32/vssetup.cmd
Normal file
|
@ -0,0 +1,24 @@
|
|||
@echo off
|
||||
setlocal
|
||||
|
||||
::- check for vswhere
|
||||
set vswhere=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe
|
||||
if not exist "%vswhere%" (
|
||||
echo 1>&2 vswhere.exe not found
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
::- find the latest build tool and its setup batch file.
|
||||
set VCVARS=
|
||||
for /f "delims=" %%I in ('"%vswhere%" -products * -latest -property installationPath') do (
|
||||
set VCVARS=%%I\VC\Auxiliary\Build\vcvarsall.bat
|
||||
)
|
||||
if not defined VCVARS (
|
||||
echo 1>&2 Visual Studio not found
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
::- If no target is given, setup for the current processor.
|
||||
set target=
|
||||
if "%1" == "" set target=%PROCESSOR_ARCHITECTURE%
|
||||
echo on && endlocal && "%VCVARS%" %target% %*
|
Loading…
Add table
Add a link
Reference in a new issue