2 @REM Windows batch file to setup a WORKSPACE environment
4 @REM Copyright
(c
) 2006 - 2010, Intel Corporation. All rights reserved.
<BR
>
5 @REM This program and the accompanying materials
6 @REM are licensed and made available under the terms and conditions of the BSD License
7 @REM which accompanies this distribution. The full text of the license may be found at
8 @REM http
://opensource.org
/licenses
/bsd
-license.php
10 @REM THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN
"AS IS" BASIS
,
11 @REM WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND
, EITHER EXPRESS OR IMPLIED.
14 @REM
set CYGWIN_HOME
=C
:\cygwin
17 @REM edksetup.bat
[--nt32
] [AntBuild
] [Rebuild
] [ForceRebuild
] [Reconfig
]
18 @REM
if the argument
, skip is present
, only the paths and the
19 @REM test and
set of environment settings are performed.
21 @REM ##############################################################
22 @REM # You should
not have to modify anything below this line
28 @REM
Set the WORKSPACE to the current working directory
33 if not defined WORKSPACE
(
37 if %WORKSPACE% == %CD% (
38 @REM Workspace is
not changed.
43 @REM
set new workspace
44 @REM clear EFI_SOURCE and EDK_SOURCE
for the new workspace
50 @
if /I
"%1"=="-h" goto Usage
51 @
if /I
"%1"=="-help" goto Usage
52 @
if /I
"%1"=="--help" goto Usage
53 @
if /I
"%1"=="/h" goto Usage
54 @
if /I
"%1"=="/?" goto Usage
55 @
if /I
"%1"=="/help" goto Usage
57 @
if /I
not "%1"=="--nt32" goto no_nt32
59 @REM Flag
, --nt32 is
set
60 @REM The Nt32 Emluation Platform requires Microsoft Libraries
61 @REM and headers to interface with Windows.
63 if not defined VCINSTALLDIR
(
64 if defined VS71COMNTOOLS
(
65 call "%VS71COMNTOOLS%\vsvars32.bat"
67 if defined VS80COMNTOOLS
(
68 call "%VS80COMNTOOLS%\vsvars32.bat"
70 if defined VS90COMNTOOLS
(
71 call "%VS90COMNTOOLS%\vsvars32.bat"
74 echo !!! WARNING
!!! Cannot
find Visual Studio
!!!
83 @
if /I
"%1"=="NewBuild" shift
84 @
if not defined EDK_TOOLS_PATH
set EDK_TOOLS_PATH
=%WORKSPACE%\BaseTools
85 @
IF NOT EXIST "%EDK_TOOLS_PATH%\toolsetup.bat" goto BadBaseTools
86 @
call %EDK_TOOLS_PATH%\toolsetup.bat
%*
87 @
if /I
"%1"=="Reconfig" shift
92 @REM Need the BaseTools Package in order to build
95 echo !!! ERROR
!!! The BaseTools Package was
not found
!!!
97 echo Set the system environment variable
, EDK_TOOLS_PATH to the BaseTools
,
99 echo set EDK_TOOLS_PATH
=C
:\MyTools\BaseTools
100 echo The setup script
, toolsetup.bat must reside in this folder.
105 @
if exist c
:\cygwin
(
106 @
set CYGWIN_HOME
=c
:\cygwin
109 @
echo !!! WARNING
!!! No CYGWIN_HOME
set, gcc build may
not be used
!!!
113 @
if NOT "%1"=="" goto Usage
118 @
echo Usage
: "%0 [-h | -help | --help | /h | /help | /?] [--nt32] [Reconfig]"
119 @
echo --nt32
Call vsvars32.bat
for NT32 platform build.
121 @
echo Reconfig Reinstall target.txt
, tools_def.txt and build_rule.txt.
123 @
echo Note that target.template
, tools_def.template and build_rules.template
124 @
echo will be only copied to target.txt
, tools_def.txt and build_rule.txt
125 @
echo respectively
if they
do not exist. Using option
[Reconfig
] to force the
copy.