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 */
public static bool bCompilePhysX ;
/** Whether to include PhysX APEX support */
public static bool bCompileAPEX ;
/** Whether to include ICU unicode/i18n support in core */
public static bool bCompileICU ;
/** Whether we should compile the network profiler or not.*/
public static bool bCompileNetworkProfiler ;
/** Whether to build a stripped down version of the game specifically for dedicated server. */
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 */
public static bool bBuildEditor ;
/** Whether to compile code related to building assets. Consoles generally cannot build assets. Desktop platforms generally can. */
public static bool bBuildRequiresCookedData ;
/** Whether to compile WITH_EDITORONLY_DATA disabled. Only Windows will use this, other platforms force this to false */
public static bool bBuildWithEditorOnlyData ;
/** Whether to compile the developer tools. */
public static bool bBuildDeveloperTools ;
/** Whether to force compiling the target platform modules, even if they wouldn't normally be built */
public static bool bForceBuildTargetPlatforms ;
/** Whether to force compiling shader format modules, even if they wouldn't normally be built. */
public static bool bForceBuildShaderFormats ;
/** Whether we should compile in support for Simplygon or not. */
public static bool bCompileSimplygon ;
2014-04-23 19:36:38 -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-03-14 14:13:41 -04:00
public static bool bCompileSteamOSS ;
/** Whether we should compile in support for Mcp OnlineSubsystem or not. */
public static bool bCompileMcpOSS ;
/** Whether to compile lean and mean version of UE. */
public static bool bCompileLeanAndMeanUE ;
/** Whether to generate a manifest file that contains the files to add to Perforce */
public static bool bGenerateManifest ;
/** Whether to add to the existing manifest (if it exists), or start afresh */
public static bool bMergeManifests ;
/** Whether to 'clean' the given project */
public static bool bCleanProject ;
/** Whether we are just running the PrepTargetForDeployment step */
public static bool bPrepForDeployment ;
/** Enabled for all builds that include the engine project. Disabled only when building standalone apps that only link with Core. */
public static bool bCompileAgainstEngine ;
/** Enabled for all builds that include the CoreUObject project. Disabled only when building standalone apps that only link with Core. */
public static bool bCompileAgainstCoreUObject ;
/** If true, include ADO database support in core */
public static bool bIncludeADO ;
/** Directory for the third part files/libs */
public static string UEThirdPartyDirectory ;
/** If true, force header regeneration. Intended for the build machine */
public static bool bForceHeaderGeneration ;
/** If true, do not build UHT, assume it is already built */
public static bool bDoNotBuildUHT ;
/** If true, fail if any of the generated header files is out of date. */
public static bool bFailIfGeneratedCodeChanges ;
/** Whether to compile Recast navmesh generation */
public static bool bCompileRecast ;
/** Whether to compile SpeedTree support. */
public static bool bCompileSpeedTree ;
/** Enable exceptions for all modules */
public static bool bForceEnableExceptions ;
/** Compile server-only code. */
public static bool bWithServerCode ;
/** Whether to include stats support even without the engine */
public static bool bCompileWithStatsWithoutEngine ;
/** Whether to include plugin support */
public static bool bCompileWithPluginSupport ;
/** Whether to turn on logging for test/shipping builds */
public static bool bUseLoggingInShipping ;
/** True if plugins should be excluded when building target. */
public static bool bExcludePlugins ;
/** Sets the configuration back to defaults. */
public static void Reset ( )
{
//@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 ;
bCompileNetworkProfiler = false ;
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 ;
UEThirdPartyDirectory = "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 ;
bUseLoggingInShipping = false ;
2014-04-23 18:00:27 -04:00
bCompileSteamOSS = true ;
bCompileMcpOSS = true ;
2014-03-14 14:13:41 -04:00
2014-04-23 18:00:27 -04:00
XmlConfigLoader . Load ( typeof ( UEBuildConfiguration ) ) ;
// Configuration overrides.
2014-03-14 14:13:41 -04:00
string SteamVersion = "Steamv128" ;
2014-04-23 18:00:27 -04:00
bCompileSteamOSS = bCompileSteamOSS
2014-03-14 14:13:41 -04:00
& & Directory . Exists ( UEBuildConfiguration . UEThirdPartyDirectory + "Steamworks/" + SteamVersion ) = = true ;
2014-04-23 18:00:27 -04:00
bCompileMcpOSS = bCompileMcpOSS
& & Directory . Exists ( "Runtime/Online/NoRedist/OnlineSubsystemMcp" ) = = true ;
bCompileSimplygon = bCompileSimplygon
& & Directory . Exists ( UEBuildConfiguration . UEThirdPartyDirectory + "NoRedist" ) = = true
& & Directory . Exists ( UEBuildConfiguration . UEThirdPartyDirectory + "NoRedist/Simplygon" ) = = true
& & Directory . Exists ( "Developer/SimplygonMeshReduction" ) = = true
& & ! ( ProjectFileGenerator . bGenerateProjectFiles & & ProjectFileGenerator . bGeneratingRocketProjectFiles ) ;
bCompileSpeedTree = bCompileSpeedTree
& & Directory . Exists ( UEBuildConfiguration . UEThirdPartyDirectory + "NoRedist" ) = = true
& & Directory . Exists ( UEBuildConfiguration . UEThirdPartyDirectory + "NoRedist/SpeedTree" ) = = 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 ;
bCompileNetworkProfiler = false ;
bCompileSpeedTree = false ;
}
}
}
}