]> git.proxmox.com Git - mirror_edk2.git/blob - BaseTools/set_vsprefix_envs.bat
BaseTools/VfrCompile: Remove framework VFR support
[mirror_edk2.git] / BaseTools / set_vsprefix_envs.bat
1 @REM @file
2 @REM This stand-alone program is typically called by the toolsetup.bat file,
3 @REM however it may be executed directly from the BaseTools project folder
4 @REM if the file is not executed within a WORKSPACE\BaseTools folder.
5 @REM
6 @REM Copyright (c) 2016-2017, Intel Corporation. All rights reserved.<BR>
7 @REM
8 @REM SPDX-License-Identifier: BSD-2-Clause-Patent
9 @REM
10
11 @echo off
12 pushd .
13
14 if defined VS71COMNTOOLS (
15 if not defined VS2003_PREFIX (
16 set "VS2003_PREFIX=%VS71COMNTOOLS:~0,-14%"
17 )
18 )
19
20 if defined VS80COMNTOOLS (
21 if not defined VS2005_PREFIX (
22 set "VS2005_PREFIX=%VS80COMNTOOLS:~0,-14%"
23 )
24 )
25
26 if defined VS90COMNTOOLS (
27 if not defined VS2008_PREFIX (
28 set "VS2008_PREFIX=%VS90COMNTOOLS:~0,-14%"
29 )
30 if not defined WINSDK_PREFIX (
31 set "WINSDK_PREFIX=c:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\"
32 )
33 if not defined WINSDKx86_PREFIX (
34 set "WINSDKx86_PREFIX=c:\Program Files (x86)\Microsoft SDKs\Windows\v6.0A\bin\"
35 )
36 )
37
38 if defined VS100COMNTOOLS (
39 if not defined VS2010_PREFIX (
40 set "VS2010_PREFIX=%VS100COMNTOOLS:~0,-14%"
41 )
42 if not defined WINSDK7_PREFIX (
43 set "WINSDK7_PREFIX=c:\Program Files\Microsoft SDKs\Windows\v7.0A\Bin\"
44 )
45 if not defined WINSDK7x86_PREFIX (
46 set "WINSDK7x86_PREFIX=c:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\"
47 )
48 )
49
50 if defined VS110COMNTOOLS (
51 if not defined VS2012_PREFIX (
52 set "VS2012_PREFIX=%VS110COMNTOOLS:~0,-14%"
53 )
54 if not defined WINSDK71_PREFIX (
55 set "WINSDK71_PREFIX=c:\Program Files\Microsoft SDKs\Windows\v7.1A\Bin\"
56 )
57 if not defined WINSDK71x86_PREFIX (
58 set "WINSDK71x86_PREFIX=c:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin\"
59 )
60 )
61
62 if defined VS120COMNTOOLS (
63 if not defined VS2013_PREFIX (
64 set "VS2013_PREFIX=%VS120COMNTOOLS:~0,-14%"
65 )
66 if not defined WINSDK8_PREFIX (
67 set "WINSDK8_PREFIX=c:\Program Files\Windows Kits\8.0\bin\"
68 )
69 if not defined WINSDK8x86_PREFIX (
70 set "WINSDK8x86_PREFIX=c:\Program Files (x86)\Windows Kits\8.0\bin\"
71 )
72 )
73
74 if defined VS140COMNTOOLS (
75 if not defined VS2015_PREFIX (
76 set "VS2015_PREFIX=%VS140COMNTOOLS:~0,-14%"
77 )
78 if not defined WINSDK81_PREFIX (
79 set "WINSDK81_PREFIX=c:\Program Files\Windows Kits\8.1\bin\"
80 )
81 if not defined WINSDK81x86_PREFIX (
82 set "WINSDK81x86_PREFIX=c:\Program Files (x86)\Windows Kits\8.1\bin\"
83 )
84 )
85
86 @REM set VS2017
87 if not defined VS150COMNTOOLS (
88 if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" (
89 for /f "usebackq tokens=1* delims=: " %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"`) do (
90 if /i "%%i"=="installationPath" call "%%j\VC\Auxiliary\Build\vcvars32.bat"
91 )
92 ) else if exist "%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe" (
93 for /f "usebackq tokens=1* delims=: " %%i in (`"%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe"`) do (
94 if /i "%%i"=="installationPath" call "%%j\VC\Auxiliary\Build\vcvars32.bat"
95 )
96 ) else (
97 goto SetWinDDK
98 )
99 )
100
101 if defined VCToolsInstallDir (
102 if not defined VS2017_PREFIX (
103 set "VS2017_PREFIX=%VCToolsInstallDir%"
104 )
105 )
106 if not defined WINSDK10_PREFIX (
107 if defined WindowsSdkVerBinPath (
108 set "WINSDK10_PREFIX=%WindowsSdkVerBinPath%"
109 ) else if exist "%ProgramFiles(x86)%\Windows Kits\10\bin" (
110 set "WINSDK10_PREFIX=%ProgramFiles(x86)%\Windows Kits\10\bin\"
111 ) else if exist "%ProgramFiles%\Windows Kits\10\bin" (
112 set "WINSDK10_PREFIX=%ProgramFiles%\Windows Kits\10\bin\"
113 )
114 )
115
116 :SetWinDDK
117 if not defined WINDDK3790_PREFIX (
118 set WINDDK3790_PREFIX=C:\WINDDK\3790.1830\bin\
119 )
120
121 if not defined IASL_PREFIX (
122 set IASL_PREFIX=C:\ASL\
123 )
124
125 popd