void ExecuteInner()
    {
        var UE4Build = new UE4Build(this);

        var Agenda = new UE4Build.BuildAgenda();

        {
            var Win32Targets = new string[]
            {
                "FortniteClient",
                "FortniteGame",
                "FortniteServer",
                "OrionServer",
                "OrionClient",
                "OrionGame",
            };
            Agenda.AddTargets(Win32Targets, UnrealTargetPlatform.Win32, UnrealTargetConfiguration.Shipping);
            Agenda.AddTargets(Win32Targets, UnrealTargetPlatform.Win32, UnrealTargetConfiguration.Test);
        }

        Agenda.DoRetries = false;
        Agenda.SpecialTestFlag = true;
        UE4Build.Build(Agenda, InDeleteBuildProducts: true, InUpdateVersionFiles: true);

        UE4Build.CheckBuildProducts(UE4Build.BuildProductFiles);
    }
    void ExecuteInner()
    {
        var UE4Build = new UE4Build(this);

        var Agenda_Mono = new UE4Build.BuildAgenda();
        var Agenda_NonUnity = new UE4Build.BuildAgenda();
        {
            {
                var Win64DevTargets = new string[]
                {
                    "FortniteEditor",
                    "OrionEditor",
                    "PlatformerGameEditor",
                    "QAGameEditor",
                    "ShooterGameEditor",
                    "StrategyGameEditor",
                    "VehicleGameEditor",
                };
                Agenda_Mono.AddTargets(Win64DevTargets, UnrealTargetPlatform.Win64, UnrealTargetConfiguration.Development, bForceMonolithic: true);
                Agenda_Mono.AddTargets(Win64DevTargets, UnrealTargetPlatform.Win64, UnrealTargetConfiguration.Shipping, bForceMonolithic: true);
                Agenda_Mono.AddTargets(Win64DevTargets, UnrealTargetPlatform.Win64, UnrealTargetConfiguration.Development, bForceNonUnity: true);
                Agenda_Mono.AddTargets(Win64DevTargets, UnrealTargetPlatform.Win64, UnrealTargetConfiguration.Shipping, bForceNonUnity: true);

                var Win32Targets = new string[]
                {
                    "FortniteGame",
                    "FortniteServer",
                    "OrionGame",
                    "PlatformerGame",
                    "QAGame",
                    "ShooterGame",
                    "StrategyGame",
                    "VehicleGame",
                };
                Agenda_Mono.AddTargets(Win32Targets, UnrealTargetPlatform.Win32, UnrealTargetConfiguration.Development, bForceMonolithic: true);
                Agenda_Mono.AddTargets(Win32Targets, UnrealTargetPlatform.Win32, UnrealTargetConfiguration.Development, bForceNonUnity: true);

                var Win32ShipTargets = new string[]
                {
                    "FortniteGame",
                    "FortniteServer",
                };
                Agenda_Mono.AddTargets(Win32ShipTargets, UnrealTargetPlatform.Win32, UnrealTargetConfiguration.Shipping, bForceMonolithic: true);
                Agenda_Mono.AddTargets(Win32ShipTargets, UnrealTargetPlatform.Win32, UnrealTargetConfiguration.Shipping, bForceNonUnity: true);
            }
        }

        UE4Build.Build(Agenda_Mono, InDeleteBuildProducts: true, InUpdateVersionFiles: true);

        UE4Build.Build(Agenda_NonUnity, InDeleteBuildProducts: true, InUpdateVersionFiles: true);
        UE4Build.CheckBuildProducts(UE4Build.BuildProductFiles);
    }
Exemple #3
0
        public override UE4Build.BuildAgenda GetAgenda(GUBP bp)
        {
            bool bAnyAdded = false;
            var Agenda = new UE4Build.BuildAgenda();

			if (HostPlatform == UnrealTargetPlatform.Win64)
            {
                bAnyAdded = true;
                Agenda.DotNetProjects.AddRange(
                    new string[] 
			    {
                    CombinePaths(@"Engine\Source\Programs\NotForLicensees\CrashReportServer\CrashReportCommon\CrashReportCommon.csproj"),
					CombinePaths(@"Engine\Source\Programs\NotForLicensees\CrashReportServer\CrashReportReceiver\CrashReportReceiver.csproj"),
					CombinePaths(@"Engine\Source\Programs\NotForLicensees\CrashReportServer\CrashReportProcess\CrashReportProcess.csproj"),
                    CombinePaths(@"Engine\Source\Programs\CrashReporter\RegisterPII\RegisterPII.csproj"),
			    });
                Agenda.DotNetSolutions.AddRange(
                    new string[] 
			        {
				        CombinePaths(@"Engine\Source\Programs\UnrealDocTool\UnrealDocTool\UnrealDocTool.sln"),
			        }
                    );
                Agenda.ExtraDotNetFiles.AddRange(
                    new string[] 
			        {
				        "Interop.IWshRuntimeLibrary",
				        "UnrealMarkdown",
				        "CommonUnrealMarkdown",
			        }
                    );
            }
            string AddArgs = "-nobuilduht -skipactionhistory -CopyAppBundleBackToDevice";

			foreach (var ProgramTarget in BranchConfig.Branch.BaseEngineProject.Properties.Programs)
            {
                bool bInternalOnly;
                bool SeparateNode;
				bool CrossCompile;
                if (ProgramTarget.Rules.GUBP_AlwaysBuildWithTools(HostPlatform, out bInternalOnly, out SeparateNode, out CrossCompile) && ProgramTarget.Rules.SupportsPlatform(HostPlatform) && bInternalOnly && !SeparateNode)
                {
                    foreach (var Plat in ProgramTarget.Rules.GUBP_ToolPlatforms(HostPlatform))
                    {
                        foreach (var Config in ProgramTarget.Rules.GUBP_ToolConfigs(HostPlatform))
                        {
                            Agenda.AddTargets(new string[] { ProgramTarget.TargetName }, Plat, Config, InAddArgs: AddArgs);
                            bAnyAdded = true;
                        }
                    }
                }
            }
            if (bAnyAdded)
            {
                return Agenda;
            }
            return null;
        }
Exemple #4
0
		public override UE4Build.BuildAgenda GetAgenda(GUBP bp)
		{
			var Agenda = new UE4Build.BuildAgenda();

			string AddArgs = "-nobuilduht -skipactionhistory -CopyAppBundleBackToDevice";

			foreach (var ProgramTarget in BranchConfig.Branch.BaseEngineProject.Properties.Programs)
			{
				bool bInternalOnly;
				bool SeparateNode;
				bool CrossCompile;
				if (ProgramTarget.Rules.GUBP_AlwaysBuildWithTools(HostPlatform, out bInternalOnly, out SeparateNode, out CrossCompile) && ProgramTarget.Rules.SupportsPlatform(HostPlatform) && !bInternalOnly && !SeparateNode && CrossCompile)
				{
					foreach (var Config in ProgramTarget.Rules.GUBP_ToolConfigs(HostPlatform))
					{
						Agenda.AddTargets(new string[] { ProgramTarget.TargetName }, UnrealTargetPlatform.Linux, Config, InAddArgs: AddArgs);
					}					
				}
			}

			return Agenda;
		}
Exemple #5
0
		public override UE4Build.BuildAgenda GetAgenda(GUBP bp)
		{
			var Agenda = new UE4Build.BuildAgenda();

			string AddArgs = "-nobuilduht";
			Agenda.AddTargets(
				new string[] { BranchConfig.Branch.BaseEngineProject.Properties.Targets[TargetRules.TargetType.Editor].TargetName },
				UnrealTargetPlatform.Linux, UnrealTargetConfiguration.Development, InAddArgs: AddArgs);
			 foreach (var ProgramTarget in BranchConfig.Branch.BaseEngineProject.Properties.Programs)
            {
                if (ProgramTarget.Rules.GUBP_AlwaysBuildWithBaseEditor() && ProgramTarget.Rules.SupportsPlatform(UnrealTargetPlatform.Linux))
                {
                    Agenda.AddTargets(new string[] { ProgramTarget.TargetName }, UnrealTargetPlatform.Linux, UnrealTargetConfiguration.Development, InAddArgs: AddArgs);
                }
            }
			return Agenda;
		}
Exemple #6
0
		public override void DoTest(GUBP bp)
		{
			var Build = new UE4Build(bp);
			var Agenda = new UE4Build.BuildAgenda();

			string AddArgs = "-nobuilduht";

			Agenda.AddTargets(
				new string[] { BranchConfig.Branch.BaseEngineProject.Properties.Targets[TargetRules.TargetType.Editor].TargetName },
				HostPlatform, UnrealTargetConfiguration.Development, InAddArgs: AddArgs);
			foreach (var ProgramTarget in BranchConfig.Branch.BaseEngineProject.Properties.Programs)
			{
				if (ProgramTarget.Rules.GUBP_AlwaysBuildWithBaseEditor() && ProgramTarget.Rules.SupportsPlatform(HostPlatform))
				{
					Agenda.AddTargets(new string[] { ProgramTarget.TargetName }, HostPlatform, UnrealTargetConfiguration.Development, InAddArgs: AddArgs);
				}
			}
			Build.Build(Agenda, InDeleteBuildProducts: true, InUpdateVersionFiles: false);

			UE4Build.CheckBuildProducts(Build.BuildProductFiles);
			SaveRecordOfSuccessAndAddToBuildProducts();
		}
Exemple #7
0
        public override void DoTest(GUBP bp)
        {
            var Build = new UE4Build(bp);
            var Agenda = new UE4Build.BuildAgenda();
            
            Agenda.AddTargets(new string[] { "UnrealHeaderTool" }, HostPlatform, UnrealTargetConfiguration.Development);
            Agenda.AddTargets(
                new string[] { BranchConfig.Branch.BaseEngineProject.Properties.Targets[TargetRules.TargetType.Editor].TargetName },
                HostPlatform, UnrealTargetConfiguration.Development, InAddArgs: "-skipnonhostplatforms -shadowvariableerrors");

            foreach (var Kind in BranchInfo.MonolithicKinds)
            {
                if (BranchConfig.Branch.BaseEngineProject.Properties.Targets.ContainsKey(Kind))
                {
                    var Target = BranchConfig.Branch.BaseEngineProject.Properties.Targets[Kind];
                    Agenda.AddTargets(new string[] { Target.TargetName }, HostPlatform, UnrealTargetConfiguration.Development, InAddArgs: "-shadowvariableerrors");
                }
            }

            Build.Build(Agenda, InDeleteBuildProducts: true, InUpdateVersionFiles: false, InForceNonUnity: true, InForceNoXGE: true);

            UE4Build.CheckBuildProducts(Build.BuildProductFiles);
            SaveRecordOfSuccessAndAddToBuildProducts();
        }
Exemple #8
0
        public override UE4Build.BuildAgenda GetAgenda(GUBP bp)
        {
            if (!ActivePlatforms.Contains(TargetPlatform))
            {
                throw new AutomationException("{0} is not a supported platform for {1}", TargetPlatform.ToString(), GetFullName());
            }
            var Agenda = new UE4Build.BuildAgenda();

            string Args = "-nobuilduht -skipactionhistory -CopyAppBundleBackToDevice";

			if(Precompiled)
			{
				Args += " -precompile";

				// MSVC doesn't provide a way to strip symbols from static libraries - you have to use PDBs, but that causes random OOM 
				// exceptions with the /FS arg because mspdbsrv is 32-bit. Just disable compiler debug info manually for now.
				if(TargetPlatform == UnrealTargetPlatform.Win32 || TargetPlatform == UnrealTargetPlatform.Win64)
				{
	                Args += " -nodebuginfo";
				}
			}

			if (WithXp)
			{
				Args += " -winxp";
			}

            foreach (var Kind in BranchInfo.MonolithicKinds)
            {
                if (GameProj.Properties.Targets.ContainsKey(Kind))
                {
                    var Target = GameProj.Properties.Targets[Kind];
					var AllowXp = Target.Rules.GUBP_BuildWindowsXPMonolithics();
					if (!WithXp || (AllowXp && WithXp))
					{
						var Platforms = Target.Rules.GUBP_GetPlatforms_MonolithicOnly(HostPlatform);
						var AdditionalPlatforms = Target.Rules.GUBP_GetBuildOnlyPlatforms_MonolithicOnly(HostPlatform);
						var AllPlatforms = Platforms.Union(AdditionalPlatforms);
						if (AllPlatforms.Contains(TargetPlatform) && Target.Rules.SupportsPlatform(TargetPlatform))
						{
							List<UnrealTargetConfiguration> Configs;
							if(Precompiled)
							{
								Configs = Target.Rules.GUBP_GetConfigsForPrecompiledBuilds_MonolithicOnly(HostPlatform, TargetPlatform);
							}
							else
							{
								Configs = Target.Rules.GUBP_GetConfigs_MonolithicOnly(HostPlatform, TargetPlatform).Except(Target.Rules.GUBP_GetConfigsForPrecompiledBuilds_MonolithicOnly(HostPlatform, TargetPlatform)).ToList();
							}
							
							foreach (var Config in Configs)
							{
								if (GameProj.GameName == BranchConfig.Branch.BaseEngineProject.GameName)
								{
									Agenda.AddTargets(new string[] { Target.TargetName }, TargetPlatform, Config, InAddArgs: Args);
								}
								else
								{
									Agenda.AddTargets(new string[] { Target.TargetName }, TargetPlatform, Config, GameProj.FilePath, InAddArgs: Args);
								}
							}
						}
					}
				}
            }

            return Agenda;
        }
    void ExecuteInner(int WorkingCL)
    {
        var UE4Build = new UE4Build(this);
        var Agenda = new UE4Build.BuildAgenda();

        var Config = ParseParamValue("Config");

        if (String.IsNullOrEmpty(Config) || Config.ToLower() == "editors")
        {
            Agenda.DotNetSolutions.AddRange(
                new string[]
                {
                    @"Engine\Source\Programs\UnrealDocTool\UnrealDocTool\UnrealDocTool.sln",
                    @"Engine\Source\Programs\NetworkProfiler\NetworkProfiler.sln",
                }
                );

            Agenda.SwarmProject = @"Engine\Source\Programs\UnrealSwarm\UnrealSwarm.sln";

            Agenda.DotNetProjects.AddRange(
                new string[]
                {
                    @"Engine\Source\Programs\DotNETCommon\DotNETUtilities\DotNETUtilities.csproj",
                    @"Engine\Source\Programs\NoRedist\CrashReportServer\CrashReportCommon\CrashReportCommon.csproj",
                    @"Engine\Source\Programs\NoRedist\CrashReportServer\CrashReportReceiver\CrashReportReceiver.csproj",
                    @"Engine\Source\Programs\NoRedist\CrashReportServer\CrashReportProcess\CrashReportProcess.csproj",
                    @"Engine\Source\Programs\CrashReporter\RegisterPII\RegisterPII.csproj",
                    @"Engine\Source\Programs\Distill\Distill.csproj",
                    @"Engine\Source\Programs\RPCUtility\RPCUtility.csproj",
                    @"Engine\Source\Programs\UnrealControls\UnrealControls.csproj",
                }
                );

            Agenda.IOSDotNetProjects.AddRange(
                    new string[]
                {
                    @"Engine\Source\Programs\IOS\iPhonePackager\iPhonePackager.csproj",
                    @"Engine\Source\Programs\IOS\MobileDeviceInterface\MobileDeviceInterface.csproj",
                    @"Engine\Source\Programs\IOS\DeploymentInterface\DeploymentInterface.csproj",
                }
                    );

            Agenda.ExtraDotNetFiles.AddRange(
                new string[]
                {
                    "Interop.IWshRuntimeLibrary",
                    "UnrealMarkdown",
                    "CommonUnrealMarkdown",
                }
                );
        }

        {
            if (LeanAndMean && UseXGE)
            {
                // this is minimal to test XGE
                var ProgramTargets = new string[]
                {
                    "UnrealHeaderTool",
                };
                Agenda.AddTargets(ProgramTargets, UnrealTargetPlatform.Win64, UnrealTargetConfiguration.Development);

                var Win64Targets = new string[]
                {
                    "FortniteEditor",
                    "OrionEditor",
                };
                Agenda.AddTargets(Win64Targets, UnrealTargetPlatform.Win64, UnrealTargetConfiguration.Development);

                var Win32Targets = new string[]
                {
                    "FortniteGame",
                    "OrionGame",
                };
                Agenda.AddTargets(Win32Targets, UnrealTargetPlatform.Win32, UnrealTargetConfiguration.Development);

            }
            else if (LeanAndMean)
            {
                var ProgramTargets = new string[]
                {
                    "ShaderCompileWorker",
                    "UnrealHeaderTool",
                    "UnrealLightmass",
                };
                Agenda.AddTargets(ProgramTargets, UnrealTargetPlatform.Win64, UnrealTargetConfiguration.Development);

                var Win64DevTargets = new string[]
                {
                    "FortniteEditor",
                    "QAGameEditor",
                };
                Agenda.AddTargets(Win64DevTargets, UnrealTargetPlatform.Win64, UnrealTargetConfiguration.Development);
            }
            else
            {
                //This needs to be a separate target for distributed building because it is required to build anything else.
                var UHTTarget = new string[]
                {
                    "UnrealHeaderTool",
                };
                Agenda.AddTargets(UHTTarget, UnrealTargetPlatform.Win64, UnrealTargetConfiguration.Development);

                var ProgramTargets = new string[]
                {
                    "UnrealFileServer",
                    "ShaderCompileWorker",
                    "MinidumpDiagnostics",
                    "SymbolDebugger",
                    "UnrealFrontend",
                    "UnrealLightmass",
                    "UnrealPak",
                    "CrashReportClient",
                };

                var MacProgramTargets = new string[]
                {
                    "UnrealFileServer",
                    "ShaderCompileWorker",
                    "UnrealFrontend",
                    "UnrealHeaderTool",
                    "UnrealLightmass",
                    "UnrealPak",
                    "CrashReportClient",
                };

                var Win64DevTargets = new List<string>
                {
                    "FortniteEditor",
                    "OrionEditor",
                    "PlatformerGameEditor",
                    "QAGameEditor",
                    "ShooterGameEditor",
                    "StrategyGameEditor",
                    "VehicleGameEditor",
                    "ShadowEditor",
                    "SoulEditor",
                    "StrategyVREditor",
                };

                var Win32Targets = new List<string>
                {
                    "FortniteGame",
                    "FortniteClient",
                    "FortniteServer",
                    "OrionGame",
                    "PlatformerGame",
                    "QAGame",
                    "ShooterGame",
                    "StrategyGame",
                    "VehicleGame",
                    "Shadow",
                    "Soul",
                    "StrategyVR",
                };

                var Win32ShipTargets = new List<string>
                {
                    "FortniteGame",
                    "FortniteClient",
                    "FortniteServer",
                };

                var PS4DevTargets = new List<string>
                {
                    "QAGame",
                    "UE4Game",
                    "FortniteGame",
                };

                var XboxOneDevTargets = new List<string>
                {
                    "QAGame",
                    "UE4Game",
                    "FortniteGame",
                };

                var IOSDevTargets = new List<string>
                {
                    "QAGame",
                    "UE4Game",
                    "Shadow",
                    "PlatformerGame",
                    "StrategyGame",
                    "Soul",
                };

                var MacDevTargets = new List<string>
                {
                    "QAGameEditor",
                };

                var AndroidDevTargets = new List<string>
                {
                    "UE4Game",
                    "Soul",
                };

                //Check to see if we should Exclude any projects.  We would want to do this for branches that do not have all of the projects
                var Excludes = ParseParamValue("Exclude");

                if (!String.IsNullOrEmpty(Excludes))
                {
                    List<List<string>> TargetLists = new List<List<string>>
                    {
                       Win32Targets,
                       Win64DevTargets,
                       Win32ShipTargets,
                       PS4DevTargets,
                       XboxOneDevTargets,
                       IOSDevTargets,
                       MacDevTargets,
                       AndroidDevTargets,
                    };

                    List<string> Samples = new List<string>
                    {
                        "PlatformerGame",
                        "ShooterGame",
                        "StrategyGame",
                        "VehicleGame",
                        "PlatformerGameEditor",
                        "ShooterGameEditor",
                        "StrategyGameEditor",
                        "VehicleGameEditor",
                    };

                    List<string> Orion = new List<string>
                    {
                        "OrionGame",
                        "OrionEditor",
                    };

                    List<string> Fortnite = new List<string>
                    {
                        "FortniteServer",
                        "FortniteClient",
                        "FortniteGame",
                        "FortniteEditor",
                    };

                    List<string> Shadow = new List<string>
                    {
                        "Shadow",
                        "ShadowEditor",
                    };

                    List<string> Soul = new List<string>
                    {
                        "Soul",
                        "SoulEditor",
                    };

                    List<string> StrategyVR = new List<string>
                    {
                        "StrategyVR",
                        "StrategyVREditor",
                    };

                    List<string> Exclude = new List<string>(Excludes.Split('+'));

                    foreach (List<string> List in TargetLists)
                    {
                        if (Exclude.Contains("Samples"))
                        {
                            RemoveTargetsFromList(Samples, List);
                        }
                        if (Exclude.Contains("Orion"))
                        {
                            RemoveTargetsFromList(Orion, List);
                        }
                        if (Exclude.Contains("Fortnite"))
                        {
                            RemoveTargetsFromList(Fortnite, List);
                        }
                        if (Exclude.Contains("Shadow"))
                        {
                            RemoveTargetsFromList(Shadow, List);
                        }
                        if (Exclude.Contains("Soul"))
                        {
                            RemoveTargetsFromList(Soul, List);
                        }
                        if (Exclude.Contains("StrategyVR"))
                        {
                            RemoveTargetsFromList(StrategyVR, List);
                        }
                    }
                }

                // @todo: make this programmatic by looping over the TargetLists (which maybe should be a map from config to list)
                string[] Win64Dev = Win64DevTargets.ToArray();
                string[] Win32Dev = Win32Targets.ToArray();
                string[] Win32Ship = Win32ShipTargets.ToArray();
                string[] PS4Dev = PS4DevTargets.ToArray();
                string[] XboxOneDev = XboxOneDevTargets.ToArray();
                string[] IOSDev = IOSDevTargets.ToArray();
                string[] MacDev = MacDevTargets.ToArray();
                string[] AndroidDev = AndroidDevTargets.ToArray();

                if (!String.IsNullOrEmpty(Config))
                {
                    switch (Config.ToUpperInvariant())
                    {
                        case "EDITORS":
                            Agenda.AddTargets(Win64Dev, UnrealTargetPlatform.Win64, UnrealTargetConfiguration.Development);
                            Agenda.AddTargets(ProgramTargets, UnrealTargetPlatform.Win64, UnrealTargetConfiguration.Development);
                            break;
                        case "WIN32DEV":
                            Agenda.AddTargets(Win32Dev, UnrealTargetPlatform.Win32, UnrealTargetConfiguration.Development);
                            break;
                        case "WIN32SHIP":
                            Agenda.AddTargets(Win32Ship, UnrealTargetPlatform.Win32, UnrealTargetConfiguration.Shipping);
                            break;
                        case "PS4DEV":
                            Agenda.AddTargets(PS4Dev, UnrealTargetPlatform.PS4, UnrealTargetConfiguration.Development);
                            break;
                        case "XBOXONEDEV":
                            Agenda.AddTargets(XboxOneDev, UnrealTargetPlatform.XboxOne, UnrealTargetConfiguration.Development);
                            break;
                        case "IOSDEV":
                            Agenda.AddTargets(IOSDev, UnrealTargetPlatform.IOS, UnrealTargetConfiguration.Development);
                            break;
                        case "MACDEV":
                            Agenda.AddTargets(MacDev, UnrealTargetPlatform.Mac, UnrealTargetConfiguration.Development);
                            Agenda.AddTargets(MacProgramTargets, UnrealTargetPlatform.Mac, UnrealTargetConfiguration.Development);
                            break;
                        case "ANDROIDDEV":
                            Agenda.AddTargets(AndroidDev, UnrealTargetPlatform.Android, UnrealTargetConfiguration.Development);
                            break;
                    }
                }
                else
                {
                    Agenda.AddTargets(Win64Dev, UnrealTargetPlatform.Win64, UnrealTargetConfiguration.Development);
                    Agenda.AddTargets(ProgramTargets, UnrealTargetPlatform.Win64, UnrealTargetConfiguration.Development);
                    Agenda.AddTargets(Win32Dev, UnrealTargetPlatform.Win32, UnrealTargetConfiguration.Development);
                    Agenda.AddTargets(Win32Ship, UnrealTargetPlatform.Win32, UnrealTargetConfiguration.Shipping);
                    Agenda.AddTargets(PS4Dev, UnrealTargetPlatform.PS4, UnrealTargetConfiguration.Development);
                    Agenda.AddTargets(XboxOneDev, UnrealTargetPlatform.XboxOne, UnrealTargetConfiguration.Development);
                    Agenda.AddTargets(IOSDev, UnrealTargetPlatform.IOS, UnrealTargetConfiguration.Development);
                }
            }
        }

        UE4Build.Build(Agenda, InDeleteBuildProducts: true, InUpdateVersionFiles: true);
        if (String.IsNullOrEmpty(Config) || Config.ToLower() == "editors")
        {
            UE4Build.AddUATFilesToBuildProducts();
        }
        UE4Build.CheckBuildProducts(UE4Build.BuildProductFiles);

        if (P4Enabled)
        {
            // Sign everything we built
            CodeSign.SignMultipleIfEXEOrDLL(this, UE4Build.BuildProductFiles);

            // Open files for add or edit
            UE4Build.AddBuildProductsToChangelist(WorkingCL, UE4Build.BuildProductFiles);

            // Check everything in!
            int SubmittedCL;
            Submit(WorkingCL, out SubmittedCL, true, true);

            // Label it
            if (String.IsNullOrEmpty(Config))
            {
                MakeDownstreamLabel("Promotable");
            }
            else if (Config.ToLower() == "editors")
            {
                MakeDownstreamLabel("Promotable-Partial-" + Config);
            }
            else
            {
                MakeDownstreamLabel("Partial-Promotable-" + Config, UE4Build.BuildProductFiles);
            }
        }
    }
Exemple #10
0
        public override UE4Build.BuildAgenda GetAgenda(GUBP bp)
        {
            if (!bp.bOrthogonalizeEditorPlatforms)
            {
                throw new AutomationException("EditorPlatformNode node should not be used unless we are orthogonalizing editor platforms.");
            }
            var Agenda = new UE4Build.BuildAgenda();

            Agenda.AddTargets(
                new string[] { bp.Branch.BaseEngineProject.Properties.Targets[TargetRules.TargetType.Editor].TargetName },
                HostPlatform, UnrealTargetConfiguration.Development, InAddArgs: "-nobuilduht -skipactionhistory -CopyAppBundleBackToDevice -onlyplatformspecificfor=" + EditorPlatform.ToString());
            foreach (var ProgramTarget in bp.Branch.BaseEngineProject.Properties.Programs)
            {
                if (ProgramTarget.Rules.GUBP_AlwaysBuildWithBaseEditor() && ProgramTarget.Rules.SupportsPlatform(HostPlatform) && ProgramTarget.Rules.GUBP_NeedsPlatformSpecificDLLs())
                {
                    Agenda.AddTargets(new string[] { ProgramTarget.TargetName }, HostPlatform, UnrealTargetConfiguration.Development, InAddArgs: "-nobuilduht -skipactionhistory -CopyAppBundleBackToDevice -onlyplatformspecificfor=" + EditorPlatform.ToString());
                }
            }
            return Agenda;
        }
Exemple #11
0
        public override UE4Build.BuildAgenda GetAgenda(GUBP bp)
        {
            var Agenda = new UE4Build.BuildAgenda();

            string AddArgs = "-nobuilduht -precompile";
            if (bp.bOrthogonalizeEditorPlatforms)
            {
                AddArgs += " -skipnonhostplatforms";
            }
            Agenda.AddTargets(
                new string[] { bp.Branch.BaseEngineProject.Properties.Targets[TargetRules.TargetType.Editor].TargetName },
                HostPlatform, UnrealTargetConfiguration.Development, InAddArgs: AddArgs);
            foreach (var ProgramTarget in bp.Branch.BaseEngineProject.Properties.Programs)
            {
                if (ProgramTarget.Rules.GUBP_AlwaysBuildWithBaseEditor() && ProgramTarget.Rules.SupportsPlatform(HostPlatform))
                {
                    Agenda.AddTargets(new string[] { ProgramTarget.TargetName }, HostPlatform, UnrealTargetConfiguration.Development, InAddArgs: AddArgs);
                }
            }
            return Agenda;
        }
	public override void ExecuteBuild()
	{
		int WorkingCL = -1;
		if (P4Enabled && AllowSubmit)
		{
			string CmdLine = "";
			foreach (var Arg in Params)
			{
				CmdLine += Arg.ToString() + " ";
			}
			WorkingCL = P4.CreateChange(P4Env.Client, String.Format("MegaXGE build from changelist {0} - Params: {1}", P4Env.Changelist, CmdLine));
		}

		LogConsole("************************* MegaXGE");

		bool Clean = ParseParam("Clean");
		string CleanToolLocation = CombinePaths(CmdEnv.LocalRoot, "Engine", "Build", "Batchfiles", "Clean.bat");

		bool ShowProgress = ParseParam("Progress");

		var UE4Build = new UE4Build(this);

		var Agenda = new UE4Build.BuildAgenda();

		// we need to always build UHT when we use mega XGE
		var ProgramTargets = new string[] 
		{
			"UnrealHeaderTool",
		};
		Agenda.AddTargets(ProgramTargets, UnrealTargetPlatform.Win64, UnrealTargetConfiguration.Development);
		if (Clean)
		{
			LogSetProgress(ShowProgress, "Cleaning previous builds...");
			foreach (var CurTarget in ProgramTargets)
			{
				string Args = String.Format("{0} {1} {2}", CurTarget, UnrealTargetPlatform.Win64.ToString(), UnrealTargetConfiguration.Development.ToString());
				RunAndLog(CmdEnv, CleanToolLocation, Args);
			}
		}

		LogConsole("*************************");
		for (int Arg = 1; Arg < 100; Arg++)
		{
			string Parm = String.Format("Target{0}", Arg);
			string Target = ParseParamValue(Parm, "");
			if (String.IsNullOrEmpty(Target))
			{
				break;
			}
			var Parts = Target.Split(' ');

			string JustTarget = Parts[0];
			if (String.IsNullOrEmpty(JustTarget))
			{
				throw new AutomationException("BUILD FAILED target option '{0}' not parsed.", Target);
			}
			var Targets = JustTarget.Split('|');
			if (Targets.Length < 1)
			{
				throw new AutomationException("BUILD FAILED target option '{0}' not parsed.", Target);
			}

			var Platforms = new List<UnrealTargetPlatform>();
			var Configurations = new List<UnrealTargetConfiguration>();

			for (int Part = 1; Part < Parts.Length; Part++)
			{
				if (!String.IsNullOrEmpty(Parts[Part]))
				{
					var SubParts = Parts[Part].Split('|');

					foreach (var SubPart in SubParts)
					{
						if (UEBuildPlatform.ConvertStringToPlatform(SubPart) != UnrealTargetPlatform.Unknown)
						{
							Platforms.Add(UEBuildPlatform.ConvertStringToPlatform(SubPart));
						}
						else
						{
							switch (SubPart.ToUpperInvariant())
							{
								case "DEBUG":
									Configurations.Add(UnrealTargetConfiguration.Debug);
									break;
								case "DEBUGGAME":
									Configurations.Add(UnrealTargetConfiguration.DebugGame);
									break;
								case "DEVELOPMENT":
									Configurations.Add(UnrealTargetConfiguration.Development);
									break;
								case "SHIPPING":
									Configurations.Add(UnrealTargetConfiguration.Shipping);
									break;
								case "TEST":
									Configurations.Add(UnrealTargetConfiguration.Test);
									break;
								default:
									throw new AutomationException("BUILD FAILED target option {0} not recognized.", SubPart);
							}
						}

					}
				}
			}
			if (Platforms.Count < 1)
			{
				Platforms.Add(UnrealTargetPlatform.Win64);
			}
			if (Configurations.Count < 1)
			{
				Configurations.Add(UnrealTargetConfiguration.Development);
			}
			foreach (var Platform in Platforms)
			{
				foreach (var CurTarget in Targets)
				{
					foreach (var Configuration in Configurations)
					{
						Agenda.AddTargets(new string[] { CurTarget }, Platform, Configuration);
						LogConsole("Target {0} {1} {2}", CurTarget, Platform.ToString(), Configuration.ToString());
						if (Clean)
						{
							string Args = String.Format("{0} {1} {2}", CurTarget, Platform.ToString(), Configuration.ToString());
							RunAndLog(CmdEnv, CleanToolLocation, Args);
						}
					}
				}
			}
		}
		LogConsole("*************************");

		Agenda.DoRetries = ParseParam("Retry");
		UE4Build.Build(Agenda, InUpdateVersionFiles: IsBuildMachine, InUseParallelExecutor: ParseParam("useparallelexecutor"), InShowProgress: ShowProgress);

		// 		if (WorkingCL > 0) // only move UAT files if we intend to check in some build products
		// 		{
		// 			UE4Build.CopyUATFilesAndAddToBuildProducts();
		// 		}

		UE4Build.CheckBuildProducts(UE4Build.BuildProductFiles);

		if (WorkingCL > 0)
		{
			// Sign everything we built
			CodeSign.SignMultipleIfEXEOrDLL(this, UE4Build.BuildProductFiles);

			// Open files for add or edit
			UE4Build.AddBuildProductsToChangelist(WorkingCL, UE4Build.BuildProductFiles);

			int SubmittedCL;
			P4.Submit(WorkingCL, out SubmittedCL, true, true);
		}

		PrintRunTime();

	}
    public static void Build(BuildCommand Command, ProjectParams Params, int WorkingCL = -1, ProjectBuildTargets TargetMask = ProjectBuildTargets.All)
	{
		Params.ValidateAndLog();

		if (!Params.Build)
		{
			return;
		}

		Log("********** BUILD COMMAND STARTED **********");

		var UE4Build = new UE4Build(Command);
		var Agenda = new UE4Build.BuildAgenda();
		var CrashReportPlatforms = new HashSet<UnrealTargetPlatform>();

		// Setup editor targets
		if (Params.HasEditorTargets && !Automation.IsEngineInstalled() && (TargetMask & ProjectBuildTargets.Editor) == ProjectBuildTargets.Editor)
		{
			// @todo Mac: proper platform detection
			UnrealTargetPlatform EditorPlatform = HostPlatform.Current.HostEditorPlatform;
			const UnrealTargetConfiguration EditorConfiguration = UnrealTargetConfiguration.Development;

			CrashReportPlatforms.Add(EditorPlatform);
            Agenda.AddTargets(Params.EditorTargets.ToArray(), EditorPlatform, EditorConfiguration, Params.CodeBasedUprojectPath);
			if (Params.EditorTargets.Contains("UnrealHeaderTool") == false)
			{
				Agenda.AddTargets(new string[] { "UnrealHeaderTool" }, EditorPlatform, EditorConfiguration);
			}
			if (Params.EditorTargets.Contains("ShaderCompileWorker") == false)
			{
				Agenda.AddTargets(new string[] { "ShaderCompileWorker" }, EditorPlatform, EditorConfiguration);
			}
			if (Params.Pak && Params.EditorTargets.Contains("UnrealPak") == false)
			{
				Agenda.AddTargets(new string[] { "UnrealPak" }, EditorPlatform, EditorConfiguration);
			}
			if (Params.FileServer && Params.EditorTargets.Contains("UnrealFileServer") == false)
			{
				Agenda.AddTargets(new string[] { "UnrealFileServer" }, EditorPlatform, EditorConfiguration);
			}
		}

		// Setup cooked targets
		if (Params.HasClientCookedTargets && (TargetMask & ProjectBuildTargets.ClientCooked) == ProjectBuildTargets.ClientCooked)
		{
            List<UnrealTargetPlatform> UniquePlatformTypes = Params.ClientTargetPlatforms.ConvertAll(x => x.Type).Distinct().ToList();

            foreach (var BuildConfig in Params.ClientConfigsToBuild)
			{
                foreach (var ClientPlatformType in UniquePlatformTypes)
				{
                    string ScriptPluginArgs = GetBlueprintPluginPathArgument(Params, true, ClientPlatformType);
                    CrashReportPlatforms.Add(ClientPlatformType);
					Agenda.AddTargets(Params.ClientCookedTargets.ToArray(), ClientPlatformType, BuildConfig, Params.CodeBasedUprojectPath, InAddArgs: ScriptPluginArgs + " -remoteini=\"" + Params.RawProjectPath.Directory.FullName + "\"");
				}
			}
		}
		if (Params.HasServerCookedTargets && (TargetMask & ProjectBuildTargets.ServerCooked) == ProjectBuildTargets.ServerCooked)
		{
            List<UnrealTargetPlatform> UniquePlatformTypes = Params.ServerTargetPlatforms.ConvertAll(x => x.Type).Distinct().ToList();

            foreach (var BuildConfig in Params.ServerConfigsToBuild)
			{
				foreach (var ServerPlatformType in UniquePlatformTypes)
				{
                    string ScriptPluginArgs = GetBlueprintPluginPathArgument(Params, false, ServerPlatformType);
                    CrashReportPlatforms.Add(ServerPlatformType);
					Agenda.AddTargets(Params.ServerCookedTargets.ToArray(), ServerPlatformType, BuildConfig, Params.CodeBasedUprojectPath, InAddArgs: ScriptPluginArgs + " -remoteini=\"" + Params.RawProjectPath.Directory.FullName + "\"");
				}
			}
		}
		if (!Params.NoBootstrapExe && !Automation.IsEngineInstalled() && (TargetMask & ProjectBuildTargets.Bootstrap) == ProjectBuildTargets.Bootstrap)
		{
			UnrealBuildTool.UnrealTargetPlatform[] BootstrapPackagedGamePlatforms = { UnrealBuildTool.UnrealTargetPlatform.Win32, UnrealBuildTool.UnrealTargetPlatform.Win64 };
			foreach(UnrealBuildTool.UnrealTargetPlatform BootstrapPackagedGamePlatformType in BootstrapPackagedGamePlatforms)
			{
				if(Params.ClientTargetPlatforms.Contains(new TargetPlatformDescriptor(BootstrapPackagedGamePlatformType)))
				{
					Agenda.AddTarget("BootstrapPackagedGame", BootstrapPackagedGamePlatformType, UnrealBuildTool.UnrealTargetConfiguration.Shipping);
				}
			}
		}
		if (Params.CrashReporter && !Automation.IsEngineInstalled() && (TargetMask & ProjectBuildTargets.CrashReporter) == ProjectBuildTargets.CrashReporter)
		{
			foreach (var CrashReportPlatform in CrashReportPlatforms)
			{
				if (UnrealBuildTool.UnrealBuildTool.PlatformSupportsCrashReporter(CrashReportPlatform))
				{
					Agenda.AddTarget("CrashReportClient", CrashReportPlatform, UnrealTargetConfiguration.Shipping);
				}
			}
		}
		if (Params.HasProgramTargets && (TargetMask & ProjectBuildTargets.Programs) == ProjectBuildTargets.Programs)
		{
            List<UnrealTargetPlatform> UniquePlatformTypes = Params.ClientTargetPlatforms.ConvertAll(x => x.Type).Distinct().ToList();

            foreach (var BuildConfig in Params.ClientConfigsToBuild)
			{
				foreach (var ClientPlatformType in UniquePlatformTypes)
				{
					Agenda.AddTargets(Params.ProgramTargets.ToArray(), ClientPlatformType, BuildConfig, Params.CodeBasedUprojectPath);
				}
			}
		}
		UE4Build.Build(Agenda, InDeleteBuildProducts: Params.Clean, InUpdateVersionFiles: WorkingCL > 0);

		if (WorkingCL > 0) // only move UAT files if we intend to check in some build products
		{
			UE4Build.AddUATFilesToBuildProducts();
		}
		UE4Build.CheckBuildProducts(UE4Build.BuildProductFiles);

		if (WorkingCL > 0)
		{
			// Sign everything we built
			CodeSign.SignMultipleIfEXEOrDLL(Command, UE4Build.BuildProductFiles);

			// Open files for add or edit
			UE4Build.AddBuildProductsToChangelist(WorkingCL, UE4Build.BuildProductFiles);
		}

		Log("********** BUILD COMMAND COMPLETED **********");
	}
    void ExecuteInner(int WorkingCL)
    {
        var UE4Build = new UE4Build(this);
        var Agenda = new UE4Build.BuildAgenda();

        Agenda.DotNetSolutions.AddRange(
            new string[]
            {
                //@"Engine\Source\Programs\UnrealDocTool\UnrealDocTool\UnrealDocTool.sln",
                //@"Engine\Source\Programs\NetworkProfiler\NetworkProfiler.sln",
            }
            );

        Agenda.DotNetProjects.AddRange(
            new string[]
            {
                //@"Engine\Source\Programs\DotNETCommon\DotNETUtilities\DotNETUtilities.csproj",
                //@"Engine\Source\Programs\CrashReporter\CrashReportCommon\CrashReportCommon.csproj",
                //@"Engine\Source\Programs\CrashReporter\CrashReportInput\CrashReportInput.csproj",
                //@"Engine\Source\Programs\CrashReporter\CrashReportUploader\CrashReportUploader.csproj",
                //@"Engine\Source\Programs\CrashReporter\CrashReportReceiver\CrashReportReceiver.csproj",
                //@"Engine\Source\Programs\CrashReporter\CrashReportProcess\CrashReportProcess.csproj",
                //@"Engine\Source\Programs\CrashReporter\RegisterPII\RegisterPII.csproj",
                //@"Engine\Source\Programs\Distill\Distill.csproj",
                //@"Engine\Source\Programs\UnSetup\UnSetup.csproj",
            }
            );

        Agenda.ExtraDotNetFiles.AddRange(
            new string[]
            {
                //"Interop.IWshRuntimeLibrary",
                //"UnrealMarkdown",
                //"CommonUnrealMarkdown",
            }
            );

        {
            if (LeanAndMean)
            {
                var ProgramTargets = new string[]
                {
                    "CrashReportClient",
                    "ShaderCompileWorker",
                    "UnrealHeaderTool",
                    "UnrealLightmass",
                };
                Agenda.AddTargets(ProgramTargets, UnrealTargetPlatform.Mac, UnrealTargetConfiguration.Development);

                var MacDevTargets = new string[]
                {
                    "QAGameEditor",
                };
                Agenda.AddTargets(MacDevTargets, UnrealTargetPlatform.Mac, UnrealTargetConfiguration.Development);
            }
            else
            {
                var ProgramTargets = new string[]
                {
                    "BuildPatchTool",
                    "CrashReportClient",
                    "UnrealFileServer",
                    "ShaderCompileWorker",
                    //"MinidumpDiagnostics",
                    //"SymbolDebugger",
                    "UnrealFrontend",
                    "UnrealHeaderTool",
                    "UnrealLightmass",
                    "UnrealPak",
                    //"UnrealRemoteAgent",
                };
                Agenda.AddTargets(ProgramTargets, UnrealTargetPlatform.Mac, UnrealTargetConfiguration.Development);

                var MacDevTargets = new string[]
                {
        //					"FortniteEditor",
        //					"OrionEditor",
                    "PlatformerGameEditor",
                    "QAGameEditor",
                    "ShooterGameEditor",
                    "StrategyGameEditor",
        //					"VehicleGameEditor",
        //					"FortniteGame",
        //					"FortniteServer",
        //					"OrionGame",
                    "PlatformerGame",
                    "QAGame",
                    "ShooterGame",
                    "StrategyGame",
        //					"VehicleGame",
                };
                Agenda.AddTargets(MacDevTargets, UnrealTargetPlatform.Mac, UnrealTargetConfiguration.Development);

            }
        }

        UE4Build.Build(Agenda, InDeleteBuildProducts: true, InUpdateVersionFiles: true);

        UE4Build.CheckBuildProducts(UE4Build.BuildProductFiles);

        if (P4Enabled)
        {
            // Sign everything we built
            CodeSign.SignMultipleIfEXEOrDLL(this, UE4Build.BuildProductFiles);

            // Open files for add or edit
            UE4Build.AddBuildProductsToChangelist(WorkingCL, UE4Build.BuildProductFiles);

            // Check everything in!
            int SubmittedCL;
            Submit(WorkingCL, out SubmittedCL, true, true);

            // Label it
            MakeDownstreamLabel("PromotableMacOnly");
        }
    }
    void ExecuteInner()
    {
        var UE4Build = new UE4Build(this);
        bool IsRunningOnMono = (Type.GetType("Mono.Runtime") != null);
        var Agenda = new UE4Build.BuildAgenda();

        var Config = ParseParamValue("Config");
        if (String.IsNullOrEmpty(Config))
        {
            Config = "tools";
        }

        if (Config.ToLower() == "tools")
        {
            Agenda.DotNetSolutions.AddRange(
                    new string[]
                {
                    @"Engine\Source\Programs\UnrealDocTool\UnrealDocTool\UnrealDocTool.sln",
                    @"Engine\Source\Programs\NetworkProfiler\NetworkProfiler.sln",
                }
                    );

            Agenda.SwarmProject = @"Engine\Source\Programs\UnrealSwarm\UnrealSwarm.sln";

            Agenda.DotNetProjects.AddRange(
                    new string[]
                {
                    @"Engine\Source\Programs\DotNETCommon\DotNETUtilities\DotNETUtilities.csproj",
                    @"Engine\Source\Programs\NoRedist\CrashReportServer\CrashReportCommon\CrashReportCommon.csproj",
                    @"Engine\Source\Programs\NoRedist\CrashReportServer\CrashReportReceiver\CrashReportReceiver.csproj",
                    @"Engine\Source\Programs\NoRedist\CrashReportServer\CrashReportProcess\CrashReportProcess.csproj",
                    @"Engine\Source\Programs\CrashReporter\RegisterPII\RegisterPII.csproj",
                    @"Engine\Source\Programs\Distill\Distill.csproj",
                    @"Engine\Source\Programs\RPCUtility\RPCUtility.csproj",
                    @"Engine\Source\Programs\UnrealControls\UnrealControls.csproj",
                }
                    );

            Agenda.IOSDotNetProjects.AddRange(
                    new string[]
                {
                    @"Engine\Source\Programs\IOS\iPhonePackager\iPhonePackager.csproj",
                    @"Engine\Source\Programs\IOS\MobileDeviceInterface\MobileDeviceInterface.csproj",
                    @"Engine\Source\Programs\IOS\DeploymentInterface\DeploymentInterface.csproj",
                }
                    );

            Agenda.ExtraDotNetFiles.AddRange(
                    new string[]
                {
                    "Interop.IWshRuntimeLibrary",
                    "UnrealMarkdown",
                    "CommonUnrealMarkdown",
                }
                    );
        }
        //This needs to be a separate target for distributed building because it is required to build anything else.
        if (!IsRunningOnMono)
        {
            var UHTTarget = new string[]
            {
                "UnrealHeaderTool",
            };

            Agenda.AddTargets(UHTTarget, UnrealTargetPlatform.Win64, UnrealTargetConfiguration.Development);
        }

        var ProgramTargets = new string[]
        {
            "UnrealFileServer",
            "ShaderCompileWorker",
            "MinidumpDiagnostics",
            "SymbolDebugger",
            "UnrealFrontend",
            "UnrealLightmass",
            "UnrealPak",
        };

        var Win64DevTargets = new List<string>
        {
            "FortniteEditor",
            "OrionEditor",
            "PlatformerGameEditor",
            "QAGameEditor",
            "ShooterGameEditor",
            "StrategyGameEditor",
            "VehicleGameEditor",
            "ShadowEditor",
            "SoulEditor",
        };

        var Win32Targets = new List<string>
        {
            "FortniteGame",
            "FortniteServer",
            "FortniteClient",
            "OrionGame",
            "PlatformerGame",
            "ShooterGame",
            "StrategyGame",
            "VehicleGame",
            "Shadow",
            "Soul",
        };

        var MacDebugTargets = new List<string>
        {
            "FortniteGame",
            "FortniteEditor",
            "ShooterGameEditor",
            "ShooterGame",
        };

        var PS4DevTargets = new List<string>
        {
            "FortniteGame",
        };

        var XboxOneDevTargets = new List<string>
        {
            "QAGame",
        };

        var IOSDevTargets = new List<string>
        {
            "QAGame",
            "Shadow",
            //"PlatformerGame",
            //"StrategyGame",
            "Soul",
        };

        var LinuxTargets = new List<string>
        {
            "FortniteServer",
        };

        var WinRTDevTargets = new List<string>
        {
            "QAGame",
        };

        var HTML5DevTargets = new List<string>
        {
            "QAGame",
        };

        var AndroidDevTargets = new List<string>
        {
            "UE4Game",
            "Soul",
        };

        //Check to see if we should Exclude any projects.  We would want to do this for branches that do not have all of the projects
        var Excludes = ParseParamValue("Exclude");

        if (!String.IsNullOrEmpty(Excludes))
        {
            List<List<string>> TargetLists = new List<List<string>>
            {
                Win32Targets,
                Win64DevTargets,
                PS4DevTargets,
                XboxOneDevTargets,
                IOSDevTargets,
                LinuxTargets,
                HTML5DevTargets,
                WinRTDevTargets,
                MacDebugTargets,
                AndroidDevTargets
            };

            List<string> Samples = new List<string>
            {
                "PlatformerGame",
                "ShooterGame",
                "StrategyGame",
                "VehicleGame",
                "PlatformerGameEditor",
                "ShooterGameEditor",
                "StrategyGameEditor",
                "VehicleGameEditor",
            };

            List<string> Orion = new List<string>
            {
                "OrionGame",
                "OrionEditor",
            };

            List<string> Fortnite = new List<string>
            {
                "FortniteServer",
                "FortniteGame",
                "FortniteClient",
                "FortniteEditor",
            };

            List<string> Shadow = new List<string>
            {
                "Shadow",
                "ShadowEditor",
            };

            List<string> Soul = new List<string>
            {
                "Soul",
                "SoulEditor",
            };

            List<string> Exclude = new List<string>(Excludes.Split('+'));

            foreach (List<string> List in TargetLists)
            {
                if (Exclude.Contains("Samples"))
                {
                    RemoveTargetsFromList(Samples, List);
                }
                if (Exclude.Contains("Orion"))
                {
                    RemoveTargetsFromList(Orion, List);
                }
                if (Exclude.Contains("Fortnite"))
                {
                    RemoveTargetsFromList(Fortnite, List);
                }
                if (Exclude.Contains("Shadow"))
                {
                    RemoveTargetsFromList(Shadow, List);
                }
                if (Exclude.Contains("Soul"))
                {
                    RemoveTargetsFromList(Soul, List);
                }
            }
        }
        // @todo: make this programmatic by looping over the TargetLists (which maybe should be a map from config to list)
        string[] Win64Dev = Win64DevTargets.ToArray();
        string[] Win32Dev = Win32Targets.ToArray();
        string[] PS4Dev = PS4DevTargets.ToArray();
        string[] XboxOneDev = XboxOneDevTargets.ToArray();
        string[] IOSDev = IOSDevTargets.ToArray();
        string[] LinuxDev = LinuxTargets.ToArray();
        string[] WinRTDev = WinRTDevTargets.ToArray();
        string[] MacDebug = MacDebugTargets.ToArray();
        string[] HTML5Dev = HTML5DevTargets.ToArray();
        string[] AndroidDev = AndroidDevTargets.ToArray();

        switch (Config.ToUpperInvariant())
        {
            case "TOOLS":
                Agenda.AddTargets(ProgramTargets, UnrealTargetPlatform.Win64, UnrealTargetConfiguration.Development);
                break;
            case "EDITORS":
                Agenda.AddTargets(Win64Dev, UnrealTargetPlatform.Win64, UnrealTargetConfiguration.Development);
                break;
            case "WIN32DEV":
                Agenda.AddTargets(Win32Dev, UnrealTargetPlatform.Win32, UnrealTargetConfiguration.Development);
                break;
            case "PS4DEV":
                Agenda.AddTargets(PS4Dev, UnrealTargetPlatform.PS4, UnrealTargetConfiguration.Development);
                break;
            case "XBOXONEDEV":
                Agenda.AddTargets(XboxOneDev, UnrealTargetPlatform.XboxOne, UnrealTargetConfiguration.Development);
                break;
            case "IOSDEV":
                Agenda.AddTargets(IOSDev, UnrealTargetPlatform.IOS, UnrealTargetConfiguration.Development);
                break;
            case "LINUX":
                Agenda.AddTargets(LinuxDev, UnrealTargetPlatform.Linux, UnrealTargetConfiguration.Development);
                break;
            case "WINRT":
                Agenda.AddTargets(WinRTDev, UnrealTargetPlatform.WinRT, UnrealTargetConfiguration.Development);
                break;
            case "MAC":
                Agenda.AddTargets(MacDebug, UnrealTargetPlatform.Mac, UnrealTargetConfiguration.Debug);
                break;
            case "HTML5":
                Agenda.AddTargets(HTML5Dev, UnrealTargetPlatform.HTML5, UnrealTargetConfiguration.Development);
                break;
            case "ANDROID":
                Agenda.AddTargets(AndroidDev, UnrealTargetPlatform.Android, UnrealTargetConfiguration.Development);
                break;
        }
        UE4Build.Build(Agenda, InDeleteBuildProducts: true, InUpdateVersionFiles: true);
        UE4Build.CheckBuildProducts(UE4Build.BuildProductFiles);
    }
    void ExecuteInner()
    {
        var UE4Build = new UE4Build(this);
        var Agenda = new UE4Build.BuildAgenda();

        Agenda.DotNetSolutions.AddRange(
            new string[]
            {
                @"Engine\Source\Programs\UnrealDocTool\UnrealDocTool\UnrealDocTool.sln",
                @"Engine\Source\Programs\NetworkProfiler\NetworkProfiler.sln",
            }
            );

        Agenda.DotNetProjects.AddRange(
            new string[]
            {
                @"Engine\Source\Programs\DotNETCommon\DotNETUtilities\DotNETUtilities.csproj",
                @"Engine\Source\Programs\NoRedist\CrashReportServer\CrashReportCommon\CrashReportCommon.csproj",
                @"Engine\Source\Programs\NoRedist\CrashReportServer\CrashReportReceiver\CrashReportReceiver.csproj",
                @"Engine\Source\Programs\NoRedist\CrashReportServer\CrashReportProcess\CrashReportProcess.csproj",
                @"Engine\Source\Programs\CrashReporter\RegisterPII\RegisterPII.csproj",
                @"Engine\Source\Programs\Distill\Distill.csproj",
            }
            );

        Agenda.ExtraDotNetFiles.AddRange(
            new string[]
            {
                "Interop.IWshRuntimeLibrary",
                "UnrealMarkdown",
                "CommonUnrealMarkdown",
            }
            );

        {
            if (LeanAndMean && !ParseParam("NoXGE"))
            {
                // this is minimal to test XGE
                var ProgramTargets = new string[]
                {
                    "UnrealHeaderTool",
                };
                Agenda.AddTargets(ProgramTargets, UnrealTargetPlatform.Win64, UnrealTargetConfiguration.Development);

                var Win64Targets = new string[]
                {
                    "FortniteEditor",
                    "OrionEditor",
                };
                Agenda.AddTargets(Win64Targets, UnrealTargetPlatform.Win64, UnrealTargetConfiguration.Development);

                var Win32Targets = new string[]
                {
                    "FortniteGame",
                    "OrionGame",
                };
                Agenda.AddTargets(Win32Targets, UnrealTargetPlatform.Win32, UnrealTargetConfiguration.Development);

            }
            else if (LeanAndMean)
            {
                var ProgramTargets = new string[]
                {
                    "ShaderCompileWorker",
                    "UnrealHeaderTool",
                    "UnrealLightmass",
                };
                Agenda.AddTargets(ProgramTargets, UnrealTargetPlatform.Win64, UnrealTargetConfiguration.Development);

                var Win64DevTargets = new string[]
                {
                    "FortniteEditor",
                    "QAGameEditor",
                };
                Agenda.AddTargets(Win64DevTargets, UnrealTargetPlatform.Win64, UnrealTargetConfiguration.Development);
            }
            else
            {
                var ProgramTargets = new string[]
                {
                    "UnrealFileServer",
                    "ShaderCompileWorker",
                    "MinidumpDiagnostics",
                    "SymbolDebugger",
                    "UnrealFrontend",
                    "UnrealHeaderTool",
                    "BlankProgram",
                    "UnrealLightmass",
                    "UnrealPak",
                };
                Agenda.AddTargets(ProgramTargets, UnrealTargetPlatform.Win64, UnrealTargetConfiguration.Development);

                var Win64DevTargets = new string[]
                {
                    "FortniteEditor",
                    "OrionEditor",
                    "PlatformerGameEditor",
                    "QAGameEditor",
                    "ShooterGameEditor",
                    "StrategyGameEditor",
                    "VehicleGameEditor",
                    "ShadowEditor",
                    "SoulEditor",
                };
                Agenda.AddTargets(Win64DevTargets, UnrealTargetPlatform.Win64, UnrealTargetConfiguration.Development);

                var Win32Targets = new string[]
                {
                    "FortniteClient",
                    "OrionServer",
                    "ShooterGame",
                };
                Agenda.AddTargets(Win32Targets, UnrealTargetPlatform.Win32, UnrealTargetConfiguration.Development);

                var Win32ShipTargets = new string[]
                {
                    "OrionGame",
                    "FortniteServer",
                };
                Agenda.AddTargets(Win32ShipTargets, UnrealTargetPlatform.Win32, UnrealTargetConfiguration.Shipping);

                var PS4DevTargets = new string[]
                {
                    // could also have "QAGame", "UE4Game",
                    "FortniteGame",
                };
                Agenda.AddTargets(PS4DevTargets, UnrealTargetPlatform.PS4, UnrealTargetConfiguration.Development);

                var XboxOneDevTargets = new string[]
                {
                    // could also have "FortniteGame", "UE4Game",
                    "QAGame",
                };
                Agenda.AddTargets(XboxOneDevTargets, UnrealTargetPlatform.XboxOne, UnrealTargetConfiguration.Development);

                var IOSDevTargets = new string[]
                {
                    // could also have "QAGame", "UE4Game", PlatformerGame", "StrategyGame",
                    "Shadow",
                    "Soul",
                };
                Agenda.AddTargets(IOSDevTargets, UnrealTargetPlatform.IOS, UnrealTargetConfiguration.Development);
            }
        }

        Agenda.DoRetries = false;
        UE4Build.Build(Agenda, InDeleteBuildProducts: true, InUpdateVersionFiles: true);

        UE4Build.CheckBuildProducts(UE4Build.BuildProductFiles);
    }
Exemple #17
0
        public override UE4Build.BuildAgenda GetAgenda(GUBP bp)
        {
            var Agenda = new UE4Build.BuildAgenda();

            string Args = "-nobuilduht -skipactionhistory -skipnonhostplatforms -CopyAppBundleBackToDevice -forceheadergeneration";
			
			if(!BranchConfig.BranchOptions.bNoInstalledEngine)
			{
				Args += " -precompile";
			}

			foreach(BranchInfo.BranchUProject GameProj in GameProjects)
			{
            Agenda.AddTargets(
                new string[] { GameProj.Properties.Targets[TargetRules.TargetType.Editor].TargetName },
                HostPlatform, UnrealTargetConfiguration.Development, GameProj.FilePath, InAddArgs: Args);
			}

            return Agenda;
        }
    public override void ExecuteBuild()
    {
        var Build = new UE4Build(this);
        var Agenda = new UE4Build.BuildAgenda();
        var Platform = UnrealBuildTool.UnrealTargetPlatform.Win64;
        var Configuration = UnrealBuildTool.UnrealTargetConfiguration.Development;
        var Targets = new List<string>();

        foreach (var ObjParam in Params)
        {
            var Param = (string)ObjParam;
            UnrealBuildTool.UnrealTargetPlatform ParsePlatform;
            if (Enum.TryParse<UnrealBuildTool.UnrealTargetPlatform>(Param, true, out ParsePlatform))
            {
                Platform = ParsePlatform;
                continue;
            }
            UnrealBuildTool.UnrealTargetConfiguration ParseConfiguration;
            if (Enum.TryParse<UnrealBuildTool.UnrealTargetConfiguration>(Param, true, out ParseConfiguration))
            {
                Configuration = ParseConfiguration;
                continue;
            }
            if (String.Compare("NoXGE", Param, true) != 0 && String.Compare("Clean", Param, true) != 0)
            {
                Targets.Add(Param);
            }
        }

        var Clean = ParseParam("Clean");

        Agenda.AddTargets(Targets.ToArray(), Platform, Configuration);

        Log("UBT Buid");
        Log("Targets={0}", String.Join(",", Targets));
        Log("Platform={0}", Platform);
        Log("Configuration={0}", Configuration);
        Log("Clean={0}", Clean);

        Build.Build(Agenda, InUpdateVersionFiles: false);

        Log("UBT Completed");
    }
Exemple #19
0
		public override void DoTest(GUBP bp)
		{
			var Build = new UE4Build(bp);
			var Agenda = new UE4Build.BuildAgenda();

			Agenda.AddTargets(new string[] { "UnrealHeaderTool" }, HostPlatform, UnrealTargetConfiguration.Development);
			Agenda.AddTargets(new string[] { ProgramTarget.TargetName }, HostPlatform, UnrealTargetConfiguration.Development, InAddArgs: "-skipnonhostplatforms");			

			Build.Build(Agenda, InDeleteBuildProducts: true, InUpdateVersionFiles: false, InForceNonUnity: true, InForceNoXGE: true);

			UE4Build.CheckBuildProducts(Build.BuildProductFiles);
			SaveRecordOfSuccessAndAddToBuildProducts();
		}
        public override UE4Build.BuildAgenda GetAgenda(GUBP bp)
        {
            var Agenda = new UE4Build.BuildAgenda();

            Agenda.AddTargets(
                new string[] { GameProj.Properties.Targets[TargetRules.TargetType.Editor].TargetName },
                HostPlatform, UnrealTargetConfiguration.Development, GameProj.FilePath, InAddArgs: "-nobuilduht -skipactionhistory -skipnonhostplatforms");

            return Agenda;
        }
Exemple #21
0
        public override void DoTest(GUBP bp)
        {
            var Build = new UE4Build(bp);
            var Agenda = new UE4Build.BuildAgenda();

            Agenda.AddTargets(new string[] { BranchConfig.Branch.BaseEngineProject.Properties.Targets[TargetRules.TargetType.Game].TargetName }, UnrealTargetPlatform.IOS, UnrealTargetConfiguration.Development);

            Build.Build(Agenda, InDeleteBuildProducts: true, InUpdateVersionFiles: false);

            UE4Build.CheckBuildProducts(Build.BuildProductFiles);
            SaveRecordOfSuccessAndAddToBuildProducts();
        }
        public override UE4Build.BuildAgenda GetAgenda(GUBP bp)
        {
            if (EditorPlatform != UnrealTargetPlatform.IOS && !bp.bOrthogonalizeEditorPlatforms)
            {
                return null;
            }
            var Agenda = new UE4Build.BuildAgenda();

            if (EditorPlatform == UnrealTargetPlatform.IOS)
            {
                //@todo, this should be generic platform stuff
                Agenda.IOSDotNetProjects.AddRange(
                        new string[]
                    {
                        @"Engine\Source\Programs\IOS\iPhonePackager\iPhonePackager.csproj",
                        @"Engine\Source\Programs\IOS\MobileDeviceInterface\MobileDeviceInterface.csproj",
                        @"Engine\Source\Programs\IOS\DeploymentInterface\DeploymentInterface.csproj",
                    }
                        );
            }
            if (bp.bOrthogonalizeEditorPlatforms)
            {
                Agenda.AddTargets(
                    new string[] { bp.Branch.BaseEngineProject.Properties.Targets[TargetRules.TargetType.Editor].TargetName },
                    HostPlatform, UnrealTargetConfiguration.Development, InAddArgs: "-nobuilduht -skipactionhistory -onlyplatformspecificfor=" + EditorPlatform.ToString());
                foreach (var ProgramTarget in bp.Branch.BaseEngineProject.Properties.Programs)
                {
                    if (ProgramTarget.Rules.GUBP_AlwaysBuildWithBaseEditor() && ProgramTarget.Rules.SupportsPlatform(HostPlatform) && ProgramTarget.Rules.GUBP_NeedsPlatformSpecificDLLs())
                    {
                        Agenda.AddTargets(new string[] { ProgramTarget.TargetName }, HostPlatform, UnrealTargetConfiguration.Development, InAddArgs: "-nobuilduht -skipactionhistory -onlyplatformspecificfor=" + EditorPlatform.ToString());
                    }
                }
            }
            return Agenda;
        }
Exemple #23
0
        public override UE4Build.BuildAgenda GetAgenda(GUBP bp)
        {
            var Agenda = new UE4Build.BuildAgenda();
			if (HostPlatform == UnrealTargetPlatform.Win64 && !BranchConfig.bForceIncrementalCompile)
            {
                Agenda.DotNetProjects.AddRange(
                    new string[] 
			    {
				    @"Engine\Source\Programs\DotNETCommon\DotNETUtilities\DotNETUtilities.csproj",
                    @"Engine\Source\Programs\RPCUtility\RPCUtility.csproj",
			    }
                    );
            }
            string AddArgs = "-CopyAppBundleBackToDevice";

            Agenda.AddTargets(new string[] { "UnrealHeaderTool" }, HostPlatform, UnrealTargetConfiguration.Development, InAddArgs: AddArgs);
			if (HostPlatform == UnrealTargetPlatform.Win64)
			{
				Agenda.AddTargets(new string[] { "ParallelExecutor" }, HostPlatform, UnrealTargetConfiguration.Development, InAddArgs: AddArgs);
			}
            return Agenda;
        }
        public override UE4Build.BuildAgenda GetAgenda(GUBP bp)
        {
            if (!bp.ActivePlatforms.Contains(TargetPlatform))
            {
                throw new AutomationException("{0} is not a supported platform for {1}", TargetPlatform.ToString(), GetFullName());
            }
            var Agenda = new UE4Build.BuildAgenda();

            foreach (var Kind in BranchInfo.MonolithicKinds)
            {
                if (GameProj.Properties.Targets.ContainsKey(Kind))
                {
                    var Target = GameProj.Properties.Targets[Kind];
                    var Platforms = Target.Rules.GUBP_GetPlatforms_MonolithicOnly(HostPlatform);
                    if (Platforms.Contains(TargetPlatform) && Target.Rules.SupportsPlatform(TargetPlatform))
                    {
                        var Configs = Target.Rules.GUBP_GetConfigs_MonolithicOnly(HostPlatform, TargetPlatform);
                        foreach (var Config in Configs)
                        {
                            Agenda.AddTargets(new string[] { Target.TargetName }, TargetPlatform, Config, GameProj.FilePath);
                        }

                    }
                }
            }

            return Agenda;
        }
Exemple #25
0
        public override UE4Build.BuildAgenda GetAgenda(GUBP bp)
        {
            var Agenda = new UE4Build.BuildAgenda();

			if (HostPlatform == UnrealTargetPlatform.Win64)
            {
				if (!BranchConfig.bForceIncrementalCompile)
				{
					Agenda.DotNetProjects.AddRange(
						new string[] 
						{
							CombinePaths(@"Engine\Source\Programs\UnrealControls\UnrealControls.csproj"),
						}
					);
				}
                Agenda.DotNetSolutions.AddRange(
						new string[] 
						{
							CombinePaths(@"Engine\Source\Programs\NetworkProfiler\NetworkProfiler.sln"),   
						}
                    );
				if (!BranchConfig.bForceIncrementalCompile)
                {
					Agenda.SwarmProject = CombinePaths(@"Engine\Source\Programs\UnrealSwarm\UnrealSwarm.sln");
				}

				bool WithIOS = !BranchConfig.BranchOptions.PlatformsToRemove.Contains(UnrealTargetPlatform.IOS);
				if ( WithIOS )
				{
					Agenda.IOSDotNetProjects.AddRange(
                        new string[]
						{
							CombinePaths(@"Engine\Source\Programs\IOS\iPhonePackager\iPhonePackager.csproj"),
							CombinePaths(@"Engine\Source\Programs\IOS\DeploymentServer\DeploymentServer.csproj"),
							CombinePaths(@"Engine\Source\Programs\IOS\MobileDeviceInterface\MobileDeviceInterface.csproj"),
							CombinePaths(@"Engine\Source\Programs\IOS\DeploymentInterface\DeploymentInterface.csproj"),
						}
                    );
				}

				bool WithHTML5 = !BranchConfig.BranchOptions.PlatformsToRemove.Contains(UnrealTargetPlatform.HTML5);
				if (WithHTML5)
				{
					Agenda.HTML5DotNetProjects.AddRange(
						new string[]
						{
							CombinePaths(@"Engine\Source\Programs\HTML5\HTML5LaunchHelper\HTML5LaunchHelper.csproj"),
						}
					);
				}
            }

            string AddArgs = "-nobuilduht -skipactionhistory -CopyAppBundleBackToDevice";

            foreach (var ProgramTarget in BranchConfig.Branch.BaseEngineProject.Properties.Programs)
            {
                bool bInternalOnly;
                bool SeparateNode;
				bool CrossCompile;
                if (ProgramTarget.Rules.GUBP_AlwaysBuildWithTools(HostPlatform, out bInternalOnly, out SeparateNode, out CrossCompile) && ProgramTarget.Rules.SupportsPlatform(HostPlatform) && !bInternalOnly && !SeparateNode)
                {
					if (!BranchConfig.BranchOptions.ExcludeNodes.Contains(ProgramTarget.TargetName))
                    {
						foreach (var Plat in ProgramTarget.Rules.GUBP_ToolPlatforms(HostPlatform))
						{
							foreach (var Config in ProgramTarget.Rules.GUBP_ToolConfigs(HostPlatform))
							{
								Agenda.AddTargets(new string[] { ProgramTarget.TargetName }, Plat, Config, InAddArgs: AddArgs);
							}
						}
					}
				}
            }

            return Agenda;
        }
        public override UE4Build.BuildAgenda GetAgenda(GUBP bp)
        {
            var Agenda = new UE4Build.BuildAgenda();
            //if (HostPlatform == UnrealTargetPlatform.Mac)
            {
                Agenda.DotNetProjects.AddRange(
                    new string[]
                    {
                        @"Engine\Source\Programs\DotNETCommon\DotNETUtilities\DotNETUtilities.csproj",
                        @"Engine\Source\Programs\RPCUtility\RPCUtility.csproj",
                    }
                    );
            }
            string AddArgs = "";
            if (bp.bOrthogonalizeEditorPlatforms)
            {
                AddArgs = "-skipnonhostplatforms";
            }
            Agenda.AddTargets(new string[] { "UnrealHeaderTool" }, HostPlatform, UnrealTargetConfiguration.Development);
            Agenda.AddTargets(
                new string[] { bp.Branch.BaseEngineProject.Properties.Targets[TargetRules.TargetType.Editor].TargetName },
                HostPlatform, UnrealTargetConfiguration.Development, InAddArgs: AddArgs);
            foreach (var ProgramTarget in bp.Branch.BaseEngineProject.Properties.Programs)
            {
                if (ProgramTarget.Rules.GUBP_AlwaysBuildWithBaseEditor() && ProgramTarget.Rules.SupportsPlatform(HostPlatform))
                {
                    Agenda.AddTargets(new string[] { ProgramTarget.TargetName }, HostPlatform, UnrealTargetConfiguration.Development, InAddArgs: AddArgs);
                }
            }

            return Agenda;
        }
Exemple #27
0
        public override UE4Build.BuildAgenda GetAgenda(GUBP bp)
        {
            var Agenda = new UE4Build.BuildAgenda();

            string AddArgs = "-nobuilduht -skipactionhistory -CopyAppBundleBackToDevice";

            foreach (var Plat in ProgramTarget.Rules.GUBP_ToolPlatforms(HostPlatform))
            {
                foreach (var Config in ProgramTarget.Rules.GUBP_ToolConfigs(HostPlatform))
                {
                    Agenda.AddTargets(new string[] { ProgramTarget.TargetName }, Plat, Config, InAddArgs: AddArgs);
                }
            }
            return Agenda;
        }
        public override UE4Build.BuildAgenda GetAgenda(GUBP bp)
        {
            var Agenda = new UE4Build.BuildAgenda();

            Agenda.DotNetProjects.AddRange(
                new string[]
                {
                    @"Engine\Source\Programs\Distill\Distill.csproj",
                    @"Engine\Source\Programs\UnrealControls\UnrealControls.csproj",
                }
                );
            if (HostPlatform == UnrealTargetPlatform.Mac)
            {
                Agenda.DotNetProjects.AddRange(
                    new string[]
                    {
                        // UnrealSwarm
                        @"Engine/Source/Programs/UnrealSwarm/SwarmCoordinatorInterface/SwarmCoordinatorInterface_Mono.csproj",
                        @"Engine/Source/Programs/UnrealSwarm/Agent/Agent_Mono.csproj",
                        @"Engine/Source/Programs/UnrealControls/UnrealControls_Mono.csproj",
                        @"Engine/Source/Programs/UnrealSwarm/SwarmCoordinator/SwarmCoordinator_Mono.csproj",
                        @"Engine/Source/Programs/UnrealSwarm/AgentInterface/AgentInterface_Mono.csproj",
                        // AutomationTool
                        @"Engine/Source/Programs/AutomationTool/AutomationTool_Mono.csproj",
                    }
                    );
            }
            else
            {
                Agenda.DotNetSolutions.AddRange(
                    new string[]
                    {
                        @"Engine\Source\Programs\UnrealDocTool\UnrealDocTool\UnrealDocTool.sln",
                        @"Engine\Source\Programs\NetworkProfiler\NetworkProfiler.sln",
                    }
                    );

                Agenda.SwarmProject = @"Engine\Source\Programs\UnrealSwarm\UnrealSwarm.sln";

                Agenda.ExtraDotNetFiles.AddRange(
                    new string[]
                    {
                        "Interop.IWshRuntimeLibrary",
                        "UnrealMarkdown",
                        "CommonUnrealMarkdown",
                    }
                    );
                Agenda.DotNetProjects.AddRange(new string[]
                {
                    @"Engine\Source\Programs\CrashReporter\RegisterPII\RegisterPII.csproj",
                    @"Engine\Source\Programs\NoRedist\CrashReportServer\CrashReportCommon\CrashReportCommon.csproj",
                    @"Engine\Source\Programs\NoRedist\CrashReportServer\CrashReportReceiver\CrashReportReceiver.csproj",
                    @"Engine\Source\Programs\NoRedist\CrashReportServer\CrashReportProcess\CrashReportProcess.csproj",
                });
            }

            foreach (var ProgramTarget in bp.Branch.BaseEngineProject.Properties.Programs)
            {
                if (ProgramTarget.Rules.GUBP_AlwaysBuildWithTools() && ProgramTarget.Rules.SupportsPlatform(HostPlatform))
                {
                    Agenda.AddTargets(new string[] { ProgramTarget.TargetName }, HostPlatform, UnrealTargetConfiguration.Development);
                }
            }

            return Agenda;
        }
	public static void Build(BuildCommand Command, ProjectParams Params, int WorkingCL = -1)
	{

		Params.ValidateAndLog();

		if (!Params.Build)
		{
			return;
		}

		Log("********** BUILD COMMAND STARTED **********");

		var UE4Build = new UE4Build(Command);
		var Agenda = new UE4Build.BuildAgenda();
		var CrashReportPlatforms = new HashSet<UnrealTargetPlatform>();

		// Setup editor targets
		if (Params.HasEditorTargets && !Params.Rocket)
		{
			// @todo Mac: proper platform detection
			UnrealTargetPlatform EditorPlatform = HostPlatform.Current.HostEditorPlatform;
			const UnrealTargetConfiguration EditorConfiguration = UnrealTargetConfiguration.Development;

			CrashReportPlatforms.Add(EditorPlatform);
			Agenda.AddTargets(Params.EditorTargets.ToArray(), EditorPlatform, EditorConfiguration, Params.CodeBasedUprojectPath);
			if (Params.EditorTargets.Contains("UnrealHeaderTool") == false)
			{
				Agenda.AddTargets(new string[] { "UnrealHeaderTool" }, EditorPlatform, EditorConfiguration);
			}
			if (Params.EditorTargets.Contains("ShaderCompileWorker") == false)
			{
				Agenda.AddTargets(new string[] { "ShaderCompileWorker" }, EditorPlatform, EditorConfiguration);
			}
			if (Params.Pak && Params.EditorTargets.Contains("UnrealPak") == false)
			{
				Agenda.AddTargets(new string[] { "UnrealPak" }, EditorPlatform, EditorConfiguration);
			}
			if (Params.FileServer && Params.EditorTargets.Contains("UnrealFileServer") == false)
			{
				Agenda.AddTargets(new string[] { "UnrealFileServer" }, EditorPlatform, EditorConfiguration);
			}
		}

		// Setup cooked targets
		if (Params.HasClientCookedTargets)
		{
			foreach (var BuildConfig in Params.ClientConfigsToBuild)
			{
				foreach (var ClientPlatform in Params.ClientTargetPlatforms)
				{
					CrashReportPlatforms.Add(ClientPlatform);
					Agenda.AddTargets(Params.ClientCookedTargets.ToArray(), ClientPlatform, BuildConfig, Params.CodeBasedUprojectPath, InAddArgs: " -remoteini=\""+Path.GetDirectoryName(Params.RawProjectPath)+"\"");
				}
			}
		}
		if (Params.HasServerCookedTargets)
		{
			foreach (var BuildConfig in Params.ServerConfigsToBuild)
			{
				foreach (var ServerPlatform in Params.ServerTargetPlatforms)
				{
					CrashReportPlatforms.Add(ServerPlatform);
					Agenda.AddTargets(Params.ServerCookedTargets.ToArray(), ServerPlatform, BuildConfig, Params.CodeBasedUprojectPath, InAddArgs: " -remoteini=\""+Path.GetDirectoryName(Params.RawProjectPath)+"\"");
				}
			}
		}
		if (Params.CrashReporter && !Params.Rocket)
		{
			var CrashReportClientTarget = new[] { "CrashReportClient" };
			foreach (var CrashReportPlatform in CrashReportPlatforms)
			{
				if (UnrealBuildTool.UnrealBuildTool.PlatformSupportsCrashReporter(CrashReportPlatform))
				{
					Agenda.AddTargets(CrashReportClientTarget, CrashReportPlatform, UnrealTargetConfiguration.Development);
				}
			}
		}
		if (Params.HasProgramTargets && !Params.Rocket)
		{
			foreach (var BuildConfig in Params.ClientConfigsToBuild)
			{
				foreach (var ClientPlatform in Params.ClientTargetPlatforms)
				{
					Agenda.AddTargets(Params.ProgramTargets.ToArray(), ClientPlatform, BuildConfig, Params.CodeBasedUprojectPath);
				}
			}
		}
		UE4Build.Build(Agenda, InDeleteBuildProducts: Params.Clean, InUpdateVersionFiles: WorkingCL > 0);

		if (WorkingCL > 0) // only move UAT files if we intend to check in some build products
		{
			UE4Build.AddUATFilesToBuildProducts();
		}
		UE4Build.CheckBuildProducts(UE4Build.BuildProductFiles);

		if (WorkingCL > 0)
		{
			// Sign everything we built
			CodeSign.SignMultipleIfEXEOrDLL(Command, UE4Build.BuildProductFiles);

			// Open files for add or edit
			UE4Build.AddBuildProductsToChangelist(WorkingCL, UE4Build.BuildProductFiles);
		}

		Log("********** BUILD COMMAND COMPLETED **********");
	}
Exemple #30
0
		public override UE4Build.BuildAgenda GetAgenda(GUBP bp)
		{
			var Agenda = new UE4Build.BuildAgenda();

			string AddArgs = "-nobuilduht" + bp.RocketUBTArgs();
			Agenda.AddTargets(
				new string[] { bp.Branch.BaseEngineProject.Properties.Targets[TargetRules.TargetType.Editor].TargetName },
				UnrealTargetPlatform.Linux, UnrealTargetConfiguration.Development, InAddArgs: AddArgs);
			return Agenda;
		}