* Runs the specified command passing all files of the collection
* on the command line - potentially adding an /out parameter.
*/
private void run(String executable, Collection s, File target,
File runInDir, Collection params, Commandline cmdl) {
DotNetExecTask exec = DotNetExecTask.getTask(this, vm,
executable, null);
if (runInDir != null) {
exec.setDir(runInDir);
}
exec.setFailonerror(true);
exec.setTaskType("wix");
exec.createArg().setValue("/nologo");
Iterator iter = s.iterator();
while (iter.hasNext()) {
File f = (File) iter.next();
exec.createArg().setValue(f.getAbsolutePath());
}
if (target != null) {
exec.createArg().setValue("/out");
exec.createArg().setValue(target.getAbsolutePath());
}
iter = params.iterator();
while (iter.hasNext()) {
AbstractBuildTask.Property p =
(AbstractBuildTask.Property) iter.next();
exec.createArg().setValue("-d" + p.getName() + "=" + p.getValue());
}
String[] extraArgs = cmdl.getArguments();
for (int i = 0; i < extraArgs.length; i++) {
exec.createArg().setValue(extraArgs[i]);
}
exec.execute();
}