@REM\r
@REM Copyright (c) 2013-2014, ARM Limited. All rights reserved.\r
\r
-@REM This program and the accompanying materials\r
-@REM are licensed and made available under the terms and conditions of the BSD License\r
-@REM which accompanies this distribution. The full text of the license may be found at\r
-@REM http://opensource.org/licenses/bsd-license.php\r
-@REM\r
-@REM THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-@REM WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+@REM SPDX-License-Identifier: BSD-2-Clause-Patent\r
@REM\r
\r
\r
@echo off\r
goto :main\r
\r
+:set_vsvars\r
+for /f "usebackq tokens=1* delims=: " %%i in (`%*`) do (\r
+ if /i "%%i"=="installationPath" call "%%j\VC\Auxiliary\Build\vcvars32.bat"\r
+)\r
+goto :EOF\r
+\r
:read_vsvars\r
@rem Do nothing if already found, otherwise call vsvars32.bat if there\r
if defined VCINSTALLDIR goto :EOF\r
\r
:main\r
if defined VCINSTALLDIR goto :done\r
+ if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" call :set_vsvars "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"\r
+ if exist "%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe" call :set_vsvars "%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe"\r
if defined VS140COMNTOOLS call :read_vsvars "%VS140COMNTOOLS%"\r
if defined VS120COMNTOOLS call :read_vsvars "%VS120COMNTOOLS%"\r
if defined VS110COMNTOOLS call :read_vsvars "%VS110COMNTOOLS%"\r