1+ @ echo off
2+
3+ echo Dependency MSVC Build Tools with C++ with ARM64/ARM64EC components installation started.
4+
5+ :: Pre-check for downloads and dependencies folders
6+ if not exist " %DOWNLOADS_DIR% " mkdir " %DOWNLOADS_DIR% "
7+ if not exist " %DEPENDENCIES_DIR% " mkdir " %DEPENDENCIES_DIR% "
8+
9+ :: Set download URL for the Visual Studio Installer
10+ set DOWNLOAD_URL = https://aka.ms/vs/17/release/vs_BuildTools.exe
11+ set INSTALLER_FILE = %DOWNLOADS_DIR% \vs_BuildTools.exe
12+
13+ :: Download installer
14+ echo Downloading Visual Studio Build Tools with C++ installer...
15+ curl -L -o " %INSTALLER_FILE% " %DOWNLOAD_URL%
16+
17+ :: Install the Visual Studio Build Tools with C++ components
18+ echo Installing Visual Studio Build Tools with C++ components...
19+ echo Installing MSVC %MSVC_VERSION%
20+ if " %MSVC_VERSION% " == " latest" (
21+ " %INSTALLER_FILE% " --norestart --nocache --quiet --wait --installPath " %DEPENDENCIES_DIR% \VSBuildTools" ^
22+ --add Microsoft.VisualStudio.Component.Windows11SDK.22621 ^
23+ --add Microsoft.VisualStudio.Component.VC.ASAN ^
24+ --add Microsoft.VisualStudio.Component.VC.CMake.Project ^
25+ --add Microsoft.VisualStudio.Component.VC.Tools.ARM64 ^
26+ --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64
27+ ) else if " %MSVC_VERSION% " == " 14.40" (
28+ " %INSTALLER_FILE% " --norestart --nocache --quiet --wait --installPath " %DEPENDENCIES_DIR% \VSBuildTools" ^
29+ --add Microsoft.VisualStudio.Component.Windows11SDK.22621 ^
30+ --add Microsoft.VisualStudio.Component.VC.ASAN ^
31+ --add Microsoft.VisualStudio.Component.VC.CMake.Project ^
32+ --add Microsoft.VisualStudio.Component.VC.14.40.17.10.ARM64 ^
33+ --add Microsoft.VisualStudio.Component.VC.14.40.17.10.x86.x64
34+ ) else if " %MSVC_VERSION% " == " 14.36" (
35+ " %INSTALLER_FILE% " --norestart --nocache --quiet --wait --installPath " %DEPENDENCIES_DIR% \VSBuildTools" ^
36+ --add Microsoft.VisualStudio.Component.Windows11SDK.22621 ^
37+ --add Microsoft.VisualStudio.Component.VC.ASAN ^
38+ --add Microsoft.VisualStudio.Component.VC.CMake.Project ^
39+ --add Microsoft.VisualStudio.Component.VC.14.36.17.6.ARM64 ^
40+ --add Microsoft.VisualStudio.Component.VC.14.36.17.6.x86.x64
41+ )
42+
43+ :: Check if installation was successful
44+ if %errorlevel% neq 0 (
45+ echo " Failed to install Visual Studio Build Tools with C++ components. (exitcode = %errorlevel% )"
46+ exit /b 1
47+ )
48+
49+ echo Dependency Visual Studio Build Tools with C++ installation finished.
0 commit comments