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 defined PYTHON_FREEZER_PATH @echo PYTHON_FREEZER_PATH = %PYTHON_FREEZER_PATH%
56 @if "%NT32PKG%"=="TRUE" (
58 @echo NOTE: Please configure your build to use the following TOOL_CHAIN_TAG
59 @echo when building NT32Pkg/Nt32Pkg.dsc
60 @if defined VCINSTALLDIR @call :CheckVsVer
63 @if defined HIDE_PATH goto End
66 @echo ############################## PATH #########################################
67 @setlocal DisableDelayedExpansion
75 @set "var=%var:;=^;^;%"
77 @set "var=%var:"=""Q%"
78 @set "var=%var:;;="S"S%"
79 @set "var=%var:^;^;=;%"
81 @setlocal EnableDelayedExpansion
83 @for %%a in ("!var:"S"S=";"!") do (
85 @if %%a neq "" echo %%~a
90 @set "TEST_VS=C:\Program Files (x86)\Microsoft Visual Studio 9.0\"
91 @if "%VSINSTALLDIR%"=="%TEST_VS%" (
92 @echo TOOL_CHAIN_TAG = VS2008x86
95 @set "TEST_VS=C:\Program Files\Microsoft Visual Studio 9.0\"
96 @if "%VSINSTALLDIR%"=="%TEST_VS%" (
97 @echo TOOL_CHAIN_TAG = VS2008
101 @set "TEST_VS=C:\Program Files (x86)\Microsoft Visual Studio 10.0\"
102 @if "%VSINSTALLDIR%"=="%TEST_VS%" (
103 @echo TOOL_CHAIN_TAG = VS2010x86
106 @set "TEST_VS=C:\Program Files\Microsoft Visual Studio 10.0\"
107 @if "%VSINSTALLDIR%"=="%TEST_VS%" (
108 @echo TOOL_CHAIN_TAG = VS2010
112 @set "TEST_VS=C:\Program Files (x86)\Microsoft Visual Studio 11.0\"
113 @if "%VSINSTALLDIR%"=="%TEST_VS%" (
114 @echo TOOL_CHAIN_TAG = VS2012x86
117 @set "TEST_VS=C:\Program Files\Microsoft Visual Studio 11.0\"
118 @if "%VSINSTALLDIR%"=="%TEST_VS%" (
119 @echo TOOL_CHAIN_TAG = VS2012
123 @set "TEST_VS=C:\Program Files (x86)\Microsoft Visual Studio 12.0\"
124 @if "%VSINSTALLDIR%"=="%TEST_VS%" (
125 @echo TOOL_CHAIN_TAG = VS2013x86
128 @set "TEST_VS=C:\Program Files\Microsoft Visual Studio 12.0\"
129 @if "%VSINSTALLDIR%"=="%TEST_VS%" (
130 @echo TOOL_CHAIN_TAG = VS2013
134 @set "TEST_VS=C:\Program Files (x86)\Microsoft Visual Studio 14.0\"
135 @if "%VSINSTALLDIR%"=="%TEST_VS%" (
136 @echo TOOL_CHAIN_TAG = VS2015x86
139 @set "TEST_VS=C:\Program Files\Microsoft Visual Studio 14.0\"
140 @if "%VSINSTALLDIR%"=="%TEST_VS%" (
141 @echo TOOL_CHAIN_TAG = VS2015
147 @set FIRST_COPY=FALSE
148 @set MISSING_TARGET_TEMPLATE=FALSE
149 @set MISSING_TOOLS_DEF_TEMPLATE=FALSE
150 @set MISSING_BUILD_RULE_TEMPLATE=FALSE
151 @if not exist "%SRC_CONF%\target.template" @set MISSING_TARGET_TEMPLATE=TRUE
152 @if not exist "%SRC_CONF%\tools_def.template" @set MISSING_TOOLS_DEF_TEMPLATE=TRUE
153 @if not exist "%SRC_CONF%\build_rule.template" @set MISSING_BUILD_RULE_TEMPLATE=TRUE
155 @if not exist "%WORKSPACE%\Conf\target.txt" (
156 @if "%MISSING_TARGET_TEMPLATE%"=="TRUE" @goto MissingTemplates
157 @echo copying ... target.template to %WORKSPACE%\Conf\target.txt
158 @copy /Y "%SRC_CONF%\target.template" "%WORKSPACE%\Conf\target.txt" > nul
161 @if not exist "%WORKSPACE%\Conf\tools_def.txt" (
162 @if "%MISSING_TOOLS_DEF_TEMPLATE%"=="TRUE" @goto MissingTemplates
163 @echo copying ... tools_def.template to %WORKSPACE%\Conf\tools_def.txt
164 @copy /Y "%SRC_CONF%\tools_def.template" "%WORKSPACE%\Conf\tools_def.txt" > nul
167 @if not exist "%WORKSPACE%\Conf\build_rule.txt" (
168 @if "%MISSING_BUILD_RULE_TEMPLATE%"=="TRUE" @goto MissingTemplates
169 @echo copying ... build_rule.template to %WORKSPACE%\Conf\build_rule.txt
170 @copy /Y "%SRC_CONF%\build_rule.template" "%WORKSPACE%\Conf\build_rule.txt" > nul
174 @if "%FIRST_COPY%"=="TRUE" @goto End
175 @if not "%RECONFIG%"=="TRUE" @goto End
177 @if "%RECONFIG%"=="TRUE" (
179 @echo Over-writing the files in the WORKSPACE\Conf directory
180 @echo using the default template files
182 @if "%MISSING_TARGET_TEMPLATE%"=="TRUE" @goto MissingTemplates
183 @echo over-write ... target.template to %WORKSPACE%\Conf\target.txt
184 @copy /Y "%SRC_CONF%\target.template" "%WORKSPACE%\Conf\target.txt" > nul
186 @if "%MISSING_TOOLS_DEF_TEMPLATE%"=="TRUE" @goto MissingTemplates
187 @echo over-write ... tools_def.template to %WORKSPACE%\Conf\tools_def.txt
188 @copy /Y "%SRC_CONF%\tools_def.template" "%WORKSPACE%\Conf\tools_def.txt" > nul
190 @if "%MISSING_BUILD_RULE_TEMPLATE%"=="TRUE" @goto MissingTemplates
191 @echo over-write ... build_rule.template to %WORKSPACE%\Conf\build_rule.txt
192 @copy /Y "%SRC_CONF%\build_rule.template" "%WORKSPACE%\Conf\build_rule.txt" > nul
198 @if "%RECONFIG%"=="TRUE" @echo ERROR : Reconfig failed
199 @if "%MISSING_TARGET_TEMPLATE%"=="TRUE" @echo ERROR : Unable to locate: "%SRC_CONF%\target.template"
200 @if "%MISSING_TOOLS_DEF_TEMPLATE%"=="TRUE" @echo ERROR : Unable to locate: "%SRC_CONF%\tools_def.template"
201 @if "%MISSING_BUILD_RULE_TEMPLATE%"=="TRUE" @echo ERROR : Unable to locate: "%SRC_CONF%\build_rule.template"
203 @set MISSING_TARGET_TEMPLATE=
204 @set MISSING_TOOLS_DEF_TEMPLATE=
205 @set MISSING_BUILD_RULE_TEMPLATE=
208 @set SE_SVN_REVISION=
209 @if not "%SCRIPT%"=="EDKSETUP_BAT" @echo on
213 @set MISSING_TARGET_TEMPLATE=
214 @set MISSING_TOOLS_DEF_TEMPLATE=
215 @set MISSING_BUILD_RULE_TEMPLATE=
218 @set SE_SVN_REVISION=
219 @if not "%SCRIPT%"=="EDKSETUP_BAT" @echo on