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
==========================
#lockdown Nick.Penwarden
Change 2903938 on 2016/03/10 by Frank.Gigliotti
Added an instance ID to FAnimMontageInstance
#CodeReview Laurent.Delayen
#RB Laurent.Delayen
#Tests PIE
Change 2903745 on 2016/03/10 by Wes.Hunt
Update Oodle TPS
#rb none
#tests none
#codereview:john.pollard
Change 2903689 on 2016/03/10 by Uriel.Doyon
New "LogHeroMaterials" console command, displaying the current state of materials and textures on the character hero.
#rb marcus.wasmer
#codereview marcus.wassmer
#tests editor, playing PC games, trying the new command
Change 2903669 on 2016/03/10 by Aaron.McLeran
OR-17180 Make stat soundcues and stat soundwaves NOT display zero volume sounds
- Change only effects debug stat commands for audio guys
#rb none
#tests played paragon with new debug stat commands, confirms doesn't show zero-volume sounds
Change 2903625 on 2016/03/10 by John.Pollard
XB1 Oodle SDK
#rb none
#tests none
#codereview Jeff.Campeau
Change 2903577 on 2016/03/10 by Ben.Marsh
Remaking latest build scripts from //UE4/Main @ 2900980.
Change 2903560 on 2016/03/10 by Ben.Marsh
Initial version of BuildGraph scripts - used to create build processes in UE4 which can be run locally or in parallel across a build farm (assuming synchronization and resource allocation implemented by a separate system). Intended to supersede GUBP.
Build graphs are declared using an XML script using syntax similar to MSBuild, ANT or NAnt, and consist of the following components:
* Tasks: Building blocks which can be executed as part of the build process. Many predefined tasks are provided (<Cook>, <Compile>, <Copy>, <Stage>, <Log>, <PakFile>, etc...), and additional tasks may be added be declaring classes derived from AutomationTool.CustomTask in other UAT modules.
* Nodes: A named sequence of tasks which is executed to produce outputs. Nodes may have input dependencies on other nodes before they can be executed. Declared with the <Node> element in scripts.
* Agent Groups: A set of nodes nodes which is executed on the same machine if running as part of a build system. Has no effect when building locally. Declared with the <Group> element in scripts.
* Triggers: Container for groups which should only be executed when explicitly triggered (using the -Trigger=<Name> or -SkipTriggers command line argument). Declared with the <Trigger> element in scripts.
* Notifiers: Specifies email recipients for failures in one or more nodes, whether they should receive notifications on warnings, and so on.
Properties can be passed in to a script on the command line, or set procedurally with the <Property Name="Foo" Value="Bar"/> syntax. Properties referenced with the $(Property Name) notation are valid within all strings, and will be expanded as macros when the script is read. If a property name is not set explicitly, it defaults to the contents of an environment variable with the same name.
Local properties, which only affect the scope of the containing XML element (node, group, etc...) are declared with the <Local Name="Foo" Value="Bar"/> element, and will override a similarly named global property for the local property's scope.
Any elements can be conditionally defined via the "If" attribute, and are largely identical to MSBuild conditions. Literals in conditions may be quoted with single (') or double (") quotes, or an unquoted sequence of letters, digits and underscore characters. All literals are considered identical regardless of how they are declared, and are considered case-insensitive for comparisons (so true equals 'True', equals "TRUE"). Available operators are "==", "!=", "And", "Or", "!", "(...)", "Exists(...)" and "HasTrailingSlash(...)". A full grammar is written up in Condition.cs.
File manipulation is done using wildcards and tags. Any attribute that accepts a list of files may consist of: a Perforce-style wildcard (matching any number of "...", "*" and "?" patterns in any location), a full path name, or a reference to a tagged collection of files, denoted by prefixing with a '#' character. Files may be added to a tag set using the <Tag> Task, which also allows performing set union/difference style operations. Each node can declare multiple outputs in the form of a list of named tags, which other nodes can then depend on.
Build graphs may be executed in parallel as part build system. To do so, the initial graph configuration is generated by running with the -Export=<Filename> argument (producing a JSON file listing the nodes and dependencies to execute). Each participating agent should be synced to the same changelist, and UAT should be re-run with the appropriate -Node=<Name> argument. Outputs from different nodes are transferred between agents via shared storage, typically a network share, the path to which can be specified on the command line using the -SharedStorageDir=<Path> argument. Note that the allocation of machines, and coordination between them, is assumed to be managed by an external system.
A schema for the known set of tasks can be generated by running UAT with the "-Schema=<FileName>" option. Generating a schema and referencing it from a BuildGraph script allows Visual Studio to validate and auto-complete elements as you type.
#rb none
#codereview Marc.Audy, Wes.Hunt, Matthew.Griffin, Richard.Fawcett
#tests local only so far, but not part of any build process yet
Change 2903539 on 2016/03/10 by John.Pollard
Improve replay playback debugging of character movement
#rb none
#tests replays
Change 2903526 on 2016/03/10 by Ben.Marsh
Remake changes from //UE4/Main without integration history, to add support for BuildGraph tasks.
#rb none
#tests none
Change 2903512 on 2016/03/10 by Dan.Youhon
Modify minimum Duration values for JumpForce and MoveToForce ability tasks so that having minimum Duration values doesn't trigger check()s
#rb None
#tests Compiles
Change 2903474 on 2016/03/10 by Marc.Audy
Fix crash if ChildActor is null
#rb None
#tests None
Change 2903314 on 2016/03/10 by Marc.Audy
Fix ParentComponent not being persisted and fixup content that was saved in the window it was broken
#rb James.Golding
#tests Selection of child actors works as expected
#jira UE-28201
Change 2903298 on 2016/03/10 by Simon.Tovey
Disabling the trails optimization.
#tests none
#rb none
#codereview Olaf.Piesche
Change 2903124 on 2016/03/10 by Robert.Manuszewski
Small refactor to pak signing to help with exe protection
#rb none
#tests none
[CL 2907678 by Andrew Grant in Main branch]
198 lines
6.6 KiB
C#
198 lines
6.6 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using UnrealBuildTool;
|
|
using AutomationTool;
|
|
|
|
namespace AutomationTool
|
|
{
|
|
/// <summary>
|
|
/// Defines a node, a container for tasks and the smallest unit of execution that can be run as part of a build graph.
|
|
/// </summary>
|
|
class Node
|
|
{
|
|
/// <summary>
|
|
/// The node's name
|
|
/// </summary>
|
|
public string Name;
|
|
|
|
/// <summary>
|
|
/// Array of input names which this node requires to run
|
|
/// </summary>
|
|
public string[] InputNames;
|
|
|
|
/// <summary>
|
|
/// Array of output names produced by this node
|
|
/// </summary>
|
|
public string[] OutputNames;
|
|
|
|
/// <summary>
|
|
/// Nodes which this node has input dependencies on
|
|
/// </summary>
|
|
public Node[] InputDependencies;
|
|
|
|
/// <summary>
|
|
/// Nodes which this node needs to run after
|
|
/// </summary>
|
|
public Node[] OrderDependencies;
|
|
|
|
/// <summary>
|
|
/// The trigger which controls whether this node will be executed
|
|
/// </summary>
|
|
public ManualTrigger ControllingTrigger;
|
|
|
|
/// <summary>
|
|
/// List of tasks to execute
|
|
/// </summary>
|
|
public List<CustomTask> Tasks;
|
|
|
|
/// <summary>
|
|
/// List of email addresses to notify if this node fails.
|
|
/// </summary>
|
|
public HashSet<string> NotifyUsers = new HashSet<string>(StringComparer.InvariantCultureIgnoreCase);
|
|
|
|
/// <summary>
|
|
/// If set, anyone that has submitted to one of the given paths will be notified on failure of this node
|
|
/// </summary>
|
|
public HashSet<string> NotifySubmitters = new HashSet<string>(StringComparer.InvariantCultureIgnoreCase);
|
|
|
|
/// <summary>
|
|
/// Whether to ignore warnings produced by this node
|
|
/// </summary>
|
|
public bool bNotifyOnWarnings = true;
|
|
|
|
/// <summary>
|
|
/// Constructor
|
|
/// </summary>
|
|
/// <param name="InName">The name of this node</param>
|
|
/// <param name="InInputNames">Names of inputs that this node depends on</param>
|
|
/// <param name="InOutputNames">Names of outputs that this node produces</param>
|
|
/// <param name="InInputDependencies">Nodes which this node is dependent on for its inputs</param>
|
|
/// <param name="InOrderDependencies">Nodes which this node needs to run after. Should include all input dependencies.</param>
|
|
/// <param name="InControllingTrigger">The trigger which this node is behind</param>
|
|
public Node(string InName, string[] InInputNames, string[] InOutputNames, Node[] InInputDependencies, Node[] InOrderDependencies, ManualTrigger InControllingTrigger, List<CustomTask> InTasks)
|
|
{
|
|
Name = InName;
|
|
InputNames = InInputNames;
|
|
OutputNames = InOutputNames;
|
|
InputDependencies = InInputDependencies;
|
|
OrderDependencies = InOrderDependencies;
|
|
ControllingTrigger = InControllingTrigger;
|
|
Tasks = new List<CustomTask>(InTasks);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Build all the tasks for this node
|
|
/// </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. Should be set to contain the node inputs on entry.</param>
|
|
/// <returns>Whether the task succeeded or not. Exiting with an exception will be caught and treated as a failure.</returns>
|
|
public bool Build(JobContext Job, Dictionary<string, HashSet<FileReference>> TagNameToFileSet)
|
|
{
|
|
bool bResult = true;
|
|
|
|
// Allow tasks to merge together
|
|
MergeTasks();
|
|
|
|
// Build everything
|
|
HashSet<FileReference> BuildProducts = new HashSet<FileReference>();
|
|
foreach(CustomTask Task in Tasks)
|
|
{
|
|
if(!Task.Execute(Job, BuildProducts, TagNameToFileSet))
|
|
{
|
|
CommandUtils.LogError("Failed to execute task.");
|
|
return false;
|
|
}
|
|
}
|
|
|
|
// Build a mapping of build product to the outputs it belongs to, using the filesets created by the tasks.
|
|
Dictionary<FileReference, string> FileToOutputName = new Dictionary<FileReference,string>();
|
|
foreach(string OutputName in OutputNames)
|
|
{
|
|
HashSet<FileReference> FileSet = TagNameToFileSet[OutputName];
|
|
foreach(FileReference File in FileSet)
|
|
{
|
|
string ExistingOutputName;
|
|
if(FileToOutputName.TryGetValue(File, out ExistingOutputName))
|
|
{
|
|
CommandUtils.LogError("Build product is added to multiple outputs; {0} added to {1} and {2}", File.MakeRelativeTo(new DirectoryReference(CommandUtils.CmdEnv.LocalRoot)), ExistingOutputName, OutputName);
|
|
bResult = false;
|
|
continue;
|
|
}
|
|
FileToOutputName.Add(File, OutputName);
|
|
}
|
|
}
|
|
|
|
// Any build products left over can be added to the default output.
|
|
TagNameToFileSet[Name].UnionWith(BuildProducts.Where(x => !FileToOutputName.ContainsKey(x)));
|
|
return bResult;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Merge tasks which can be combined together
|
|
/// </summary>
|
|
void MergeTasks()
|
|
{
|
|
List<CustomTask> MergedTasks = new List<CustomTask>();
|
|
while(Tasks.Count > 0)
|
|
{
|
|
CustomTask NextTask = Tasks[0];
|
|
Tasks.RemoveAt(0);
|
|
NextTask.Merge(Tasks);
|
|
MergedTasks.Add(NextTask);
|
|
}
|
|
Tasks = MergedTasks;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Determines the minimal set of direct input dependencies for this node to run
|
|
/// </summary>
|
|
/// <returns>Sequence of nodes that are direct inputs to this node</returns>
|
|
public IEnumerable<Node> GetDirectInputDependencies()
|
|
{
|
|
HashSet<Node> DirectDependencies = new HashSet<Node>(InputDependencies);
|
|
foreach(Node InputDependency in InputDependencies)
|
|
{
|
|
DirectDependencies.ExceptWith(InputDependency.InputDependencies);
|
|
}
|
|
return DirectDependencies;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Determines the minimal set of direct order dependencies for this node to run
|
|
/// </summary>
|
|
/// <returns>Sequence of nodes that are direct order dependencies of this node</returns>
|
|
public IEnumerable<Node> GetDirectOrderDependencies()
|
|
{
|
|
HashSet<Node> DirectDependencies = new HashSet<Node>(OrderDependencies);
|
|
foreach(Node OrderDependency in OrderDependencies)
|
|
{
|
|
DirectDependencies.ExceptWith(OrderDependency.OrderDependencies);
|
|
}
|
|
return DirectDependencies;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Checks whether this node is downstream of the given trigger
|
|
/// </summary>
|
|
/// <param name="Trigger">The trigger to check</param>
|
|
/// <returns>True if the node is downstream of the trigger, false otherwise</returns>
|
|
public bool IsControlledBy(ManualTrigger Trigger)
|
|
{
|
|
return Trigger == null || ControllingTrigger == Trigger || (ControllingTrigger != null && ControllingTrigger.IsDownstreamFrom(Trigger));
|
|
}
|
|
|
|
/// <summary>
|
|
/// Returns the name of this node
|
|
/// </summary>
|
|
/// <returns>The name of this node</returns>
|
|
public override string ToString()
|
|
{
|
|
return Name;
|
|
}
|
|
}
|
|
}
|