2 @REM Windows batch file to display the Windows environment
4 @REM This script will be used to show the current EDK II build environment.
5 @REM it may be called by the Edk2Setup.bat
(that will be renamed to edksetup.bat
) or
6 @REM
run as stand
-alone application.
8 @REM Copyright
(c
) 2014, Intel Corporation. All rights reserved.
<BR
>
9 @REM This program and the accompanying materials
10 @REM are licensed and made available under the terms and conditions of the BSD License
11 @REM which accompanies this distribution. The full text of the license may be found at
12 @REM http
://opensource.org
/licenses
/bsd
-license.php
14 @REM THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN
"AS IS" BASIS
,
15 @REM WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND
, EITHER EXPRESS OR IMPLIED.
18 @
set SE_SVN_REVISION
=$Revision
: 8 $
19 @
set SE_VERSION
=0.7.0.
20 @
if "%SCRIPT%"=="EDKSETUP_BAT" goto SkipCmdlineArgumentCheck
23 @
if /I
"%1"=="-h" @
goto Usage
24 @
if /I
"%1"=="--help" @
goto Usage
25 @
if /I
"%1"=="/?" @
goto Usage
26 @
if /I
"%1"=="-v" @
goto Version
27 @
if /I
"%1"=="--version" @
goto Version
30 @
echo Usage
: ShowEnvironment.bat
[Options
]
31 @
echo Copyright
(c
) 2014, Intel Corporation. All rights reserved.
34 @
echo --help
, -h
Print this help screen and
exit
35 @
echo --version
, -v
Print this tool
's version and exit
40 @echo ShowEnvironment.bat Version: %SE_VERSION%%SE_SVN_REVISION:~11,-1%
41 @echo Copyright(c) 2014, Intel Corporation. All rights reserved.
43 :SkipCmdlineArgumentCheck
44 if defined SRC_CONF @goto SetEnv
47 @echo #############################################################################
48 @if defined WORKSPACE @echo WORKSPACE = %WORKSPACE%
49 @if not defined WORKSPACE @echo WORKSPACE = Not Set
50 @if defined PACKAGES_PATH @echo PACKAGES_PATH = %PACKAGES_PATH%
51 @if defined EDK_TOOLS_PATH @echo EDK_TOOLS_PATH = %EDK_TOOLS_PATH%
52 @if not defined EDK_TOOLS_PATH @echo EDK_TOOLS_PATH = Not Set
53 @if defined BASE_TOOLS_PATH @echo BASE_TOOLS_PATH = %BASE_TOOLS_PATH%
54 @if defined EDK_TOOLS_BIN @echo EDK_TOOLS_BIN = %EDK_TOOLS_BIN%
55 @if "%NT32PKG%"=="TRUE" (
57 @echo NOTE: Please configure your build to use the following TOOL_CHAIN_TAG
58 @echo when building NT32Pkg/Nt32Pkg.dsc
59 @if defined VCINSTALLDIR @call :CheckVsVer
62 @if defined HIDE_PATH goto End
65 @echo ############################## PATH #########################################
66 @setlocal DisableDelayedExpansion
74 @set "var=%var:;=^;^;%"
76 @set "var=%var:"=""Q%"
77 @set "var=%var:;;="S"S%"
78 @set "var=%var:^;^;=;%"
80 @setlocal EnableDelayedExpansion
82 @for %%a in ("!var:"S"S=";"!") do (
84 @if %%a neq "" echo %%~a
89 @set "TEST_VS=C:\Program Files (x86)\Microsoft Visual Studio 9.0\"
90 @if "%VSINSTALLDIR%"=="%TEST_VS%" (
91 @echo TOOL_CHAIN_TAG = VS2008x86
94 @set "TEST_VS=C:\Program Files\Microsoft Visual Studio 9.0\"
95 @if "%VSINSTALLDIR%"=="%TEST_VS%" (
96 @echo TOOL_CHAIN_TAG = VS2008
100 @set "TEST_VS=C:\Program Files (x86)\Microsoft Visual Studio 10.0\"
101 @if "%VSINSTALLDIR%"=="%TEST_VS%" (
102 @echo TOOL_CHAIN_TAG = VS2010x86
105 @set "TEST_VS=C:\Program Files\Microsoft Visual Studio 10.0\"
106 @if "%VSINSTALLDIR%"=="%TEST_VS%" (
107 @echo TOOL_CHAIN_TAG = VS2010
111 @set "TEST_VS=C:\Program Files (x86)\Microsoft Visual Studio 11.0\"
112 @if "%VSINSTALLDIR%"=="%TEST_VS%" (
113 @echo TOOL_CHAIN_TAG = VS2012x86
116 @set "TEST_VS=C:\Program Files\Microsoft Visual Studio 11.0\"
117 @if "%VSINSTALLDIR%"=="%TEST_VS%" (
118 @echo TOOL_CHAIN_TAG = VS2012
122 @set "TEST_VS=C:\Program Files (x86)\Microsoft Visual Studio 12.0\"
123 @if "%VSINSTALLDIR%"=="%TEST_VS%" (
124 @echo TOOL_CHAIN_TAG = VS2013x86
127 @set "TEST_VS=C:\Program Files\Microsoft Visual Studio 12.0\"
128 @if "%VSINSTALLDIR%"=="%TEST_VS%" (
129 @echo TOOL_CHAIN_TAG = VS2013
133 @set "TEST_VS=C:\Program Files (x86)\Microsoft Visual Studio 14.0\"
134 @if "%VSINSTALLDIR%"=="%TEST_VS%" (
135 @echo TOOL_CHAIN_TAG = VS2015x86
138 @set "TEST_VS=C:\Program Files\Microsoft Visual Studio 14.0\"
139 @if "%VSINSTALLDIR%"=="%TEST_VS%" (
140 @echo TOOL_CHAIN_TAG = VS2015
146 @set FIRST_COPY=FALSE
147 @set MISSING_TARGET_TEMPLATE=FALSE
148 @set MISSING_TOOLS_DEF_TEMPLATE=FALSE
149 @set MISSING_BUILD_RULE_TEMPLATE=FALSE
150 @if not exist "%SRC_CONF%\target.template" @set MISSING_TARGET_TEMPLATE=TRUE
151 @if not exist "%SRC_CONF%\tools_def.template" @set MISSING_TOOLS_DEF_TEMPLATE=TRUE
152 @if not exist "%SRC_CONF%\build_rule.template" @set MISSING_BUILD_RULE_TEMPLATE=TRUE
154 @if not exist "%WORKSPACE%\Conf\target.txt" (
155 @if "%MISSING_TARGET_TEMPLATE%"=="TRUE" @goto MissingTemplates
156 @echo copying ... target.template to %WORKSPACE%\Conf\target.txt
157 @copy /Y "%SRC_CONF%\target.template" "%WORKSPACE%\Conf\target.txt" > nul
160 @if not exist "%WORKSPACE%\Conf\tools_def.txt" (
161 @if "%MISSING_TOOLS_DEF_TEMPLATE%"=="TRUE" @goto MissingTemplates
162 @echo copying ... tools_def.template to %WORKSPACE%\Conf\tools_def.txt
163 @copy /Y "%SRC_CONF%\tools_def.template" "%WORKSPACE%\Conf\tools_def.txt" > nul
166 @if not exist "%WORKSPACE%\Conf\build_rule.txt" (
167 @if "%MISSING_BUILD_RULE_TEMPLATE%"=="TRUE" @goto MissingTemplates
168 @echo copying ... build_rule.template to %WORKSPACE%\Conf\build_rule.txt
169 @copy /Y "%SRC_CONF%\build_rule.template" "%WORKSPACE%\Conf\build_rule.txt" > nul
173 @if "%FIRST_COPY%"=="TRUE" @goto End
174 @if not "%RECONFIG%"=="TRUE" @goto End
176 @if "%RECONFIG%"=="TRUE" (
178 @echo Over-writing the files in the WORKSPACE\Conf directory
179 @echo using the default template files
181 @if "%MISSING_TARGET_TEMPLATE%"=="TRUE" @goto MissingTemplates
182 @echo over-write ... target.template to %WORKSPACE%\Conf\target.txt
183 @copy /Y "%SRC_CONF%\target.template" "%WORKSPACE%\Conf\target.txt" > nul
185 @if "%MISSING_TOOLS_DEF_TEMPLATE%"=="TRUE" @goto MissingTemplates
186 @echo over-write ... tools_def.template to %WORKSPACE%\Conf\tools_def.txt
187 @copy /Y "%SRC_CONF%\tools_def.template" "%WORKSPACE%\Conf\tools_def.txt" > nul
189 @if "%MISSING_BUILD_RULE_TEMPLATE%"=="TRUE" @goto MissingTemplates
190 @echo over-write ... build_rule.template to %WORKSPACE%\Conf\build_rule.txt
191 @copy /Y "%SRC_CONF%\build_rule.template" "%WORKSPACE%\Conf\build_rule.txt" > nul
197 @if "%RECONFIG%"=="TRUE" @echo ERROR : Reconfig failed
198 @if "%MISSING_TARGET_TEMPLATE%"=="TRUE" @echo ERROR : Unable to locate: "%SRC_CONF%\target.template"
199 @if "%MISSING_TOOLS_DEF_TEMPLATE%"=="TRUE" @echo ERROR : Unable to locate: "%SRC_CONF%\tools_def.template"
200 @if "%MISSING_BUILD_RULE_TEMPLATE%"=="TRUE" @echo ERROR : Unable to locate: "%SRC_CONF%\build_rule.template"
202 @set MISSING_TARGET_TEMPLATE=
203 @set MISSING_TOOLS_DEF_TEMPLATE=
204 @set MISSING_BUILD_RULE_TEMPLATE=
207 @set SE_SVN_REVISION=
208 @if not "%SCRIPT%"=="EDKSETUP_BAT" @echo on
212 @set MISSING_TARGET_TEMPLATE=
213 @set MISSING_TOOLS_DEF_TEMPLATE=
214 @set MISSING_BUILD_RULE_TEMPLATE=
217 @set SE_SVN_REVISION=
218 @if not "%SCRIPT%"=="EDKSETUP_BAT" @echo on