using System; using System.IO; using Flax.Build; using Flax.Build.NativeCpp; public class GameTarget : GameProjectTarget { /// public override void Init() { base.Init(); OutputName = "Goake"; Win32ResourceFile = @"C:\dev\GoakeFlax\Source\goake.rc"; IsPreBuilt = false; Architectures = new TargetArchitecture[] { TargetArchitecture.x64 }; Platforms = new TargetPlatform[] { TargetPlatform.Windows, TargetPlatform.Linux }; // Monolithic build only seems to work on Windows for now? LinkType = TargetLinkType.Monolithic; if (LinkType == TargetLinkType.Monolithic) { Modules.Add("Main"); OutputType = TargetOutputType.Executable; } Modules.Add("Game"); } public override void SetupTargetEnvironment(BuildOptions options) { base.SetupTargetEnvironment(options); options.LinkEnv.UseFastPDBLinking = true; } public override string GetOutputFilePath(BuildOptions options, TargetOutputType? outputType = null) { if (!Environment.CommandLine.Contains("Cooker")) // Detect if this is run during editor cooking { // Output files directly to cooked folders (used only during development) options.OutputFolder = Path.Combine(FolderPath, "..", "Output", "Windows"); } return base.GetOutputFilePath(options, outputType); } }