Fix a bug of unreference PCD token defined in FPD does *not* be autogened into emulat...
[mirror_edk2.git] / Tools / bin / PackageEditor.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 @echo off
13
14 :check_java
15 if "%JAVA_HOME%"=="" goto no_jdk
16
17 :check_wks
18 if "%WORKSPACE%"=="" goto no_wks
19
20 :check_ant
21 if "%ANT_HOME%"=="" goto no_ant
22 @REM set ANT_HOME=%WORKSPACE%\Tools\bin\apache-ant
23
24 :check_xmlbeans
25 if "%XMLBEANS_HOME"=="" goto no_xmlbeans
26 @REM set XMLBEANS_HOME=%WORKSPACE%\Tools\bin\xmlbeans
27
28 set Framework_Tools_Path=%WORKSPACE%\Tools\bin
29
30 set PATH=%JAVA_HOME%\bin;%ANT_HOME%\bin;%WORKSPACE%\Tools\bin;%XMLBEANS_HOME%\bin;%PATH%
31
32 set CLASSPATH=%WORKSPACE%\Tools\Jars\SurfaceArea.jar;%WORKSPACE%\Tools\Jars\GenBuild.jar
33 set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Jars\cpptasks.jar;%WORKSPACE%\Tools\Jars\frameworktasks.jar
34 set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\jsr173_1.0_api.jar;%XMLBEANS_HOME%\lib\xbean.jar
35 set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\xbean_xpath.jar;%XMLBEANS_HOME%\lib\xmlpublic.jar
36 set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\saxon8.jar;%XMLBEANS_HOME%\lib\saxon8-jdom.jar
37 set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\saxon8-sql.jar;%XMLBEANS_HOME%\lib\resolver.jar
38 set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\bin\PackageEditor.jar
39
40 call "ant" -f %WORKSPACE%\Tools\Source\PackageEditor\build.xml
41
42 call "java" org.tianocore.packaging.PackagingMain
43
44 goto end
45
46 :no_jdk
47 echo.
48 echo !!! Please set JAVA_HOME !!!
49 echo.
50 goto check_wks
51
52 :no_wks
53 echo.
54 echo !!! Please set WORKSPACE !!!
55 echo.
56 goto check_ant
57
58 :no_ant
59 echo.
60 echo !!! Please set ANT_HOME !!!
61 echo.
62 goto check_xmlbeans
63
64 :no_xmlbeans
65 echo.
66 echo !!! Please set XMLBEANS_HOME !!!
67 echo.
68 goto end
69
70 :end
71 @echo on
72