/// <summary> /// Construct a compile task /// </summary> /// <param name="Parameters">Parameters for this task</param> public CompileTask(CompileTaskParameters Parameters) { UE4Build.BuildTarget Target = new UE4Build.BuildTarget { TargetName = Parameters.Target, Platform = Parameters.Platform, Config = Parameters.Configuration, UBTArgs = "-nobuilduht " + (Parameters.Arguments ?? "") }; if (!String.IsNullOrEmpty(Parameters.Tag)) { TargetToTagName.Add(Target, Parameters.Tag); } Targets.Add(Target); }
protected bool CanBuildToolForAllArchitectures(UE4Build.BuildTarget InTarget, ProjectParams InParams) { string[] WhitelistedTargets = { "UnrealHeaderTool", /*"ShaderCompileWorker",*/ "UnrealPak" }; // These targets are known to work. if (WhitelistedTargets.Contains(InTarget.TargetName)) { return(true); } // Editor does not work, and other tools are less interesting at this time return(false); }
/// <summary> /// Adds another task to this executor /// </summary> /// <param name="Task">Task to add</param> /// <returns>True if the task could be added, false otherwise</returns> public bool Add(CustomTask Task) { CompileTask CompileTask = Task as CompileTask; if (CompileTask == null) { return(false); } CompileTaskParameters Parameters = CompileTask.Parameters; UE4Build.BuildTarget Target = new UE4Build.BuildTarget { TargetName = Parameters.Target, Platform = Parameters.Platform, Config = Parameters.Configuration, UBTArgs = "-nobuilduht " + (Parameters.Arguments ?? "") }; if (!String.IsNullOrEmpty(Parameters.Tag)) { TargetToTagName.Add(Target, Parameters.Tag); } Targets.Add(Target); return(true); }
private static void BuildProduct(BuildCommand Command, UE4Build.BuildTarget Target) { if (Target == null) { throw new AutomationException("Target is required when calling UE4BuildUtils.BuildProduct"); } Log("Building {0}", Target.TargetName); if (Command == null) { Command = new UE4BuildUtilDummyBuildCommand(); } var UE4Build = new UE4Build(Command); var Agenda = new UE4Build.BuildAgenda(); Agenda.Targets.Add(Target); UE4Build.Build(Agenda, InDeleteBuildProducts: true, InUpdateVersionFiles: true); UE4Build.CheckBuildProducts(UE4Build.BuildProductFiles); }
/// <summary> /// Adds another task to this executor /// </summary> /// <param name="Task">Task to add</param> /// <returns>True if the task could be added, false otherwise</returns> public bool Add(CustomTask Task) { CompileTask CompileTask = Task as CompileTask; if (CompileTask == null) { return(false); } if (Targets.Count > 0) { if (bAllowXGE != CompileTask.Parameters.AllowXGE) { return(false); } if (!bAllowParallelExecutor || !CompileTask.Parameters.AllowParallelExecutor) { return(false); } } CompileTaskParameters Parameters = CompileTask.Parameters; bAllowXGE &= Parameters.AllowXGE; bAllowParallelExecutor &= Parameters.AllowParallelExecutor; UE4Build.BuildTarget Target = new UE4Build.BuildTarget { TargetName = Parameters.Target, Platform = Parameters.Platform, Config = Parameters.Configuration, UBTArgs = "-nobuilduht " + (Parameters.Arguments ?? "") }; if (!String.IsNullOrEmpty(Parameters.Tag)) { TargetToTagName.Add(Target, Parameters.Tag); } Targets.Add(Target); return(true); }