Files
GoakeFlax/Source/GameTarget.Build.cs
2022-05-09 18:08:56 +03:00

44 lines
1.4 KiB
C#

using System;
using Flax.Build;
using Flax.Build.NativeCpp;
public class GameTarget : GameProjectTarget
{
/// <inheritdoc />
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 };
LinkType = TargetLinkType.Monolithic;
if (LinkType == TargetLinkType.Monolithic)
{
Modules.Add("Main");
OutputType = TargetOutputType.Executable;
}
Modules.Add("Game");
Modules.Add("FidelityFXFSR");
}
public override string GetOutputFilePath(BuildOptions options, TargetOutputType? outputType = null)
{
if (!Environment.CommandLine.Contains("Cooker")) // Hacky way to detect if this is run during cooking
{
// Output files directly to cooked folders (used only during development)
if (options.Configuration == TargetConfiguration.Development)
options.OutputFolder = @"C:\dev\GoakeFlax\Output\WindowsDevelopment";
else if (options.Configuration == TargetConfiguration.Release)
options.OutputFolder = @"C:\dev\GoakeFlax\Output\WindowsRelease";
}
return base.GetOutputFilePath(options, outputType);
}
}