public CompileMessages CompileGame(bool forceRebuild, bool createMiniExeForDebug)
{
Factory.GUIController.ClearOutputPanel();
CompileMessages errors = new CompileMessages();
Utilities.EnsureStandardSubFoldersExist();
if (PreCompileGame != null)
{
PreCompileGameEventArgs evArgs = new PreCompileGameEventArgs(forceRebuild);
evArgs.Errors = errors;
PreCompileGame(evArgs);
if (!evArgs.AllowCompilation)
{
Factory.GUIController.ShowOutputPanel(errors);
ReportErrorsIfAppropriate(errors);
return errors;
}
}
RunPreCompilationChecks(errors);
if (!errors.HasErrors)
{
CompileMessage result = (CompileMessage)BusyDialog.Show("Please wait while your scripts are compiled...", new BusyDialog.ProcessingHandler(CompileScripts), new CompileScriptsParameters(errors, forceRebuild));
if (result != null)
{
errors.Add(result);
}
else if (!errors.HasErrors)
{
if (createMiniExeForDebug)
{
CreateMiniEXEForDebugging(errors);
}
else
{
CreateCompiledFiles(errors, forceRebuild);
}
}
}
Factory.GUIController.ShowOutputPanel(errors);
ReportErrorsIfAppropriate(errors);
return errors;
}