This commit is contained in:
2023-03-02 22:07:43 +02:00
parent 1a0709d113
commit 5e48806b8c
21 changed files with 145 additions and 82 deletions

View File

@@ -1,13 +1,10 @@
//#define COMPILE_WITH_DLSS
using System;
using System.IO;
using Flax.Build;
using Flax.Build.NativeCpp;
public class GameTarget : GameProjectTarget
{
private bool UseDLSS = false;
/// <inheritdoc />
public override void Init()
{
@@ -19,34 +16,30 @@ public class GameTarget : GameProjectTarget
Architectures = new TargetArchitecture[] { TargetArchitecture.x64 };
Platforms = new TargetPlatform[] { TargetPlatform.Windows, TargetPlatform.Linux };
//LinkType = TargetLinkType.Monolithic;
// Monolithic build only seems to work on Windows for now?
LinkType = TargetLinkType.Monolithic;
if (LinkType == TargetLinkType.Monolithic)
{
//only for windows?
//Modules.Add("Main");
//OutputType = TargetOutputType.Executable;
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)
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";
options.OutputFolder = Path.Combine(FolderPath, "..", "Output", "WindowsDevelopment");
else if (options.Configuration == TargetConfiguration.Release)
options.OutputFolder = @"C:\dev\GoakeFlax\Output\WindowsRelease";
options.OutputFolder = Path.Combine(FolderPath, "..", "Output", "WindowsRelease");
}
return base.GetOutputFilePath(options, outputType);
}*/
}
}