VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/BaseTools/Scripts/ShowEnvironment.bat@ 105681

最後變更 在這個檔案從105681是 101291,由 vboxsync 提交於 14 月 前

EFI/FirmwareNew: Make edk2-stable202308 build on all supported platforms (using gcc at least, msvc not tested yet), bugref:4643

  • 屬性 svn:eol-style 設為 CRLF
  • 屬性 svn:executable 設為 *
檔案大小: 6.1 KB
 
1@REM @file
2@REM Windows batch file to display the Windows environment
3@REM
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.
7@REM
8@REM Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>
9@REM SPDX-License-Identifier: BSD-2-Clause-Patent
10@REM
11@echo off
12@set SE_SVN_REVISION=$Revision: 8 $
13@set SE_VERSION=0.7.0.
14@if "%SCRIPT%"=="EDKSETUP_BAT" goto SkipCmdlineArgumentCheck
15
16:parse_cmd_line
17@if /I "%1"=="-h" @goto Usage
18@if /I "%1"=="--help" @goto Usage
19@if /I "%1"=="/?" @goto Usage
20@if /I "%1"=="-v" @goto Version
21@if /I "%1"=="--version" @goto Version
22
23:Usage
24@echo Usage: ShowEnvironment.bat [Options]
25@echo Copyright(c) 2014, Intel Corporation. All rights reserved.
26@echo.
27@echo Options:
28@echo --help, -h Print this help screen and exit
29@echo --version, -v Print this tool's version and exit
30@echo.
31@goto End
32
33:Version
34@echo ShowEnvironment.bat Version: %SE_VERSION%%SE_SVN_REVISION:~11,-1%
35@echo Copyright(c) 2014, Intel Corporation. All rights reserved.
36
37:SkipCmdlineArgumentCheck
38if defined SRC_CONF @goto SetEnv
39
40@echo.
41@echo #############################################################################
42@if defined WORKSPACE @echo WORKSPACE = %WORKSPACE%
43@if not defined WORKSPACE @echo WORKSPACE = Not Set
44@if defined PACKAGES_PATH @echo PACKAGES_PATH = %PACKAGES_PATH%
45@if defined EDK_TOOLS_PATH @echo EDK_TOOLS_PATH = %EDK_TOOLS_PATH%
46@if not defined EDK_TOOLS_PATH @echo EDK_TOOLS_PATH = Not Set
47@if defined BASE_TOOLS_PATH @echo BASE_TOOLS_PATH = %BASE_TOOLS_PATH%
48@if defined EDK_TOOLS_BIN @echo EDK_TOOLS_BIN = %EDK_TOOLS_BIN%
49@if "%NT32PKG%"=="TRUE" (
50 @echo.
51 @echo NOTE: Please configure your build to use the following TOOL_CHAIN_TAG
52 @echo when building NT32Pkg/Nt32Pkg.dsc
53 @if defined VCINSTALLDIR @call :CheckVsVer
54 @set TEST_VS=
55)
56@if defined HIDE_PATH goto End
57
58
59@echo ############################## PATH #########################################
60@setlocal DisableDelayedExpansion
61@set "var=%PATH%"
62@set "var=%var:"=""%"
63@set "var=%var:^=^^%"
64@set "var=%var:&=^&%"
65@set "var=%var:|=^|%"
66@set "var=%var:<=^<%"
67@set "var=%var:>=^>%"
68@set "var=%var:;=^;^;%"
69@set var=%var:""="%
70@set "var=%var:"=""Q%"
71@set "var=%var:;;="S"S%"
72@set "var=%var:^;^;=;%"
73@set "var=%var:""="%"
74@setlocal EnableDelayedExpansion
75@set "var=!var:"Q=!"
76@for %%a in ("!var:"S"S=";"!") do (
77 @if "!!"=="" endlocal
78 @if %%a neq "" echo %%~a
79)
80@goto End
81
82:CheckVsVer
83@set "TEST_VS=C:\Program Files (x86)\Microsoft Visual Studio 14.0\"
84@if "%VSINSTALLDIR%"=="%TEST_VS%" (
85 @echo TOOL_CHAIN_TAG = VS2015x86
86 @goto :EOF
87)
88@set "TEST_VS=C:\Program Files\Microsoft Visual Studio 14.0\"
89@if "%VSINSTALLDIR%"=="%TEST_VS%" (
90 @echo TOOL_CHAIN_TAG = VS2015
91 @goto :EOF
92)
93@goto :EOF
94
95:SetEnv
96@set FIRST_COPY=FALSE
97@set MISSING_TARGET_TEMPLATE=FALSE
98@set MISSING_TOOLS_DEF_TEMPLATE=FALSE
99@set MISSING_BUILD_RULE_TEMPLATE=FALSE
100@if not exist "%SRC_CONF%\target.template" @set MISSING_TARGET_TEMPLATE=TRUE
101@if not exist "%SRC_CONF%\tools_def.template" @set MISSING_TOOLS_DEF_TEMPLATE=TRUE
102@if not exist "%SRC_CONF%\build_rule.template" @set MISSING_BUILD_RULE_TEMPLATE=TRUE
103
104@if not exist "%WORKSPACE%\Conf\target.txt" (
105 @if "%MISSING_TARGET_TEMPLATE%"=="TRUE" @goto MissingTemplates
106 @echo copying ... target.template to %WORKSPACE%\Conf\target.txt
107 @copy /Y "%SRC_CONF%\target.template" "%WORKSPACE%\Conf\target.txt" > nul
108 @set FIRST_COPY=TRUE
109)
110@if not exist "%WORKSPACE%\Conf\tools_def.txt" (
111 @if "%MISSING_TOOLS_DEF_TEMPLATE%"=="TRUE" @goto MissingTemplates
112 @echo copying ... tools_def.template to %WORKSPACE%\Conf\tools_def.txt
113 @copy /Y "%SRC_CONF%\tools_def.template" "%WORKSPACE%\Conf\tools_def.txt" > nul
114 @set FIRST_COPY=TRUE
115)
116@if not exist "%WORKSPACE%\Conf\build_rule.txt" (
117 @if "%MISSING_BUILD_RULE_TEMPLATE%"=="TRUE" @goto MissingTemplates
118 @echo copying ... build_rule.template to %WORKSPACE%\Conf\build_rule.txt
119 @copy /Y "%SRC_CONF%\build_rule.template" "%WORKSPACE%\Conf\build_rule.txt" > nul
120 @set FIRST_COPY=TRUE
121)
122
123@if "%FIRST_COPY%"=="TRUE" @goto End
124@if not "%RECONFIG%"=="TRUE" @goto End
125
126@if "%RECONFIG%"=="TRUE" (
127 @echo.
128 @echo Over-writing the files in the WORKSPACE\Conf directory
129 @echo using the default template files
130 @echo.
131 @if "%MISSING_TARGET_TEMPLATE%"=="TRUE" @goto MissingTemplates
132 @echo over-write ... target.template to %WORKSPACE%\Conf\target.txt
133 @copy /Y "%SRC_CONF%\target.template" "%WORKSPACE%\Conf\target.txt" > nul
134
135 @if "%MISSING_TOOLS_DEF_TEMPLATE%"=="TRUE" @goto MissingTemplates
136 @echo over-write ... tools_def.template to %WORKSPACE%\Conf\tools_def.txt
137 @copy /Y "%SRC_CONF%\tools_def.template" "%WORKSPACE%\Conf\tools_def.txt" > nul
138
139 @if "%MISSING_BUILD_RULE_TEMPLATE%"=="TRUE" @goto MissingTemplates
140 @echo over-write ... build_rule.template to %WORKSPACE%\Conf\build_rule.txt
141 @copy /Y "%SRC_CONF%\build_rule.template" "%WORKSPACE%\Conf\build_rule.txt" > nul
142 @goto End
143)
144
145:MissingTemplates
146@echo.
147@if "%RECONFIG%"=="TRUE" @echo ERROR : Reconfig failed
148@if "%MISSING_TARGET_TEMPLATE%"=="TRUE" @echo ERROR : Unable to locate: "%SRC_CONF%\target.template"
149@if "%MISSING_TOOLS_DEF_TEMPLATE%"=="TRUE" @echo ERROR : Unable to locate: "%SRC_CONF%\tools_def.template"
150@if "%MISSING_BUILD_RULE_TEMPLATE%"=="TRUE" @echo ERROR : Unable to locate: "%SRC_CONF%\build_rule.template"
151@echo.
152@set MISSING_TARGET_TEMPLATE=
153@set MISSING_TOOLS_DEF_TEMPLATE=
154@set MISSING_BUILD_RULE_TEMPLATE=
155@set FIRST_COPY=
156@set SE_VERSION=
157@set SE_SVN_REVISION=
158@if not "%SCRIPT%"=="EDKSETUP_BAT" @echo on
159exit /B 1
160
161:End
162@set MISSING_TARGET_TEMPLATE=
163@set MISSING_TOOLS_DEF_TEMPLATE=
164@set MISSING_BUILD_RULE_TEMPLATE=
165@set FIRST_COPY=
166@set SE_VERSION=
167@set SE_SVN_REVISION=
168@if not "%SCRIPT%"=="EDKSETUP_BAT" @echo on
169exit /B 0
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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