Skip to content

Commit

Permalink
timestamp constant bugfix, empty swc path workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
makc committed Jul 26, 2013
1 parent 7bc509f commit 4d38e07
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
Binary file modified ColtPlugin.fdz
Binary file not shown.
20 changes: 16 additions & 4 deletions ColtPlugin/PluginMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -835,9 +835,21 @@ private COLTRemoteProject ExportCOLTProject()

result.name = project.Name;

String[] libraryPaths = project.CompilerOptions.LibraryPaths.Clone() as String[];
for (int i=0; i<libraryPaths.Length; i++) libraryPaths[i] = project.GetAbsolutePath(libraryPaths[i]);
result.libraries = libraryPaths;
List<String> libraryPathsList = new List<String>(project.CompilerOptions.LibraryPaths);
for (int i=0; i<libraryPathsList.Count; i++)
{
if (libraryPathsList[i].ToLower().EndsWith(".swc"))
{
libraryPathsList[i] = project.GetAbsolutePath(libraryPathsList[i]);
}

else
{
// workaround (FD saves empty paths for missing libs)
libraryPathsList.RemoveAt(i); i--;
}
}
result.libraries = libraryPathsList.ToArray();

result.targetPlayerVersion = project.MovieOptions.Version + ".0";

Expand Down Expand Up @@ -908,7 +920,7 @@ private COLTRemoteProject ExportCOLTProject()

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::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") + " ";
Expand Down

0 comments on commit 4d38e07

Please # to comment.