]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/SetStampTask.java
Updated PeiRebase to produce a map file of the relocations done by this tool. This...
[mirror_edk2.git] / Tools / Source / FrameworkTasks / org / tianocore / framework / tasks / SetStampTask.java
index af04702b6e5c6dae8e34fe5072e7a627fcbf3c8b..a06d312d06fc80227353307d9431ffe9f96b366c 100644 (file)
@@ -13,6 +13,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 **/\r
 package org.tianocore.framework.tasks;\r
 \r
+import java.io.File;\r
+\r
 import org.apache.tools.ant.BuildException;\r
 import org.apache.tools.ant.Project;\r
 import org.apache.tools.ant.Task;\r
@@ -46,12 +48,12 @@ public class SetStampTask extends Task implements EfiDefine {
         ///\r
         /// absolute path of edk tools\r
         ///\r
-        String path = project.getProperty("env.Framework_Tools_Path");\r
+        String path = project.getProperty("env.FRAMEWORK_TOOLS_PATH");\r
         String command;\r
         if (path == null) {\r
-            command = "setstamp";\r
+            command = "SetStamp";\r
         } else {\r
-            command = path + "/" + "setstamp";\r
+            command = path + "/" + "SetStamp";\r
         }\r
         ///\r
         /// argument of SetStamp tool\r
@@ -74,23 +76,18 @@ public class SetStampTask extends Task implements EfiDefine {
             runner.setAntRun(project);\r
             runner.setCommandline(commandLine.getCommandline());\r
 \r
-            System.out.println(Commandline.toString(commandLine\r
-                    .getCommandline()));\r
+            log(Commandline.toString(commandLine.getCommandline()), Project.MSG_VERBOSE);\r
+            log((new File(this.peFile)).getName());\r
 \r
             returnVal = runner.execute();\r
             if (EFI_SUCCESS == returnVal) {\r
-                ///\r
-                /// command execution success\r
-                ///\r
-                System.out.println("SetStamp execute succeeded!");\r
+                log("SetStamp succeeded!", Project.MSG_VERBOSE);\r
             } else {\r
                 ///\r
                 /// command execution fail\r
                 ///\r
-                System.out.println("SetStamp failed. (error="\r
-                        + Integer.toHexString(returnVal) + ")");\r
-                throw new BuildException("SetStamp failed. (error="\r
-                        + Integer.toHexString(returnVal) + ")");\r
+                log("ERROR = " + Integer.toHexString(returnVal));\r
+                throw new BuildException("SetStamp failed!");\r
             }\r
         } catch (Exception e) {\r
             throw new BuildException(e.getMessage());\r