+ n/a
authoralfred <alfred@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 21 Sep 2006 05:29:00 +0000 (05:29 +0000)
committeralfred <alfred@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 21 Sep 2006 05:29:00 +0000 (05:29 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1586 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Source/MigrationTools/org/tianocore/migration/FirstPanel.java
Tools/Source/MigrationTools/org/tianocore/migration/MigrationTool.java
Tools/Source/MigrationTools/org/tianocore/migration/ModuleReader.java
Tools/Source/MigrationTools/org/tianocore/migration/MsaWriter.java

index 5acf56f..6b899c8 100644 (file)
@@ -26,7 +26,7 @@ public final class FirstPanel extends JPanel implements ActionListener, ItemList
     \r
     private static final FirstPanel INSTANCE = FirstPanel.init();\r
     \r
-    private String startpath;\r
+    private String startpath = null;\r
     \r
     private JButton moduleButton, goButton, msaEditorButton, criticButton, specifyCommentButton;\r
     private JTextField moduletext;\r
index 2bb9e2b..fea4f8b 100644 (file)
@@ -73,7 +73,11 @@ public class MigrationTool {
         MigrationTool.ui.println(show + hash.size());\r
         MigrationTool.ui.println(hash);\r
     }\r
-\r
+/*\r
+    public static final String getTempDir(String modulepath) {\r
+       return "C:" + File.separator + "MigrationTool_Temp" + File.separator + modulepath.replaceAll(ui., arg1);\r
+    }\r
+*/\r
     private static final String assignOutPutPath(String inputpath) {\r
         if (MigrationTool.defaultoutput) {\r
             return inputpath.replaceAll(Common.STRSEPARATER, "$1");\r
index dc32fb9..6495810 100644 (file)
@@ -193,13 +193,11 @@ public final class ModuleReader implements Common.ForDoAll {
         ii = mi.preprocessedccodes.iterator();\r
         \r
         Pattern patefifuncc = Pattern.compile("g?(BS|RT)\\s*->\\s*([a-zA-Z_]\\w*)",Pattern.MULTILINE);\r
-        Pattern patentrypoint = Pattern.compile("EFI_([A-Z]*)_ENTRY_POINT\\s*\\(([^\\(\\)]*)\\)",Pattern.MULTILINE);\r
         Matcher matguid;\r
         Matcher matfuncc;\r
         Matcher matfuncd;\r
         Matcher matenclosereplace;\r
         Matcher matefifuncc;\r
-        Matcher matentrypoint;\r
         Matcher matmacro;\r
         \r
         while (ii.hasNext()) {\r
@@ -211,17 +209,6 @@ public final class ModuleReader implements Common.ForDoAll {
             }\r
             line = wholefile.toString();\r
             \r
-            // if this is a Pei phase module , add these library class to .msa\r
-            matentrypoint = patentrypoint.matcher(line);\r
-            if (matentrypoint.find()) {\r
-                mi.entrypoint = matentrypoint.group(2);\r
-                if (matentrypoint.group(1).matches("PEIM")) {\r
-                    mi.hashrequiredr9libs.add("PeimEntryPoint");\r
-                } else {\r
-                    mi.hashrequiredr9libs.add("UefiDriverEntryPoint");\r
-                }\r
-            }\r
-            \r
             // find guid\r
             matguid = Guid.ptnguid.matcher(line);                                        // several ways to implement this , which one is faster ? :\r
             while (matguid.find()) {                                                    // 1.currently , find once , then call to identify which is it\r
index 23ea8b2..7db15dc 100644 (file)
@@ -168,7 +168,7 @@ public class MsaWriter {
         }\r
         it = mi.hashrequiredr9libs.iterator();\r
         while (it.hasNext()) {\r
-            if ((temp = it.next()) != null && !temp.matches("%")) {\r
+            if ((temp = it.next()) != null && !temp.matches("%") && !temp.matches("n/a")) {\r
                 LibraryClassDocument.LibraryClass lc = libclassdefs.addNewLibraryClass();\r
                 lc.setKeyword(temp);\r
                 lc.setUsage(UsageTypes.ALWAYS_CONSUMED);\r