Skip to content

Commit

Permalink
closes #11
Browse files Browse the repository at this point in the history
  • Loading branch information
makc committed Jun 19, 2013
1 parent c817346 commit 7bc509f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
Binary file modified ColtPlugin.fdz
Binary file not shown.
24 changes: 23 additions & 1 deletion ColtPlugin/PluginMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,29 @@ private COLTRemoteProject ExportCOLTProject()
additionalOptions += option + " ";
}

result.compilerOptions = additionalOptions.Trim() + (project.TraceEnabled ? " -debug" : "");

// compiler constants
// see AddCompilerConstants in FDBuild's Building.AS3.FlexConfigWriter
Boolean debugMode = project.TraceEnabled;
Boolean isMobile = (project.MovieOptions.Platform == AS3MovieOptions.AIR_MOBILE_PLATFORM);
Boolean isDesktop = (project.MovieOptions.Platform == AS3MovieOptions.AIR_PLATFORM);

additionalOptions += "-define+=CONFIG::debug," + (debugMode ? "true" : "false") + " ";
additionalOptions += "-define+=CONFIG::release," + (debugMode ? "false" : "true") + " ";
additionalOptions += "-define+=CONFIG::timeStamp,'" + DateTime.Now.ToString("d") + "' ";
additionalOptions += "-define+=CONFIG::air," + (isMobile || isDesktop ? "true" : "false") + " ";
additionalOptions += "-define+=CONFIG::mobile," + (isMobile ? "true" : "false") + " ";
additionalOptions += "-define+=CONFIG::desktop," + (isDesktop ? "true" : "false") + " ";

if (project.CompilerOptions.CompilerConstants != null)
{
foreach (string define in project.CompilerOptions.CompilerConstants)
{
if (define.IndexOf(',') >= 0) additionalOptions += "-define+=" + define + " ";
}
}

result.compilerOptions = additionalOptions.Trim() + (debugMode ? " -debug" : "");

return result;
}
Expand Down

0 comments on commit 7bc509f

Please # to comment.