\r
<sequential>\r
<shellscript shell="cmd.exe" tmpsuffix=".cmd" >\r
+ <arg line="/q"/>\r
<arg line="/c"/>\r
<arg line="call"/>\r
"${DLINK}" /LIBPATH:"${env.MSVCDir}\Lib" /LIBPATH:"${env.MSVCDir}\PlatformSdk\Lib" /NOLOGO /SUBSYSTEM:CONSOLE /NODEFAULTLIB /IGNORE:4086 /MAP /OPT:REF /DEBUG /MACHINE:I386 /LTCG Kernel32.lib MSVCRTD.lib Gdi32.lib User32.lib Winmm.lib ${OBJECTS} ${LIBS} /base:0x10000000 /out:${BIN_DIR}\SecMain.exe /pdb:${DEST_DIR_DEBUG}\SecMain.pdb\r
//\r
// Set debug log information.\r
//\r
- EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline.getCommandline()));\r
- \r
+ EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));\r
+ EdkLog.log(EdkLog.EDK_INFO, (new File(this.outputFile)).getName());\r
revl = runner.execute();\r
\r
if (EFI_SUCCESS == revl) {\r
//\r
// command execution success\r
//\r
- EdkLog.log(EdkLog.EDK_INFO,"CreateMtFile succeeded!");\r
+ EdkLog.log(EdkLog.EDK_VERBOSE, "CreateMtFile succeeded!");\r
} else {\r
//\r
// command execution fail\r
//\r
- EdkLog.log(EdkLog.EDK_ERROR, "CreateMtFile failed. (error="\r
- + Integer.toHexString(revl) + ")");\r
- throw new BuildException("CreateMtFile failed. (error="\r
- + Integer.toHexString(revl) + ")");\r
-\r
+ EdkLog.log(EdkLog.EDK_INFO, "ERROR = "+ Integer.toHexString(revl));\r
+ throw new BuildException("CreateMtFile failed!");\r
}\r
} catch (Exception e) {\r
throw new BuildException(e.getMessage());\r
//\r
// Set debug log information.\r
//\r
- EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline.getCommandline()));\r
+ EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));\r
+ EdkLog.log(EdkLog.EDK_INFO, (new File(this.inputFile)).getName());\r
\r
revl = runner.execute();\r
\r
//\r
// command execution success\r
//\r
- EdkLog.log(EdkLog.EDK_INFO,"EfiCompress succeeded!");\r
+ EdkLog.log(EdkLog.EDK_VERBOSE, "EfiCompress succeeded!");\r
} else {\r
//\r
// command execution fail\r
//\r
- EdkLog.log(EdkLog.EDK_ERROR, "EfiCompress failed. (error="\r
- + Integer.toHexString(revl) + ")");\r
- throw new BuildException("Strip failed. (error="\r
- + Integer.toHexString(revl) + ")");\r
+ EdkLog.log(EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));\r
+ throw new BuildException("Strip failed!");\r
\r
}\r
} catch (Exception e) {\r
argList.add(((Input)pe32ComprList.next()).getFile());\r
}\r
}\r
- EdkLog.log(EdkLog.EDK_INFO, argList.toString().replaceAll(",",""));\r
- \r
+\r
+ EdkLog.log(EdkLog.EDK_VERBOSE, argList.toString().replaceAll(",",""));\r
+ EdkLog.log(EdkLog.EDK_INFO, " ");\r
+\r
//\r
// lauch the program\r
//\r
exitCode = cmdProc.waitFor();\r
if (exitCode != 0) {\r
int len = cmdOut.read(buf, 0, 1024);\r
- EdkLog.log(EdkLog.EDK_ERROR,new String(buf, 0, len));\r
+ EdkLog.log(EdkLog.EDK_INFO, new String(buf, 0, len));\r
} else {\r
- EdkLog.log(EdkLog.EDK_INFO, "FlashMap succeed!");\r
+ EdkLog.log(EdkLog.EDK_VERBOSE, "EfiRom succeeded!");\r
}\r
} catch (Exception e) {\r
throw new BuildException(e.getMessage());\r
} finally {\r
if (exitCode != 0) {\r
- //throw new BuildException("GenFvImage: failed to generate FV file!");\r
+ throw new BuildException("EfiRom failed!");\r
}\r
}\r
}\r
import org.tianocore.logger.EdkLog;\r
\r
/**\r
- * SecFixupTask class.\r
+ * FlashMapTask class.\r
* \r
- * SecFixupTask is used to call SecFixup.exe to fix up sec image.\r
+ * FlashMapTask is used to call FlashMap.exe to generate flash map defition files and fd files.\r
*/\r
public class FlashMapTask extends Task implements EfiDefine {\r
// /\r
private final String toolName = "FlashMap";\r
\r
// /\r
- // / Flash default file\r
+ // / Flash definition file\r
// /\r
private String flashDefFile = "";\r
\r
}\r
}\r
\r
- EdkLog.log(EdkLog.EDK_INFO, argList.toString().replace(",",""));\r
//\r
// lauch the program\r
//\r
//\r
// log command line string.\r
//\r
- EdkLog.log(EdkLog.EDK_INFO, cmdProc.getOutputStream().toString());\r
+ EdkLog.log(EdkLog.EDK_VERBOSE, cmdProc.getOutputStream().toString());\r
+ EdkLog.log(EdkLog.EDK_INFO, (new File(this.flashDefFile)).getName());\r
if (exitCode != 0) {\r
int len = cmdOut.read(buf, 0, 1024);\r
- EdkLog.log(EdkLog.EDK_ERROR, new String(buf, 0, len));\r
+ EdkLog.log(EdkLog.EDK_INFO, new String(buf, 0, len));\r
} else {\r
- EdkLog.log(EdkLog.EDK_INFO, "FlashMap succeed!");\r
+ EdkLog.log(EdkLog.EDK_VERBOSE, "FlashMap succeeded!");\r
}\r
} catch (Exception e) {\r
throw new BuildException(e.getMessage());\r
} finally {\r
if (exitCode != 0) {\r
- // throw new BuildException("GenFvImage: failed to generate FV\r
- // file!");\r
+ throw new BuildException("FlashMap failed!");\r
}\r
}\r
}\r
private String titleName;\r
public FrameworkLogger(Project project, String taskName) {\r
this.project = project;\r
- this.titleName = taskName;\r
- \r
- \r
+ this.titleName = taskName; \r
}\r
\r
- public void putMessage(Object msgSource, int msgLevel, String msg) {\r
- \r
+ public void putMessage(Object msgSource, int msgLevel, String msg) { \r
String frameworkMsg = " [" + this.titleName + "] " + msg;\r
this.project.log(frameworkMsg, Project.MSG_INFO);\r
}\r
**/\r
package org.tianocore.framework.tasks;\r
\r
-import org.apache.tools.ant.Task;\r
-import org.apache.tools.ant.Project;\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
import org.apache.tools.ant.taskdefs.Execute;\r
import org.apache.tools.ant.taskdefs.LogStreamHandler;\r
import org.apache.tools.ant.types.Commandline;\r
+import org.tianocore.logger.EdkLog;\r
\r
\r
/**\r
/// input PE image\r
/// \r
private String peImage = "";\r
+ private String peImageName = "";\r
///\r
/// output EFI image\r
/// \r
\r
runner.setAntRun(project);\r
runner.setCommandline(cmdline.getCommandline());\r
- //System.out.println(Commandline.toString(cmdline.getCommandline()));\r
- //GenBuildTask.myLogger.log(Commandline.toString(cmdline.getCommandline()),0);\r
- //getProject().log(Commandline.toString(cmdline.getCommandline()));\r
+\r
+ log(Commandline.toString(cmdline.getCommandline()), Project.MSG_VERBOSE);\r
+ log(this.peImageName);\r
revl = runner.execute();\r
if (EFI_SUCCESS == revl) {\r
- //\r
- // command execution success\r
- //\r
- System.out.println("fwimage succeeded!");\r
+ log("fwimage succeeded!", Project.MSG_VERBOSE);\r
} else {\r
//\r
// command execution fail\r
//\r
- System.out.println("fwimage failed. (error="\r
- + Integer.toHexString(revl) + ")");\r
- throw new BuildException("fwimage failed. (error="\r
- + Integer.toHexString(revl) + ")");\r
-\r
+ log("ERROR = " + Integer.toHexString(revl));\r
+ throw new BuildException("fwimage failed!");\r
}\r
} catch (Exception e) {\r
throw new BuildException(e.getMessage());\r
@param peImage name of PE image\r
**/\r
public void setPeImage(String peImage) {\r
+ this.peImageName = (new File(peImage)).getName();\r
this.peImage = " " + peImage;\r
}\r
\r
//\r
// Set debug log information.\r
//\r
- EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline.getCommandline()));\r
- \r
+ EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));\r
+ EdkLog.log(EdkLog.EDK_INFO, (new File(this.inputFile)).getName());\r
revl = runner.execute();\r
\r
if (EFI_SUCCESS == revl) {\r
//\r
// command execution success\r
//\r
- EdkLog.log(EdkLog.EDK_INFO,"GenAcpiTable successed!");\r
+ EdkLog.log(EdkLog.EDK_VERBOSE, "GenAcpiTable succeeded!");\r
} else {\r
//\r
// command execution fail\r
//\r
- EdkLog.log(EdkLog.EDK_ERROR, "GenAcpiTable failed. (error="\r
- + Integer.toHexString(revl) + ")");\r
- throw new BuildException("GenAcpiTable failed. (error="\r
- + Integer.toHexString(revl) + ")");\r
-\r
+ EdkLog.log(EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));\r
+ throw new BuildException("GenAcpiTable failed!");\r
}\r
} catch (Exception e) {\r
throw new BuildException(e.getMessage());\r
\r
runner.setAntRun(project);\r
runner.setCommandline(cmdline.getCommandline());\r
- System.out.println(Commandline.toString(cmdline.getCommandline()));\r
- \r
+ log(Commandline.toString(cmdline.getCommandline()), Project.MSG_VERBOSE);\r
+ log(" ");\r
revl = runner.execute();\r
if (EFI_SUCCESS == revl){\r
//\r
// command execution success \r
//\r
- System.out.println("gencrc32section succeeded!");\r
- }\r
- else\r
- {\r
+ log("gencrc32section succeeded!", Project.MSG_VERBOSE);\r
+ } else {\r
// \r
// command execution fail\r
//\r
- System.out.println("gencrc32section failed. (error=" + \r
- Integer.toHexString(revl) + \r
- ")"\r
- );\r
+ log("ERROR = " + Integer.toHexString(revl));\r
}\r
} catch (Exception e) {\r
throw new BuildException(e.getMessage());\r
- }\r
- \r
+ } \r
}\r
\r
/**\r
//\r
// Set debug log information.\r
//\r
- EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline\r
- .getCommandline()));\r
-\r
+ EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));\r
+ EdkLog.log(EdkLog.EDK_INFO, (new File(scriptFile)).getName());\r
revl = runner.execute();\r
\r
if (EFI_SUCCESS == revl) {\r
//\r
// command execution success\r
//\r
- EdkLog.log(EdkLog.EDK_INFO, "GenCapsuleHdr succeeded!");\r
+ EdkLog.log(EdkLog.EDK_VERBOSE, "GenCapsuleHdr succeeded!");\r
} else {\r
//\r
// command execution fail\r
//\r
- EdkLog.log(EdkLog.EDK_ERROR, "GenCapsuleHdr failed. (error="\r
- + Integer.toHexString(revl) + ")");\r
- throw new BuildException("GenCapsuleHdr failed. (error="\r
- + Integer.toHexString(revl) + ")");\r
-\r
+ EdkLog.log(EdkLog.EDK_ERROR, "ERROR = " + Integer.toHexString(revl));\r
+ throw new BuildException("GenCapsuleHdr failed!");\r
}\r
} catch (Exception e) {\r
throw new BuildException(e.getMessage());\r
\r
**/\r
package org.tianocore.framework.tasks;\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
/// input pre-processed dependency text files name\r
///\r
private String inputFile = "";\r
+ private String inputFileName = "";\r
///\r
/// padding integer value\r
///\r
runner.setAntRun(project);\r
runner.setCommandline(commandLine.getCommandline());\r
\r
- System.out.println(Commandline.toString(commandLine\r
- .getCommandline()));\r
-\r
+ log(Commandline.toString(commandLine.getCommandline()), Project.MSG_VERBOSE);\r
+ log(inputFileName);\r
returnVal = runner.execute();\r
if (EFI_SUCCESS == returnVal) {\r
- //\r
- // command execution success\r
- //\r
- System.out.println("GenDepex execute succeeded!");\r
-\r
+ log("GenDepex succeeded!", Project.MSG_VERBOSE);\r
} else {\r
//\r
// command execution fail\r
//\r
- System.out.println("GenDepex failed. (error="\r
- + Integer.toHexString(returnVal) + ")");\r
- throw new BuildException("GenDepex failed. (error="\r
- + Integer.toHexString(returnVal) + ")");\r
+ log("ERROR = " + Integer.toHexString(returnVal));\r
+ throw new BuildException("GenDepex failed!");\r
}\r
} catch (Exception e) {\r
throw new BuildException(e.getMessage());\r
@param inputFileName name of inputFile\r
**/\r
public void setInputFile(String inputFileName) {\r
+ this.inputFileName = (new File(inputFileName)).getName();\r
this.inputFile = " -I " + inputFileName;\r
}\r
\r
\r
}\r
\r
- ffsFile = new File (outputPath + this.ffsFileGuid + '-' + this.baseName + ffsSuffix); \r
- System.out.print("General Ffs file: file name is:\n");\r
- System.out.print(outputPath + this.ffsFileGuid + '-' + this.baseName + ffsSuffix);\r
- System.out.print("\n");\r
- \r
+ String ffsFilePath = outputPath + this.ffsFileGuid + '-' + this.baseName + ffsSuffix;\r
+ ffsFile = new File (ffsFilePath); \r
//\r
// Create ffs ORG file. fileName = FfsFileGuid + BaseName + ffsSuffix +\r
// ".org".\r
//\r
- ffsOrgFile = new File(outputPath + this.ffsFileGuid + '-' + this.baseName + ffsSuffix + ".org");\r
+ ffsOrgFile = new File(ffsFilePath + ".org");\r
\r
+ log(ffsFile.getName());\r
+ log(ffsOrgFile.getName());\r
try {\r
//\r
// Create file output stream -- dataBuffer.\r
//\r
ffsBuffer.close();\r
orgFfsBuffer.close();\r
- System.out.print ("Successful create ffs file!\n");\r
} catch (Exception e) {\r
+ log("genffsfile failed!");\r
throw new BuildException (e.getMessage());\r
}\r
} \r
ProcessBuilder pb = new ProcessBuilder(argList);\r
pb.directory(new File(outputDir));\r
int exitCode = 0;\r
+ log((new File(this.infFile)).getName());\r
try {\r
Process cmdProc = pb.start();\r
InputStreamReader cmdOut = new InputStreamReader(cmdProc.getInputStream());\r
exitCode = cmdProc.waitFor();\r
if (exitCode != 0) {\r
int len = cmdOut.read(buf, 0, 1024);\r
- log(new String(buf, 0, len), Project.MSG_ERR);\r
+ log(new String(buf, 0, len));\r
} else {\r
- log("GenFvImage - DONE!", Project.MSG_VERBOSE);\r
+ log("GenFvImage succeeded!", Project.MSG_VERBOSE);\r
}\r
} catch (Exception e) {\r
throw new BuildException(e.getMessage());\r
\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
-import org.apache.tools.ant.BuildException;\r
import org.apache.tools.ant.taskdefs.Execute;\r
import org.apache.tools.ant.taskdefs.LogStreamHandler;\r
import org.apache.tools.ant.types.Commandline;\r
///\r
private String inputFile = "";\r
///\r
+ /// \r
+ /// \r
+ private String inputFileName = "";\r
+ ///\r
/// outputfile name\r
///\r
private String outputFile = "";\r
\r
runner.setAntRun(project);\r
runner.setCommandline(cmdline.getCommandline());\r
- System.out.println(Commandline.toString(cmdline.getCommandline()));\r
\r
+ log(inputFileName);\r
+ log(Commandline.toString(cmdline.getCommandline()), Project.MSG_VERBOSE);\r
revl = runner.execute();\r
if (EFI_SUCCESS == revl) {\r
- //\r
- // command execution success\r
- //\r
- System.out.println("gensection succeeded!");\r
+ log("gensection succeeded!", Project.MSG_VERBOSE);\r
} else {\r
//\r
// command execution fail\r
//\r
- System.out.println("gensection failed. (error="\r
- + Integer.toHexString(revl) + ")");\r
- throw new BuildException("gensection failed. (error="\r
- + Integer.toHexString(revl) + ")");\r
+ log("ERROR = " + Integer.toHexString(revl));\r
+ throw new BuildException("gensection failed!");\r
}\r
} catch (Exception e) {\r
throw new BuildException(e.getMessage());\r
@param inputFile name of input file\r
**/\r
public void setInputFile(String inputFile) {\r
+ this.inputFileName = (new File(inputFile)).getName();\r
this.inputFile = " -i " + inputFile;\r
}\r
\r
//\r
// Set debug log information.\r
//\r
- EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline\r
- .getCommandline()));\r
+ EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));\r
+ EdkLog.log(EdkLog.EDK_INFO, (new File(this.inputFile)).getName());\r
\r
revl = runner.execute();\r
\r
//\r
// command execution success\r
//\r
- EdkLog.log(EdkLog.EDK_INFO, "GenTeImage succeeded!");\r
+ EdkLog.log(EdkLog.EDK_VERBOSE, "GenTeImage succeeded!");\r
} else {\r
//\r
// command execution fail\r
//\r
- EdkLog.log(EdkLog.EDK_ERROR, "GenTeImage failed. (error="\r
- + Integer.toHexString(revl) + ")");\r
- throw new BuildException("GenTeImage failed. (error="\r
- + Integer.toHexString(revl) + ")");\r
-\r
+ EdkLog.log(EdkLog.EDK_INFO, "ERROR = "+ Integer.toHexString(revl));\r
+ throw new BuildException("GenTeImage failed!");\r
}\r
} catch (Exception e) {\r
throw new BuildException(e.getMessage());\r
printGuiDef + \r
printAllGuid; \r
try {\r
- System.out.println(command + " " + argument);\r
+ log(command + " " + argument, Project.MSG_VERBOSE);\r
//\r
// execute command line \r
//\r
else {\r
BufferedReader bin = new BufferedReader(new InputStreamReader(proc.getInputStream()));\r
String line = bin.readLine();\r
- System.out.println(line);\r
while (line != null ){\r
- System.out.print(line);\r
line = bin.readLine();\r
} \r
} \r
- System.out.println("GuidChkTask Success!");\r
+ log("GuidChkTask Succeeded!", Project.MSG_VERBOSE);\r
} catch (Exception e) {\r
- System.out.println("GuidChkTask failed!");\r
- System.out.println(e.getMessage());\r
- \r
+ throw new BuildException("GuidChkTask failed!");\r
}\r
}\r
/**\r
import org.apache.tools.ant.taskdefs.LogStreamHandler;\r
import org.apache.tools.ant.types.Commandline;\r
import org.apache.tools.ant.types.Path;\r
+import org.tianocore.logger.EdkLog;\r
\r
/**\r
Class MakeDeps is used to wrap MakeDeps.exe as an ANT task.\r
\r
Project prj = this.getOwningTarget().getProject();\r
String toolPath = prj.getProperty("env.FRAMEWORK_TOOLS_PATH");\r
+ FrameworkLogger logger = new FrameworkLogger(prj, "makedeps");\r
+ EdkLog.setLogLevel(prj.getProperty("env.LOGLEVEL"));\r
+ EdkLog.setLogger(logger);\r
+\r
///\r
/// compose full tool path\r
///\r
Iterator iterator = inputFileList.iterator();\r
while (iterator.hasNext()) {\r
Input inputFile = (Input)iterator.next();\r
+ String inputFileString = cleanupPathName(inputFile.getFile());\r
args.append(" -f ");\r
- args.append(cleanupPathName(inputFile.getFile()));\r
+ args.append(inputFileString);\r
}\r
\r
///\r
runner.setAntRun(prj);\r
runner.setCommandline(cmd.getCommandline());\r
\r
+ EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmd.getCommandline()));\r
+ EdkLog.log(EdkLog.EDK_INFO, " ");\r
+\r
int result = 0;\r
try {\r
result = runner.execute();\r
}\r
\r
if (result != 0) {\r
- log ("MakeDeps failed");\r
+ EdkLog.log(EdkLog.EDK_INFO, "MakeDeps failed!");\r
return;\r
}\r
\r
//\r
// Set debug log information.\r
//\r
- EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline\r
- .getCommandline()));\r
-\r
+ EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));\r
+ EdkLog.log(EdkLog.EDK_INFO, (new File(this.inputFVInfFileName)).getName());\r
revl = runner.execute();\r
\r
if (EFI_SUCCESS == revl) {\r
//\r
// command execution success\r
//\r
- EdkLog.log(EdkLog.EDK_INFO, "ModifyInfTask succeeded!");\r
+ EdkLog.log(EdkLog.EDK_VERBOSE, "ModifyInfTask succeeded!");\r
} else {\r
//\r
// command execution fail\r
//\r
- EdkLog.log(EdkLog.EDK_ERROR, "ModifyInfTask failed. (error="\r
- + Integer.toHexString(revl) + ")");\r
- throw new BuildException("ModifyInfTask failed. (error="\r
- + Integer.toHexString(revl) + ")");\r
-\r
+ EdkLog.log(EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));\r
+ throw new BuildException("ModifyInfTask failed!");\r
}\r
} catch (Exception e) {\r
throw new BuildException(e.getMessage());\r
// / Input file\r
// /\r
private String inputFile = "";\r
-\r
+ private String inputFileName = "";\r
// /\r
// / Output file\r
// /\r
//\r
// Set debug log information.\r
//\r
- EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline.getCommandline()));\r
+ EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));\r
+ EdkLog.log(EdkLog.EDK_INFO, this.inputFileName);\r
\r
revl = runner.execute();\r
\r
//\r
// command execution success\r
//\r
- EdkLog.log(EdkLog.EDK_INFO,"PeiBase succeeded!");\r
+ EdkLog.log(EdkLog.EDK_VERBOSE, "PeiReBase succeeded!");\r
} else {\r
//\r
// command execution fail\r
//\r
- EdkLog.log(EdkLog.EDK_ERROR, "PeiBase failed. (error="\r
- + Integer.toHexString(revl) + ")");\r
- throw new BuildException("PeiBase failed. (error="\r
- + Integer.toHexString(revl) + ")");\r
-\r
+ EdkLog.log(EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));\r
+ throw new BuildException("PeiReBase failed!");\r
}\r
} catch (Exception e) {\r
throw new BuildException(e.getMessage());\r
* string of input file name.\r
*/\r
public void setInputFile(String inputFile) {\r
+ this.inputFileName = (new File(inputFile)).getName();\r
this.inputFile = "-I " + inputFile;\r
}\r
\r
//\r
// Set debug log information.\r
//\r
- EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline.getCommandline()));\r
+ EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));\r
+ EdkLog.log(EdkLog.EDK_INFO, (new File(this.fvInputFile)).getName());\r
\r
revl = runner.execute();\r
\r
//\r
// command execution success\r
//\r
- EdkLog.log(EdkLog.EDK_INFO,"SecApResetVectorFixup succeeded!");\r
+ EdkLog.log(EdkLog.EDK_VERBOSE, "SecApResetVectorFixup succeeded!");\r
} else {\r
//\r
// command execution fail\r
//\r
- EdkLog.log(EdkLog.EDK_ERROR, "SecApResetVectorFixup failed. (error="\r
- + Integer.toHexString(revl) + ")");\r
- throw new BuildException("SecApResetVectorFixup failed. (error="\r
- + Integer.toHexString(revl) + ")");\r
-\r
+ EdkLog.log(EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));\r
+ throw new BuildException("SecApResetVectorFixup failed!");\r
}\r
} catch (Exception e) {\r
throw new BuildException(e.getMessage());\r
//\r
// Set debug log information.\r
//\r
- EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline\r
- .getCommandline()));\r
+ EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));\r
\r
revl = runner.execute();\r
\r
//\r
// command execution success\r
//\r
- EdkLog.log(EdkLog.EDK_INFO, "SecFixup succeeded!");\r
+ EdkLog.log(EdkLog.EDK_VERBOSE, "SecFixup succeeded!");\r
} else {\r
//\r
// command execution fail\r
//\r
- EdkLog.log(EdkLog.EDK_ERROR, "SecFixup failed. (error="\r
- + Integer.toHexString(revl) + ")");\r
- throw new BuildException("SecFixup failed. (error="\r
- + Integer.toHexString(revl) + ")");\r
-\r
+ EdkLog.log(EdkLog.EDK_INFO, "ERROR = "+ Integer.toHexString(revl));\r
+ throw new BuildException("SecFixup failed!");\r
}\r
} catch (Exception e) {\r
throw new BuildException(e.getMessage());\r
**/\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
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
runner.setAntRun(project);\r
runner.setCommandline(cmdline.getCommandline());\r
\r
- EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline.getCommandline()));\r
+ EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));\r
+ EdkLog.log(EdkLog.EDK_INFO, (new File(this.inputFile)).getName());\r
revl = runner.execute();\r
if (EFI_SUCCESS == revl) {\r
//\r
// command execution success\r
//\r
- EdkLog.log(EdkLog.EDK_INFO, "splitfile succeeded!");\r
+ EdkLog.log(EdkLog.EDK_VERBOSE, "splitfile succeeded!");\r
} else {\r
//\r
// command execution fail\r
//\r
- EdkLog.log(EdkLog.EDK_ERROR, "splitfile failed. (error="\r
- + Integer.toHexString(revl) + ")");\r
- throw new BuildException("splitfile failed. (error="\r
- + Integer.toHexString(revl) + ")");\r
-\r
+ EdkLog.log(EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));\r
+ throw new BuildException("splitfile failed!");\r
}\r
} catch (Exception e) {\r
throw new BuildException(e.getMessage());\r
\r
runner.setAntRun(project);\r
runner.setCommandline(cmdline.getCommandline());\r
- System.out.println(Commandline.toString(cmdline.getCommandline()));\r
\r
+ log(Commandline.toString(cmdline.getCommandline()), Project.MSG_VERBOSE);\r
+ log(this.commandType.substring(2));\r
revl = runner.execute();\r
if (EFI_SUCCESS == revl) {\r
- ///\r
- /// command execution success\r
- ///\r
- System.out.println("strgather succeeded!");\r
+ log("strgather succeeded!", Project.MSG_VERBOSE);\r
} else {\r
///\r
/// command execution fail\r
///\r
- System.out.println("strgather failed. (error="\r
- + Integer.toHexString(revl) + ")");\r
- throw new BuildException("strgather failed. (error="\r
- + Integer.toHexString(revl) + ")");\r
+ log("ERROR = " + Integer.toHexString(revl));\r
+ throw new BuildException("strgather failed!");\r
}\r
} catch (Exception e) {\r
throw new BuildException(e.getMessage());\r
//\r
// Set debug log information.\r
//\r
- EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline.getCommandline()));\r
+ EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));\r
+ EdkLog.log(EdkLog.EDK_INFO, (new File(this.inputFile)).getName());\r
\r
revl = runner.execute();\r
\r
//\r
// command execution success\r
//\r
- EdkLog.log(EdkLog.EDK_INFO,"Strip succeeded!");\r
+ EdkLog.log(EdkLog.EDK_VERBOSE, "Strip succeeded!");\r
} else {\r
//\r
// command execution fail\r
//\r
- EdkLog.log(EdkLog.EDK_ERROR, "Strip failed. (error="\r
- + Integer.toHexString(revl) + ")");\r
- throw new BuildException("Strip failed. (error="\r
- + Integer.toHexString(revl) + ")");\r
-\r
+ EdkLog.log(EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));\r
+ throw new BuildException("Strip failed!");\r
}\r
} catch (Exception e) {\r
throw new BuildException(e.getMessage());\r
**/\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
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
@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
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
//\r
// Set debug log information.\r
//\r
- EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline.getCommandline()));\r
- \r
+ EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));\r
+ EdkLog.log(EdkLog.EDK_INFO, (new File(this.peFile)).getName());\r
+\r
revl = runner.execute();\r
\r
if (EFI_SUCCESS == revl) {\r
//\r
// command execution success\r
//\r
- EdkLog.log(EdkLog.EDK_INFO,"ZeroDebug succeeded!");\r
+ EdkLog.log(EdkLog.EDK_VERBOSE, "ZeroDebugData succeeded!");\r
} else {\r
//\r
// command execution fail\r
//\r
- EdkLog.log(EdkLog.EDK_ERROR, "ZeroDebug failed. (error="\r
- + Integer.toHexString(revl) + ")");\r
- throw new BuildException("ZeroDebug failed. (error="\r
- + Integer.toHexString(revl) + ")");\r
+ EdkLog.log(EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));\r
+ throw new BuildException("ZeroDebugData failed!");\r
\r
}\r
} catch (Exception e) {\r
Output_Flag = FALSE;\r
Pad_Flag = FALSE;\r
\r
- //\r
- // Output the calling arguments\r
- //\r
- printf ("\n\n");\r
- for (Index = 0; Index < argc; Index++) {\r
- printf ("%s ", argv[Index]);\r
- }\r
-\r
- printf ("\n\n");\r
-\r
if (argc < 5) {\r
printf ("Not enough arguments\n");\r
PrintGenDepexUsageInfo ();\r