2 This file is ANT task FpdParserTask.
4 FpdParserTask is used to parse FPD (Framework Platform Description) and generate
5 build.out.xml. It is for Package or Platform build use.
7 Copyright (c) 2006, Intel Corporation
8 All rights reserved. This program and the accompanying materials
9 are licensed and made available under the terms and conditions of the BSD License
10 which accompanies this distribution. The full text of the license may be found at
11 http://opensource.org/licenses/bsd-license.php
13 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
14 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 package org
.tianocore
.build
.fpd
;
18 import java
.io
.BufferedWriter
;
20 import java
.io
.FileWriter
;
21 import java
.util
.HashMap
;
22 import java
.util
.Iterator
;
23 import java
.util
.LinkedHashMap
;
24 import java
.util
.LinkedHashSet
;
27 import java
.util
.Vector
;
29 import javax
.xml
.parsers
.DocumentBuilder
;
30 import javax
.xml
.parsers
.DocumentBuilderFactory
;
31 import javax
.xml
.transform
.OutputKeys
;
32 import javax
.xml
.transform
.Result
;
33 import javax
.xml
.transform
.Source
;
34 import javax
.xml
.transform
.Transformer
;
35 import javax
.xml
.transform
.TransformerFactory
;
36 import javax
.xml
.transform
.dom
.DOMSource
;
37 import javax
.xml
.transform
.stream
.StreamResult
;
39 import org
.apache
.tools
.ant
.BuildException
;
40 import org
.apache
.tools
.ant
.Task
;
41 import org
.apache
.tools
.ant
.taskdefs
.Property
;
42 import org
.apache
.xmlbeans
.XmlObject
;
43 import org
.w3c
.dom
.Comment
;
44 import org
.w3c
.dom
.Document
;
45 import org
.w3c
.dom
.Element
;
47 import org
.tianocore
.build
.global
.GlobalData
;
48 import org
.tianocore
.build
.global
.OutputManager
;
49 import org
.tianocore
.build
.global
.OverrideProcess
;
50 import org
.tianocore
.build
.global
.SurfaceAreaQuery
;
51 import org
.tianocore
.build
.pcd
.action
.CollectPCDAction
;
52 import org
.tianocore
.build
.pcd
.action
.ActionMessage
;
53 import org
.tianocore
.BuildOptionsDocument
;
54 import org
.tianocore
.FrameworkPlatformDescriptionDocument
;
55 import org
.tianocore
.ModuleSADocument
;
59 <code>FpdParserTask</code> is an ANT task. The main function is parsing FPD
60 XML file and generating its ANT build script for Platform or Package.
62 <p>The usage is (take NT32 Platform for example):</p>
65 <FPDParser fpdfilename="Build\Nt32.fpd" />
68 <p>The task will initialize all information through parsing Framework Database,
69 SPD, Tool chain configuration files. </p>
73 public class FpdParserTask
extends Task
{
76 /// FV dir: ${PLATFORM_DIR}/Build/FV
78 public static final String FV_OUTPUT_DIR
= "${PLATFORM_DIR}" + File
.separatorChar
+ "Build" + File
.separatorChar
+ "FV";
80 private File fpdFilename
;
82 private File guiddatabase
;
85 /// Keep platform buildoption information
87 public static XmlObject platformBuildOptions
= null;
90 /// Mapping from modules identification to out put file name
92 private Map
<FpdModuleIdentification
, String
> outfiles
= new LinkedHashMap
<FpdModuleIdentification
, String
>();
95 /// Mapping from FV name to its modules
97 private Map
<String
, Set
<FpdModuleIdentification
> > fvs
= new HashMap
<String
, Set
<FpdModuleIdentification
> >();
100 /// Mapping from sequence number to its modules
102 private Map
<String
, Set
<FpdModuleIdentification
> > sequences
= new HashMap
<String
, Set
<FpdModuleIdentification
> >();
105 /// FpdParserTask can specify some ANT properties.
107 private Vector
<Property
> properties
= new Vector
<Property
>();
109 private String info
= "====================================================================\n"
111 + "File auto-generated by build utility\n"
114 + "Auto-generated ANT build file for building of EFI Modules/Platforms\n"
115 + "=====================================================================";
118 Public construct method. It is necessary for ANT task.
120 public FpdParserTask () {
124 ANT task's entry method. The main steps is described as following:
127 <li>Initialize global information (Framework DB, SPD files and all MSA files
128 listed in SPD). This step will execute only once in whole build process;</li>
129 <li>Parse specified FPD file; </li>
130 <li>Generate FV.inf files; </li>
131 <li>Generate build.out.xml file for Flatform or Package build; </li>
132 <li>Collect PCD information. </li>
135 @throws BuildException
136 Surface area is not valid.
138 public void execute() throws BuildException
{
139 OutputManager
.update(getProject());
141 // Parse DB and SPDs files. Initialize Global Data
143 GlobalData
.initInfo("Tools" + File
.separatorChar
+ "Conf" + File
.separatorChar
+ "FrameworkDatabase.db", getProject()
144 .getProperty("WORKSPACE_DIR"));
158 // Collect PCD information
160 collectPCDInformation ();
164 Generate Fv.inf files. The Fv.inf file is composed with four
165 parts: Options, Attributes, Components and Files. The Fv.inf files
166 will be under ${PLATFOMR_DIR}\Build\Fv.
168 @throws BuildException
169 File write FV.inf files error.
171 private void genFvInfFiles() throws BuildException
{
172 String
[] validFv
= SurfaceAreaQuery
.getFpdValidImageNames();
173 for (int i
= 0; i
< validFv
.length
; i
++) {
174 getProject().setProperty("FV_FILENAME", validFv
[i
].toUpperCase());
176 // Get all global variables from FPD and set them to properties
178 String
[][] globalVariables
= SurfaceAreaQuery
179 .getFpdGlobalVariable();
180 for (int j
= 0; j
< globalVariables
.length
; j
++) {
181 getProject().setProperty(globalVariables
[j
][0],
182 globalVariables
[j
][1]);
185 File fvFile
= new File(getProject().replaceProperties(
186 FV_OUTPUT_DIR
+ File
.separatorChar
+ validFv
[i
].toUpperCase()
188 fvFile
.getParentFile().mkdirs();
191 FileWriter fw
= new FileWriter(fvFile
);
192 BufferedWriter bw
= new BufferedWriter(fw
);
196 String
[][] options
= SurfaceAreaQuery
.getFpdOptions(validFv
[i
]);
197 if (options
.length
> 0) {
198 bw
.write("[options]");
200 for (int j
= 0; j
< options
.length
; j
++) {
201 StringBuffer str
= new StringBuffer(100);
202 str
.append(options
[j
][0]);
203 while (str
.length() < 40) {
207 str
.append(options
[j
][1]);
208 bw
.write(getProject().replaceProperties(str
.toString()));
216 String
[][] attributes
= SurfaceAreaQuery
217 .getFpdAttributes(validFv
[i
]);
218 if (attributes
.length
> 0) {
219 bw
.write("[attributes]");
221 for (int j
= 0; j
< attributes
.length
; j
++) {
222 StringBuffer str
= new StringBuffer(100);
223 str
.append(attributes
[j
][0]);
224 while (str
.length() < 40) {
228 str
.append(attributes
[j
][1]);
230 .write(getProject().replaceProperties(
239 String
[][] components
= SurfaceAreaQuery
240 .getFpdComponents(validFv
[i
]);
241 if (components
.length
> 0) {
242 bw
.write("[components]");
244 for (int j
= 0; j
< components
.length
; j
++) {
245 StringBuffer str
= new StringBuffer(100);
246 str
.append(components
[j
][0]);
247 while (str
.length() < 40) {
251 str
.append(components
[j
][1]);
253 .write(getProject().replaceProperties(
262 Set
<FpdModuleIdentification
> filesSet
= fvs
.get(validFv
[i
].toUpperCase());
263 if (filesSet
!= null) {
264 FpdModuleIdentification
[] files
= filesSet
.toArray(new FpdModuleIdentification
[filesSet
268 for (int j
= 0; j
< files
.length
; j
++) {
269 String str
= outfiles
.get(files
[j
]);
270 bw
.write(getProject().replaceProperties(
271 "EFI_FILE_NAME = " + str
));
278 } catch (Exception e
) {
279 throw new BuildException("Generate Fv.inf file failed. \n" + e
.getMessage());
287 @throws BuildException
288 FPD file is not valid.
290 private void parseFpdFile() throws BuildException
{
292 FrameworkPlatformDescriptionDocument doc
= (FrameworkPlatformDescriptionDocument
) XmlObject
.Factory
294 if ( ! doc
.validate() ){
295 throw new BuildException("FPD file is invalid.");
297 platformBuildOptions
= doc
.getFrameworkPlatformDescription()
299 HashMap
<String
, XmlObject
> map
= new HashMap
<String
, XmlObject
>();
300 map
.put("FrameworkPlatformDescription", doc
);
301 SurfaceAreaQuery
.setDoc(map
);
303 // Parse all list modules SA
305 parseModuleSAFiles();
306 SurfaceAreaQuery
.setDoc(map
);
307 } catch (Exception e
) {
308 throw new BuildException("Load FPD file [" + fpdFilename
.getPath()
309 + "] error. \n" + e
.getMessage());
314 Parse all modules listed in FPD file.
316 private void parseModuleSAFiles() {
317 ModuleSADocument
.ModuleSA
[] moduleSAs
= SurfaceAreaQuery
320 // For every Module lists in FPD file.
322 for (int i
= 0; i
< moduleSAs
.length
; i
++) {
323 String defaultFv
= "NULL";
324 String defaultArch
= "IA32";
325 String baseName
= moduleSAs
[i
].getModuleName();
326 if (baseName
== null) {
327 System
.out
.println("Warning: Module Name is not specified.");
330 String fvBinding
= moduleSAs
[i
].getFvBinding();
332 // If the module do not specify any FvBinding, use the default value.
333 // Else update the default FvBinding value to this value.
335 if (fvBinding
== null) {
336 fvBinding
= defaultFv
;
339 defaultFv
= fvBinding
;
343 // If the module do not specify any Arch, use the default value.
344 // Else update the default Arch value to this value.
346 if (moduleSAs
[i
].getArch() == null ){
350 arch
= moduleSAs
[i
].getArch().toString();
353 Map
<String
, XmlObject
> msaMap
= GlobalData
.getNativeMsa(baseName
);
354 Map
<String
, XmlObject
> mbdMap
= GlobalData
.getNativeMbd(baseName
);
355 Map
<String
, XmlObject
> map
= new HashMap
<String
, XmlObject
>();
357 // Whether the Module SA has parsed before or not
359 if (!GlobalData
.isModuleParsed(baseName
)) {
360 OverrideProcess op
= new OverrideProcess();
362 // using overriding rules
363 // Here we can also put platform Build override
365 map
= op
.override(mbdMap
, msaMap
);
366 Map
<String
, XmlObject
> overrideMap
= op
.override(
367 getPlatformOverrideInfo(moduleSAs
[i
]),
368 OverrideProcess
.deal(map
));
369 GlobalData
.registerModule(baseName
, overrideMap
);
371 map
= GlobalData
.getDoc(baseName
);
373 SurfaceAreaQuery
.setDoc(map
);
374 String guid
= SurfaceAreaQuery
.getModuleGuid();
375 String componentType
= SurfaceAreaQuery
.getComponentType();
376 FpdModuleIdentification moduleId
= new FpdModuleIdentification(baseName
, guid
, arch
);
377 updateFvs(fvBinding
, moduleId
);
378 outfiles
.put(moduleId
, "${PLATFORM_DIR}" + File
.separatorChar
+ "Build" + File
.separatorChar
379 + "${TARGET}" + File
.separatorChar
+ arch
380 + File
.separatorChar
+ guid
+ "-" + baseName
381 + getSuffix(componentType
));
386 Add the current module to corresponding FV.
388 @param fvName current FV name
389 @param moduleName current module identification
391 private void updateFvs(String fvName
, FpdModuleIdentification moduleName
) {
392 String upcaseFvName
= fvName
.toUpperCase();
393 if (fvs
.containsKey(upcaseFvName
)) {
394 Set
<FpdModuleIdentification
> set
= fvs
.get(upcaseFvName
);
397 Set
<FpdModuleIdentification
> set
= new LinkedHashSet
<FpdModuleIdentification
>();
399 fvs
.put(upcaseFvName
, set
);
404 Get the suffix based on component type. Current relationship are listed:
407 <b>ComponentType</b> <b>Suffix</b>
412 RELOCATABLE_PEIM .PEI
414 COMBINED_PEIM_DRIVER .PEI
420 @param componentType component type
422 @throws BuildException
423 If component type is null
425 public static String
getSuffix(String componentType
) throws BuildException
{
426 if (componentType
== null) {
427 throw new BuildException("Component type is not specified.");
430 if (componentType
.equalsIgnoreCase("APPLICATION")) {
432 } else if (componentType
.equalsIgnoreCase("SEC")) {
434 } else if (componentType
.equalsIgnoreCase("PEI_CORE")) {
436 } else if (componentType
.equalsIgnoreCase("PE32_PEIM")) {
438 } else if (componentType
.equalsIgnoreCase("RELOCATABLE_PEIM")) {
440 } else if (componentType
.equalsIgnoreCase("PIC_PEIM")) {
442 } else if (componentType
.equalsIgnoreCase("COMBINED_PEIM_DRIVER")) {
444 } else if (componentType
.equalsIgnoreCase("TE_PEIM")) {
446 } else if (componentType
.equalsIgnoreCase("LOGO")) {
453 Parse module surface are info described in FPD file and put them into map.
455 @param sa module surface area info descibed in FPD file
456 @return map list with top level elements
458 private Map
<String
, XmlObject
> getPlatformOverrideInfo(
459 ModuleSADocument
.ModuleSA sa
) {
460 Map
<String
, XmlObject
> map
= new HashMap
<String
, XmlObject
>();
461 map
.put("SourceFiles", sa
.getSourceFiles());
462 map
.put("Includes", sa
.getIncludes());
463 map
.put("Libraries", sa
.getLibraries());
464 map
.put("Protocols", sa
.getProtocols());
465 map
.put("Events", sa
.getEvents());
466 map
.put("Hobs", sa
.getHobs());
467 map
.put("PPIs", sa
.getPPIs());
468 map
.put("Variables", sa
.getVariables());
469 map
.put("BootModes", sa
.getBootModes());
470 map
.put("SystemTables", sa
.getSystemTables());
471 map
.put("DataHubs", sa
.getDataHubs());
472 map
.put("Formsets", sa
.getFormsets());
473 map
.put("Guids", sa
.getGuids());
474 map
.put("Externs", sa
.getExterns());
475 map
.put("BuildOptions", platformBuildOptions
);
480 Generate build.out.xml file.
482 @throws BuildException
483 build.out.xml XML document create error
485 private void genBuildFile() throws BuildException
{
486 DocumentBuilderFactory domfac
= DocumentBuilderFactory
.newInstance();
488 DocumentBuilder dombuilder
= domfac
.newDocumentBuilder();
489 Document document
= dombuilder
.newDocument();
490 Comment rootComment
= document
.createComment(info
);
492 // create root element and its attributes
494 Element root
= document
.createElement("project");
495 root
.setAttribute("name", getProject().getProperty("PLATFORM"));
496 root
.setAttribute("default", "main");
497 root
.setAttribute("basedir", ".");
499 // element for External ANT tasks
501 root
.appendChild(document
.createComment("Apply external ANT tasks"));
502 Element ele
= document
.createElement("taskdef");
503 ele
.setAttribute("resource", "GenBuild.tasks");
504 root
.appendChild(ele
);
506 ele
= document
.createElement("taskdef");
507 ele
.setAttribute("resource", "frameworktasks.tasks");
508 root
.appendChild(ele
);
510 ele
= document
.createElement("property");
511 ele
.setAttribute("environment", "env");
512 root
.appendChild(ele
);
516 root
.appendChild(document
.createComment("Default target"));
517 ele
= document
.createElement("target");
518 ele
.setAttribute("name", "main");
519 ele
.setAttribute("depends", "modules, fvs");
520 root
.appendChild(ele
);
524 root
.appendChild(document
.createComment("Modules target"));
525 ele
= document
.createElement("target");
526 ele
.setAttribute("name", "modules");
528 Set set
= outfiles
.keySet();
529 Iterator iter
= set
.iterator();
530 while (iter
.hasNext()) {
531 FpdModuleIdentification moduleId
= (FpdModuleIdentification
) iter
.next();
532 String baseName
= moduleId
.getBaseName();
533 Element moduleEle
= document
.createElement("ant");
534 moduleEle
.setAttribute("antfile", GlobalData
535 .getModulePath(baseName
)
536 + File
.separatorChar
+ "build.xml");
537 moduleEle
.setAttribute("target", baseName
);
541 Element property
= document
.createElement("property");
542 property
.setAttribute("name", "ARCH");
543 property
.setAttribute("value", moduleId
.getArch());
544 moduleEle
.appendChild(property
);
548 property
= document
.createElement("property");
549 property
.setAttribute("name", "PACKAGE_DIR");
550 property
.setAttribute("value", "${WORKSPACE_DIR}" + File
.separatorChar
551 + GlobalData
.getPackagePathForModule(baseName
));
552 moduleEle
.appendChild(property
);
556 property
= document
.createElement("property");
557 property
.setAttribute("name", "PACKAGE");
558 property
.setAttribute("value", GlobalData
559 .getPackageNameForModule(baseName
));
560 moduleEle
.appendChild(property
);
561 ele
.appendChild(moduleEle
);
563 root
.appendChild(ele
);
567 root
.appendChild(document
.createComment("FVs target"));
568 ele
= document
.createElement("target");
569 ele
.setAttribute("name", "fvs");
571 String
[] validFv
= SurfaceAreaQuery
.getFpdValidImageNames();
572 for (int i
= 0; i
< validFv
.length
; i
++) {
573 String inputFile
= FV_OUTPUT_DIR
+ "" + File
.separatorChar
574 + validFv
[i
].toUpperCase() + ".inf";
575 Element fvEle
= document
.createElement("genfvimage");
576 fvEle
.setAttribute("infFile", inputFile
);
577 ele
.appendChild(fvEle
);
578 Element moveEle
= document
.createElement("move");
579 moveEle
.setAttribute("file", validFv
[i
].toUpperCase() + ".fv");
580 moveEle
.setAttribute("todir", FV_OUTPUT_DIR
);
581 ele
.appendChild(moveEle
);
583 root
.appendChild(ele
);
585 boolean isUnified
= false;
586 BuildOptionsDocument
.BuildOptions buildOptions
= (BuildOptionsDocument
.BuildOptions
)platformBuildOptions
;
587 if (buildOptions
.getOutputDirectory() != null){
588 if (buildOptions
.getOutputDirectory().getIntermediateDirectories() != null){
589 if (buildOptions
.getOutputDirectory().getIntermediateDirectories().toString().equalsIgnoreCase("UNIFIED")){
597 root
.appendChild(document
.createComment("Clean target"));
598 ele
= document
.createElement("target");
599 ele
.setAttribute("name", "clean");
602 Element cleanEle
= document
.createElement("delete");
603 cleanEle
.setAttribute("includeemptydirs", "true");
604 Element filesetEle
= document
.createElement("fileset");
605 filesetEle
.setAttribute("dir", getProject().getProperty("PLATFORM_DIR") + File
.separatorChar
+ "Build" + File
.separatorChar
+ "${TARGET}");
606 filesetEle
.setAttribute("includes", "**/OUTPUT/**");
607 cleanEle
.appendChild(filesetEle
);
608 ele
.appendChild(cleanEle
);
611 set
= outfiles
.keySet();
612 iter
= set
.iterator();
613 while (iter
.hasNext()) {
614 FpdModuleIdentification moduleId
= (FpdModuleIdentification
) iter
.next();
615 String baseName
= moduleId
.getBaseName();
617 Element ifEle
= document
.createElement("if");
618 Element availableEle
= document
.createElement("available");
619 availableEle
.setAttribute("file", GlobalData
620 .getModulePath(baseName
)
621 + File
.separatorChar
+ "build.xml");
622 ifEle
.appendChild(availableEle
);
623 Element elseEle
= document
.createElement("then");
625 Element moduleEle
= document
.createElement("ant");
626 moduleEle
.setAttribute("antfile", GlobalData
627 .getModulePath(baseName
)
628 + File
.separatorChar
+ "build.xml");
629 moduleEle
.setAttribute("target", baseName
+ "_clean");
633 Element property
= document
.createElement("property");
634 property
.setAttribute("name", "ARCH");
635 property
.setAttribute("value", moduleId
.getArch());
636 moduleEle
.appendChild(property
);
640 property
= document
.createElement("property");
641 property
.setAttribute("name", "PACKAGE_DIR");
642 property
.setAttribute("value", "${WORKSPACE_DIR}" + File
.separatorChar
643 + GlobalData
.getPackagePathForModule(baseName
));
644 moduleEle
.appendChild(property
);
648 property
= document
.createElement("property");
649 property
.setAttribute("name", "PACKAGE");
650 property
.setAttribute("value", GlobalData
651 .getPackageNameForModule(baseName
));
652 moduleEle
.appendChild(property
);
653 elseEle
.appendChild(moduleEle
);
654 ifEle
.appendChild(elseEle
);
655 ele
.appendChild(ifEle
);
658 root
.appendChild(ele
);
662 root
.appendChild(document
.createComment("Clean All target"));
663 ele
= document
.createElement("target");
664 ele
.setAttribute("name", "cleanall");
667 Element cleanAllEle
= document
.createElement("delete");
668 cleanAllEle
.setAttribute("dir", getProject().getProperty("PLATFORM_DIR") + File
.separatorChar
+ "Build" + File
.separatorChar
+ "${TARGET}");
669 ele
.appendChild(cleanAllEle
);
672 set
= outfiles
.keySet();
673 iter
= set
.iterator();
674 while (iter
.hasNext()) {
675 FpdModuleIdentification moduleId
= (FpdModuleIdentification
) iter
.next();
676 String baseName
= moduleId
.getBaseName();
678 Element ifEle
= document
.createElement("if");
679 Element availableEle
= document
.createElement("available");
680 availableEle
.setAttribute("file", GlobalData
681 .getModulePath(baseName
)
682 + File
.separatorChar
+ "build.xml");
683 ifEle
.appendChild(availableEle
);
684 Element elseEle
= document
.createElement("then");
686 Element moduleEle
= document
.createElement("ant");
687 moduleEle
.setAttribute("antfile", GlobalData
688 .getModulePath(baseName
)
689 + File
.separatorChar
+ "build.xml");
690 moduleEle
.setAttribute("target", baseName
+ "_cleanall");
694 Element property
= document
.createElement("property");
695 property
.setAttribute("name", "ARCH");
696 property
.setAttribute("value", moduleId
.getArch());
697 moduleEle
.appendChild(property
);
701 property
= document
.createElement("property");
702 property
.setAttribute("name", "PACKAGE_DIR");
703 property
.setAttribute("value", "${WORKSPACE_DIR}" + File
.separatorChar
704 + GlobalData
.getPackagePathForModule(baseName
));
705 moduleEle
.appendChild(property
);
709 property
= document
.createElement("property");
710 property
.setAttribute("name", "PACKAGE");
711 property
.setAttribute("value", GlobalData
712 .getPackageNameForModule(baseName
));
713 moduleEle
.appendChild(property
);
714 elseEle
.appendChild(moduleEle
);
715 ifEle
.appendChild(elseEle
);
716 ele
.appendChild(ifEle
);
719 root
.appendChild(ele
);
721 document
.appendChild(rootComment
);
722 document
.appendChild(root
);
724 // Prepare the DOM document for writing
726 Source source
= new DOMSource(document
);
728 // Prepare the output file
730 File file
= new File(getProject().getProperty("PLATFORM_DIR")
731 + File
.separatorChar
+ "build.out.xml");
733 // generate all directory path
735 (new File(file
.getParent())).mkdirs();
736 Result result
= new StreamResult(file
);
738 // Write the DOM document to the file
740 Transformer xformer
= TransformerFactory
.newInstance()
742 xformer
.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
743 xformer
.setOutputProperty(OutputKeys
.INDENT
, "yes");
744 xformer
.transform(source
, result
);
745 } catch (Exception ex
) {
746 throw new BuildException("Generate build.out.xml failed. \n" + ex
.getMessage());
755 public void addProperty(Property p
) {
756 properties
.addElement(p
);
762 @return FPD file name.
764 public File
getFpdFilename() {
771 @param fpdFilename FPD file name
773 public void setFpdFilename(File fpdFilename
) {
774 this.fpdFilename
= fpdFilename
;
777 public File
getGuiddatabase() {
781 public void setGuiddatabase(File guiddatabase
) {
782 this.guiddatabase
= guiddatabase
;
785 public void collectPCDInformation() {
786 String exceptionString
= null;
787 CollectPCDAction collectAction
= new CollectPCDAction ();
789 // Collect all PCD information from FPD to MSA, and get help information from SPD.
790 // These all information will be stored into memory database for future usage such
794 collectAction
.perform (getProject().getProperty("WORKSPACE_DIR"),
795 fpdFilename
.getPath(),
796 ActionMessage
.MAX_MESSAGE_LEVEL
798 } catch (Exception exp
) {
799 exceptionString
= exp
.getMessage();
800 if (exceptionString
== null) {
801 exceptionString
= "[Internal Error]Pcd tools catch a internel errors, Please report this bug into TianoCore or send email to Wang, scott or Lu, ken!";
803 throw new BuildException (String
.format("Fail to do PCD preprocess from FPD file: %s", exceptionString
));