VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/BaseTools/get_vsvars.bat@ 85716

最後變更 在這個檔案從85716是 80721,由 vboxsync 提交於 6 年 前

Devices/EFI/FirmwareNew: Start upgrade process to edk2-stable201908 (compiles on Windows and works to some extent), bugref:4643

  • 屬性 svn:eol-style 設為 CRLF
檔案大小: 2.8 KB
 
1@REM @file
2@REM Windows batch file to find the Visual Studio set up script
3@REM
4@REM Copyright (c) 2013-2014, ARM Limited. All rights reserved.
5
6@REM SPDX-License-Identifier: BSD-2-Clause-Patent
7@REM
8
9
10@echo off
11set SCRIPT_ERROR=0
12if "%1"=="" goto main
13if /I "%1"=="VS2017" goto VS2017Vars
14if /I "%1"=="VS2015" goto VS2015Vars
15if /I "%1"=="VS2013" goto VS2013Vars
16if /I "%1"=="VS2012" goto VS2012Vars
17
18:set_vsvars
19for /f "usebackq tokens=1* delims=: " %%i in (`%*`) do (
20 if /i "%%i"=="installationPath" call "%%j\VC\Auxiliary\Build\vcvars32.bat"
21)
22goto :EOF
23
24:read_vsvars
25@rem Do nothing if already found, otherwise call vsvars32.bat if there
26if defined VCINSTALLDIR goto :EOF
27 set GET_VSVARS_BAT_CHECK_DIR=%*
28 set GET_VSVARS_BAT_CHECK_DIR=%GET_VSVARS_BAT_CHECK_DIR:"=%
29 if exist "%GET_VSVARS_BAT_CHECK_DIR%\vsvars32.bat" call "%GET_VSVARS_BAT_CHECK_DIR%\vsvars32.bat"
30:vsvars_done
31goto :EOF
32
33
34:ToolNotInstall
35set SCRIPT_ERROR=1
36goto :EOF
37
38REM NOTE: This file will find the most recent Visual Studio installation
39REM apparent from the environment.
40REM To use an older version, modify your environment set up.
41REM (Or invoke the relevant vsvars32 file beforehand).
42
43:main
44if defined VCINSTALLDIR goto :done
45 :VS2017Vars
46 if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" (
47 if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\BuildTools" (
48 call :set_vsvars "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -products Microsoft.VisualStudio.Product.BuildTools
49 ) else (
50 call :set_vsvars "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
51 )
52 )
53 if exist "%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe" (
54 if exist "%ProgramFiles%\Microsoft Visual Studio\2017\BuildTools" (
55 call :set_vsvars "%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe" -products Microsoft.VisualStudio.Product.BuildTools
56 ) else (
57 call :set_vsvars "%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe"
58 )
59 )
60 if /I "%1"=="VS2017" goto ToolNotInstall
61
62 :VS2015Vars
63 if defined VS140COMNTOOLS (call :read_vsvars "%VS140COMNTOOLS%") else (if /I "%1"=="VS2015" goto ToolNotInstall)
64
65 :VS2013Vars
66 if defined VS120COMNTOOLS ( call :read_vsvars "%VS120COMNTOOLS%") else (if /I "%1"=="VS2013" goto ToolNotInstall)
67
68 :VS2012Vars
69 if defined VS110COMNTOOLS (call :read_vsvars "%VS110COMNTOOLS%") else (if /I "%1"=="VS2012" goto ToolNotInstall)
70
71 if defined VS100COMNTOOLS call :read_vsvars "%VS100COMNTOOLS%"
72 if defined VS90COMNTOOLS call :read_vsvars "%VS90COMNTOOLS%"
73 if defined VS80COMNTOOLS call :read_vsvars "%VS80COMNTOOLS%"
74 if defined VS71COMNTOOLS call :read_vsvars "%VS71COMNTOOLS%"
75
76:done
77set GET_VSVARS_BAT_CHECK_DIR=
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette