// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved. using UnrealBuildTool; using System.Collections.Generic; public class UE4GameTarget : TargetRules { public UE4GameTarget( TargetInfo Target ) { Type = TargetType.Game; // Output to Engine/Binaries/ even if built as monolithic bOutputToEngineBinaries = true; } public override bool GetSupportedPlatforms(ref List OutPlatforms) { return UnrealBuildTool.UnrealBuildTool.GetAllPlatforms(ref OutPlatforms, false); } public override void SetupBinaries( TargetInfo Target, ref List OutBuildBinaryConfigurations, ref List OutExtraModuleNames ) { OutExtraModuleNames.Add("UE4Game"); // this is important - for some reason achievements etc intertwined with the onlinesubsystem and they saved without using a fake OSS. :/ if (Target.Platform == UnrealTargetPlatform.HTML5) { OutExtraModuleNames.Add("OnlineSubsystemNull"); } if (UnrealBuildTool.UnrealBuildTool.BuildingRocket()) { if ((Target.Platform == UnrealTargetPlatform.Win32) || (Target.Platform == UnrealTargetPlatform.Win64)) { OutExtraModuleNames.Add("OnlineSubsystemNull"); OutExtraModuleNames.Add("OnlineSubsystemAmazon"); if (UEBuildConfiguration.bCompileSteamOSS == true) { OutExtraModuleNames.Add("OnlineSubsystemSteam"); } OutExtraModuleNames.Add("OnlineSubsystemFacebook"); } else if (Target.Platform == UnrealTargetPlatform.Mac) { OutExtraModuleNames.Add("OnlineSubsystemNull"); if (UEBuildConfiguration.bCompileSteamOSS == true) { OutExtraModuleNames.Add("OnlineSubsystemSteam"); } } else if (Target.Platform == UnrealTargetPlatform.IOS) { OutExtraModuleNames.Add("OnlineSubsystemFacebook"); OutExtraModuleNames.Add("OnlineSubsystemIOS"); OutExtraModuleNames.Add("IOSAdvertising"); } else if (Target.Platform == UnrealTargetPlatform.Android) { // @todo android: Add Android online subsystem OutExtraModuleNames.Add("AndroidAdvertising"); } else if (Target.Platform == UnrealTargetPlatform.HTML5) { OutExtraModuleNames.Add("OnlineSubsystemNull"); } } } public override void SetupGlobalEnvironment( TargetInfo Target, ref LinkEnvironmentConfiguration OutLinkEnvironmentConfiguration, ref CPPEnvironmentConfiguration OutCPPEnvironmentConfiguration ) { if( UnrealBuildTool.UnrealBuildTool.BuildingRocket() ) { UEBuildConfiguration.bCompileLeanAndMeanUE = true; // Don't need editor or editor only data UEBuildConfiguration.bBuildEditor = false; UEBuildConfiguration.bBuildWithEditorOnlyData = false; UEBuildConfiguration.bCompileAgainstEngine = true; // no exports, so no need to verify that a .lib and .exp file was emitted by the linker. OutLinkEnvironmentConfiguration.bHasExports = false; } else { // Tag it as a UE4Game build OutCPPEnvironmentConfiguration.Definitions.Add("UE4GAME=1"); } if (Target.Platform == UnrealTargetPlatform.HTML5) { // to make Tappy Chicken as small as possible we excluded some items from the engine. UEBuildConfiguration.bCompileRecast = false; UEBuildConfiguration.bCompileSpeedTree = false; UEBuildConfiguration.bCompileAPEX = false; UEBuildConfiguration.bCompileLeanAndMeanUE = true; UEBuildConfiguration.bCompilePhysXVehicle = false; UEBuildConfiguration.bCompileForSize = true; UEBuildConfiguration.bCompileFreeType = false; } } public override List GUBP_GetPlatforms_MonolithicOnly(UnrealTargetPlatform HostPlatform) { if (HostPlatform == UnrealTargetPlatform.Mac) { return new List { HostPlatform, UnrealTargetPlatform.IOS }; } return new List { HostPlatform, UnrealTargetPlatform.Win32, UnrealTargetPlatform.IOS, UnrealTargetPlatform.XboxOne, UnrealTargetPlatform.PS4, UnrealTargetPlatform.Android, UnrealTargetPlatform.Linux }; } public override List GUBP_GetConfigs_MonolithicOnly(UnrealTargetPlatform HostPlatform, UnrealTargetPlatform Platform) { return new List { UnrealTargetConfiguration.Development, UnrealTargetConfiguration.Shipping, UnrealTargetConfiguration.Test }; } }