protected override void DoBuild(string[] extraClasspaths, bool noTrace) { Environment.CurrentDirectory = project.Directory; string output = project.FixDebugReleasePath(project.OutputPathAbsolute); string outputDir = Path.GetDirectoryName(project.OutputPathAbsolute); if (!Directory.Exists(outputDir)) { Directory.CreateDirectory(outputDir); } string serverPort = Environment.ExpandEnvironmentVariables("%HAXE_SERVER_PORT%"); string connect = (!serverPort.StartsWith("%") && serverPort != "0") ? "--connect " + serverPort : ""; if (project.IsNmeOutput && !string.IsNullOrEmpty(project.TargetBuild)) { haxePath = haxePath.Replace("haxe.exe", "haxelib.exe"); string config = project.TargetBuild; string haxeNmeArgs = String.Join(" ", BuildNmeCommand(extraClasspaths, output, config, noTrace, null));// +" " + connect; Console.WriteLine("haxelib " + haxeNmeArgs); if (!ProcessRunner.Run(haxePath, haxeNmeArgs, false, false)) { throw new BuildException("Build halted with errors (haxelib.exe)."); } return; } // always use relative path for CPP (because it prepends ./) if (project.IsCppOutput) { output = project.FixDebugReleasePath(project.OutputPath); } if (project.IsFlashOutput) { SwfmillLibraryBuilder libraryBuilder = new SwfmillLibraryBuilder(); // before doing anything else, make sure any resources marked as "keep updated" // are properly kept up to date if possible libraryBuilder.KeepUpdated(project); // if we have any resources, build our library file and run swfmill on it libraryBuilder.BuildLibrarySwf(project, false); } string haxeArgs = connect + " " + String.Join(" ", project.BuildHXML(extraClasspaths, output, noTrace)); Console.WriteLine("haxe " + haxeArgs); if (!ProcessRunner.Run(haxePath, haxeArgs, false, false)) { throw new BuildException("Build halted with errors (haxe.exe)."); } }
protected override void DoBuild(string[] extraClasspaths, bool noTrace) { Environment.CurrentDirectory = project.Directory; string output = project.FixDebugReleasePath(project.OutputPathAbsolute); string outputDir = Path.GetDirectoryName(project.OutputPathAbsolute); if (!Directory.Exists(outputDir)) { Directory.CreateDirectory(outputDir); } string serverPort = Environment.ExpandEnvironmentVariables("%HAXE_SERVER_PORT%"); string connect = (!serverPort.StartsWith("%") && serverPort != "0") ? "--connect " + serverPort : ""; if (project.MovieOptions.HasPlatformSupport && project.MovieOptions.PlatformSupport.ExternalToolchain != null) { Console.WriteLine("Automatic NME/OpenFL build by FDBuild is deprecated."); return; } // always use relative path for CPP (because it prepends ./) //if (project.IsCppOutput) // output = project.FixDebugReleasePath(project.OutputPath); if (project.IsFlashOutput) { SwfmillLibraryBuilder libraryBuilder = new SwfmillLibraryBuilder(); // before doing anything else, make sure any resources marked as "keep updated" // are properly kept up to date if possible libraryBuilder.KeepUpdated(project); // if we have any resources, build our library file and run swfmill on it libraryBuilder.BuildLibrarySwf(project, false); } string haxeArgs = connect + " " + String.Join(" ", project.BuildHXML(extraClasspaths, output, noTrace)); Console.WriteLine("haxe " + haxeArgs); if (!ProcessRunner.Run(haxePath, haxeArgs, false, false)) { throw new BuildException("Build halted with errors (haxe.exe)."); } }
protected override void DoBuild(string[] extraClasspaths, bool noTrace) { Environment.CurrentDirectory = project.Directory; string outputDir = Path.GetDirectoryName(project.OutputPathAbsolute); if (!Directory.Exists(outputDir)) { Directory.CreateDirectory(outputDir); } if (project.IsFlashOutput) { SwfmillLibraryBuilder libraryBuilder = new SwfmillLibraryBuilder(); // before doing anything else, make sure any resources marked as "keep updated" // are properly kept up to date if possible libraryBuilder.KeepUpdated(project); // if we have any resources, build our library file and run swfmill on it libraryBuilder.BuildLibrarySwf(project, false); } string output = project.FixDebugReleasePath(project.OutputPathAbsolute); // always use relative path for CPP (because it prepends ./) if (project.IsCppOutput) { output = project.OutputPath; } string haxeArgs = String.Join(" ", project.BuildHXML(extraClasspaths, output, noTrace)); Console.WriteLine("haxe " + haxeArgs); if (!ProcessRunner.Run(haxePath, haxeArgs, false)) { throw new BuildException("Build halted with errors (haxe.exe)."); } }
protected override void DoBuild(string[] extraClasspaths, bool noTrace) { Environment.CurrentDirectory = project.Directory; string outputDir = Path.GetDirectoryName(project.OutputPathAbsolute); if (!Directory.Exists(outputDir)) { Directory.CreateDirectory(outputDir); } SwfmillLibraryBuilder libraryBuilder = new SwfmillLibraryBuilder(); // before doing anything else, make sure any resources marked as "keep updated" // are properly kept up to date if possible libraryBuilder.KeepUpdated(project); // if we have any resources, build our library file and run swfmill on it libraryBuilder.BuildLibrarySwf(project, project.CompilerOptions.Verbose); // do we have anything to compile? if (project.CompileTargets.Count > 0 || project.CompilerOptions.IncludePackages.Length > 0) { MtascArgumentBuilder mtasc = new MtascArgumentBuilder(project); mtasc.AddCompileTargets(); mtasc.AddOutput(); mtasc.AddClassPaths(extraClasspaths); mtasc.AddOptions(noTrace); if (project.UsesInjection) { mtasc.AddInput(); } else { mtasc.AddFrame(libraryBuilder.Frame); if (project.LibraryAssets.Count == 0) { mtasc.AddHeader(); // mtasc will have to generate its own output SWF } else { mtasc.AddKeep(); // keep everything you added with swfmill } } string mtascArgs = mtasc.ToString(); if (project.CompilerOptions.Verbose) { Console.WriteLine("mtasc " + mtascArgs); } if (!ProcessRunner.Run(MtascPath, mtascArgs, false, false)) { throw new BuildException("Build halted with errors (mtasc)."); } } }