2014-03-14 14:13:41 -04:00
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
using System ;
using System.IO ;
namespace UnrealBuildTool
{
public class UEBuildConfiguration
{
/** Whether to include PhysX support */
2014-06-06 07:43:02 -04:00
[XmlConfig]
2014-03-14 14:13:41 -04:00
public static bool bCompilePhysX ;
/** Whether to include PhysX APEX support */
2014-06-06 07:43:02 -04:00
[XmlConfig]
2014-03-14 14:13:41 -04:00
public static bool bCompileAPEX ;
2014-09-09 16:30:29 -04:00
/** Whether to allow runtime cooking of physics */
[XmlConfig]
public static bool bRuntimePhysicsCooking ;
2014-05-30 13:28:52 -04:00
/** Whether to include Box2D support */
2014-06-06 07:43:02 -04:00
[XmlConfig]
2014-05-30 13:28:52 -04:00
public static bool bCompileBox2D ;
2014-06-18 11:01:21 -04:00
/** Whether to include ICU unicode/i18n support in core */
2014-06-06 07:43:02 -04:00
[XmlConfig]
2014-06-18 11:01:21 -04:00
public static bool bCompileICU ;
2014-03-14 14:13:41 -04:00
/** Whether to build a stripped down version of the game specifically for dedicated server. */
2014-06-06 07:43:02 -04:00
[XmlConfig]
2014-03-14 14:13:41 -04:00
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 */
2014-06-06 07:43:02 -04:00
[XmlConfig]
2014-03-14 14:13:41 -04:00
public static bool bBuildEditor ;
/** Whether to compile code related to building assets. Consoles generally cannot build assets. Desktop platforms generally can. */
2014-06-06 07:43:02 -04:00
[XmlConfig]
2014-03-14 14:13:41 -04:00
public static bool bBuildRequiresCookedData ;
/** Whether to compile WITH_EDITORONLY_DATA disabled. Only Windows will use this, other platforms force this to false */
2014-06-06 07:43:02 -04:00
[XmlConfig]
2014-03-14 14:13:41 -04:00
public static bool bBuildWithEditorOnlyData ;
/** Whether to compile the developer tools. */
2014-06-06 07:43:02 -04:00
[XmlConfig]
2014-03-14 14:13:41 -04:00
public static bool bBuildDeveloperTools ;
/** Whether to force compiling the target platform modules, even if they wouldn't normally be built */
2014-06-06 07:43:02 -04:00
[XmlConfig]
2014-03-14 14:13:41 -04:00
public static bool bForceBuildTargetPlatforms ;
/** Whether to force compiling shader format modules, even if they wouldn't normally be built. */
2014-06-06 07:43:02 -04:00
[XmlConfig]
2014-03-14 14:13:41 -04:00
public static bool bForceBuildShaderFormats ;
/** Whether we should compile in support for Simplygon or not. */
2014-06-06 07:43:02 -04:00
[XmlConfig]
2014-03-14 14:13:41 -04:00
public static bool bCompileSimplygon ;
2014-06-18 11:01:21 -04:00
/** 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 */
2014-06-06 07:43:02 -04:00
[XmlConfig]
2014-03-14 14:13:41 -04:00
public static bool bCompileSteamOSS ;
/** Whether we should compile in support for Mcp OnlineSubsystem or not. */
2014-06-06 07:43:02 -04:00
[XmlConfig]
2014-03-14 14:13:41 -04:00
public static bool bCompileMcpOSS ;
/** Whether to compile lean and mean version of UE. */
2014-06-06 07:43:02 -04:00
[XmlConfig]
2014-03-14 14:13:41 -04:00
public static bool bCompileLeanAndMeanUE ;
2014-06-18 15:37:35 -04:00
/** 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 ;
2014-03-14 14:13:41 -04:00
/** Whether to generate a manifest file that contains the files to add to Perforce */
2014-06-06 07:43:02 -04:00
[XmlConfig]
2014-03-14 14:13:41 -04:00
public static bool bGenerateManifest ;
/** Whether to add to the existing manifest (if it exists), or start afresh */
2014-06-06 07:43:02 -04:00
[XmlConfig]
2014-03-14 14:13:41 -04:00
public static bool bMergeManifests ;
/** Whether to 'clean' the given project */
2014-06-06 07:43:02 -04:00
[XmlConfig]
2014-03-14 14:13:41 -04:00
public static bool bCleanProject ;
/** Whether we are just running the PrepTargetForDeployment step */
2014-06-06 07:43:02 -04:00
[XmlConfig]
2014-03-14 14:13:41 -04:00
public static bool bPrepForDeployment ;
/** Enabled for all builds that include the engine project. Disabled only when building standalone apps that only link with Core. */
2014-06-06 07:43:02 -04:00
[XmlConfig]
2014-03-14 14:13:41 -04:00
public static bool bCompileAgainstEngine ;
/** Enabled for all builds that include the CoreUObject project. Disabled only when building standalone apps that only link with Core. */
2014-06-06 07:43:02 -04:00
[XmlConfig]
2014-03-14 14:13:41 -04:00
public static bool bCompileAgainstCoreUObject ;
/** If true, include ADO database support in core */
2014-06-06 07:43:02 -04:00
[XmlConfig]
2014-03-14 14:13:41 -04:00
public static bool bIncludeADO ;
2014-06-13 16:31:00 -04:00
/** Directory for the third party files/libs */
[Obsolete("Use UEThirdPartySourceDirectory instead of UEThirdPartyDirectory.", true)]
2014-06-06 07:43:02 -04:00
[XmlConfig]
2014-03-14 14:13:41 -04:00
public static string UEThirdPartyDirectory ;
2014-06-13 16:31:00 -04:00
/** Directory for the third party source */
[XmlConfig]
public static string UEThirdPartySourceDirectory ;
/** Directory for the third party binaries */
[XmlConfig]
public static string UEThirdPartyBinariesDirectory ;
2014-03-14 14:13:41 -04:00
/** If true, force header regeneration. Intended for the build machine */
2014-06-06 07:43:02 -04:00
[XmlConfig]
2014-03-14 14:13:41 -04:00
public static bool bForceHeaderGeneration ;
/** If true, do not build UHT, assume it is already built */
2014-06-06 07:43:02 -04:00
[XmlConfig]
2014-03-14 14:13:41 -04:00
public static bool bDoNotBuildUHT ;
/** If true, fail if any of the generated header files is out of date. */
2014-06-06 07:43:02 -04:00
[XmlConfig]
2014-03-14 14:13:41 -04:00
public static bool bFailIfGeneratedCodeChanges ;
/** Whether to compile Recast navmesh generation */
2014-06-06 07:43:02 -04:00
[XmlConfig]
2014-03-14 14:13:41 -04:00
public static bool bCompileRecast ;
/** Whether to compile SpeedTree support. */
2014-06-06 07:43:02 -04:00
[XmlConfig]
2014-03-14 14:13:41 -04:00
public static bool bCompileSpeedTree ;
/** Enable exceptions for all modules */
2014-06-06 07:43:02 -04:00
[XmlConfig]
2014-03-14 14:13:41 -04:00
public static bool bForceEnableExceptions ;
/** Compile server-only code. */
2014-06-06 07:43:02 -04:00
[XmlConfig]
2014-03-14 14:13:41 -04:00
public static bool bWithServerCode ;
/** Whether to include stats support even without the engine */
2014-06-06 07:43:02 -04:00
[XmlConfig]
2014-03-14 14:13:41 -04:00
public static bool bCompileWithStatsWithoutEngine ;
/** Whether to include plugin support */
2014-06-06 07:43:02 -04:00
[XmlConfig]
2014-03-14 14:13:41 -04:00
public static bool bCompileWithPluginSupport ;
/** Whether to turn on logging for test/shipping builds */
2014-06-06 07:43:02 -04:00
[XmlConfig]
2014-03-14 14:13:41 -04:00
public static bool bUseLoggingInShipping ;
2014-06-18 11:01:21 -04:00
/** True if we need to package up Android with the OBB in the APK file */
2014-06-06 07:43:02 -04:00
[XmlConfig]
2014-06-18 11:01:21 -04:00
public static bool bOBBinAPK ;
2014-05-13 11:40:41 -04:00
2014-05-22 15:14:51 -04:00
/** True if we need PhysX vehicle support */
2014-06-06 07:43:02 -04:00
[XmlConfig]
2014-05-22 15:14:51 -04:00
public static bool bCompilePhysXVehicle ;
/** True if we need FreeType support */
2014-06-06 07:43:02 -04:00
[XmlConfig]
2014-05-22 15:14:51 -04:00
public static bool bCompileFreeType ;
/** True if we want to favor optimizing size over speed */
2014-06-06 07:43:02 -04:00
[XmlConfig]
2014-05-22 15:14:51 -04:00
public static bool bCompileForSize ;
2014-08-14 03:37:01 -04:00
/** True if hot-reload from IDE is allowed */
2014-08-15 07:16:48 -04:00
[XmlConfig]
2014-08-14 03:37:01 -04:00
public static bool bAllowHotReloadFromIDE ;
/** True if performing hot-reload from IDE */
public static bool bHotReloadFromIDE ;
2014-09-18 08:10:17 -04:00
/** When true, the targets won't execute their link actions if there was nothing to compile */
public static bool bSkipLinkingWhenNothingToCompile ;
2014-06-05 12:12:32 -04:00
/// <summary>
/// Sets the configuration back to defaults.
/// </summary>
public static void LoadDefaults ( )
2014-03-14 14:13:41 -04:00
{
//@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)
2014-04-23 18:00:27 -04:00
bCompilePhysX = true ;
bCompileAPEX = true ;
2014-09-09 16:30:29 -04:00
bRuntimePhysicsCooking = true ;
2014-05-30 13:28:52 -04:00
bCompileBox2D = true ;
2014-10-15 17:28:51 -04:00
bCompileICU = true ;
2014-03-14 14:13:41 -04:00
bBuildDedicatedServer = false ;
bBuildEditor = true ;
bBuildRequiresCookedData = false ;
bBuildWithEditorOnlyData = true ;
bBuildDeveloperTools = true ;
bForceBuildTargetPlatforms = false ;
bForceBuildShaderFormats = false ;
2014-04-23 18:00:27 -04:00
bCompileSimplygon = true ;
2014-03-14 14:13:41 -04:00
bCompileLeanAndMeanUE = false ;
bCompileAgainstEngine = true ;
bCompileAgainstCoreUObject = true ;
2014-06-13 16:31:00 -04:00
UEThirdPartySourceDirectory = "ThirdParty/" ;
UEThirdPartyBinariesDirectory = "../Binaries/ThirdParty/" ;
2014-04-23 18:00:27 -04:00
bCompileRecast = true ;
2014-03-14 14:13:41 -04:00
bForceEnableExceptions = false ;
bWithServerCode = true ;
2014-04-23 18:00:27 -04:00
bCompileSpeedTree = true ;
2014-03-14 14:13:41 -04:00
bCompileWithStatsWithoutEngine = false ;
bCompileWithPluginSupport = false ;
2014-06-18 11:01:21 -04:00
bUseLoggingInShipping = false ;
2014-04-23 18:00:27 -04:00
bCompileSteamOSS = true ;
bCompileMcpOSS = true ;
2014-06-18 11:01:21 -04:00
bOBBinAPK = false ;
2014-05-22 15:14:51 -04:00
bCompilePhysXVehicle = true ;
bCompileFreeType = true ;
bCompileForSize = false ;
2014-08-14 03:37:01 -04:00
bHotReloadFromIDE = false ;
bAllowHotReloadFromIDE = true ;
2014-09-18 08:10:17 -04:00
bSkipLinkingWhenNothingToCompile = false ;
2014-06-05 12:12:32 -04:00
}
2014-03-14 14:13:41 -04:00
2014-06-05 12:12:32 -04:00
/// <summary>
/// Function to call to after reset default data.
/// </summary>
public static void PostReset ( )
{
2014-04-23 18:00:27 -04:00
// Configuration overrides.
2014-08-26 18:26:04 -04:00
string SteamVersion = "Steamv130" ;
2014-04-23 18:00:27 -04:00
bCompileSteamOSS = bCompileSteamOSS
2014-06-13 16:31:00 -04:00
& & Directory . Exists ( UEBuildConfiguration . UEThirdPartySourceDirectory + "Steamworks/" + SteamVersion ) = = true ;
2014-03-14 14:13:41 -04:00
2014-04-23 18:00:27 -04:00
bCompileMcpOSS = bCompileMcpOSS
2014-04-29 12:26:27 -04:00
& & Directory . Exists ( "Runtime/Online/NotForLicensees/OnlineSubsystemMcp" ) = = true ;
2014-04-23 18:00:27 -04:00
bCompileSimplygon = bCompileSimplygon
2014-06-13 16:31:00 -04:00
& & Directory . Exists ( UEBuildConfiguration . UEThirdPartySourceDirectory + "NotForLicensees" ) = = true
& & Directory . Exists ( UEBuildConfiguration . UEThirdPartySourceDirectory + "NotForLicensees/Simplygon" ) = = true
2014-04-23 18:00:27 -04:00
& & Directory . Exists ( "Developer/SimplygonMeshReduction" ) = = true
& & ! ( ProjectFileGenerator . bGenerateProjectFiles & & ProjectFileGenerator . bGeneratingRocketProjectFiles ) ;
2014-03-14 14:13:41 -04:00
}
/ * *
* 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 ;
}
}
}
}