public FormalBuildTestNode(GUBP.GUBPBranchConfig InBranchConfig, BranchInfo.BranchUProject InGameProj, UnrealTargetPlatform InHostPlatform, UnrealTargetPlatform InClientTargetPlatform, UnrealTargetConfiguration InClientConfig ) : base(InHostPlatform) { BranchConfig = InBranchConfig; GameProj = InGameProj; ClientTargetPlatform = InClientTargetPlatform; ClientConfig = InClientConfig; GameOrClient = TargetRules.TargetType.Game; // verify we actually built these var WorkingGameProject = InGameProj; if (!WorkingGameProject.Properties.Targets.ContainsKey(TargetRules.TargetType.Editor)) { // this is a codeless project, use the base project WorkingGameProject = BranchConfig.Branch.BaseEngineProject; } if (!WorkingGameProject.Properties.Targets.ContainsKey(GameOrClient)) { throw new AutomationException("Can't make a game build for {0} because it doesn't have a {1} target.", WorkingGameProject.GameName, GameOrClient.ToString()); } if (!WorkingGameProject.Properties.Targets[GameOrClient].Rules.GUBP_GetPlatforms_MonolithicOnly(HostPlatform).Contains(ClientTargetPlatform)) { throw new AutomationException("Can't make a game/client build for {0} because we didn't build platform {1}.", WorkingGameProject.GameName, ClientTargetPlatform.ToString()); } if (!WorkingGameProject.Properties.Targets[GameOrClient].Rules.GUBP_GetConfigs_MonolithicOnly(HostPlatform, ClientTargetPlatform).Contains(ClientConfig)) { throw new AutomationException("Can't make a game/client build for {0} because we didn't build platform {1} config {2}.", WorkingGameProject.GameName, ClientTargetPlatform.ToString(), ClientConfig.ToString()); } AddDependency(FormalBuildNode.StaticGetFullName(GameProj, HostPlatform, new List<UnrealTargetPlatform>() { ClientTargetPlatform }, InClientConfigs: new List<UnrealTargetConfiguration>() { ClientConfig }, InClientNotGame: GameOrClient == TargetRules.TargetType.Client)); }
public FormalBuildNode(GUBP.GUBPBranchConfig InBranchConfig, BranchInfo.BranchUProject InGameProj, UnrealTargetPlatform InHostPlatform, List<UnrealTargetPlatform> InClientTargetPlatforms = null, List<UnrealTargetConfiguration> InClientConfigs = null, List<UnrealTargetPlatform> InServerTargetPlatforms = null, List<UnrealTargetConfiguration> InServerConfigs = null, bool InClientNotGame = false ) : base(InHostPlatform) { BranchConfig = InBranchConfig; GameProj = InGameProj; ClientTargetPlatforms = InClientTargetPlatforms; ServerTargetPlatforms = InServerTargetPlatforms; ClientConfigs = InClientConfigs; ServerConfigs = InServerConfigs; ClientNotGame = InClientNotGame; GameOrClient = TargetRules.TargetType.Game; if (ClientNotGame) { GameOrClient = TargetRules.TargetType.Client; } if (InGameProj.GameName != BranchConfig.Branch.BaseEngineProject.GameName && GameProj.Properties.Targets.ContainsKey(TargetRules.TargetType.Editor)) { bIsCode = true; } else { bIsCode = false; } // verify we actually built these var WorkingGameProject = InGameProj; if (!WorkingGameProject.Properties.Targets.ContainsKey(TargetRules.TargetType.Editor)) { // this is a codeless project, use the base project WorkingGameProject = BranchConfig.Branch.BaseEngineProject; } var AllTargetPlatforms = new List<UnrealTargetPlatform>(); if (ClientTargetPlatforms != null) { if (!WorkingGameProject.Properties.Targets.ContainsKey(GameOrClient)) { throw new AutomationException("Can't make a game build for {0} because it doesn't have a {1} target.", WorkingGameProject.GameName, GameOrClient.ToString()); } foreach (var Plat in ClientTargetPlatforms) { if (!AllTargetPlatforms.Contains(Plat)) { AllTargetPlatforms.Add(Plat); } } if (ClientConfigs == null) { ClientConfigs = new List<UnrealTargetConfiguration>() { UnrealTargetConfiguration.Development }; } foreach (var Plat in ClientTargetPlatforms) { if (!WorkingGameProject.Properties.Targets[GameOrClient].Rules.GUBP_GetPlatforms_MonolithicOnly(HostPlatform).Contains(Plat)) { throw new AutomationException("Can't make a game/client build for {0} because we didn't build platform {1}.", WorkingGameProject.GameName, Plat.ToString()); } foreach (var Config in ClientConfigs) { if (!WorkingGameProject.Properties.Targets[GameOrClient].Rules.GUBP_GetConfigs_MonolithicOnly(HostPlatform, Plat).Contains(Config)) { throw new AutomationException("Can't make a game/client build for {0} because we didn't build platform {1} config {2}.", WorkingGameProject.GameName, Plat.ToString(), Config.ToString()); } } } } if (ServerTargetPlatforms != null) { if (!WorkingGameProject.Properties.Targets.ContainsKey(TargetRules.TargetType.Server) && ServerTargetPlatforms != null) { throw new AutomationException("Can't make a server build for {0} because it doesn't have a server target.", WorkingGameProject.GameName); } foreach (var Plat in ServerTargetPlatforms) { if (!AllTargetPlatforms.Contains(Plat)) { AllTargetPlatforms.Add(Plat); } } if (ServerConfigs == null) { ServerConfigs = new List<UnrealTargetConfiguration>() { UnrealTargetConfiguration.Development }; } foreach (var Plat in ServerTargetPlatforms) { if (!WorkingGameProject.Properties.Targets[TargetRules.TargetType.Server].Rules.GUBP_GetPlatforms_MonolithicOnly(HostPlatform).Contains(Plat)) { throw new AutomationException("Can't make a server build for {0} because we didn't build platform {1}.", WorkingGameProject.GameName, Plat.ToString()); } foreach (var Config in ServerConfigs) { if (!WorkingGameProject.Properties.Targets[TargetRules.TargetType.Server].Rules.GUBP_GetConfigs_MonolithicOnly(HostPlatform, Plat).Contains(Config)) { throw new AutomationException("Can't make a server build for {0} because we didn't build platform {1} config {2}.", WorkingGameProject.GameName, Plat.ToString(), Config.ToString()); } } } } // add dependencies for cooked and compiled foreach (var Plat in AllTargetPlatforms) { AddDependency(GamePlatformCookedAndCompiledNode.StaticGetFullName(HostPlatform, GameProj, Plat)); } }