**/\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
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
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 successed!");\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
return this.timeFile;\r
}\r
\r
-}
\ No newline at end of file
+}\r