// Set any platform specific system properties.
BootStrapPlatform.applyPlatformHacks();
if (options.isUseGuiLogger()) {
// Initialize a tree logger window.
DetachedTreeLoggerWindow loggerWindow = DetachedTreeLoggerWindow.getInstance(
"Build Output for " + options.getModuleNames(), 800, 600, true);
// Eager AWT initialization for OS X to ensure safe coexistence with SWT.
BootStrapPlatform.initGui();
final AbstractTreeLogger logger = loggerWindow.getLogger();
logger.setMaxDetail(options.getLogLevel());
final boolean[] success = new boolean[1];
// Compiler will be spawned onto a second thread, UI thread for tree
// logger will remain on the main.
Thread compilerThread = new Thread(new Runnable() {
public void run() {
success[0] = doRun(logger, task);
}
});
compilerThread.setName("GWTCompiler Thread");
compilerThread.start();
loggerWindow.run();
// Even if the tree logger window is closed, we wait for the compiler
// to finish.
waitForThreadToTerminate(compilerThread);