From 2809eda79528d88657751491b0c687be95ed05c2 Mon Sep 17 00:00:00 2001 From: Stone Tickle Date: Thu, 20 Feb 2025 08:57:26 -0500 Subject: [PATCH] bootstrap.bat - run vcvarsall if cl not found --- bootstrap.bat | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/bootstrap.bat b/bootstrap.bat index 84f0d1db..066824a8 100644 --- a/bootstrap.bat +++ b/bootstrap.bat @@ -7,6 +7,17 @@ cd /D "%~dp0" if "%~1" == "" goto :usage +where cl >nul 2>nul +if %ERRORLEVEL%==0 goto :build + +:: Attempt to run vcvarsall if cl was not found. +for /f "tokens=*" %%g in ( +'"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath' +) do (set installation_path=%%g) +call "%installation_path%\VC\Auxiliary\Build\vcvarsall" x64 + +:build + set dir=%1 if not exist "%dir%" mkdir "%dir%"