-IF "%ARCH%" == "Win64" (
- call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x64
-) ELSE (
- IF "%ARCH%" == "Win32" (
- call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86
- ) ELSE (
- echo Wrong architecture is used. Win32 or Win64 architecture is allowed only.
- echo Refer to the set_env.bat script.
- )
+if "%VS140COMNTOOLS%" == "" (
+ echo Could not find MS Visual Studio: variable VS140COMNTOOLS is not defined!
+ exit 1
+) else if exist "%VS140COMNTOOLS%\..\IDE\devenv.exe" (
+ set MSVC_EXE="%VS140COMNTOOLS%\..\IDE\devenv.exe"
+) else if exist "%VS140COMNTOOLS%\..\IDE\VCExpress.exe" (
+ set MSVC_EXE="%VS140COMNTOOLS%\..\IDE\VCExpress.exe"
+) else (
+ echo "Could not find MS Visual Studio in %VS140COMNTOOLS%\..\IDE"
+ echo Check environment variable VS140COMNTOOLS!
+ exit 1