You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2945275 on 2016/04/15 by Ben.Marsh
BuildCommonTools: Stop forcing the DeleteBuildProducts flag to true; just respect the -Clean parameter from the command line.
Change 2946668 on 2016/04/18 by Ben.Marsh
EC: Prevent lookbehind for UBT error strings on Mac.
Change 2952657 on 2016/04/22 by Ben.Marsh
UGS: Require the user to explicitly choose to show *.uprojectdirs files, to discourage people from selecting the first thing they see in a synced branch. The uprojectdirs workflow is only used by Engine QA, but catches a lot of people out.
Change 2954256 on 2016/04/25 by Ben.Marsh
EC: Fix lines starting with error: and warning: being swallowed by the postprocessor. Also remove confusing 4 line look-behind on generic error and warning messages.
Change 2954449 on 2016/04/25 by Ben.Marsh
Use the original application name for log files (and for the prefix in stdout), rather than the application name after the host platform has modified it. Prevents UAT/UBT calls showing up with a "mono: " prefix on Mac, rather than "AutomationTool:" or "UnrealBuildTool:".
Change 2955885 on 2016/04/26 by Ben.Marsh
BuildGraph: Allow passing -Clean on the command line to propagate to UE4Build, impacting how targets are compiled as well as clearing the cached BuildGraph state. Add a second parameter, -ClearHistory, to just wipe the history of completed nodes.
Change 2955919 on 2016/04/26 by Chad.Garyet
Fixed timestamp resolution to check for two seconds instead of two ticks. This was causing mac builders to throw false positives on file changes
Change 2956118 on 2016/04/26 by Ben.Marsh
BuildGraph: Add support for conditional blocks in BuildGraph scripts, either with a simple condition, or picking from a list of options. Two new elements can be added anywhere in scripts:
<Do If="...">
<!-- Inner elements -->
</Do>
<Choose>
<Option If="...">
<!-- Inner elements -->
</Option>
<Option If="...">
<!-- Inner elements -->
</Option>
<Otherwise>
<!-- Inner elements -->
</Otherwise>
</Choose>
Change 2956792 on 2016/04/26 by Ben.Marsh
EC: Prevent scheduled builds being queued up, and starting at times other than the times they're scheduled for. Prevents builds which have just been added to the stream settings from starting immediately, and prevents full builds starting during the day (as soon as the first change is made).
Change 2957131 on 2016/04/26 by Ben.Marsh
EC: Increase the precedence of the stack trace matcher.
Change 2957419 on 2016/04/27 by Ben.Marsh
EC: Skip the "end: stack for UAT" line in postp.
Change 2957588 on 2016/04/27 by Ben.Marsh
Core: Change formatting for callstacks for crashes and ensures so that EC can parse them from logs more easily.
Change 2958047 on 2016/04/27 by Ben.Marsh
BuildGraph: Feature to generate reports as part of build graph scripts. Reports operate similarly to triggers, but just provide a summary of completed jobsteps without offering to run a downstream job. Syntax is similar to declaring aggregates: <Report Name="Summary" Requires="Node1;Node2"/>
Change 2958188 on 2016/04/27 by Ben.Marsh
BuildGraph: Automatically generate a report when a preflight completes.
Change 2959053 on 2016/04/28 by Ben.Marsh
BuildGraph: Move the CleanTempStorage commandlet into BuildGraph, and add support for cleaning out new-style temp storage directories (which do not contain TempManifest files).
Change 2959429 on 2016/04/28 by Ben.Marsh
UAT: Add a script to describe a stream being copied up to its parent. To use, just run the UAT command "StreamCopyDescription -Stream=//UE4/Dev-Build". Optionally specify -Changes=//UE4/OtherStream/Engine/...
#lockdown Nick.Penwarden
[CL 2959583 by Ben Marsh in Main branch]
162 lines
5.5 KiB
C#
162 lines
5.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using UnrealBuildTool;
|
|
using AutomationTool;
|
|
using System.Xml;
|
|
|
|
namespace AutomationTool
|
|
{
|
|
/// <summary>
|
|
/// Parameters for a compile task
|
|
/// </summary>
|
|
public class CompileTaskParameters
|
|
{
|
|
/// <summary>
|
|
/// The target to compile
|
|
/// </summary>
|
|
[TaskParameter]
|
|
public string Target;
|
|
|
|
/// <summary>
|
|
/// The configuration to compile
|
|
/// </summary>
|
|
[TaskParameter]
|
|
public UnrealTargetConfiguration Configuration;
|
|
|
|
/// <summary>
|
|
/// The platform to compile for
|
|
/// </summary>
|
|
[TaskParameter]
|
|
public UnrealTargetPlatform Platform;
|
|
|
|
/// <summary>
|
|
/// Additional arguments for UnrealBuildTool
|
|
/// </summary>
|
|
[TaskParameter(Optional = true)]
|
|
public string Arguments;
|
|
|
|
/// <summary>
|
|
/// Tag to be applied to build products of this task
|
|
/// </summary>
|
|
[TaskParameter(Optional = true, ValidationType = TaskParameterValidationType.Tag)]
|
|
public string Tag;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Task which compiles a target with UnrealBuildTool
|
|
/// </summary>
|
|
[TaskElement("Compile", typeof(CompileTaskParameters))]
|
|
public class CompileTask : CustomTask
|
|
{
|
|
/// <summary>
|
|
/// List of targets to compile. As well as the target specifically added for this task, additional compile tasks may be merged with it.
|
|
/// </summary>
|
|
List<UE4Build.BuildTarget> Targets = new List<UE4Build.BuildTarget>();
|
|
|
|
/// <summary>
|
|
/// Mapping of receipt filename to its corresponding tag name
|
|
/// </summary>
|
|
Dictionary<UE4Build.BuildTarget, string> TargetToTagName = new Dictionary<UE4Build.BuildTarget,string>();
|
|
|
|
/// <summary>
|
|
/// Construct a compile task
|
|
/// </summary>
|
|
/// <param name="InParameters">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);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Allow this task to merge with other tasks within the same node. This can be useful to allow tasks to execute in parallel and reduce overheads.
|
|
/// </summary>
|
|
/// <param name="OtherTasks">Other tasks that this task can merge with. If a merge takes place, the other tasks should be removed from the list.</param>
|
|
public override void Merge(List<CustomTask> OtherTasks)
|
|
{
|
|
for (int Idx = 0; Idx < OtherTasks.Count; Idx++)
|
|
{
|
|
CompileTask OtherCompileTask = OtherTasks[Idx] as CompileTask;
|
|
if (OtherCompileTask != null)
|
|
{
|
|
Targets.AddRange(OtherCompileTask.Targets);
|
|
foreach(KeyValuePair<UE4Build.BuildTarget, string> TargetTagName in OtherCompileTask.TargetToTagName)
|
|
{
|
|
TargetToTagName.Add(TargetTagName.Key, TargetTagName.Value);
|
|
}
|
|
OtherTasks.RemoveAt(Idx);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Execute the task.
|
|
/// </summary>
|
|
/// <param name="Job">Information about the current job</param>
|
|
/// <param name="BuildProducts">Set of build products produced by this node.</param>
|
|
/// <param name="TagNameToFileSet">Mapping from tag names to the set of files they include</param>
|
|
/// <returns>True if the task succeeded</returns>
|
|
public override bool Execute(JobContext Job, HashSet<FileReference> BuildProducts, Dictionary<string, HashSet<FileReference>> TagNameToFileSet)
|
|
{
|
|
// Create the agenda
|
|
UE4Build.BuildAgenda Agenda = new UE4Build.BuildAgenda();
|
|
Agenda.Targets.AddRange(Targets);
|
|
|
|
// Build everything
|
|
Dictionary<UE4Build.BuildTarget, BuildManifest> TargetToManifest = new Dictionary<UE4Build.BuildTarget,BuildManifest>();
|
|
UE4Build Builder = new UE4Build(Job.OwnerCommand);
|
|
Builder.Build(Agenda, InDeleteBuildProducts: null, InUpdateVersionFiles: false, InForceNoXGE: false, InUseParallelExecutor: true, InTargetToManifest: TargetToManifest);
|
|
UE4Build.CheckBuildProducts(Builder.BuildProductFiles);
|
|
|
|
// Tag all the outputs
|
|
foreach(KeyValuePair<UE4Build.BuildTarget, string> TargetTagName in TargetToTagName)
|
|
{
|
|
BuildManifest Manifest;
|
|
if(!TargetToManifest.TryGetValue(TargetTagName.Key, out Manifest))
|
|
{
|
|
throw new AutomationException("Missing manifest for target {0} {1} {2}", TargetTagName.Key.TargetName, TargetTagName.Key.Platform, TargetTagName.Key.Config);
|
|
}
|
|
|
|
HashSet<FileReference> FileSet = FindOrAddTagSet(TagNameToFileSet, TargetTagName.Value);
|
|
FileSet.UnionWith(Manifest.BuildProducts.Select(x => new FileReference(x)));
|
|
FileSet.UnionWith(Manifest.LibraryBuildProducts.Select(x => new FileReference(x)));
|
|
}
|
|
|
|
// Add everything to the list of build products
|
|
BuildProducts.UnionWith(Builder.BuildProductFiles.Select(x => new FileReference(x)));
|
|
BuildProducts.UnionWith(Builder.LibraryBuildProductFiles.Select(x => new FileReference(x)));
|
|
return true;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Output this task out to an XML writer.
|
|
/// </summary>
|
|
public override void Write(XmlWriter Writer)
|
|
{
|
|
foreach (UE4Build.BuildTarget Target in Targets)
|
|
{
|
|
CompileTaskParameters Parameters = new CompileTaskParameters();
|
|
Parameters.Target = Target.TargetName;
|
|
Parameters.Platform = Target.Platform;
|
|
Parameters.Configuration = Target.Config;
|
|
Parameters.Arguments = Target.UBTArgs;
|
|
|
|
string TagName;
|
|
if (TargetToTagName.TryGetValue(Target, out TagName))
|
|
{
|
|
Parameters.Tag = TagName;
|
|
}
|
|
|
|
Write(Writer, Parameters);
|
|
}
|
|
}
|
|
}
|
|
}
|