]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/get_vsvars.bat
Sync BaseTool trunk (version r2670) into EDKII BaseTools.
[mirror_edk2.git] / BaseTools / get_vsvars.bat
diff --git a/BaseTools/get_vsvars.bat b/BaseTools/get_vsvars.bat
new file mode 100644 (file)
index 0000000..b67a81d
--- /dev/null
@@ -0,0 +1,46 @@
+@REM @file\r
+@REM   Windows batch file to find the Visual Studio set up script\r
+@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\r
+\r
+\r
+@echo off\r
+goto  :main\r
+\r
+:read_vsvars\r
+@rem Do nothing if already found, otherwise call vsvars32.bat if there\r
+if defined VCINSTALLDIR goto :EOF\r
+  set GET_VSVARS_BAT_CHECK_DIR=%*\r
+  set GET_VSVARS_BAT_CHECK_DIR=%GET_VSVARS_BAT_CHECK_DIR:"=%\r
+  if exist  "%GET_VSVARS_BAT_CHECK_DIR%\vsvars32.bat"  call "%GET_VSVARS_BAT_CHECK_DIR%\vsvars32.bat"\r
+:vsvars_done\r
+goto :EOF\r
+\r
+\r
+REM NOTE: This file will find the most recent Visual Studio installation\r
+REM       apparent from the environment.\r
+REM       To use an older version, modify your environment set up.\r
+REM       (Or invoke the relevant vsvars32 file beforehand).\r
+\r
+:main\r
+if defined VCINSTALLDIR goto :done\r
+  if defined VS140COMNTOOLS  call :read_vsvars  "%VS140COMNTOOLS%"\r
+  if defined VS130COMNTOOLS  call :read_vsvars  "%VS130COMNTOOLS%"\r
+  if defined VS120COMNTOOLS  call :read_vsvars  "%VS120COMNTOOLS%"\r
+  if defined VS110COMNTOOLS  call :read_vsvars  "%VS110COMNTOOLS%"\r
+  if defined VS100COMNTOOLS  call :read_vsvars  "%VS100COMNTOOLS%"\r
+  if defined VS90COMNTOOLS   call :read_vsvars  "%VS90COMNTOOLS%"\r
+  if defined VS80COMNTOOLS   call :read_vsvars  "%VS80COMNTOOLS%"\r
+  if defined VS71COMNTOOLS   call :read_vsvars  "%VS71COMNTOOLS%"\r
+\r
+:done\r
+set GET_VSVARS_BAT_CHECK_DIR=\r