]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/GenBuild/org/tianocore/build/fpd/FpdParserTask.java
Removed the printStackTrace() which is used only for debug purpose.
[mirror_edk2.git] / Tools / Source / GenBuild / org / tianocore / build / fpd / FpdParserTask.java
index 5d829c9f2258d4341a7752a6528c9b6ac235a7f3..2b0fb2346be35411be04b59098ef2b58f71a852d 100644 (file)
@@ -139,7 +139,7 @@ public class FpdParserTask extends Task {
             if (platformName == null) {\r
                 throw new BuildException("FpdParserTask parameter error. Please specify platform name or FPD file. ");\r
             }\r
-            platformId = GlobalData.getPlatform(platformName);\r
+            platformId = GlobalData.getPlatformByName(platformName);\r
             fpdFile = platformId.getFpdFile();\r
         }\r
         \r
@@ -148,18 +148,6 @@ public class FpdParserTask extends Task {
         //\r
         parseFpdFile();\r
         \r
-        //\r
-        // Pcd Collection. Call CollectPCDAction to collect pcd info.\r
-        //\r
-        try {\r
-            System.out.println("Begin PCD collecttion!");\r
-            CollectPCDAction ca = new CollectPCDAction();\r
-            ca.perform(GlobalData.getWorkspacePath(),platformId.getFpdFile().getPath(),ActionMessage.NULL_MESSAGE_LEVEL);\r
-            System.out.println("End PCD collection!"); \r
-        } catch (Exception e){\r
-            throw new BuildException(e.getMessage());\r
-        }\r
-        \r
         //\r
         // Prepare BUILD_DIR\r
         //\r
@@ -323,7 +311,6 @@ public class FpdParserTask extends Task {
                 bw.close();\r
                 fw.close();\r
             } catch (Exception e) {\r
-                e.printStackTrace();\r
                 throw new BuildException("Generate FV file [" + fvFile.getPath() + "] failed. \n" + e.getMessage());\r
             }\r
         }\r
@@ -357,13 +344,14 @@ public class FpdParserTask extends Task {
             Map<String, XmlObject> map = new HashMap<String, XmlObject>();\r
             map.put("PlatformSurfaceArea", doc);\r
             SurfaceAreaQuery.setDoc(map);\r
-            \r
+\r
             //\r
             // Initialize\r
             //\r
             platformId = SurfaceAreaQuery.getFpdHeader();\r
             platformId.setFpdFile(fpdFile);\r
             getProject().setProperty("PLATFORM", platformId.getName());\r
+            getProject().setProperty("PLATFORM_FILE", platformId.getRelativeFpdFile().replaceAll("(\\\\)", "/"));\r
             getProject().setProperty("PLATFORM_DIR", platformId.getFpdFile().getParent().replaceAll("(\\\\)", "/"));\r
             getProject().setProperty("PLATFORM_RELATIVE_DIR", platformId.getPlatformRelativeDir().replaceAll("(\\\\)", "/"));\r
 \r
@@ -394,8 +382,17 @@ public class FpdParserTask extends Task {
             parseToolChainOptions();\r
 \r
             SurfaceAreaQuery.setDoc(map);\r
+            \r
+            //\r
+            // Pcd Collection. Call CollectPCDAction to collect pcd info.\r
+            //\r
+            try {\r
+                CollectPCDAction ca = new CollectPCDAction();\r
+                ca.perform(GlobalData.getWorkspacePath(),platformId.getFpdFile().getPath(),ActionMessage.NULL_MESSAGE_LEVEL);\r
+            } catch (Exception e){\r
+                throw new BuildException(e.getMessage());\r
+            }\r
         } catch (Exception e) {\r
-            e.printStackTrace();\r
             throw new BuildException("Load FPD file [" + fpdFile.getPath() + "] error. \n" + e.getMessage());\r
         }\r
     }\r