From a9c926041b1304951bc02f8422317d26240d3cd9 Mon Sep 17 00:00:00 2001 From: makc Date: Fri, 31 May 2013 18:23:47 +0200 Subject: [PATCH] Closes #3 --- ColtPlugin/PluginMain.cs | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/ColtPlugin/PluginMain.cs b/ColtPlugin/PluginMain.cs index 217948a..7aacb3a 100644 --- a/ColtPlugin/PluginMain.cs +++ b/ColtPlugin/PluginMain.cs @@ -507,10 +507,17 @@ private void OpenInCOLT() stream.WriteLine("target=SWF"); // use project.MovieOptions.Platform switch ?? String outputPath = project.OutputPath; - // fixme: colt does not take paths atm int lastSlash = outputPath.LastIndexOf(@"\"); - if (lastSlash > -1) outputPath = outputPath.Substring(lastSlash + 1); - stream.WriteLine("outputFileName=" + outputPath); + if (lastSlash > -1) + { + stream.WriteLine("outputPath=" + outputPath.Substring(0, lastSlash)); + stream.WriteLine("outputFileName=" + outputPath.Substring(lastSlash + 1)); + } + + else + { + stream.WriteLine("outputFileName=" + outputPath); + } stream.WriteLine("useDefaultSDKConfiguration=true"); @@ -519,6 +526,11 @@ private void OpenInCOLT() sourcePaths += EscapeForCOLT(project.GetAbsolutePath(sourcePath)) + ";"; stream.WriteLine("sourcePaths=" + sourcePaths); + // size, frame rate and background color + stream.WriteLine("compilerOptions=-default-size " + project.MovieOptions.Width + " " + project.MovieOptions.Height + + " -default-frame-rate " + project.MovieOptions.Fps + + " -default-background-color " + project.MovieOptions.BackgroundColorInt); + stream.Close(); // Open it with default app (COLT)