git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1576
6f19259b-4bc3-4df7-8a09-
765794883524
private String toolName = "";\r
private ToolArg toolArgList = new ToolArg();\r
private Input inputFiles = new Input();\r
private String toolName = "";\r
private ToolArg toolArgList = new ToolArg();\r
private Input inputFiles = new Input();\r
+ private Input tempInputFile = new Input();\r
private String outputPath;\r
private File outputFile ;\r
private List<Section> gensectList = new ArrayList<Section>();\r
private String outputPath;\r
private File outputFile ;\r
private List<Section> gensectList = new ArrayList<Section>();\r
if (fs != null) {\r
fs.close();\r
}\r
if (fs != null) {\r
fs.close();\r
}\r
+ outputFile.delete(); \r
} catch (Exception e) {\r
EdkLog.log("WARNING: Cannot close " + outputFile.getPath());\r
}\r
} catch (Exception e) {\r
EdkLog.log("WARNING: Cannot close " + outputFile.getPath());\r
}\r
throw new BuildException ("GenSection failed at Tool!");\r
} \r
Do.close();\r
throw new BuildException ("GenSection failed at Tool!");\r
} \r
Do.close();\r
- this.inputFiles.insFile(outputFile.getPath()); \r
+ this.tempInputFile.insFile(outputFile.getPath());\r
} \r
} catch (IOException e){\r
throw new BuildException ("Gensection failed at tool!");\r
} \r
} catch (IOException e){\r
throw new BuildException ("Gensection failed at tool!");\r
try {\r
outputFile = File.createTempFile("temp", null, new File(outputPath));\r
argument = toolArgList + inputFiles.toStringWithSinglepPrefix(" -i ") \r
try {\r
outputFile = File.createTempFile("temp", null, new File(outputPath));\r
argument = toolArgList + inputFiles.toStringWithSinglepPrefix(" -i ") \r
- + " -o " + outputFile.getPath();\r
+ + tempInputFile.toString(" ")+ " -o " + outputFile.getPath();\r
EdkLog.log(this, EdkLog.EDK_VERBOSE, command + " " + argument);\r
///\r
/// execute command line\r
///\r
Process process = Runtime.getRuntime().exec(command + " " + argument);\r
process.waitFor();\r
EdkLog.log(this, EdkLog.EDK_VERBOSE, command + " " + argument);\r
///\r
/// execute command line\r
///\r
Process process = Runtime.getRuntime().exec(command + " " + argument);\r
process.waitFor();\r
+ Iterator tempFile = tempInputFile.getNameList().iterator();\r
+ while (tempFile.hasNext()){\r
+ File file = new File((String)tempFile.next());\r
+ if (file.exists()) {\r
+ file.delete();\r
+ }\r
+ }\r
} catch (Exception e) {\r
EdkLog.log(e.getMessage());\r
throw new BuildException("Execution of externalTool task failed!\n");\r
} catch (Exception e) {\r
EdkLog.log(e.getMessage());\r
throw new BuildException("Execution of externalTool task failed!\n");\r