2 @REM Copyright (c) 2006, Intel Corporation
\r
3 @REM All rights reserved. This program and the accompanying materials
\r
4 @REM are licensed and made available under the terms and conditions of the BSD License
\r
5 @REM which accompanies this distribution. The full text of the license may be found at
\r
6 @REM http://opensource.org/licenses/bsd-license.php
\r
8 @REM THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
\r
9 @REM WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
\r
14 REM ##############################################################
\r
15 REM # You should not have to modify anything below this line
\r
18 if /I "%1"=="-h" goto usage
\r
19 if /I "%1"=="-help" goto usage
\r
20 if /I "%1"=="--help" goto usage
\r
21 if /I "%1"=="/h" goto usage
\r
22 if /I "%1"=="/?" goto usage
\r
23 if /I "%1"=="/help" goto usage
\r
25 if /I "%1"=="Reconfig" (
\r
26 if NOT "%2"=="" set EDK_TOOLS_PATH=%2
\r
28 if NOT "%1"=="" set EDK_TOOLS_PATH=%1
\r
32 REM Check the required system environment variables
\r
36 if defined VCINSTALLDIR goto setup_workspace
\r
37 if defined VS71COMNTOOLS (
\r
38 call "%VS71COMNTOOLS%\vsvars32.bat"
\r
41 echo !!!WARNING!!! Cannot find Visual Studio !!!
\r
47 REM check the EDK_TOOLS_PATH
\r
49 if not defined EDK_TOOLS_PATH goto no_tools_path
\r
50 if exist %EDK_TOOLS_PATH% goto set_path
\r
52 echo !!!WARNING!!! %EDK_TOOLS_PATH% doesn't exist. %WORKSPACE%\BaseTools will be used !!!
\r
56 if exist %WORKSPACE%\BaseTools (
\r
57 set EDK_TOOLS_PATH=%WORKSPACE%\BaseTools
\r
60 echo !!!WARNING!!! No tools path found. Please set EDK_TOOLS_PATH !!!
\r
66 if defined WORKSPACE_TOOLS_PATH goto check_path
\r
67 set PATH=%EDK_TOOLS_PATH%\Bin;%EDK_TOOLS_PATH%\Bin\Win32;%PATH%
\r
68 set WORKSPACE_TOOLS_PATH=%EDK_TOOLS_PATH%
\r
72 if "%EDK_TOOLS_PATH%"=="%WORKSPACE_TOOLS_PATH%" goto path_ok
\r
73 set PATH=%EDK_TOOLS_PATH%\Bin;%EDK_TOOLS_PATH%\Bin\Win32;%PATH%
\r
74 set WORKSPACE_TOOLS_PATH=%EDK_TOOLS_PATH%
\r
75 echo Resetting the PATH variable to include the EDK_TOOLS_PATH for this WORKSPACE
\r
80 echo WORKSPACE = %WORKSPACE%
\r
81 echo EDK_TOOLS_PATH = %EDK_TOOLS_PATH%
\r
85 REM copy *.template to %WORKSPACE%\Conf
\r
87 if NOT exist %WORKSPACE%\Conf (
\r
88 mkdir %WORKSPACE%\Conf
\r
90 if /I "%1"=="Reconfig" (
\r
92 echo Over-writing the files in the WORKSPACE\Conf directory
\r
93 echo using the default template files
\r
97 if NOT exist %WORKSPACE%\Conf\FrameworkDatabase.db (
\r
98 echo copying ... FrameworkDatabase.template to %WORKSPACE%\Conf\FrameworkDatabase.db
\r
99 copy %EDK_TOOLS_PATH%\Conf\FrameworkDatabase.template %WORKSPACE%\Conf\FrameworkDatabase.db > nul
\r
101 if /I "%1"=="Reconfig" copy /Y %EDK_TOOLS_PATH%\Conf\FrameworkDatabase.template %WORKSPACE%\Conf\FrameworkDatabase.db > nul
\r
103 if NOT exist %WORKSPACE%\Conf\target.txt (
\r
104 echo copying ... target.template to %WORKSPACE%\Conf\target.txt
\r
105 copy %EDK_TOOLS_PATH%\Conf\target.template %WORKSPACE%\Conf\target.txt > nul
\r
107 if /I "%1"=="Reconfig" copy /Y %EDK_TOOLS_PATH%\Conf\target.template %WORKSPACE%\Conf\target.txt > nul
\r
109 if NOT exist %WORKSPACE%\Conf\tools_def.txt (
\r
110 echo copying ... tools_def.template to %WORKSPACE%\Conf\tools_def.txt
\r
111 copy %EDK_TOOLS_PATH%\Conf\tools_def.template %WORKSPACE%\Conf\tools_def.txt > nul
\r
113 if /I "%1"=="Reconfig" copy /Y %EDK_TOOLS_PATH%\Conf\tools_def.template %WORKSPACE%\Conf\tools_def.txt > nul
\r
115 if NOT exist %WORKSPACE%\Conf\build_rule.txt (
\r
116 echo copying ... build_rule.template to %WORKSPACE%\Conf\build_rule.txt
\r
117 copy %EDK_TOOLS_PATH%\Conf\build_rule.template %WORKSPACE%\Conf\build_rule.txt > nul
\r
119 if /I "%1"=="Reconfig" copy /Y %EDK_TOOLS_PATH%\Conf\build_rule.template %WORKSPACE%\Conf\build_rule.txt > nul
\r
123 REM copy XMLSchema to %EDK_TOOLS_PATH%\Conf\XMLSchema
\r
125 REM echo copying ... XMLSchema to %EDK_TOOLS_PATH%\Conf\XMLSchema
\r
126 REM xcopy %WORKSPACE%\Conf\XMLSchema %EDK_TOOLS_PATH%\Conf\XMLSchema /S /I /D /F /Q > nul
\r
135 echo "Usage: %0 [/? | /h | /help | -h | -help | --help] [Reconfig] [tools_path]"
\r
137 echo tools_path Tools' path. EDK_TOOLS_PATH will be set to this path.
\r