a.setConfiguration(c);
System.out.println(a.build(new java.io.ByteArrayOutputStream(), true));
*/
FBApp app = new FBApp(new File(args[args.length - 1]));
CommandLineConfiguration c2 = getCommandLineConfiguration(args);
app.setLogger(new OEMConsole());
OEMConfiguration c1 = (OEMConfiguration) app.getDefaultConfiguration();
OEMConfiguration c3 = new OEMConfiguration(null, c2);
c1.importDefaults(c3);
c1.keepConfigurationReport(true);
app.setConfiguration(c1);
// app.setProgressMeter(new OEMProgressMeter());
// app.build(new BufferedOutputStream(new FileOutputStream(new File(c2.getOutput()))), true);
app.build(new BufferedOutputStream(new FileOutputStream(new File(c2.getOutput()))),
new BufferedOutputStream(new FileOutputStream(new File(c2.getOutput() + ".swf"))), true);
Report r = app.getReport();
r.writeLinkReport(new PrintWriter(new FileOutputStream(new File(c2.getOutput() + ".link.xml"))));
r.writeConfigurationReport(new PrintWriter(new FileOutputStream(new File(c2.getOutput() + ".config.xml"))));
/*
Message[] messages = r.getMessages();
for (int i = 0, size = messages == null ? 0 : messages.length; i < size; i++)
{
System.out.println(messages[i].toString());