From 2be54d60f1182b85003433d03466df9822e20697 Mon Sep 17 00:00:00 2001 From: alfred Date: Wed, 16 Aug 2006 01:14:51 +0000 Subject: [PATCH] Identify SupArch for .msa git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1287 6f19259b-4bc3-4df7-8a09-765794883524 --- .../org/tianocore/migration/MsaWriter.java | 35 ++++++++++++++----- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/Tools/Source/MigrationTools/org/tianocore/migration/MsaWriter.java b/Tools/Source/MigrationTools/org/tianocore/migration/MsaWriter.java index 2c3c97274e..cf9c2a2719 100644 --- a/Tools/Source/MigrationTools/org/tianocore/migration/MsaWriter.java +++ b/Tools/Source/MigrationTools/org/tianocore/migration/MsaWriter.java @@ -51,6 +51,31 @@ public class MsaWriter { return answer; } + private void addSourceFiles (String name) { // furthur modification needed + List arch = new ArrayList(); + FilenameDocument.Filename filename; + filename = sourcefiles.addNewFilename(); + filename.setStringValue(name); + + if (name.contains("x64" + File.separator)) { // filename ??? + arch.add(SupportedArchitectures.X_64); + System.out.println("x64" + File.separator); + filename.setSupArchList(arch); + } else if (name.contains("Ia32" + File.separator)) { // filename ??? + arch.add(SupportedArchitectures.IA_32); + System.out.println("Ia32" + File.separator); + filename.setSupArchList(arch); + } else if (name.contains("Ipf" + File.separator)) { // filename ??? + arch.add(SupportedArchitectures.IPF); + System.out.println("Ipf" + File.separator); + filename.setSupArchList(arch); + } else if (name.contains("Ebc" + File.separator)) { // filename ??? + arch.add(SupportedArchitectures.EBC); + System.out.println("Ebc" + File.separator); + filename.setSupArchList(arch); + } + } + private ModuleSurfaceAreaDocument fulfillMsadoc() throws Exception { Iterator it; String temp; @@ -103,17 +128,9 @@ public class MsaWriter { externs.addNewSpecification().setStringValue("EDK_RELEASE_VERSION 0x00020000"); externs.addNewExtern().setModuleEntryPoint(mi.entrypoint); - FilenameDocument.Filename filename; it = mi.localmodulesources.iterator(); - //System.out.println(mi.localmodulesources); while (it.hasNext()) { - temp = it.next(); - filename = sourcefiles.addNewFilename(); - filename.setStringValue(temp); - //if (temp.contains("x64" + File.separator)) { - //System.out.println("find"); - //filename.setSupArchList(); - //} + addSourceFiles(it.next()); } if (!mi.protocol.isEmpty()) { protocols = msa.addNewProtocols();