diff --git a/Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/CreateMtFileTask.java b/Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/CreateMtFileTask.java
index 672e712b3e..bdc492c0dc 100644
--- a/Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/CreateMtFileTask.java
+++ b/Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/CreateMtFileTask.java
@@ -33,33 +33,33 @@ import org.tianocore.common.logger.EdkLog;
CreateMtFileTask is used to call CreateMtFile.exe to create MT file.
**/
public class CreateMtFileTask extends Task implements EfiDefine {
- ///
- /// Tool name
- ///
- private String toolName="CreateMtFile";
- ///
- /// file size
- ///
- private String fileSize = "";
+ //
+ // Tool name
+ //
+ private String toolName = "CreateMtFile";
+ //
+ // file size
+ //
+ private ToolArg fileSize = new ToolArg();
- ///
- /// output file
- ///
- private String outputFile = "";
+ //
+ // output file
+ //
+ private FileArg outputFile = new FileArg();
- ///
- /// output directory, this variable is added by jave wrap
- ///
- private String outputDir = "";
+ //
+ // output directory, this variable is added by jave wrap
+ //
+ private String outputDir = ".";
/**
- * execute
- *
- * StripTask execute function is to assemble tool command line & execute
- * tool command line
- *
- * @throws BuidException
- */
+ execute
+
+ StripTask execute function is to assemble tool command line & execute
+ tool command line
+
+ @throws BuidException
+ **/
public void execute() throws BuildException {
Project project = this.getOwningTarget().getProject();
@@ -73,18 +73,12 @@ public class CreateMtFileTask extends Task implements EfiDefine {
if (path == null) {
command = toolName;
} else {
- command = path + File.separatorChar + toolName;
+ command = path + File.separator + toolName;
}
//
// argument of tools
//
- File file = new File(outputFile);
- if (!file.isAbsolute() && (!this.outputDir.equalsIgnoreCase(""))) {
- argument = outputDir + File.separatorChar + outputFile + " " + this.fileSize;
-
- } else {
- argument = outputFile + " " + this.fileSize;
- }
+ argument = "" + outputFile + fileSize;
//
// return value of fwimage execution
//
@@ -101,24 +95,26 @@ public class CreateMtFileTask extends Task implements EfiDefine {
runner.setAntRun(project);
runner.setCommandline(cmdline.getCommandline());
+ runner.setWorkingDirectory(new File(outputDir));
+
//
// Set debug log information.
//
EdkLog.log(this, EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
- EdkLog.log(this, EdkLog.EDK_INFO, (new File(this.outputFile)).getName());
- revl = runner.execute();
+ EdkLog.log(this, EdkLog.EDK_INFO, this.outputFile.toFileList());
+ revl = runner.execute();
if (EFI_SUCCESS == revl) {
//
// command execution success
//
- EdkLog.log(this, EdkLog.EDK_VERBOSE, "CreateMtFile succeeded!");
+ EdkLog.log(this, EdkLog.EDK_VERBOSE, toolName + " succeeded!");
} else {
//
// command execution fail
//
EdkLog.log(this, EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));
- throw new BuildException("CreateMtFile failed!");
+ throw new BuildException(toolName + " failed!");
}
} catch (Exception e) {
throw new BuildException(e.getMessage());
@@ -126,70 +122,70 @@ public class CreateMtFileTask extends Task implements EfiDefine {
}
/**
- * getFileSize
- *
- * This function is to get class member "fileSize".
- *
- * @return fileSize string of file size.
- */
+ getFileSize
+
+ This function is to get class member "fileSize".
+
+ @return fileSize string of file size.
+ **/
public String getFileSize() {
- return this.fileSize;
+ return this.fileSize.getValue();
}
/**
- * setFileSize
- *
- * This function is to set class member "fileSize".
- *
- * @param fileSize
- * string of file size value.
- */
+ setFileSize
+
+ This function is to set class member "fileSize".
+
+ @param fileSize
+ string of file size value.
+ **/
public void setFileSize(String fileSize) {
- this.fileSize = fileSize;
+ this.fileSize.setArg(" ", fileSize);
}
/**
- * getOutputFile
- *
- * This function is to get class member "outputFile"
- *
- * @return outputFile string of output file name.
- */
+ getOutputFile
+
+ This function is to get class member "outputFile"
+
+ @return outputFile string of output file name.
+ **/
public String getOutputFile() {
- return outputFile;
+ return outputFile.getValue();
}
/**
- * setOutputFile
- *
- * This function is to set class member "outputFile"
- *
- * @param outputFile
- * string of output file name.
- */
+ setOutputFile
+
+ This function is to set class member "outputFile"
+
+ @param outputFile
+ string of output file name.
+ **/
public void setOutputFile(String outputFile) {
- this.outputFile = outputFile;
+ this.outputFile.setArg(" ", outputFile);
}
/**
- * getOutputDir
- *
- * This function is to get class member "outputDir"
- *
- * @return outputDir string of output directory.
- */
+ getOutputDir
+
+ This function is to get class member "outputDir"
+
+ @return outputDir string of output directory.
+ **/
public String getOutputDir() {
return outputDir;
}
/**
- * setOutputDir
- *
- * This function is to set class member "outputDir"
- *
- * @param outputDir
- * string of output directory.
- */
+ setOutputDir
+
+ This function is to set class member "outputDir"
+
+ @param outputDir
+ string of output directory.
+ **/
public void setOutputDir(String outputDir) {
this.outputDir = outputDir;
}
diff --git a/Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/EfiCompressTask.java b/Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/EfiCompressTask.java
index 0f82002bb5..1ffd61f015 100644
--- a/Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/EfiCompressTask.java
+++ b/Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/EfiCompressTask.java
@@ -33,29 +33,33 @@ import org.tianocore.common.logger.EdkLog;
EfiCompressTask is used to call EfiCompress.exe to strip input file.
**/
public class EfiCompressTask extends Task implements EfiDefine {
- // /
- // / input file
- // /
- private String inputFile = "";
+ //
+ //
+ //
+ private final static String toolName = "EfiCompress";
+ //
+ // input file
+ //
+ private FileArg inputFile = new FileArg();
- // /
- // / output file
- // /
- private String outputFile = "";
+ //
+ // output file
+ //
+ private FileArg outputFile = new FileArg();
- // /
- // / output directory, this variable is added by jave wrap
- // /
- private String outputDir = "";
+ //
+ // output directory, this variable is added by jave wrap
+ //
+ private String outputDir = ".";
/**
- * execute
- *
- * EfiCompressTask execute function is to assemble tool command line & execute
- * tool command line
- *
- * @throws BuidException
- */
+ execute
+
+ EfiCompressTask execute function is to assemble tool command line & execute
+ tool command line
+
+ @throws BuidException
+ **/
public void execute() throws BuildException {
Project project = this.getOwningTarget().getProject();
@@ -67,20 +71,14 @@ public class EfiCompressTask extends Task implements EfiDefine {
String command;
String argument;
if (path == null) {
- command = "EfiCompress";
+ command = toolName;
} else {
- command = path + File.separatorChar + "EfiCompress";
+ command = path + File.separator + toolName;
}
//
// argument of tools
//
- File file = new File(outputFile);
- if (!file.isAbsolute() && (!this.outputDir.equalsIgnoreCase(""))) {
- argument = inputFile + " " + outputDir + File.separatorChar
- + outputFile;
- } else {
- argument = inputFile + " " + outputFile;
- }
+ argument = "" + inputFile + outputFile;
//
// return value of fwimage execution
//
@@ -97,25 +95,27 @@ public class EfiCompressTask extends Task implements EfiDefine {
runner.setAntRun(project);
runner.setCommandline(cmdline.getCommandline());
+ runner.setWorkingDirectory(new File(outputDir));
+
//
// Set debug log information.
//
EdkLog.log(this, EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
- EdkLog.log(this, EdkLog.EDK_INFO, (new File(this.inputFile)).getName());
+ EdkLog.log(this, EdkLog.EDK_INFO, this.inputFile.toFileList() + " => "
+ + this.outputFile.toFileList());
revl = runner.execute();
-
if (EFI_SUCCESS == revl) {
//
// command execution success
//
- EdkLog.log(this, EdkLog.EDK_VERBOSE, "EfiCompress succeeded!");
+ EdkLog.log(this, EdkLog.EDK_VERBOSE, toolName + " succeeded!");
} else {
//
// command execution fail
//
EdkLog.log(this, EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));
- throw new BuildException("EfiCompress failed!");
+ throw new BuildException(toolName + " failed!");
}
} catch (Exception e) {
@@ -124,70 +124,70 @@ public class EfiCompressTask extends Task implements EfiDefine {
}
/**
- * getInputFile
- *
- * This function is to get class member "inputFile".
- *
- * @return string of input file name.
- */
+ getInputFile
+
+ This function is to get class member "inputFile".
+
+ @return string of input file name.
+ **/
public String getInputFile() {
- return inputFile;
+ return inputFile.getValue();
}
/**
- * setComponentType
- *
- * This function is to set class member "inputFile".
- *
- * @param inputFile
- * string of input file name.
- */
+ setComponentType
+
+ This function is to set class member "inputFile".
+
+ @param inputFile
+ string of input file name.
+ **/
public void setInputFile(String inputFile) {
- this.inputFile = inputFile;
+ this.inputFile.setArg(" ", inputFile);
}
/**
- * getOutputFile
- *
- * This function is to get class member "outputFile"
- *
- * @return outputFile string of output file name.
- */
+ getOutputFile
+
+ This function is to get class member "outputFile"
+
+ @return outputFile string of output file name.
+ **/
public String getOutputFile() {
- return outputFile;
+ return outputFile.getValue();
}
/**
- * setOutputFile
- *
- * This function is to set class member "outputFile"
- *
- * @param outputFile
- * string of output file name.
- */
+ setOutputFile
+
+ This function is to set class member "outputFile"
+
+ @param outputFile
+ string of output file name.
+ **/
public void setOutputFile(String outputFile) {
- this.outputFile = outputFile;
+ this.outputFile.setArg(" ", outputFile);
}
/**
- * getOutputDir
- *
- * This function is to get class member "outputDir"
- *
- * @return outputDir string of output directory.
- */
+ getOutputDir
+
+ This function is to get class member "outputDir"
+
+ @return outputDir string of output directory.
+ **/
public String getOutputDir() {
return outputDir;
}
/**
- * setOutputDir
- *
- * This function is to set class member "outputDir"
- *
- * @param outputDir
- * string of output directory.
- */
+ setOutputDir
+
+ This function is to set class member "outputDir"
+
+ @param outputDir
+ string of output directory.
+ **/
public void setOutputDir(String outputDir) {
this.outputDir = outputDir;
}
diff --git a/Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/EfiRomTask.java b/Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/EfiRomTask.java
index 7eb987854a..caa77477ad 100644
--- a/Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/EfiRomTask.java
+++ b/Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/EfiRomTask.java
@@ -23,92 +23,95 @@ import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
-import org.apache.tools.ant.Task;
-import org.apache.tools.ant.Project;
import org.apache.tools.ant.BuildException;
-
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
import org.tianocore.common.logger.EdkLog;
+import org.apache.tools.ant.taskdefs.Execute;
+import org.apache.tools.ant.taskdefs.LogStreamHandler;
+import org.apache.tools.ant.types.Commandline;
+
+import com.sun.org.apache.bcel.internal.generic.NEW;
/**
- * SecFixupTask class.
- *
- * SecFixupTask is used to call SecFixup.exe to fix up sec image.
- */
+ SecFixupTask class.
+
+ SecFixupTask is used to call SecFixup.exe to fix up sec image.
+ **/
public class EfiRomTask extends Task implements EfiDefine {
- ///
- /// tool name
- ///
- private final String toolName = "EfiRom";
+ //
+ // tool name
+ //
+ private final static String toolName = "EfiRom";
- ///
- /// Flash default file
- ///
- private String verbose = "";
+ //
+ // Flash default file
+ //
+ private ToolArg verbose = new ToolArg();
- ///
- /// Flash device
- ///
- private String venderId = "";
+ //
+ // Flash device
+ //
+ private ToolArg venderId = new ToolArg();
- ///
- /// Flash device Image
- ///
- private String deviceId = "";
+ //
+ // Flash device Image
+ //
+ private ToolArg deviceId = new ToolArg();
- ///
- /// MCI file
- ///
- private String outputFile = "";
+ //
+ // output file
+ //
+ private FileArg outputFile = new FileArg();
- ///
- /// MCO file
- ///
- private List binaryFileList = new ArrayList();
+ //
+ // binary file
+ //
+ private Input binaryFileList = new Input();
- ///
- /// Efi PE32 image file
- ///
- private List pe32FileList = new ArrayList();
+ //
+ // Efi PE32 image file
+ //
+ private Input pe32FileList = new Input();
- ///
- /// Compress efi PE32 image file
- ///
- private List pe32ComprFileList = new ArrayList();
+ //
+ // Compress efi PE32 image file
+ //
+ private Input pe32ComprFileList = new Input();
- ///
- /// Hex class code in the PCI data strutor header
- ///
- private String classCode = "";
+ //
+ // Hex class code in the PCI data strutor header
+ //
+ private ToolArg classCode = new ToolArg();
- ///
- /// Hex revision in the PCI data header.
- ///
- private String revision = "";
+ //
+ // Hex revision in the PCI data header.
+ //
+ private ToolArg revision = new ToolArg();
- ///
- /// Dump the headers of an existing option rom image.
- ///
- private String dump = "";
+ //
+ // Dump the headers of an existing option rom image.
+ //
+ private ToolArg dump = new ToolArg();
-
- ///
- /// output directory
- ///
+ //
+ // output directory
+ //
private String outputDir = ".";
-
- ///
- /// command and argument list
- ///
+ //
+ // command and argument list
+ //
LinkedList argList = new LinkedList();
+
/**
- * execute
- *
- * EfiRomTask execute function is to assemble tool command line & execute
- * tool command line
- *
- * @throws BuidException
- */
+ execute
+
+ EfiRomTask execute function is to assemble tool command line & execute
+ tool command line
+
+ @throws BuidException
+ **/
public void execute() throws BuildException {
Project project = this.getOwningTarget().getProject();
@@ -121,294 +124,259 @@ public class EfiRomTask extends Task implements EfiDefine {
if (path == null) {
command = toolName;
} else {
- command = path + File.separatorChar + toolName;
- }
- argList.addFirst(command);
-
- //
- // add microcode binary files
- //
- if (this.binaryFileList.size() > 0){
- argList.add("-b");
- Iterator binList = this.binaryFileList.iterator();
- while (binList.hasNext()){
- argList.addAll(((Input)binList.next()).getNameList());
- }
+ command = path + File.separator + toolName;
}
- //
- // add pe32 file
- //
- if (this.pe32FileList.size() > 0){
- argList.add("-e");
- Iterator pe32List = this.pe32FileList.iterator();
- while (pe32List.hasNext()){
- argList.addAll(((Input)pe32List.next()).getNameList());
- }
- }
+ String argument = "" + verbose + venderId + deviceId + dump + revision + classCode
+ + binaryFileList.toStringWithSinglepPrefix(" -b ")
+ + pe32FileList.toStringWithSinglepPrefix(" -e ")
+ + pe32ComprFileList.toStringWithSinglepPrefix(" -ec ")
+ + outputFile;
- //
- // add compressed pe32 file
- //
- if (this.pe32ComprFileList.size() > 0){
- argList.add("-ec");
- Iterator pe32ComprList = this.pe32ComprFileList.iterator();
- while (pe32ComprList.hasNext()){
- argList.addAll(((Input)pe32ComprList.next()).getNameList());
- }
- }
-
- EdkLog.log(this, EdkLog.EDK_VERBOSE, argList.toString().replaceAll(",",""));
- EdkLog.log(this, EdkLog.EDK_INFO, " ");
-
- //
- // lauch the program
- //
- ProcessBuilder pb = new ProcessBuilder(argList);
- pb.directory(new File(outputDir));
- int exitCode = 0;
try {
- Process cmdProc = pb.start();
- InputStreamReader cmdOut = new InputStreamReader(cmdProc.getInputStream());
- char[] buf = new char[1024];
+ Commandline cmdline = new Commandline();
+ cmdline.setExecutable(command);
+ cmdline.createArgument().setLine(argument);
- exitCode = cmdProc.waitFor();
+ LogStreamHandler streamHandler = new LogStreamHandler(this,
+ Project.MSG_INFO, Project.MSG_WARN);
+ Execute runner = new Execute(streamHandler, null);
+
+ runner.setAntRun(project);
+ runner.setCommandline(cmdline.getCommandline());
+ runner.setWorkingDirectory(new File(outputDir));
+
+ EdkLog.log(this, EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
+ EdkLog.log(this, EdkLog.EDK_INFO, binaryFileList.toFileList()
+ + pe32FileList.toFileList() + pe32ComprFileList.toFileList()
+ + " => " + outputFile.toFileList());
+
+ int exitCode = runner.execute();
if (exitCode != 0) {
- int len = cmdOut.read(buf, 0, 1024);
- EdkLog.log(EdkLog.EDK_INFO, new String(buf, 0, len));
+ //
+ // command execution fail
+ //
+ EdkLog.log(this, "ERROR = " + Integer.toHexString(exitCode));
+ throw new BuildException(toolName + " failed!");
} else {
- EdkLog.log(EdkLog.EDK_VERBOSE, "EfiRom succeeded!");
+ EdkLog.log(this, EdkLog.EDK_VERBOSE, toolName + " succeeded!");
}
} catch (Exception e) {
throw new BuildException(e.getMessage());
- } finally {
- if (exitCode != 0) {
- throw new BuildException("EfiRom failed!");
- }
}
}
/**
- * getVerbose
- *
- * This function is to get class member "verbose"
- *
- * @return verbose for verbose output.
- */
+ getVerbose
+
+ This function is to get class member "verbose"
+
+ @return verbose for verbose output.
+ **/
public String getVerbose() {
- return verbose;
+ return verbose.getValue();
}
/**
- * setVerbose
- *
- * This function is to set class member "verbose"
- *
- * @param verbose for verbose output.
- */
+ setVerbose
+
+ This function is to set class member "verbose"
+
+ @param verbose for verbose output.
+ **/
public void setVerbose(boolean verbose) {
if (verbose){
- this.verbose = "-p";
- argList.add(this.verbose);
+ this.verbose.setArg(" -", "p");
}
}
/**
- * getVenderId
- *
- * This function is to get class member "venderId"
- *
- * @return venderId String of venderId.
- */
+ getVenderId
+
+ This function is to get class member "venderId"
+
+ @return venderId String of venderId.
+ **/
public String getVenderId() {
- return venderId;
+ return venderId.getValue();
}
/**
- * setVenderId
- *
- * This function is to set class member "venderId"
- *
- * @param venderId String of venderId.
- */
- public void setVenderId(String VenderId) {
- this.venderId = VenderId;
- argList.add("-v");
- argList.add(this.venderId);
+ setVenderId
+
+ This function is to set class member "venderId"
+
+ @param venderId String of venderId.
+ **/
+ public void setVenderId(String venderId) {
+ this.venderId.setArg(" -v ", venderId);
}
/**
- * getDeviceId
- *
- * This function is to get class member "deviceId"
- *
- * @return deviceId String of device ID.
- */
+ getDeviceId
+
+ This function is to get class member "deviceId"
+
+ @return deviceId String of device ID.
+ **/
public String getDeviceId() {
- return this.deviceId;
+ return this.deviceId.getValue();
}
/**
- * setDeviceId
- *
- * This function is to set class member "deviceId"
- *
- * @param deviceId String of device ID.
- */
+ setDeviceId
+
+ This function is to set class member "deviceId"
+
+ @param deviceId String of device ID.
+ **/
public void setDeviceId(String deviceId) {
- this.deviceId = deviceId;
- argList.add("-d");
- argList.add(this.deviceId);
+ this.deviceId.setArg(" -d ", deviceId);
}
/**
- * getOutputFile
- *
- * This function is to get class member "outputFile"
- *
- * @return outputFile name of output directory.
- */
+ getOutputFile
+
+ This function is to get class member "outputFile"
+
+ @return outputFile name of output directory.
+ **/
public String getOutputFile() {
- return outputFile;
+ return outputFile.getValue();
}
/**
- * setOutputFile
- *
- * This function is to set class member "dscFile"
- *
- * @param outputFile name of DSC file
- */
+ setOutputFile
+
+ This function is to set class member "dscFile"
+
+ @param outputFile name of DSC file
+ **/
public void setOutputFile(String outputFile) {
- this.outputFile = outputFile;
-
+ this.outputFile.setArg(" -o ", outputFile);
}
/**
- * getClassCode
- *
- * This function is to get class member "classCode"
- *
- * @return fdImage name of class code file.
- */
+ getClassCode
+
+ This function is to get class member "classCode"
+
+ @return fdImage name of class code file.
+ **/
public String getClassCode() {
- return classCode;
+ return classCode.getValue();
}
/**
- * setclassCode
- *
- * This function is to set class member "classCode"
- *
- * @param fdImage name of class code file.
- */
+ setclassCode
+
+ This function is to set class member "classCode"
+
+ @param fdImage name of class code file.
+ **/
public void setclassCode(String classCode) {
- this.classCode = classCode;
- argList.add("-cc");
- argList.add(this.classCode);
+ this.classCode.setArg(" -cc ", classCode);
}
/**
- * getRevision
- *
- * This function is to get class member "revision".
- *
- * @return revision hex revision in the PDI data header.
- */
+ getRevision
+
+ This function is to get class member "revision".
+
+ @return revision hex revision in the PDI data header.
+ **/
public String getRevision() {
- return revision;
+ return revision.getValue();
}
/**
- * setRevision
- *
- * This function is to set class member "revision"
- *
- * @param revision hex revision in the PDI data header.
- */
+ setRevision
+
+ This function is to set class member "revision"
+
+ @param revision hex revision in the PDI data header.
+ **/
public void setRevision(String revision) {
- this.revision = revision;
- argList.add("-rev");
- argList.add(this.revision);
+ this.revision.setArg(" -rev ", revision);
}
/**
- * getFlashDeviceImage
- *
- * This function is to get class member "dump"
- *
- * @return flashDeviceImage name of flash device image
- */
+ getFlashDeviceImage
+
+ This function is to get class member "dump"
+
+ @return flashDeviceImage name of flash device image
+ **/
public String getDump() {
- return dump;
+ return dump.getValue();
}
/**
- * setFlashDeviceImage
- *
- * This function is to set class member "dump"
- *
- * @param flashDeviceImage name of flash device image
- */
+ setFlashDeviceImage
+
+ This function is to set class member "dump"
+
+ @param flashDeviceImage name of flash device image
+ **/
public void setDump(boolean dump) {
- if (dump){
- this.dump = "-dump";
- argList.add(this.dump);
+ if (dump) {
+ this.dump.setArg(" -", "dump");
}
}
/**
- * getOutputDir
- *
- * This function is to get class member "outputDir"
- *
- * @return outputDir string of output directory
- */
+ getOutputDir
+
+ This function is to get class member "outputDir"
+
+ @return outputDir string of output directory
+ **/
public String getOutputDir() {
return outputDir;
}
/**
- * setOutputDir
- *
- * This function is to set class member "outputDir"
- *
- * @param outputDir string of output directory
- */
+ setOutputDir
+
+ This function is to set class member "outputDir"
+
+ @param outputDir string of output directory
+ **/
public void setOutputDir(String outputDir) {
this.outputDir = outputDir;
}
+
/**
- * addBinaryFile
- *
- * This function is to add binary file to binaryFile list.
- *
- * @param binaryFile name of binary file.
- */
- public void addBinaryFile(Input binaryFile){
- this.binaryFileList.add(binaryFile);
+ addBinaryFile
+
+ This function is to add binary file to binaryFile list.
+
+ @param binaryFile name of binary file.
+ **/
+ public void addConfiguredBinaryFile(Input binaryFile){
+ this.binaryFileList.insert(binaryFile);
}
/**
- * addPe32File
- *
- * This function is to add pe32 file to pe32File list.
- *
- * @param pe32File name of pe32 file.
- */
- public void addPe32File(Input pe32File){
- this.pe32FileList.add(pe32File);
+ addPe32File
+
+ This function is to add pe32 file to pe32File list.
+
+ @param pe32File name of pe32 file.
+ **/
+ public void addConfiguredPe32File(Input pe32File){
+ this.pe32FileList.insert(pe32File);
}
/**
- * addPe32ComprFile
- *
- * This function os to add compressed pe32 file to pe32ComprFile list.
- *
- * @param pe32ComprFile name of compressed pe32 file.
- */
- public void addPe32ComprFile(Input pe32ComprFile){
- this.pe32ComprFileList.add(pe32ComprFile);
+ addPe32ComprFile
+
+ This function os to add compressed pe32 file to pe32ComprFile list.
+
+ @param pe32ComprFile name of compressed pe32 file.
+ **/
+ public void addConfiguredPe32ComprFile(Input pe32ComprFile){
+ this.pe32ComprFileList.insert(pe32ComprFile);
}
}
diff --git a/Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/FileParser.java b/Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/FileParser.java
deleted file mode 100644
index cc48b71dab..0000000000
--- a/Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/FileParser.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/** @file
- FileParser class.
-
- FileParser class is to parse file which contains the list of file name and
- add those files to list.
-
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-package org.tianocore.framework.tasks;
-import java.io.*;
-import java.util.List;
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Project;
-
-/**
- FileParser class.
-
- FileParser class is to parse file which contains the list of file name and
- add those files to list.
-**/
-public class FileParser {
- /**
- loadFile
-
- This function is to add files to array from input file which contains the
- files list.
- @param project The current project.
- @param list File array.
- @param file File which contains the file list.
- @param tag Target of architecture.
- @throws BuildException
- **/
- public static synchronized void loadFile(Project project, List