@REM however it may be executed directly from the BaseTools project folder\r
@REM if the file is not executed within a WORKSPACE\BaseTools folder.\r
@REM\r
-@REM Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+@REM Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
@REM\r
@REM This program and the accompanying materials are licensed and made available\r
-@REM under the terms and conditions of the BSD Licensewhich accompanies this \r
+@REM under the terms and conditions of the BSD License which accompanies this \r
@REM distribution. The full text of the license may be found at:\r
@REM http://opensource.org/licenses/bsd-license.php\r
@REM\r
@REM # You should not have to modify anything below this line\r
@REM #\r
\r
-@if /I "%1"=="-h" goto Usage\r
-@if /I "%1"=="-help" goto Usage\r
-@if /I "%1"=="--help" goto Usage\r
-@if /I "%1"=="/h" goto Usage\r
-@if /I "%1"=="/help" goto Usage\r
-@if /I "%1"=="/?" goto Usage\r
+if /I "%1"=="-h" goto Usage\r
+if /I "%1"=="-help" goto Usage\r
+if /I "%1"=="--help" goto Usage\r
+if /I "%1"=="/h" goto Usage\r
+if /I "%1"=="/help" goto Usage\r
+if /I "%1"=="/?" goto Usage\r
\r
\r
:loop\r
- @if "%1"=="" goto setup_workspace\r
- @if /I "%1"=="--nt32" (\r
+ if "%1"=="" goto setup_workspace\r
+ if /I "%1"=="--nt32" (\r
@REM Ignore --nt32 flag\r
shift\r
goto loop\r
)\r
- @if /I "%1"=="Reconfig" (\r
+ if /I "%1"=="Reconfig" (\r
shift\r
set RECONFIG=TRUE\r
goto loop\r
)\r
- @if /I "%1"=="Rebuild" (\r
+ if /I "%1"=="Rebuild" (\r
shift\r
set REBUILD=TRUE\r
goto loop\r
)\r
- @if /I "%1"=="ForceRebuild" (\r
+ if /I "%1"=="ForceRebuild" (\r
shift\r
set FORCE_REBUILD=TRUE\r
goto loop\r
)\r
set PATH=%BASE_TOOLS_PATH%\Bin\Win32;%PATH%\r
\r
- set PYTHONPATH=%BASE_TOOLS_PATH%\Source\Python\r
+ set BASETOOLS_PYTHON_SOURCE=%BASE_TOOLS_PATH%\Source\Python\r
+ set PYTHONPATH=%BASETOOLS_PYTHON_SOURCE%;%PYTHONPATH%\r
\r
if not defined PYTHON_HOME (\r
if defined PYTHONHOME (\r
echo !!! WARNING !!! Will not be able to compile Python programs to .exe\r
echo Will setup environment to run Python scripts directly.\r
echo.\r
- set PYTHONPATH=%BASE_TOOLS_PATH%\Source\Python\r
- set PATH=%PYTHONPATH%\build;%PYTHONPATH%\GenFds;%PYTHONPATH%\Trim;%PATH%\r
+ set PATH=%BASETOOLS_PYTHON_SOURCE%\Trim;%PATH%\r
+ set PATH=%BASETOOLS_PYTHON_SOURCE%\GenFds;%PATH%\r
+ set PATH=%BASETOOLS_PYTHON_SOURCE%\build;%PATH%\r
set PATHEXT=%PATHEXT%;.py\r
)\r
)\r
echo PYTHON_FREEZER_PATH = %PYTHON_FREEZER_PATH%\r
echo.\r
\r
- if defined VCINSTALLDIR goto VisualStudioAvailable\r
- if defined VS100COMNTOOLS (\r
- call "%VS100COMNTOOLS%\vsvars32.bat"\r
- ) else (\r
- if defined VS90COMNTOOLS (\r
- call "%VS90COMNTOOLS%\vsvars32.bat"\r
- ) else (\r
- if defined VS80COMNTOOLS (\r
- call "%VS80COMNTOOLS%\vsvars32.bat"\r
- ) else (\r
- if defined VS71COMNTOOLS (\r
- call "%VS71COMNTOOLS%\vsvars32.bat"\r
- ) else (\r
- echo.\r
- echo !!! ERROR !!!! Cannot find Visual Studio, required to build C tools !!!\r
- echo.\r
- goto end\r
- )\r
- )\r
- )\r
+ call "%EDK_TOOLS_PATH%\get_vsvars.bat"\r
+ if not defined VCINSTALLDIR (\r
+ @echo.\r
+ @echo !!! ERROR !!!! Cannot find Visual Studio, required to build C tools !!!\r
+ @echo.\r
+ goto end\r
)\r
\r
:VisualStudioAvailable\r
- if defined FORCE_REBUILD goto CleanAndBuild\r
- goto IncrementalBuild\r
+ if not defined FORCE_REBUILD goto IncrementalBuild\r
\r
:CleanAndBuild\r
pushd .\r
goto end\r
\r
:Usage\r
- echo.\r
+ @echo.\r
echo Usage: "%0 [-h | -help | --help | /h | /help | /?] [ Rebuild | ForceRebuild ] [Reconfig] [base_tools_path [edk_tools_path]]"\r
- echo.\r
- echo base_tools_path BaseTools project path, BASE_TOOLS_PATH will be set to this path. \r
- echo edk_tools_path EDK_TOOLS_PATH will be set to this path.\r
- echo Rebuild If sources are available perform an Incremental build, only \r
- echo build those updated tools.\r
- echo ForceRebuild If sources are available, rebuild all tools regardless of \r
- echo whether they have been updated or not.\r
- echo Reconfig Reinstall target.txt, tools_def.txt and build_rule.txt.\r
-echo.\r
+ @echo.\r
+ @echo base_tools_path BaseTools project path, BASE_TOOLS_PATH will be set to this path. \r
+ @echo edk_tools_path EDK_TOOLS_PATH will be set to this path.\r
+ @echo Rebuild If sources are available perform an Incremental build, only \r
+ @echo build those updated tools.\r
+ @echo ForceRebuild If sources are available, rebuild all tools regardless of \r
+ @echo whether they have been updated or not.\r
+ @echo Reconfig Reinstall target.txt, tools_def.txt and build_rule.txt.\r
+ @echo.\r
\r
:end\r
set REBUILD=\r
set RECONFIG=\r
popd\r
\r
-@echo on\r
-\r