2014-12-07 19:09:38 -05:00
|
|
|
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
using UnrealBuildTool;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
public class UE4GameTarget : TargetRules
|
|
|
|
|
{
|
|
|
|
|
public UE4GameTarget( TargetInfo Target )
|
|
|
|
|
{
|
|
|
|
|
Type = TargetType.Game;
|
2015-03-20 08:25:23 -04:00
|
|
|
|
2014-03-14 14:13:41 -04:00
|
|
|
// Output to Engine/Binaries/<PLATFORM> even if built as monolithic
|
|
|
|
|
bOutputToEngineBinaries = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override bool GetSupportedPlatforms(ref List<UnrealTargetPlatform> OutPlatforms)
|
|
|
|
|
{
|
|
|
|
|
return UnrealBuildTool.UnrealBuildTool.GetAllPlatforms(ref OutPlatforms, false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void SetupBinaries(
|
|
|
|
|
TargetInfo Target,
|
|
|
|
|
ref List<UEBuildBinaryConfiguration> OutBuildBinaryConfigurations,
|
|
|
|
|
ref List<string> OutExtraModuleNames
|
|
|
|
|
)
|
|
|
|
|
{
|
|
|
|
|
OutExtraModuleNames.Add("UE4Game");
|
2014-05-22 15:14:51 -04:00
|
|
|
// 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");
|
|
|
|
|
}
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void SetupGlobalEnvironment(
|
|
|
|
|
TargetInfo Target,
|
|
|
|
|
ref LinkEnvironmentConfiguration OutLinkEnvironmentConfiguration,
|
|
|
|
|
ref CPPEnvironmentConfiguration OutCPPEnvironmentConfiguration
|
|
|
|
|
)
|
|
|
|
|
{
|
2014-07-07 17:19:49 -04:00
|
|
|
if (Target.Platform == UnrealTargetPlatform.IOS)
|
2014-05-22 15:14:51 -04:00
|
|
|
{
|
2014-07-07 17:19:49 -04:00
|
|
|
// to make World Explorers as small as possible we excluded some items from the engine.
|
|
|
|
|
// uncomment below to make a smaller iOS build
|
|
|
|
|
/*UEBuildConfiguration.bCompileRecast = false;
|
2014-05-22 15:14:51 -04:00
|
|
|
UEBuildConfiguration.bCompileSpeedTree = false;
|
|
|
|
|
UEBuildConfiguration.bCompileAPEX = false;
|
|
|
|
|
UEBuildConfiguration.bCompileLeanAndMeanUE = true;
|
|
|
|
|
UEBuildConfiguration.bCompilePhysXVehicle = false;
|
2014-07-08 15:10:01 -04:00
|
|
|
UEBuildConfiguration.bCompileFreeType = false;
|
|
|
|
|
UEBuildConfiguration.bCompileForSize = true;*/
|
2014-05-22 15:14:51 -04:00
|
|
|
}
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
2015-03-20 08:25:23 -04:00
|
|
|
|
2015-04-16 11:55:56 -04:00
|
|
|
public override bool ShouldUseSharedBuildEnvironment(TargetInfo Target)
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2015-03-20 08:25:23 -04:00
|
|
|
public override void GetModulesToPrecompile(TargetInfo Target, List<string> ModuleNames)
|
|
|
|
|
{
|
|
|
|
|
// Add all the precompiled modules for this target
|
|
|
|
|
ModuleNames.Add("Launch");
|
2015-03-21 11:34:45 -04:00
|
|
|
ModuleNames.Add("InputDevice");
|
2015-03-20 08:25:23 -04:00
|
|
|
ModuleNames.Add("GameMenuBuilder");
|
2015-05-21 22:17:17 -04:00
|
|
|
ModuleNames.Add("GameplayAbilities");
|
2015-04-01 08:14:14 -04:00
|
|
|
ModuleNames.Add("XmlParser");
|
2015-05-26 20:13:22 -04:00
|
|
|
ModuleNames.Add("UE4Game");
|
2015-06-03 08:20:19 -04:00
|
|
|
ModuleNames.Add("AITestSuite");
|
|
|
|
|
ModuleNames.Add("GameplayDebugger");
|
2015-07-28 14:55:02 -04:00
|
|
|
ModuleNames.Add("RuntimeAssetCache");
|
2015-07-29 11:05:54 -04:00
|
|
|
ModuleNames.Add("UnrealCodeAnalyzerTests");
|
2015-08-12 14:27:29 -04:00
|
|
|
ModuleNames.Add("JsonUtilities");
|
2015-07-29 11:14:05 -04:00
|
|
|
|
2015-03-20 08:25:23 -04:00
|
|
|
if (Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Win64)
|
|
|
|
|
{
|
|
|
|
|
ModuleNames.Add("OnlineSubsystemNull");
|
|
|
|
|
ModuleNames.Add("OnlineSubsystemAmazon");
|
|
|
|
|
if (UEBuildConfiguration.bCompileSteamOSS == true)
|
|
|
|
|
{
|
|
|
|
|
ModuleNames.Add("OnlineSubsystemSteam");
|
|
|
|
|
}
|
|
|
|
|
ModuleNames.Add("OnlineSubsystemFacebook");
|
|
|
|
|
}
|
|
|
|
|
else if (Target.Platform == UnrealTargetPlatform.Mac || Target.Platform == UnrealTargetPlatform.Linux)
|
|
|
|
|
{
|
|
|
|
|
ModuleNames.Add("OnlineSubsystemNull");
|
|
|
|
|
if (UEBuildConfiguration.bCompileSteamOSS == true)
|
|
|
|
|
{
|
|
|
|
|
ModuleNames.Add("OnlineSubsystemSteam");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (Target.Platform == UnrealTargetPlatform.IOS)
|
|
|
|
|
{
|
|
|
|
|
ModuleNames.Add("OnlineSubsystemFacebook");
|
|
|
|
|
ModuleNames.Add("OnlineSubsystemIOS");
|
|
|
|
|
ModuleNames.Add("IOSAdvertising");
|
2015-05-20 21:06:54 -04:00
|
|
|
ModuleNames.Add("MetalRHI");
|
2015-03-20 08:25:23 -04:00
|
|
|
}
|
|
|
|
|
else if (Target.Platform == UnrealTargetPlatform.Android)
|
|
|
|
|
{
|
|
|
|
|
// @todo android: Add Android online subsystem
|
|
|
|
|
ModuleNames.Add("AndroidAdvertising");
|
|
|
|
|
}
|
|
|
|
|
else if (Target.Platform == UnrealTargetPlatform.HTML5)
|
|
|
|
|
{
|
|
|
|
|
ModuleNames.Add("OnlineSubsystemNull");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2014-05-22 15:14:51 -04:00
|
|
|
public override List<UnrealTargetPlatform> GUBP_GetPlatforms_MonolithicOnly(UnrealTargetPlatform HostPlatform)
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
2014-09-05 17:49:54 -04:00
|
|
|
List<UnrealTargetPlatform> Platforms = null;
|
|
|
|
|
|
|
|
|
|
switch(HostPlatform)
|
|
|
|
|
{
|
|
|
|
|
case UnrealTargetPlatform.Mac:
|
|
|
|
|
Platforms = new List<UnrealTargetPlatform> { HostPlatform, UnrealTargetPlatform.IOS };
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case UnrealTargetPlatform.Linux:
|
|
|
|
|
Platforms = new List<UnrealTargetPlatform> { HostPlatform };
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case UnrealTargetPlatform.Win64:
|
|
|
|
|
Platforms = new List<UnrealTargetPlatform> { HostPlatform, UnrealTargetPlatform.Win32, UnrealTargetPlatform.IOS, UnrealTargetPlatform.XboxOne, UnrealTargetPlatform.PS4, UnrealTargetPlatform.Android, UnrealTargetPlatform.Linux, UnrealTargetPlatform.HTML5 };
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
Platforms = new List<UnrealTargetPlatform>();
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return Platforms;
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
public override List<UnrealTargetConfiguration> GUBP_GetConfigs_MonolithicOnly(UnrealTargetPlatform HostPlatform, UnrealTargetPlatform Platform)
|
|
|
|
|
{
|
2014-04-24 19:35:17 -04:00
|
|
|
return new List<UnrealTargetConfiguration> { UnrealTargetConfiguration.Development, UnrealTargetConfiguration.Shipping, UnrealTargetConfiguration.Test };
|
2015-03-21 15:21:14 -04:00
|
|
|
}
|
|
|
|
|
public override List<UnrealTargetConfiguration> GUBP_GetConfigsForPrecompiledBuilds_MonolithicOnly(UnrealTargetPlatform HostPlatform, UnrealTargetPlatform Platform)
|
|
|
|
|
{
|
|
|
|
|
List<UnrealTargetConfiguration> Platforms = new List<UnrealTargetConfiguration>();
|
|
|
|
|
if(HostPlatform == UnrealTargetPlatform.Mac)
|
|
|
|
|
{
|
|
|
|
|
if(Platform == UnrealTargetPlatform.Mac || Platform == UnrealTargetPlatform.IOS)
|
|
|
|
|
{
|
|
|
|
|
Platforms.Add(UnrealTargetConfiguration.Development);
|
|
|
|
|
Platforms.Add(UnrealTargetConfiguration.Shipping);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if(HostPlatform == UnrealTargetPlatform.Win64)
|
|
|
|
|
{
|
|
|
|
|
if(Platform == UnrealTargetPlatform.Win32 || Platform == UnrealTargetPlatform.Win64 || Platform == UnrealTargetPlatform.Android || Platform == UnrealTargetPlatform.HTML5)
|
|
|
|
|
{
|
|
|
|
|
Platforms.Add(UnrealTargetConfiguration.Development);
|
|
|
|
|
Platforms.Add(UnrealTargetConfiguration.Shipping);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return Platforms;
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
2015-01-28 08:26:51 -05:00
|
|
|
public override bool GUBP_BuildWindowsXPMonolithics()
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|