using System; using System.Collections; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace UnrealBuildTool { /// /// The type of target /// [Serializable] public enum TargetType { /// /// Cooked monolithic game executable (GameName.exe). Also used for a game-agnostic engine executable (UE4Game.exe or RocketGame.exe) /// Game, /// /// Uncooked modular editor executable and DLLs (UE4Editor.exe, UE4Editor*.dll, GameName*.dll) /// Editor, /// /// Cooked monolithic game client executable (GameNameClient.exe, but no server code) /// Client, /// /// Cooked monolithic game server executable (GameNameServer.exe, but no client code) /// Server, /// /// Program (standalone program, e.g. ShaderCompileWorker.exe, can be modular or monolithic depending on the program) /// Program, } /// /// Specifies how to link all the modules in this target /// [Serializable] public enum TargetLinkType { /// /// Use the default link type based on the current target type /// Default, /// /// Link all modules into a single binary /// Monolithic, /// /// Link modules into individual dynamic libraries /// Modular, } /// /// Specifies whether to share engine binaries and intermediates with other projects, or to create project-specific versions. By default, /// editor builds always use the shared build environment (and engine binaries are written to Engine/Binaries/Platform), but monolithic builds /// and programs do not (except in installed builds). Using the shared build environment prevents target-specific modifications to the build /// environment. /// [Serializable] public enum TargetBuildEnvironment { /// /// Use the default build environment for this target type (and whether the engine is installed) /// Default, /// /// Engine binaries and intermediates are output to the engine folder. Target-specific modifications to the engine build environment will be ignored. /// Shared, /// /// Engine binaries and intermediates are specific to this target /// Unique, } /// /// TargetRules is a data structure that contains the rules for defining a target (application/executable) /// public abstract class TargetRules { /// /// Static class wrapping constants aliasing the global TargetType enum. /// public static class TargetType { /// /// Alias for TargetType.Game /// public const global::UnrealBuildTool.TargetType Game = global::UnrealBuildTool.TargetType.Game; /// /// Alias for TargetType.Editor /// public const global::UnrealBuildTool.TargetType Editor = global::UnrealBuildTool.TargetType.Editor; /// /// Alias for TargetType.Client /// public const global::UnrealBuildTool.TargetType Client = global::UnrealBuildTool.TargetType.Client; /// /// Alias for TargetType.Server /// public const global::UnrealBuildTool.TargetType Server = global::UnrealBuildTool.TargetType.Server; /// /// Alias for TargetType.Program /// public const global::UnrealBuildTool.TargetType Program = global::UnrealBuildTool.TargetType.Program; } /// /// Dummy class to maintain support for the SetupGlobalEnvironment() callback. We don't expose these classes directly any more. /// public class LinkEnvironmentConfiguration { /// /// TargetRules instance to forward settings to. /// TargetRules Inner; /// /// Constructor. /// /// The target rules object. Fields on this object are treated as aliases to fields on this rules object. public LinkEnvironmentConfiguration(TargetRules Inner) { this.Inner = Inner; } /// /// Settings exposed from the TargetRules instance /// #region Forwarded fields #if !__MonoCS__ #pragma warning disable CS1591 #endif public bool bHasExports { get { return Inner.bHasExports; } set { Inner.bHasExports = value; } } public bool bIsBuildingConsoleApplication { get { return Inner.bIsBuildingConsoleApplication; } set { Inner.bIsBuildingConsoleApplication = value; } } public bool bDisableSymbolCache { get { return Inner.bDisableSymbolCache; } set { Inner.bDisableSymbolCache = value; } } #if !__MonoCS__ #pragma warning restore CS1591 #endif #endregion } /// /// Dummy class to maintain support for the SetupGlobalEnvironment() callback. We don't expose these classes directly any more. /// public class CPPEnvironmentConfiguration { /// /// TargetRules instance to forward settings to. /// TargetRules Inner; /// /// Constructor. /// /// The target rules object. Fields on this object are treated as aliases to fields on this rules object. public CPPEnvironmentConfiguration(TargetRules Inner) { this.Inner = Inner; } /// /// Settings exposed from the TargetRules instance /// #region Forwarded fields #if !__MonoCS__ #pragma warning disable CS1591 #endif public List Definitions { get { return Inner.GlobalDefinitions; } } public bool bEnableOSX109Support { get { return Inner.bEnableOSX109Support; } set { Inner.bEnableOSX109Support = value; } } #if !__MonoCS__ #pragma warning restore CS1591 #endif #endregion } /// /// The name of this target. /// public readonly string Name; /// /// Platform that this target is being built for. /// public readonly UnrealTargetPlatform Platform; /// /// The configuration being built. /// public readonly UnrealTargetConfiguration Configuration; /// /// Architecture that the target is being built for (or an empty string for the default). /// public readonly string Architecture; /// /// Path to the project file for the project containing this target. /// public readonly FileReference ProjectFile; /// /// The type of target. /// public global::UnrealBuildTool.TargetType Type = global::UnrealBuildTool.TargetType.Game; /// /// Whether the target uses Steam. /// public bool bUsesSteam; /// /// Whether the target uses CEF3. /// public bool bUsesCEF3; /// /// Whether the project uses visual Slate UI (as opposed to the low level windowing/messaging, which is always available). /// public bool bUsesSlate = true; /// /// Forces linking against the static CRT. This is not fully supported across the engine due to the need for allocator implementations to be shared (for example), and TPS /// libraries to be consistent with each other, but can be used for utility programs. /// public bool bUseStaticCRT = false; /// /// Enables the debug C++ runtime (CRT) for debug builds. By default we always use the release runtime, since the debug /// version isn't particularly useful when debugging Unreal Engine projects, and linking against the debug CRT libraries forces /// our third party library dependencies to also be compiled using the debug CRT (and often perform more slowly). Often /// it can be inconvenient to require a separate copy of the debug versions of third party static libraries simply /// so that you can debug your program's code. /// [XmlConfigFile(Category = "BuildConfiguration")] public bool bDebugBuildsActuallyUseDebugCRT = false; /// /// Whether the output from this target can be publicly distributed, even if it has dependencies on modules that are in folders /// with special restrictions (eg. CarefullyRedist, NotForLicensees, NoRedist). /// public bool bOutputPubliclyDistributable = false; /// /// Specifies the configuration whose binaries do not require a "-Platform-Configuration" suffix. /// public UnrealTargetConfiguration UndecoratedConfiguration = UnrealTargetConfiguration.Development; /// /// Build all the plugins that we can find, even if they're not enabled. This is particularly useful for content-only projects, /// where you're building the UE4Editor target but running it with a game that enables a plugin. /// public bool bBuildAllPlugins = false; /// /// A list of additional plugins which need to be included in this target. This allows referencing non-optional plugin modules /// which cannot be disabled, and allows building against specific modules in program targets which do not fit the categories /// in ModuleHostType. /// public List AdditionalPlugins = new List(); /// /// Path to the set of pak signing keys to embed in the executable. /// public string PakSigningKeysFile = ""; /// /// Allows a Program Target to specify it's own solution folder path. /// public string SolutionDirectory = String.Empty; /// /// Output the executable to the engine binaries folder. /// public bool bOutputToEngineBinaries = false; /// /// Whether this target should be compiled as a DLL. Requires LinkType to be set to TargetLinkType.Monolithic. /// public bool bShouldCompileAsDLL = false; /// /// Subfolder to place executables in, relative to the default location. /// public string ExeBinariesSubFolder = String.Empty; /// /// Allow target module to override UHT code generation version. /// public EGeneratedCodeVersion GeneratedCodeVersion = EGeneratedCodeVersion.None; /// /// Whether to include PhysX support. /// public bool bCompilePhysX = true; /// /// Whether to include PhysX APEX support. /// [ConfigFile(ConfigHierarchyType.Engine, "/Script/BuildSettings.BuildSettings", "bCompileApex")] public bool bCompileAPEX = true; /// /// Whether to include NvCloth. /// public bool bCompileNvCloth = false; /// /// Whether to allow runtime cooking of physics. /// public bool bRuntimePhysicsCooking = true; /// /// Whether to include Box2D support. /// [ConfigFile(ConfigHierarchyType.Engine, "/Script/BuildSettings.BuildSettings", "bCompileBox2D")] public bool bCompileBox2D = true; /// /// Whether to include ICU unicode/i18n support in Core. /// [ConfigFile(ConfigHierarchyType.Engine, "/Script/BuildSettings.BuildSettings", "bCompileICU")] public bool bCompileICU = true; /// /// Whether to compile CEF3 support. /// [ConfigFile(ConfigHierarchyType.Engine, "/Script/BuildSettings.BuildSettings", "bCompileCEF3")] public bool bCompileCEF3 = true; /// /// Whether to compile the editor or not. Only desktop platforms (Windows or Mac) will use this, other platforms force this to false. /// [CommandLine("-NoEditor", Value = "false")] public bool bBuildEditor = true; /// /// Whether to compile code related to building assets. Consoles generally cannot build assets. Desktop platforms generally can. /// public bool bBuildRequiresCookedData = false; /// /// Whether to compile WITH_EDITORONLY_DATA disabled. Only Windows will use this, other platforms force this to false. /// [CommandLine("-NoEditorOnlyData", Value = "false")] public bool bBuildWithEditorOnlyData = true; /// /// Whether to compile the developer tools. /// public bool bBuildDeveloperTools = true; /// /// Whether to force compiling the target platform modules, even if they wouldn't normally be built. /// public bool bForceBuildTargetPlatforms = false; /// /// Whether to force compiling shader format modules, even if they wouldn't normally be built. /// public bool bForceBuildShaderFormats = false; /// /// Whether we should compile in support for Simplygon or not. /// [CommandLine("-WithSimplygon")] [ConfigFile(ConfigHierarchyType.Engine, "/Script/BuildSettings.BuildSettings", "bCompileSimplygon")] public bool bCompileSimplygon = true; /// /// Whether we should compile in support for Simplygon's SSF library or not. /// [ConfigFile(ConfigHierarchyType.Engine, "/Script/BuildSettings.BuildSettings", "bCompileSimplygonSSF")] public bool bCompileSimplygonSSF = true; /// /// Whether to compile lean and mean version of UE. /// [ConfigFile(ConfigHierarchyType.Engine, "/Script/BuildSettings.BuildSettings", "bCompileLeanAndMeanUE")] public bool bCompileLeanAndMeanUE = false; /// /// Enabled for all builds that include the engine project. Disabled only when building standalone apps that only link with Core. /// public bool bCompileAgainstEngine = true; /// /// Enabled for all builds that include the CoreUObject project. Disabled only when building standalone apps that only link with Core. /// public bool bCompileAgainstCoreUObject = true; /// /// If true, include ADO database support in core. /// [ConfigFile(ConfigHierarchyType.Engine, "/Script/BuildSettings.BuildSettings", "bIncludeADO")] public bool bIncludeADO; /// /// Whether to compile Recast navmesh generation. /// [ConfigFile(ConfigHierarchyType.Engine, "/Script/BuildSettings.BuildSettings", "bCompileRecast")] public bool bCompileRecast = true; /// /// Whether to compile SpeedTree support. /// [ConfigFile(ConfigHierarchyType.Engine, "/Script/BuildSettings.BuildSettings", "bCompileSpeedTree")] public bool bCompileSpeedTree = true; /// /// Enable exceptions for all modules. /// public bool bForceEnableExceptions = false; /// /// Enable RTTI for all modules. /// public bool bForceEnableRTTI = false; /// /// Compile server-only code. /// public bool bWithServerCode = true; /// /// Whether to include stats support even without the engine. /// public bool bCompileWithStatsWithoutEngine = false; /// /// Whether to include plugin support. /// [ConfigFile(ConfigHierarchyType.Engine, "/Script/BuildSettings.BuildSettings", "bCompileWithPluginSupport")] public bool bCompileWithPluginSupport = false; /// /// Whether to include PerfCounters support. /// [ConfigFile(ConfigHierarchyType.Engine, "/Script/BuildSettings.BuildSettings", "bWithPerfCounters")] public bool bWithPerfCounters = false; /// /// Whether to turn on logging for test/shipping builds. /// public bool bUseLoggingInShipping = false; /// /// Whether to turn on logging to memory for test/shipping builds. /// public bool bLoggingToMemoryEnabled; /// /// Whether to check that the process was launched through an external launcher. /// public bool bUseLauncherChecks = false; /// /// Whether to turn on checks (asserts) for test/shipping builds. /// public bool bUseChecksInShipping = false; /// /// True if we need FreeType support. /// [ConfigFile(ConfigHierarchyType.Engine, "/Script/BuildSettings.BuildSettings", "bCompileFreeType")] public bool bCompileFreeType = true; /// /// True if we want to favor optimizing size over speed. /// [ConfigFile(ConfigHierarchyType.Engine, "/Script/BuildSettings.BuildSettings", "bCompileForSize")] public bool bCompileForSize = false; /// /// Whether to compile development automation tests. /// public bool bForceCompileDevelopmentAutomationTests = false; /// /// Whether to compile performance automation tests. /// public bool bForceCompilePerformanceAutomationTests = false; /// /// If true, event driven loader will be used in cooked builds. @todoio This needs to be replaced by a runtime solution after async loading refactor. /// public bool bEventDrivenLoader; /// /// Enforce "include what you use" rules; warns if monolithic headers (Engine.h, UnrealEd.h, etc...) are used, and checks that source files include their matching header first. /// public bool bEnforceIWYU = true; /// /// Whether the final executable should export symbols. /// public bool bHasExports = true; /// /// Make static libraries for all engine modules as intermediates for this target. /// [CommandLine("-Precompile")] public bool bPrecompile = false; /// /// Use existing static libraries for all engine modules in this target. /// [CommandLine("-UsePrecompiled")] public bool bUsePrecompiled = false; /// /// Whether we should compile with support for OS X 10.9 Mavericks. Used for some tools that we need to be compatible with this version of OS X. /// public bool bEnableOSX109Support = false; /// /// True if this is a console application that's being built. /// public bool bIsBuildingConsoleApplication = false; /// /// True if debug symbols that are cached for some platforms should not be created. /// public bool bDisableSymbolCache = true; /// /// Whether to unify C++ code into larger files for faster compilation. /// [CommandLine("-DisableUnity", Value = "false")] [XmlConfigFile(Category = "BuildConfiguration")] public bool bUseUnityBuild = true; /// /// Whether to force C++ source files to be combined into larger files for faster compilation. /// [CommandLine("-ForceUnity")] [XmlConfigFile(Category = "BuildConfiguration")] public bool bForceUnityBuild = false; /// /// Use a heuristic to determine which files are currently being iterated on and exclude them from unity blobs, result in faster /// incremental compile times. The current implementation uses the read-only flag to distinguish the working set, assuming that files will /// be made writable by the source control system if they are being modified. This is true for Perforce, but not for Git. /// [XmlConfigFile(Category = "BuildConfiguration")] public bool bUseAdaptiveUnityBuild = true; /// /// Disable optimization for files that are in the adaptive non-unity working set. /// [XmlConfigFile(Category = "BuildConfiguration")] public bool bAdaptiveUnityDisablesOptimizations = false; /// /// Disables force-included PCHs for files that are in the adaptive non-unity working set. /// [XmlConfigFile(Category = "BuildConfiguration")] public bool bAdaptiveUnityDisablesPCH = true; /// /// The number of source files in a game module before unity build will be activated for that module. This /// allows small game modules to have faster iterative compile times for single files, at the expense of slower full /// rebuild times. This setting can be overridden by the bFasterWithoutUnity option in a module's Build.cs file. /// [XmlConfigFile(Category = "BuildConfiguration")] public int MinGameModuleSourceFilesForUnityBuild = 32; /// /// Forces shadow variable warnings to be treated as errors on platforms that support it. /// [CommandLine("-ShadowVariableErrors")] [XmlConfigFile(Category = "BuildConfiguration")] public bool bShadowVariableErrors = false; /// /// Forces the use of undefined identifiers in conditional expressions to be treated as errors. /// [XmlConfigFile(Category = "BuildConfiguration")] public bool bUndefinedIdentifierErrors = false; /// /// New Monolithic Graphics drivers have optional "fast calls" replacing various D3d functions /// [CommandLine("-FastMonoCalls", Value = "true")] [CommandLine("-NoFastMonoCalls", Value = "false")] [XmlConfigFile(Category = "BuildConfiguration")] public bool bUseFastMonoCalls = true; /// /// New Xbox driver supports a "fast semantics" context type. This switches it on for the immediate and deferred contexts /// Try disabling this if you see rendering issues and/or crashes inthe Xbox RHI. /// [XmlConfigFile(Category = "BuildConfiguration")] public bool bUseFastSemanticsRenderContexts = true; /// /// An approximate number of bytes of C++ code to target for inclusion in a single unified C++ file. /// [XmlConfigFile(Category = "BuildConfiguration")] public int NumIncludedBytesPerUnityCPP = 384 * 1024; /// /// Whether to stress test the C++ unity build robustness by including all C++ files files in a project from a single unified file. /// [CommandLine("-StressTestUnity")] [XmlConfigFile(Category = "BuildConfiguration")] public bool bStressTestUnity = false; /// /// Whether to force debug info to be generated. /// [CommandLine("-ForceDebugInfo")] public bool bForceDebugInfo = false; /// /// Whether to globally disable debug info generation; see DebugInfoHeuristics.cs for per-config and per-platform options. /// [CommandLine("-NoDebugInfo")] [XmlConfigFile(Category = "BuildConfiguration")] public bool bDisableDebugInfo = false; /// /// Whether to disable debug info generation for generated files. This improves link times for modules that have a lot of generated glue code. /// [XmlConfigFile(Category = "BuildConfiguration")] public bool bDisableDebugInfoForGeneratedCode = true; /// /// Whether to disable debug info on PC in development builds (for faster developer iteration, as link times are extremely fast with debug info disabled). /// [XmlConfigFile(Category = "BuildConfiguration")] public bool bOmitPCDebugInfoInDevelopment = false; /// /// Whether PDB files should be used for Visual C++ builds. /// [CommandLine("-NoPDB", Value = "false")] [XmlConfigFile(Category = "BuildConfiguration")] public bool bUsePDBFiles = false; /// /// Whether PCH files should be used. /// [CommandLine("-NoPCH", Value = "false")] [XmlConfigFile(Category = "BuildConfiguration")] public bool bUsePCHFiles = true; /// /// The minimum number of files that must use a pre-compiled header before it will be created and used. /// [XmlConfigFile(Category = "BuildConfiguration")] public int MinFilesUsingPrecompiledHeader = 6; /// /// When enabled, a precompiled header is always generated for game modules, even if there are only a few source files /// in the module. This greatly improves compile times for iterative changes on a few files in the project, at the expense of slower /// full rebuild times for small game projects. This can be overridden by setting MinFilesUsingPrecompiledHeaderOverride in /// a module's Build.cs file. /// [XmlConfigFile(Category = "BuildConfiguration")] public bool bForcePrecompiledHeaderForGameModules = true; /// /// Whether to use incremental linking or not. Incremental linking can yield faster iteration times when making small changes. /// Currently disabled by default because it tends to behave a bit buggy on some computers (PDB-related compile errors). /// [XmlConfigFile(Category = "BuildConfiguration")] public bool bUseIncrementalLinking = false; /// /// Whether to allow the use of link time code generation (LTCG). /// [CommandLine("-NoLTCG", Value = "false")] [XmlConfigFile(Category = "BuildConfiguration")] public bool bAllowLTCG = false; /// /// Whether to allow the use of ASLR (address space layout randomization) if supported. Only /// applies to shipping builds. /// [XmlConfigFile(Category = "BuildConfiguration")] public bool bAllowASLRInShipping = true; /// /// Whether to support edit and continue. Only works on Microsoft compilers in 32-bit compiles. /// [XmlConfigFile(Category = "BuildConfiguration")] public bool bSupportEditAndContinue = false; /// /// Whether to omit frame pointers or not. Disabling is useful for e.g. memory profiling on the PC. /// [XmlConfigFile(Category = "BuildConfiguration")] public bool bOmitFramePointers = true; /// /// Whether to strip iOS symbols or not (implied by bGeneratedSYMFile). /// [XmlConfigFile(Category = "BuildConfiguration")] public bool bStripSymbolsOnIOS = false; /// /// If true, then enable memory profiling in the build (defines USE_MALLOC_PROFILER=1 and forces bOmitFramePointers=false). /// [XmlConfigFile(Category = "BuildConfiguration")] public bool bUseMallocProfiler = false; /// /// Enables "Shared PCHs", a feature which significantly speeds up compile times by attempting to /// share certain PCH files between modules that UBT detects is including those PCH's header files. /// [CommandLine("-NoSharedPCH", Value = "false")] [XmlConfigFile(Category = "BuildConfiguration")] public bool bUseSharedPCHs = true; /// /// True if Development and Release builds should use the release configuration of PhysX/APEX. /// [XmlConfigFile(Category = "BuildConfiguration")] public bool bUseShippingPhysXLibraries = false; /// /// True if Development and Release builds should use the checked configuration of PhysX/APEX. if bUseShippingPhysXLibraries is true this is ignored. /// [XmlConfigFile(Category = "BuildConfiguration")] public bool bUseCheckedPhysXLibraries = false; /// /// Tells the UBT to check if module currently being built is violating EULA. /// [XmlConfigFile(Category = "BuildConfiguration")] public bool bCheckLicenseViolations = true; /// /// Tells the UBT to break build if module currently being built is violating EULA. /// [XmlConfigFile(Category = "BuildConfiguration")] public bool bBreakBuildOnLicenseViolation = true; /// /// Whether to use the :FASTLINK option when building with /DEBUG to create local PDBs on Windows. Fast, but currently seems to have problems finding symbols in the debugger. /// [CommandLine("-FastPDB")] [XmlConfigFile(Category = "BuildConfiguration")] public bool bUseFastPDBLinking = false; /// /// Outputs a map file as part of the build. /// [CommandLine("-MapFile")] [XmlConfigFile(Category = "BuildConfiguration")] public bool bCreateMapFile = false; /// /// Enables code analysis mode. Currently, this has specific requirements. It only works on Windows /// platform with the MSVC compiler. Also, it requires a version of the compiler that supports the /// /analyze option, such as Visual Studio 2013. /// [CommandLine("-EnableCodeAnalysis")] [XmlConfigFile(Category = "BuildConfiguration")] public bool bEnableCodeAnalysis = false; /// /// Bundle version for Mac apps. /// [CommandLine("-BundleVersion")] public string BundleVersion = null; /// /// Whether to deploy the executable after compilation on platforms that require deployment. /// [CommandLine("-Deploy")] public bool bDeployAfterCompile = false; /// /// If true, then a stub IPA will be generated when compiling is done (minimal files needed for a valid IPA). /// [CommandLine("-NoCreateStub", Value = "false")] public bool bCreateStubIPA = true; /// /// If true, then a stub IPA will be generated when compiling is done (minimal files needed for a valid IPA). /// [CommandLine("-CopyAppBundleBackToDevice")] public bool bCopyAppBundleBackToDevice = false; /// /// When enabled, allows XGE to compile pre-compiled header files on remote machines. Otherwise, PCHs are always generated locally. /// public bool bAllowRemotelyCompiledPCHs = false; /// /// Whether headers in system paths should be checked for modification when determining outdated actions. /// [XmlConfigFile(Category = "BuildConfiguration")] public bool bCheckSystemHeadersForModification; /// /// Whether to disable linking for this target. /// [CommandLine("-NoLink")] public bool bDisableLinking = false; /// /// Indicates that this is a formal build, intended for distribution. This flag is automatically set to true when Build.version has a changelist set. /// The only behavior currently bound to this flag is to compile the default resource file separately for each binary so that the OriginalFilename field is set correctly. /// By default, we only compile the resource once to reduce build times. /// [CommandLine("-Formal")] public bool bFormalBuild = false; /// /// Whether to clean Builds directory on a remote Mac before building. /// [CommandLine("-FlushMac")] [XmlConfigFile(Category = "BuildConfiguration")] public bool bFlushBuildDirOnRemoteMac = false; /// /// Whether to write detailed timing info from the compiler and linker. /// [CommandLine("-Timing")] [XmlConfigFile(Category = "BuildConfiguration")] public bool bPrintToolChainTimingInfo = false; /// /// The directory to put precompiled header files in. Experimental setting to allow using a path on a faster drive. Defaults to the standard output directory if not set. /// [XmlConfigFile(Category = "BuildConfiguration")] public string PCHOutputDirectory = null; /// /// Specifies how to link modules in this target (monolithic or modular). This is currently protected for backwards compatibility. Call the GetLinkType() accessor /// until support for the deprecated ShouldCompileMonolithic() override has been removed. /// public TargetLinkType LinkType { get { return (LinkTypePrivate != TargetLinkType.Default) ? LinkTypePrivate : ((Type == global::UnrealBuildTool.TargetType.Editor) ? TargetLinkType.Modular : TargetLinkType.Monolithic); } set { LinkTypePrivate = value; } } /// /// Backing storage for the LinkType property. /// [CommandLine("-Monolithic", Value ="Monolithic")] [CommandLine("-Modular", Value ="Modular")] TargetLinkType LinkTypePrivate = TargetLinkType.Default; /// /// Macros to define globally across the whole target. /// [CommandLine("-Define", ValueAfterSpace = true)] public List GlobalDefinitions = new List(); /// /// Specifies the name of the launch module. For modular builds, this is the module that is compiled into the target's executable. /// public string LaunchModuleName { get { return (LaunchModuleNamePrivate == null && Type != global::UnrealBuildTool.TargetType.Program)? "Launch" : LaunchModuleNamePrivate; } set { LaunchModuleNamePrivate = value; } } /// /// Backing storage for the LaunchModuleName property. /// private string LaunchModuleNamePrivate; /// /// List of additional modules to be compiled into the target. /// public List ExtraModuleNames = new List(); /// /// Specifies the build environment for this target. See TargetBuildEnvironment for more infomation on the available options. /// public TargetBuildEnvironment BuildEnvironment = TargetBuildEnvironment.Default; /// /// Android-specific target settings. /// public AndroidTargetRules AndroidPlatform = new AndroidTargetRules(); /// /// Mac-specific target settings. /// public MacTargetRules MacPlatform = new MacTargetRules(); /// /// PS4-specific target settings. /// public PS4TargetRules PS4Platform = new PS4TargetRules(); /// /// Windows-specific target settings. /// public WindowsTargetRules WindowsPlatform = new WindowsTargetRules(); /// /// Xbox One-specific target settings. /// public XboxOneTargetRules XboxOnePlatform = new XboxOneTargetRules(); /// /// Default constructor (deprecated; use the constructor below instead). /// [Obsolete("Please pass the TargetInfo parameter to the base class constructor (eg. \"MyTargetRules(TargetInfo Target) : base(Target)\").")] public TargetRules() { InternalConstructor(); } /// /// Default constructor. Since the parameterless TargetRules constructor is still supported for now, initialization that should happen here /// is currently done in TargetRules.CreateTargetRulesInstance() instead. /// /// Information about the target being built public TargetRules(TargetInfo Target) { InternalConstructor(); } /// /// Initialize this object, using the readonly fields set by RulesAssembly.CreateTargetRulesInstance. /// private void InternalConstructor() { // Read settings from config files foreach(object ConfigurableObject in GetConfigurableObjects()) { ConfigCache.ReadSettings(DirectoryReference.FromFile(ProjectFile), Platform, ConfigurableObject); } // Read settings from the XML config files XmlConfig.ApplyTo(this); // Allow the build platform to set defaults for this target if(Platform != UnrealTargetPlatform.Unknown) { UEBuildPlatform.GetBuildPlatform(Platform).ResetTarget(this); } // If the engine is installed, always use precompiled libraries bUsePrecompiled = UnrealBuildTool.IsEngineInstalled(); // Check that the appropriate headers exist to enable Simplygon if(bCompileSimplygon) { FileReference HeaderFile = FileReference.Combine(UnrealBuildTool.EngineDirectory, "Source", "ThirdParty", "NotForLicensees", "Simplygon", "Simplygon-latest", "Inc", "SimplygonSDK.h"); if(!FileReference.Exists(HeaderFile)) { bCompileSimplygon = false; } } if(bCompileSimplygonSSF) { FileReference HeaderFile = FileReference.Combine(UnrealBuildTool.EngineDirectory, "Source", "ThirdParty", "NotForLicensees", "SSF", "Public", "ssf.h"); if(!FileReference.Exists(HeaderFile)) { bCompileSimplygonSSF = false; } } // If we've got a changelist set, set that we're making a formal build BuildVersion Version; if (BuildVersion.TryRead(out Version)) { bFormalBuild = (Version.Changelist != 0 && Version.IsPromotedBuild != 0); } if (bCreateStubIPA && (String.IsNullOrEmpty(Environment.GetEnvironmentVariable("uebp_LOCAL_ROOT")) && BuildHostPlatform.Current.Platform == UnrealTargetPlatform.Mac)) { bCreateStubIPA = false; } } /// /// Override any settings required for the selected target type /// internal void SetOverridesForTargetType() { if(Type == global::UnrealBuildTool.TargetType.Game) { bCompileLeanAndMeanUE = true; // Do not include the editor bBuildEditor = false; bBuildWithEditorOnlyData = false; // Require cooked data bBuildRequiresCookedData = true; // Compile the engine bCompileAgainstEngine = true; // no exports, so no need to verify that a .lib and .exp file was emitted by the linker. bHasExports = false; // Tag it as a 'Game' build GlobalDefinitions.Add("UE_GAME=1"); } else if(Type == global::UnrealBuildTool.TargetType.Client) { bCompileLeanAndMeanUE = true; // Do not include the editor bBuildEditor = false; bBuildWithEditorOnlyData = false; // Require cooked data bBuildRequiresCookedData = true; // Compile the engine bCompileAgainstEngine = true; // Disable server code bWithServerCode = false; // no exports, so no need to verify that a .lib and .exp file was emitted by the linker. bHasExports = false; // Tag it as a 'Game' build GlobalDefinitions.Add("UE_GAME=1"); } else if(Type == global::UnrealBuildTool.TargetType.Editor) { bCompileLeanAndMeanUE = false; // Do not include the editor bBuildEditor = true; bBuildWithEditorOnlyData = true; // Require cooked data bBuildRequiresCookedData = false; // Compile the engine bCompileAgainstEngine = true; //enable PerfCounters bWithPerfCounters = true; // Tag it as a 'Editor' build GlobalDefinitions.Add("UE_EDITOR=1"); } else if(Type == global::UnrealBuildTool.TargetType.Server) { bCompileLeanAndMeanUE = true; // Do not include the editor bBuildEditor = false; bBuildWithEditorOnlyData = false; // Require cooked data bBuildRequiresCookedData = true; // Compile the engine bCompileAgainstEngine = true; //enable PerfCounters bWithPerfCounters = true; // no exports, so no need to verify that a .lib and .exp file was emitted by the linker. bHasExports = false; // Tag it as a 'Server' build GlobalDefinitions.Add("UE_SERVER=1"); GlobalDefinitions.Add("USE_NULL_RHI=1"); } } /// /// Finds all the subobjects which can be configured by command line options and config files /// /// Sequence of objects internal IEnumerable GetConfigurableObjects() { yield return this; yield return AndroidPlatform; yield return MacPlatform; yield return PS4Platform; yield return WindowsPlatform; yield return XboxOnePlatform; } /// /// Replacement for TargetInfo.IsMonolithic during transition from TargetInfo to ReadOnlyTargetRules /// [Obsolete("IsMonolithic is deprecated in the 4.16 release. Check whether LinkType == TargetRules.TargetLinkType.Monolithic instead.")] public bool IsMonolithic { get { return LinkType == TargetLinkType.Monolithic; } } /// /// Accessor to return the link type for this module, including support for setting LinkType, or for overriding ShouldCompileMonolithic(). /// /// The platform being compiled. /// The configuration being compiled. /// Link type for the given combination internal TargetLinkType GetLegacyLinkType(UnrealTargetPlatform Platform, UnrealTargetConfiguration Configuration) { #pragma warning disable 0612 if (GetType().GetMethod("ShouldCompileMonolithic").DeclaringType != typeof(TargetRules)) { return ShouldCompileMonolithic(Platform, Configuration) ? TargetLinkType.Monolithic : TargetLinkType.Modular; } else { return LinkType; } #pragma warning restore 0612 } /// /// Can be set to override the file extension of the executable file (normally .exe or .dll on Windows, for example) /// public string OverrideExecutableFileExtension = String.Empty; /// /// Whether this target should be compiled in monolithic mode /// /// The platform being built /// The configuration being built /// true if it should, false if not [ObsoleteOverride("ShouldCompileMonolithic() is deprecated in 4.15. Please set LinkType = TargetLinkType.Monolithic or LinkType = TargetLinkType.Modular in your target's constructor instead.")] public virtual bool ShouldCompileMonolithic(UnrealTargetPlatform InPlatform, UnrealTargetConfiguration InConfiguration) { return Type != global::UnrealBuildTool.TargetType.Editor; } /// /// Give the target an opportunity to override toolchain settings /// /// The target currently being setup /// true if successful, false if not [ObsoleteOverride("ConfigureToolchain() is deprecated in the 4.16 release. Please set toolchain-specific options from the target's constructor instead.")] public virtual bool ConfigureToolchain(TargetInfo Target) { return true; } /// /// Get the supported platforms for this target. /// This function is deprecated in 4.15, and a warning will be given by RulesCompiler if it is implemented by a derived class. /// /// The list of platforms supported /// true if successful, false if not [ObsoleteOverride("GetSupportedPlatforms() is deprecated in the 4.15 release. Add a [SupportedPlatforms(...)] attribute to your TargetRules class instead.")] public virtual bool GetSupportedPlatforms(ref List OutPlatforms) { if (Type == global::UnrealBuildTool.TargetType.Program) { OutPlatforms = new List(Utils.GetPlatformsInClass(UnrealPlatformClass.Desktop)); return true; } else if (Type == global::UnrealBuildTool.TargetType.Editor) { OutPlatforms = new List(Utils.GetPlatformsInClass(UnrealPlatformClass.Editor)); return true; } else { OutPlatforms = new List(Utils.GetPlatformsInClass(UnrealPlatformClass.All)); return true; } } /// /// Get the supported configurations for this target /// /// The list of configurations supported /// /// true if successful, false if not [ObsoleteOverride("GetSupportedConfigurations() is deprecated in the 4.15 release. Add a [SupportedConfigurations(...)] attribute to your TargetRules class instead.")] public virtual bool GetSupportedConfigurations(ref List OutConfigurations, bool bIncludeTestAndShippingConfigs) { if (Type == global::UnrealBuildTool.TargetType.Program) { // By default, programs are Debug and Development only. OutConfigurations.Add(UnrealTargetConfiguration.Debug); OutConfigurations.Add(UnrealTargetConfiguration.Development); } else { // By default all games support all configurations foreach (UnrealTargetConfiguration Config in Enum.GetValues(typeof(UnrealTargetConfiguration))) { if (Config != UnrealTargetConfiguration.Unknown) { // Some configurations just don't make sense for the editor if (Type == global::UnrealBuildTool.TargetType.Editor && (Config == UnrealTargetConfiguration.Shipping || Config == UnrealTargetConfiguration.Test)) { // We don't currently support a "shipping" editor config } else if (!bIncludeTestAndShippingConfigs && (Config == UnrealTargetConfiguration.Shipping || Config == UnrealTargetConfiguration.Test)) { // User doesn't want 'Test' or 'Shipping' configs in their project files } else { OutConfigurations.Add(Config); } } } } return (OutConfigurations.Count > 0) ? true : false; } /// /// Setup the binaries associated with this target. /// /// The target information - such as platform and configuration /// Output list of binaries to generated /// Output list of extra modules that this target could utilize [ObsoleteOverride("SetupBinaries() is deprecated in the 4.16 release. From the constructor in your .target.cs file, use ExtraModuleNames.Add(\"Foo\") to add modules to your target, or set LaunchModuleName = \"Foo\" to override the name of the launch module for program targets.")] public virtual void SetupBinaries( TargetInfo Target, ref List OutBuildBinaryConfigurations, ref List OutExtraModuleNames ) { } /// /// Setup the global environment for building this target /// IMPORTANT: Game targets will *not* have this function called if they use the shared build environment. /// See ShouldUseSharedBuildEnvironment(). /// /// The target information - such as platform and configuration /// Output link environment settings /// Output compile environment settings public virtual void SetupGlobalEnvironment( TargetInfo Target, ref LinkEnvironmentConfiguration OutLinkEnvironmentConfiguration, ref CPPEnvironmentConfiguration OutCPPEnvironmentConfiguration ) { } /// /// Allows a target to choose whether to use the shared build environment for a given configuration. Using /// the shared build environment allows binaries to be reused between targets, but prevents customizing the /// compile environment through SetupGlobalEnvironment(). /// /// Information about the target /// True if the target should use the shared build environment [ObsoleteOverride("ShouldUseSharedBuildEnvironment() is deprecated in the 4.16 release. Set the BuildEnvironment field from the TargetRules constructor instead.")] public virtual bool ShouldUseSharedBuildEnvironment(TargetInfo Target) { return UnrealBuildTool.IsEngineInstalled() || (Target.Type != global::UnrealBuildTool.TargetType.Program && !Target.IsMonolithic); } /// /// Allows the target to specify modules which can be precompiled with the -Precompile/-UsePrecompiled arguments to UBT. /// All dependencies of the specified modules will be included. /// /// The target information, such as platform and configuration /// List which receives module names to precompile [ObsoleteOverride("GetModulesToPrecompile() is deprecated in the 4.11 release. The -precompile option to UBT now automatically compiles all engine modules compatible with the current target.")] public virtual void GetModulesToPrecompile(TargetInfo Target, List ModuleNames) { } /// /// Allow target module to override UHT code generation version. /// [ObsoleteOverride("GetGeneratedCodeVersion() is deprecated in the 4.15 release. Set the GeneratedCodeVersion field from the TargetRules constructor instead.")] public virtual EGeneratedCodeVersion GetGeneratedCodeVersion() { return GeneratedCodeVersion; } /// /// Hack to allow deprecating existing code which references the static UEBuildConfiguration object; redirect it to use properties on this object. /// public TargetRules BuildConfiguration { get { return this; } } /// /// Hack to allow deprecating existing code which references the static UEBuildConfiguration object; redirect it to use properties on this object. /// public TargetRules UEBuildConfiguration { get { return this; } } } /// /// Read-only wrapper around an existing TargetRules instance. This exposes target settings to modules without letting them to modify the global environment. /// public partial class ReadOnlyTargetRules { /// /// The writeable TargetRules instance /// TargetRules Inner; /// /// Constructor /// /// The TargetRules instance to wrap around public ReadOnlyTargetRules(TargetRules Inner) { this.Inner = Inner; AndroidPlatform = new ReadOnlyAndroidTargetRules(Inner.AndroidPlatform); MacPlatform = new ReadOnlyMacTargetRules(Inner.MacPlatform); PS4Platform = new ReadOnlyPS4TargetRules(Inner.PS4Platform); WindowsPlatform = new ReadOnlyWindowsTargetRules(Inner.WindowsPlatform); XboxOnePlatform = new ReadOnlyXboxOneTargetRules(Inner.XboxOnePlatform); } /// /// Accessors for fields on the inner TargetRules instance /// #region Read-only accessor properties #if !__MonoCS__ #pragma warning disable CS1591 #endif public string Name { get { return Inner.Name; } } public UnrealTargetPlatform Platform { get { return Inner.Platform; } } public UnrealTargetConfiguration Configuration { get { return Inner.Configuration; } } public string Architecture { get { return Inner.Architecture; } } public FileReference ProjectFile { get { return Inner.ProjectFile; } } public TargetType Type { get { return Inner.Type; } } public bool bUsesSteam { get { return Inner.bUsesSteam; } } public bool bUsesCEF3 { get { return Inner.bUsesCEF3; } } public bool bUsesSlate { get { return Inner.bUsesSlate; } } public bool bUseStaticCRT { get { return Inner.bUseStaticCRT; } } public bool bDebugBuildsActuallyUseDebugCRT { get { return Inner.bDebugBuildsActuallyUseDebugCRT; } } public bool bOutputPubliclyDistributable { get { return Inner.bOutputPubliclyDistributable; } } public UnrealTargetConfiguration UndecoratedConfiguration { get { return Inner.UndecoratedConfiguration; } } public bool bBuildAllPlugins { get { return Inner.bBuildAllPlugins; } } public IEnumerable AdditionalPlugins { get { return Inner.AdditionalPlugins; } } public string PakSigningKeysFile { get { return Inner.PakSigningKeysFile; } } public string SolutionDirectory { get { return Inner.SolutionDirectory; } } public bool bOutputToEngineBinaries { get { return Inner.bOutputToEngineBinaries; } } public string ExeBinariesSubFolder { get { return Inner.ExeBinariesSubFolder; } } public EGeneratedCodeVersion GeneratedCodeVersion { get { return Inner.GeneratedCodeVersion; } } public bool bCompilePhysX { get { return Inner.bCompilePhysX; } } public bool bCompileAPEX { get { return Inner.bCompileAPEX; } } public bool bCompileNvCloth { get { return Inner.bCompileNvCloth; } } public bool bRuntimePhysicsCooking { get { return Inner.bRuntimePhysicsCooking; } } public bool bCompileBox2D { get { return Inner.bCompileBox2D; } } public bool bCompileICU { get { return Inner.bCompileICU; } } public bool bCompileCEF3 { get { return Inner.bCompileCEF3; } } public bool bBuildEditor { get { return Inner.bBuildEditor; } } public bool bBuildRequiresCookedData { get { return Inner.bBuildRequiresCookedData; } } public bool bBuildWithEditorOnlyData { get { return Inner.bBuildWithEditorOnlyData; } } public bool bBuildDeveloperTools { get { return Inner.bBuildDeveloperTools; } } public bool bForceBuildTargetPlatforms { get { return Inner.bForceBuildTargetPlatforms; } } public bool bForceBuildShaderFormats { get { return Inner.bForceBuildTargetPlatforms; } } public bool bCompileSimplygon { get { return Inner.bCompileSimplygon; } } public bool bCompileSimplygonSSF { get { return Inner.bCompileSimplygonSSF; } } public bool bCompileLeanAndMeanUE { get { return Inner.bCompileLeanAndMeanUE; } } public bool bCompileAgainstEngine { get { return Inner.bCompileAgainstEngine; } } public bool bCompileAgainstCoreUObject { get { return Inner.bCompileAgainstCoreUObject; } } public bool bIncludeADO { get { return Inner.bIncludeADO; } } public bool bCompileRecast { get { return Inner.bCompileRecast; } } public bool bCompileSpeedTree { get { return Inner.bCompileSpeedTree; } } public bool bForceEnableExceptions { get { return Inner.bForceEnableExceptions; } } public bool bForceEnableRTTI { get { return Inner.bForceEnableRTTI; } } public bool bWithServerCode { get { return Inner.bWithServerCode; } } public bool bCompileWithStatsWithoutEngine { get { return Inner.bCompileWithStatsWithoutEngine; } } public bool bCompileWithPluginSupport { get { return Inner.bCompileWithPluginSupport; } } public bool bWithPerfCounters { get { return Inner.bWithPerfCounters; } } public bool bUseLoggingInShipping { get { return Inner.bUseLoggingInShipping; } } public bool bLoggingToMemoryEnabled { get { return Inner.bLoggingToMemoryEnabled; } } public bool bUseLauncherChecks { get { return Inner.bUseLauncherChecks; } } public bool bUseChecksInShipping { get { return Inner.bUseChecksInShipping; } } public bool bCompileFreeType { get { return Inner.bCompileFreeType; } } public bool bCompileForSize { get { return Inner.bCompileForSize; } } public bool bForceCompileDevelopmentAutomationTests { get { return Inner.bForceCompileDevelopmentAutomationTests; } } public bool bForceCompilePerformanceAutomationTests { get { return Inner.bForceCompilePerformanceAutomationTests; } } public bool bEventDrivenLoader { get { return Inner.bEventDrivenLoader; } } public bool bEnforceIWYU { get { return Inner.bEnforceIWYU; } } public bool bHasExports { get { return Inner.bHasExports; } } public bool bPrecompile { get { return Inner.bPrecompile; } } public bool bUsePrecompiled { get { return Inner.bUsePrecompiled; } } public bool bEnableOSX109Support { get { return Inner.bEnableOSX109Support; } } public bool bIsBuildingConsoleApplication { get { return Inner.bIsBuildingConsoleApplication; } } public bool bDisableSymbolCache { get { return Inner.bDisableSymbolCache; } } public bool bUseUnityBuild { get { return Inner.bUseUnityBuild; } } public bool bForceUnityBuild { get { return Inner.bForceUnityBuild; } } public bool bAdaptiveUnityDisablesOptimizations { get { return Inner.bAdaptiveUnityDisablesOptimizations; } } public bool bAdaptiveUnityDisablesPCH { get { return Inner.bAdaptiveUnityDisablesPCH; } } public int MinGameModuleSourceFilesForUnityBuild { get { return Inner.MinGameModuleSourceFilesForUnityBuild; } } public bool bShadowVariableErrors { get { return Inner.bShadowVariableErrors; } } public bool bUndefinedIdentifierErrors { get { return Inner.bUndefinedIdentifierErrors; } } public bool bUseFastMonoCalls { get { return Inner.bUseFastMonoCalls; } } public bool bUseFastSemanticsRenderContexts { get { return Inner.bUseFastSemanticsRenderContexts; } } public int NumIncludedBytesPerUnityCPP { get { return Inner.NumIncludedBytesPerUnityCPP; } } public bool bStressTestUnity { get { return Inner.bStressTestUnity; } } public bool bDisableDebugInfo { get { return Inner.bDisableDebugInfo; } } public bool bDisableDebugInfoForGeneratedCode { get { return Inner.bDisableDebugInfoForGeneratedCode; } } public bool bOmitPCDebugInfoInDevelopment { get { return Inner.bOmitPCDebugInfoInDevelopment; } } public bool bUsePDBFiles { get { return Inner.bUsePDBFiles; } } public bool bUsePCHFiles { get { return Inner.bUsePCHFiles; } } public int MinFilesUsingPrecompiledHeader { get { return Inner.MinFilesUsingPrecompiledHeader; } } public bool bForcePrecompiledHeaderForGameModules { get { return Inner.bForcePrecompiledHeaderForGameModules; } } public bool bUseIncrementalLinking { get { return Inner.bUseIncrementalLinking; } } public bool bAllowLTCG { get { return Inner.bAllowLTCG; } } public bool bAllowASLRInShipping { get { return Inner.bAllowASLRInShipping; } } public bool bSupportEditAndContinue { get { return Inner.bSupportEditAndContinue; } } public bool bOmitFramePointers { get { return Inner.bOmitFramePointers; } } public bool bStripSymbolsOnIOS { get { return Inner.bStripSymbolsOnIOS; } } public bool bUseMallocProfiler { get { return Inner.bUseMallocProfiler; } } public bool bUseSharedPCHs { get { return Inner.bUseSharedPCHs; } } public bool bUseShippingPhysXLibraries { get { return Inner.bUseShippingPhysXLibraries; } } public bool bUseCheckedPhysXLibraries { get { return Inner.bUseCheckedPhysXLibraries; } } public bool bCheckLicenseViolations { get { return Inner.bCheckLicenseViolations; } } public bool bBreakBuildOnLicenseViolation { get { return Inner.bBreakBuildOnLicenseViolation; } } public bool bUseFastPDBLinking { get { return Inner.bUseFastPDBLinking; } } public bool bCreateMapFile { get { return Inner.bCreateMapFile; } } public bool bEnableCodeAnalysis { get { return Inner.bEnableCodeAnalysis; } } public string BundleVersion { get { return Inner.BundleVersion; } } public bool bDeployAfterCompile { get { return Inner.bDeployAfterCompile; } } public bool bCreateStubIPA { get { return Inner.bCreateStubIPA; } } public bool bCopyAppBundleBackToDevice { get { return Inner.bCopyAppBundleBackToDevice; } } public bool bAllowRemotelyCompiledPCHs { get { return Inner.bAllowRemotelyCompiledPCHs; } } public bool bCheckSystemHeadersForModification { get { return Inner.bCheckSystemHeadersForModification; } } public bool bDisableLinking { get { return Inner.bDisableLinking; } } public bool bFormalBuild { get { return Inner.bFormalBuild; } } public bool bUseAdaptiveUnityBuild { get { return Inner.bUseAdaptiveUnityBuild; } } public bool bFlushBuildDirOnRemoteMac { get { return Inner.bFlushBuildDirOnRemoteMac; } } public bool bPrintToolChainTimingInfo { get { return Inner.bPrintToolChainTimingInfo; } } public string PCHOutputDirectory { get { return Inner.PCHOutputDirectory; } } public TargetLinkType LinkType { get { return Inner.LinkType; } } [Obsolete("IsMonolithic is deprecated in the 4.16 release. Check whether LinkType == TargetRules.TargetLinkType.Monolithic instead.")] public bool IsMonolithic { get { return LinkType == TargetLinkType.Monolithic; } } public IReadOnlyList GlobalDefinitions { get { return Inner.GlobalDefinitions.AsReadOnly(); } } public string LaunchModuleName { get { return Inner.LaunchModuleName; } } public IReadOnlyList ExtraModuleNames { get { return Inner.ExtraModuleNames.AsReadOnly(); } } public TargetBuildEnvironment BuildEnvironment { get { return Inner.BuildEnvironment; } } public ReadOnlyAndroidTargetRules AndroidPlatform { get; private set; } public ReadOnlyMacTargetRules MacPlatform { get; private set; } public ReadOnlyPS4TargetRules PS4Platform { get; private set; } public ReadOnlyWindowsTargetRules WindowsPlatform { get; private set; } public ReadOnlyXboxOneTargetRules XboxOnePlatform { get; private set; } public string OverrideExecutableFileExtension { get { return Inner.OverrideExecutableFileExtension; } } public bool bShouldCompileAsDLL { get { return Inner.bShouldCompileAsDLL; } } #if !__MonoCS__ #pragma warning restore C1591 #endif #endregion /// /// Provide access to the RelativeEnginePath property for code referencing ModuleRules.BuildConfiguration. /// public string RelativeEnginePath { get { return UnrealBuildTool.EngineDirectory.MakeRelativeTo(DirectoryReference.GetCurrentDirectory()); } } /// /// Provide access to the UEThirdPartySourceDirectory property for code referencing ModuleRules.UEBuildConfiguration. /// public string UEThirdPartySourceDirectory { get { return "ThirdParty/"; } } /// /// Provide access to the UEThirdPartyBinariesDirectory property for code referencing ModuleRules.UEBuildConfiguration. /// public string UEThirdPartyBinariesDirectory { get { return "../Binaries/ThirdParty/"; } } /// /// Wrapper around TargetRules.SetupBinaries /// /// The target information - such as platform and configuration /// Output list of binaries to generated /// Output list of extra modules that this target could utilize public void SetupBinaries(TargetInfo Target, ref List OutBuildBinaryConfigurations, ref List OutExtraModuleNames) { Inner.SetupBinaries(Target, ref OutBuildBinaryConfigurations, ref OutExtraModuleNames); } /// /// Wrapper around TargetRules.ConfigureToolchain /// /// The target currently being setup /// true if successful, false if not public bool ConfigureToolchain(TargetInfo Target) { return Inner.ConfigureToolchain(Target); } } }