Add ODIN_IGNORE_MSVC_CHECK check to build.bat

This commit is contained in:
gingerBill
2023-06-13 13:21:15 +01:00
parent e9608c9d05
commit fc4a5e61c2
2 changed files with 13 additions and 9 deletions
+11 -9
View File
@@ -3,18 +3,20 @@
setlocal EnableDelayedExpansion setlocal EnableDelayedExpansion
where /Q cl.exe || ( where /Q cl.exe || (
set __VSCMD_ARG_NO_LOGO=1 set __VSCMD_ARG_NO_LOGO=1
for /f "tokens=*" %%i in ('"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -requires Microsoft.VisualStudio.Workload.NativeDesktop -property installationPath') do set VS=%%i for /f "tokens=*" %%i in ('"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -requires Microsoft.VisualStudio.Workload.NativeDesktop -property installationPath') do set VS=%%i
if "!VS!" equ "" ( if "!VS!" equ "" (
echo ERROR: Visual Studio installation not found echo ERROR: Visual Studio installation not found
exit /b 1 exit /b 1
) )
call "!VS!\VC\Auxiliary\Build\vcvarsall.bat" amd64 || exit /b 1 call "!VS!\VC\Auxiliary\Build\vcvarsall.bat" amd64 || exit /b 1
) )
if "%VSCMD_ARG_TGT_ARCH%" neq "x64" ( if "%VSCMD_ARG_TGT_ARCH%" neq "x64" (
echo ERROR: please run this from MSVC x64 native tools command prompt, 32-bit target is not supported! if "%ODIN_IGNORE_MSVC_CHECK%" == "" (
exit /b 1 echo ERROR: please run this from MSVC x64 native tools command prompt, 32-bit target is not supported!
exit /b 1
)
) )
for /f "usebackq tokens=1,2 delims=,=- " %%i in (`wmic os get LocalDateTime /value`) do @if %%i==LocalDateTime ( for /f "usebackq tokens=1,2 delims=,=- " %%i in (`wmic os get LocalDateTime /value`) do @if %%i==LocalDateTime (
+2
View File
@@ -7,5 +7,7 @@ rem call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxil
rem call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64 1> NUL rem call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64 1> NUL
set _NO_DEBUG_HEAP=1 set _NO_DEBUG_HEAP=1
set ODIN_IGNORE_MSVC_CHECK=1
rem set path=w:\Odin\misc;%path% rem set path=w:\Odin\misc;%path%
cls cls