]> git.proxmox.com Git - mirror_edk2.git/blob - Setup/edksetup.bat
Adding a separate Setup Directory which will contain the edksetup files so that SVN...
[mirror_edk2.git] / Setup / edksetup.bat
1 @REM
2 @REM Copyright (c) 2006, Intel Corporation
3 @REM All rights reserved. This program and the accompanying materials
4 @REM are licensed and made available under the terms and conditions of the BSD License
5 @REM which accompanies this distribution. The full text of the license may be found at
6 @REM http://opensource.org/licenses/bsd-license.php
7 @REM
8 @REM THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
9 @REM WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
10 @REM
11
12 @REM usage: edksetup.bat [Reconfig]
13 @REM if the argument, skip is present, only the paths and the
14 @REM test and set of environment settings are performed.
15
16 @REM ##############################################################
17 @REM # You should not have to modify anything below this line
18 @REM #
19
20 @echo off
21
22 @REM
23 @REM Set the WORKSPACE to the current working directory
24 @REM
25 if not defined WORKSPACE (
26 @set WORKSPACE=%CD%
27 ) else (
28 @echo WORKSPACE was already set to %WORKSPACE%
29 )
30
31
32 @if /I "%1"=="-h" goto Usage
33 @if /I "%1"=="-help" goto Usage
34 @if /I "%1"=="--help" goto Usage
35 @if /I "%1"=="/h" goto Usage
36 @if /I "%1"=="/?" goto Usage
37 @if /I "%1"=="/help" goto Usage
38
39 if defined CYGWIN_HOME goto NewBuild
40 if exist c:\cygwin (
41 set CYGWIN_HOME=c:\cygwin
42 ) else (
43 echo.
44 echo !!! WARNING !!!! Not set CYGWIN_HOME, gcc build may not be used !!!
45 echo.
46 )
47
48 goto NewBuild
49
50 :Usage
51 echo.
52 echo Usage: %0 [Reconfig]
53 echo Reconfig: Reinstall target.txt, tools_def.txt, FrameworkDatabase.db.
54 echo.
55 echo Note that target.template, tools_def.template, FrameworkDatabase.template will be
56 echo only copied to target.txt, tools_def.txt, FrameworkDatabase.db respectively if they
57 echo are not existed. Using option [Reconfig] to do the force copy.
58 echo.
59 goto end
60
61 :NewBuild
62 @IF DEFINED EDK_TOOLS_PATH goto RunToolSetup
63
64 @if exist %WORKSPACE%\BaseTools (
65 @set EDK_TOOLS_PATH=%WORKSPACE%\BaseTools
66 ) else (
67 echo.
68 echo The WORKSPACE does not contain a BaseTools directory and
69 echo the EDK_TOOLS_PATH is not set
70 echo.
71 goto Usage
72 )
73
74 :RunToolSetup
75 @if /I "%1"=="Reconfig" (
76 @call %EDK_TOOLS_PATH%\toolsetup.bat Reconfig
77 ) else (
78 @call %EDK_TOOLS_PATH%\toolsetup.bat
79 )
80
81 :end
82 @echo on
83