You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#ttp 345522: HotReload: Should not try to link DLLs when target is up to date #change Added code to handle up-to-date state of modules in hot-reload code. #change Added ECompilationResult::UpToDate and ECompilationResult::Canceled, ECompilationResult::Failed() #change UBT: added -canskiplink command line param and support for skipping link actions when there was nothing to compile #change extended the duration of re-compile notifications (TTP# 346604 NUXF-246 Hot compile fail message fades) #change Added 'Compile Canceled' notification (instead of 'Compile Failed') [CL 2302307 by Robert Manuszewski in Main branch]
270 lines
8.7 KiB
C#
270 lines
8.7 KiB
C#
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
|
|
|
|
using System;
|
|
using System.IO;
|
|
|
|
namespace UnrealBuildTool
|
|
{
|
|
public class UEBuildConfiguration
|
|
{
|
|
/** Whether to include PhysX support */
|
|
[XmlConfig]
|
|
public static bool bCompilePhysX;
|
|
|
|
/** Whether to include PhysX APEX support */
|
|
[XmlConfig]
|
|
public static bool bCompileAPEX;
|
|
|
|
/** Whether to allow runtime cooking of physics */
|
|
[XmlConfig]
|
|
public static bool bRuntimePhysicsCooking;
|
|
|
|
/** Whether to include Box2D support */
|
|
[XmlConfig]
|
|
public static bool bCompileBox2D;
|
|
|
|
/** Whether to include ICU unicode/i18n support in core */
|
|
[XmlConfig]
|
|
public static bool bCompileICU;
|
|
|
|
/** Whether to build a stripped down version of the game specifically for dedicated server. */
|
|
[XmlConfig]
|
|
public static bool bBuildDedicatedServer;
|
|
|
|
/** Whether to compile the editor or not. Only desktop platforms (Windows or Mac) will use this, other platforms force this to false */
|
|
[XmlConfig]
|
|
public static bool bBuildEditor;
|
|
|
|
/** Whether to compile code related to building assets. Consoles generally cannot build assets. Desktop platforms generally can. */
|
|
[XmlConfig]
|
|
public static bool bBuildRequiresCookedData;
|
|
|
|
/** Whether to compile WITH_EDITORONLY_DATA disabled. Only Windows will use this, other platforms force this to false */
|
|
[XmlConfig]
|
|
public static bool bBuildWithEditorOnlyData;
|
|
|
|
/** Whether to compile the developer tools. */
|
|
[XmlConfig]
|
|
public static bool bBuildDeveloperTools;
|
|
|
|
/** Whether to force compiling the target platform modules, even if they wouldn't normally be built */
|
|
[XmlConfig]
|
|
public static bool bForceBuildTargetPlatforms;
|
|
|
|
/** Whether to force compiling shader format modules, even if they wouldn't normally be built. */
|
|
[XmlConfig]
|
|
public static bool bForceBuildShaderFormats;
|
|
|
|
/** Whether we should compile in support for Simplygon or not. */
|
|
[XmlConfig]
|
|
public static bool bCompileSimplygon;
|
|
|
|
/** Whether we should compile in support for Steam OnlineSubsystem or not. [RCL] FIXME 2014-Apr-17: bCompileSteamOSS means "bHasSteamworksInstalled" for some code, these meanings need to be untangled */
|
|
[XmlConfig]
|
|
public static bool bCompileSteamOSS;
|
|
|
|
/** Whether we should compile in support for Mcp OnlineSubsystem or not. */
|
|
[XmlConfig]
|
|
public static bool bCompileMcpOSS;
|
|
|
|
/** Whether to compile lean and mean version of UE. */
|
|
[XmlConfig]
|
|
public static bool bCompileLeanAndMeanUE;
|
|
|
|
/** Whether to generate a list of external files that are required to build a target */
|
|
[XmlConfig]
|
|
public static bool bGenerateExternalFileList;
|
|
|
|
/** Whether to merge to the existing list of external files */
|
|
[XmlConfig]
|
|
public static bool bMergeExternalFileList;
|
|
|
|
/** Whether to generate a manifest file that contains the files to add to Perforce */
|
|
[XmlConfig]
|
|
public static bool bGenerateManifest;
|
|
|
|
/** Whether to add to the existing manifest (if it exists), or start afresh */
|
|
[XmlConfig]
|
|
public static bool bMergeManifests;
|
|
|
|
/** Whether to 'clean' the given project */
|
|
[XmlConfig]
|
|
public static bool bCleanProject;
|
|
|
|
/** Whether we are just running the PrepTargetForDeployment step */
|
|
[XmlConfig]
|
|
public static bool bPrepForDeployment;
|
|
|
|
/** Enabled for all builds that include the engine project. Disabled only when building standalone apps that only link with Core. */
|
|
[XmlConfig]
|
|
public static bool bCompileAgainstEngine;
|
|
|
|
/** Enabled for all builds that include the CoreUObject project. Disabled only when building standalone apps that only link with Core. */
|
|
[XmlConfig]
|
|
public static bool bCompileAgainstCoreUObject;
|
|
|
|
/** If true, include ADO database support in core */
|
|
[XmlConfig]
|
|
public static bool bIncludeADO;
|
|
|
|
/** Directory for the third party files/libs */
|
|
[Obsolete("Use UEThirdPartySourceDirectory instead of UEThirdPartyDirectory.", true)]
|
|
[XmlConfig]
|
|
public static string UEThirdPartyDirectory;
|
|
|
|
/** Directory for the third party source */
|
|
[XmlConfig]
|
|
public static string UEThirdPartySourceDirectory;
|
|
|
|
/** Directory for the third party binaries */
|
|
[XmlConfig]
|
|
public static string UEThirdPartyBinariesDirectory;
|
|
|
|
/** If true, force header regeneration. Intended for the build machine */
|
|
[XmlConfig]
|
|
public static bool bForceHeaderGeneration;
|
|
|
|
/** If true, do not build UHT, assume it is already built */
|
|
[XmlConfig]
|
|
public static bool bDoNotBuildUHT;
|
|
|
|
/** If true, fail if any of the generated header files is out of date. */
|
|
[XmlConfig]
|
|
public static bool bFailIfGeneratedCodeChanges;
|
|
|
|
/** Whether to compile Recast navmesh generation */
|
|
[XmlConfig]
|
|
public static bool bCompileRecast;
|
|
|
|
/** Whether to compile SpeedTree support. */
|
|
[XmlConfig]
|
|
public static bool bCompileSpeedTree;
|
|
|
|
/** Enable exceptions for all modules */
|
|
[XmlConfig]
|
|
public static bool bForceEnableExceptions;
|
|
|
|
/** Compile server-only code. */
|
|
[XmlConfig]
|
|
public static bool bWithServerCode;
|
|
|
|
/** Whether to include stats support even without the engine */
|
|
[XmlConfig]
|
|
public static bool bCompileWithStatsWithoutEngine;
|
|
|
|
/** Whether to include plugin support */
|
|
[XmlConfig]
|
|
public static bool bCompileWithPluginSupport;
|
|
|
|
/** Whether to turn on logging for test/shipping builds */
|
|
[XmlConfig]
|
|
public static bool bUseLoggingInShipping;
|
|
|
|
/** True if we need to package up Android with the OBB in the APK file */
|
|
[XmlConfig]
|
|
public static bool bOBBinAPK;
|
|
|
|
/** True if we need PhysX vehicle support */
|
|
[XmlConfig]
|
|
public static bool bCompilePhysXVehicle;
|
|
|
|
/** True if we need FreeType support */
|
|
[XmlConfig]
|
|
public static bool bCompileFreeType;
|
|
|
|
/** True if we want to favor optimizing size over speed */
|
|
[XmlConfig]
|
|
public static bool bCompileForSize;
|
|
|
|
/** True if hot-reload from IDE is allowed */
|
|
[XmlConfig]
|
|
public static bool bAllowHotReloadFromIDE;
|
|
|
|
/** True if performing hot-reload from IDE */
|
|
public static bool bHotReloadFromIDE;
|
|
|
|
/** When true, the targets won't execute their link actions if there was nothing to compile */
|
|
public static bool bSkipLinkingWhenNothingToCompile;
|
|
|
|
/// <summary>
|
|
/// Sets the configuration back to defaults.
|
|
/// </summary>
|
|
public static void LoadDefaults()
|
|
{
|
|
//@todo. Allow disabling PhysX/APEX via these values...
|
|
// Currently, WITH_PHYSX is forced to true in Engine.h (as it isn't defined anywhere by the builder)
|
|
bCompilePhysX = true;
|
|
bCompileAPEX = true;
|
|
bRuntimePhysicsCooking = true;
|
|
bCompileBox2D = true;
|
|
bBuildDedicatedServer = false;
|
|
bBuildEditor = true;
|
|
bBuildRequiresCookedData = false;
|
|
bBuildWithEditorOnlyData = true;
|
|
bBuildDeveloperTools = true;
|
|
bForceBuildTargetPlatforms = false;
|
|
bForceBuildShaderFormats = false;
|
|
bCompileSimplygon = true;
|
|
bCompileLeanAndMeanUE = false;
|
|
bCompileAgainstEngine = true;
|
|
bCompileAgainstCoreUObject = true;
|
|
UEThirdPartySourceDirectory = "ThirdParty/";
|
|
UEThirdPartyBinariesDirectory = "../Binaries/ThirdParty/";
|
|
bCompileRecast = true;
|
|
bForceEnableExceptions = false;
|
|
bWithServerCode = true;
|
|
bCompileSpeedTree = true;
|
|
bCompileWithStatsWithoutEngine = false;
|
|
bCompileWithPluginSupport = false;
|
|
bUseLoggingInShipping = false;
|
|
bCompileSteamOSS = true;
|
|
bCompileMcpOSS = true;
|
|
bOBBinAPK = false;
|
|
bCompilePhysXVehicle = true;
|
|
bCompileFreeType = true;
|
|
bCompileForSize = false;
|
|
bHotReloadFromIDE = false;
|
|
bAllowHotReloadFromIDE = true;
|
|
bSkipLinkingWhenNothingToCompile = false;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Function to call to after reset default data.
|
|
/// </summary>
|
|
public static void PostReset()
|
|
{
|
|
// Configuration overrides.
|
|
string SteamVersion = "Steamv130";
|
|
bCompileSteamOSS = bCompileSteamOSS
|
|
&& Directory.Exists(UEBuildConfiguration.UEThirdPartySourceDirectory + "Steamworks/" + SteamVersion) == true;
|
|
|
|
bCompileMcpOSS = bCompileMcpOSS
|
|
&& Directory.Exists("Runtime/Online/NotForLicensees/OnlineSubsystemMcp") == true;
|
|
|
|
|
|
bCompileSimplygon = bCompileSimplygon
|
|
&& Directory.Exists(UEBuildConfiguration.UEThirdPartySourceDirectory + "NotForLicensees") == true
|
|
&& Directory.Exists(UEBuildConfiguration.UEThirdPartySourceDirectory + "NotForLicensees/Simplygon") == true
|
|
&& Directory.Exists("Developer/SimplygonMeshReduction") == true
|
|
&& !(ProjectFileGenerator.bGenerateProjectFiles && ProjectFileGenerator.bGeneratingRocketProjectFiles);
|
|
}
|
|
|
|
/**
|
|
* Validates the configuration.
|
|
*
|
|
* @warning: the order of validation is important
|
|
*/
|
|
public static void ValidateConfiguration()
|
|
{
|
|
// Lean and mean means no Editor and other frills.
|
|
if (bCompileLeanAndMeanUE)
|
|
{
|
|
bBuildEditor = false;
|
|
bBuildDeveloperTools = false;
|
|
bCompileSimplygon = false;
|
|
bCompileSpeedTree = false;
|
|
}
|
|
}
|
|
}
|
|
}
|