summaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authoralfred <alfred@6f19259b-4bc3-4df7-8a09-765794883524>2006-08-14 06:40:48 +0000
committeralfred <alfred@6f19259b-4bc3-4df7-8a09-765794883524>2006-08-14 06:40:48 +0000
commitfb840aa8f7471de18152ed8531a862033e21a56f (patch)
treea56e634ddaf3d0e2fa0c35b59108952d5eb89d91 /Tools
parent9136b0e0babdff65926bb31845b1784931911746 (diff)
downloadedk2-fb840aa8f7471de18152ed8531a862033e21a56f.zip
edk2-fb840aa8f7471de18152ed8531a862033e21a56f.tar.gz
edk2-fb840aa8f7471de18152ed8531a862033e21a56f.tar.bz2
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1250 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools')
-rw-r--r--Tools/Source/MigrationTools/org/tianocore/migration/MsaWriter.java53
1 files changed, 32 insertions, 21 deletions
diff --git a/Tools/Source/MigrationTools/org/tianocore/migration/MsaWriter.java b/Tools/Source/MigrationTools/org/tianocore/migration/MsaWriter.java
index 25d959f..82e34ee 100644
--- a/Tools/Source/MigrationTools/org/tianocore/migration/MsaWriter.java
+++ b/Tools/Source/MigrationTools/org/tianocore/migration/MsaWriter.java
@@ -36,9 +36,9 @@ public class MsaWriter {
private MsaHeaderDocument.MsaHeader msaheader = msa.addNewMsaHeader();
private ModuleDefinitionsDocument.ModuleDefinitions md = msa.addNewModuleDefinitions();
private SourceFilesDocument.SourceFiles sourcefiles = msa.addNewSourceFiles(); //found local .h files are not written
- private GuidsDocument.Guids guids = msa.addNewGuids();
- private ProtocolsDocument.Protocols protocols = msa.addNewProtocols();
- private PPIsDocument.PPIs ppis = msa.addNewPPIs();
+ private GuidsDocument.Guids guids;
+ private ProtocolsDocument.Protocols protocols;
+ private PPIsDocument.PPIs ppis;
private PackageDependenciesDocument.PackageDependencies pd = msa.addNewPackageDependencies();
private LibraryClassDefinitionsDocument.LibraryClassDefinitions libclassdefs = msa.addNewLibraryClassDefinitions();
private ExternsDocument.Externs externs = msa.addNewExterns();
@@ -74,6 +74,7 @@ public class MsaWriter {
} else {
msaheader.setModuleType(ModuleTypeDef.Enum.forString(mi.moduletype = Query("GuidValue Not Found . Please Input GuidValue")));
}
+
msaheader.setCopyright("Copyright (c) 2006, Intel Corporation");
msaheader.setVersion("1.0");
msaheader.setAbstract("Component name for module " + mi.modulename);
@@ -86,6 +87,7 @@ public class MsaWriter {
" reproduced, stored in a retrieval system, or transmitted in any\n" +
" form or by any means without the express written consent of\n" +
" Intel Corporation.");
+ msaheader.setSpecification("FRAMEWORK_BUILD_PACKAGING_SPECIFICATION 0x00000052");
List<Enum> arch = new ArrayList<Enum>();
arch.add(SupportedArchitectures.IA_32);
@@ -105,28 +107,37 @@ public class MsaWriter {
while (it.hasNext()) {
sourcefiles.addNewFilename().setStringValue(it.next());
}
- it = mi.protocol.iterator();
- while (it.hasNext()) {
- if ((temp = it.next()) != null) {
- ProtocolsDocument.Protocols.Protocol pr = protocols.addNewProtocol();
- pr.setProtocolCName(temp);
- pr.setUsage(UsageTypes.ALWAYS_CONSUMED);
+ if (!mi.protocol.isEmpty()) {
+ protocols = msa.addNewProtocols();
+ it = mi.protocol.iterator();
+ while (it.hasNext()) {
+ if ((temp = it.next()) != null) {
+ ProtocolsDocument.Protocols.Protocol pr = protocols.addNewProtocol();
+ pr.setProtocolCName(temp);
+ pr.setUsage(UsageTypes.ALWAYS_CONSUMED);
+ }
}
}
- it = mi.ppi.iterator();
- while (it.hasNext()) {
- if ((temp = it.next()) != null) {
- PPIsDocument.PPIs.Ppi pp = ppis.addNewPpi();
- pp.setPpiCName(temp);
- pp.setUsage(UsageTypes.ALWAYS_CONSUMED);
+ if (!mi.ppi.isEmpty()) {
+ ppis = msa.addNewPPIs();
+ it = mi.ppi.iterator();
+ while (it.hasNext()) {
+ if ((temp = it.next()) != null) {
+ PPIsDocument.PPIs.Ppi pp = ppis.addNewPpi();
+ pp.setPpiCName(temp);
+ pp.setUsage(UsageTypes.ALWAYS_CONSUMED);
+ }
}
}
- it = mi.guid.iterator();
- while (it.hasNext()) {
- if ((temp = it.next()) != null) {
- GuidsDocument.Guids.GuidCNames gcn = guids.addNewGuidCNames();
- gcn.setGuidCName(temp);
- gcn.setUsage(UsageTypes.ALWAYS_CONSUMED);
+ if (!mi.guid.isEmpty()) {
+ guids = msa.addNewGuids();
+ it = mi.guid.iterator();
+ while (it.hasNext()) {
+ if ((temp = it.next()) != null) {
+ GuidsDocument.Guids.GuidCNames gcn = guids.addNewGuidCNames();
+ gcn.setGuidCName(temp);
+ gcn.setUsage(UsageTypes.ALWAYS_CONSUMED);
+ }
}
}
it = mi.hashrequiredr9libs.iterator();