]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/VfrCompilerTask.java
Polished the build tools' screen output to be in a more coherent form
[mirror_edk2.git] / Tools / Source / FrameworkTasks / org / tianocore / framework / tasks / VfrCompilerTask.java
index cf2fe1e476218eb85e0bae4a07f5b9da9cecb7dd..8d3a22dd17009547f8e56efe6671f008a50d873e 100644 (file)
@@ -13,6 +13,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 **/\r
 package org.tianocore.framework.tasks;\r
 \r
+import java.io.File;\r
 import java.io.IOException;\r
 import java.util.ArrayList;\r
 import java.util.List;\r
@@ -39,7 +40,8 @@ public class VfrCompilerTask extends Task implements EfiDefine {
     private String outPutDir = "";\r
     private String createIfrBinFile = "";\r
     private String processerArg ="";\r
-    private String vfrFile;\r
+    private String vfrFile = "";\r
+    private String vfrFileName = "";\r
 \r
     private List<Object> includepathList = new ArrayList<Object>();\r
 \r
@@ -116,6 +118,7 @@ public class VfrCompilerTask extends Task implements EfiDefine {
      @param     vfrFile The name of VFR file\r
      **/\r
     public void setVfrFile(String vfrFile) {\r
+        this.vfrFileName = (new File(vfrFile)).getName();\r
         this.vfrFile = " " + vfrFile;\r
     }\r
 \r
@@ -203,17 +206,15 @@ public class VfrCompilerTask extends Task implements EfiDefine {
             runner.setAntRun(project);\r
             runner.setCommandline(commandLine.getCommandline());\r
 \r
-            System.out.println(Commandline.toString(commandLine.getCommandline()));         \r
+            log(Commandline.toString(commandLine.getCommandline()), Project.MSG_VERBOSE);\r
+            log(vfrFileName);\r
             int returnVal = runner.execute();\r
             if (EFI_SUCCESS == returnVal) {\r
-                System.out.println("VfrCompiler execution succeeded!");\r
+                log("VfrCompiler succeeded!", Project.MSG_VERBOSE);\r
             } else {\r
-                System.out.println("VfrCompiler failed. (error=" + \r
-                                   Integer.toHexString(returnVal) + ")");  \r
-                throw new BuildException("VfrCompiler failed. (error=" + \r
-                                         Integer.toHexString(returnVal) + ")");\r
+                log("ERROR = " + Integer.toHexString(returnVal));\r
+                throw new BuildException("VfrCompiler failed!");\r
             }\r
-\r
         } catch (IOException e) {\r
             throw new BuildException(e.getMessage());\r
         }\r