Identify SupArch for .msa
authoralfred <alfred@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 16 Aug 2006 01:14:51 +0000 (01:14 +0000)
committeralfred <alfred@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 16 Aug 2006 01:14:51 +0000 (01:14 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1287 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Source/MigrationTools/org/tianocore/migration/MsaWriter.java

index 2c3c97274e5ba3bde5400520e21dea6fdc4d8045..cf9c2a27190a4027f69f7f28ea0a62d20591bc98 100644 (file)
@@ -51,6 +51,31 @@ public class MsaWriter {
                return answer;\r
        }\r
        \r
+       private void addSourceFiles (String name) {                                             // furthur modification needed\r
+               List<Enum> arch = new ArrayList<Enum>();\r
+               FilenameDocument.Filename filename;\r
+               filename = sourcefiles.addNewFilename();\r
+               filename.setStringValue(name);\r
+               \r
+               if (name.contains("x64" + File.separator)) {                            // filename ???\r
+                       arch.add(SupportedArchitectures.X_64);\r
+                       System.out.println("x64" + File.separator);\r
+                       filename.setSupArchList(arch);\r
+               } else if (name.contains("Ia32" + File.separator)) {            // filename ???\r
+                       arch.add(SupportedArchitectures.IA_32);\r
+                       System.out.println("Ia32" + File.separator);\r
+                       filename.setSupArchList(arch);\r
+               } else if (name.contains("Ipf" + File.separator)) {                     // filename ???\r
+                       arch.add(SupportedArchitectures.IPF);\r
+                       System.out.println("Ipf" + File.separator);\r
+                       filename.setSupArchList(arch);\r
+               } else if (name.contains("Ebc" + File.separator)) {                     // filename ???\r
+                       arch.add(SupportedArchitectures.EBC);\r
+                       System.out.println("Ebc" + File.separator);\r
+                       filename.setSupArchList(arch);\r
+               }\r
+       }\r
+       \r
        private ModuleSurfaceAreaDocument fulfillMsadoc() throws Exception {\r
                Iterator<String> it;\r
                String temp;\r
@@ -103,17 +128,9 @@ public class MsaWriter {
                externs.addNewSpecification().setStringValue("EDK_RELEASE_VERSION 0x00020000");\r
                externs.addNewExtern().setModuleEntryPoint(mi.entrypoint);\r
                \r
-               FilenameDocument.Filename filename;\r
                it = mi.localmodulesources.iterator();\r
-               //System.out.println(mi.localmodulesources);\r
                while (it.hasNext()) {\r
-                       temp = it.next();\r
-                       filename = sourcefiles.addNewFilename();\r
-                       filename.setStringValue(temp);\r
-                       //if (temp.contains("x64" + File.separator)) {\r
-                               //System.out.println("find");\r
-                               //filename.setSupArchList();\r
-                       //}\r
+                       addSourceFiles(it.next());\r
                }\r
                if (!mi.protocol.isEmpty()) {\r
                        protocols = msa.addNewProtocols();\r