51 lines
1.5 KiB
C#
51 lines
1.5 KiB
C#
//#define COMPILE_WITH_DLSS
|
|
|
|
using System;
|
|
using Flax.Build;
|
|
using Flax.Build.NativeCpp;
|
|
|
|
public class GameTarget : GameProjectTarget
|
|
{
|
|
private bool UseDLSS = false;
|
|
|
|
/// <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");
|
|
#if COMPILE_WITH_DLSS
|
|
//Modules.Add("DLSS");
|
|
#endif
|
|
}
|
|
|
|
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);
|
|
}
|
|
}
|
|
|