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 2864843 on 2016/02/12 by Ben.Marsh Add individual 'status', 'outcome', and 'error_code' fields to parsed jobsteps. Should fix grid view not being able to display 'pending' icons. Change 2865161 on 2016/02/12 by Ben.Marsh Stop storing a reference to UEBuildTarget from UEBuildModule. It creates an awkward cyclic data dependency, and makes it easy for people to write lazy code that just reaches into the internal state of the build. Change 2865643 on 2016/02/12 by Ben.Marsh Rename UEBuildModuleType to UHTModuleType, and move implementation into ExternalExecution. Change 2874408 on 2016/02/19 by Ben.Marsh Automatically sort nodes in the dashboard grid view by a weight derived from the node's order in the build graph, summed across all the jobs in which it was present. Change 2879572 on 2016/02/24 by Ben.Marsh Allow spoofing a Git merge from a given commit, using a changelist description containing the tag "git merge <branch> <changelist>", where <branch> is the name of a branch on Git (eg. master, 4.11, etc..), and <changelist> is the changelist being merged in. Change 2883216 on 2016/02/26 by Ben.Marsh Prevent Jira tickets being incorrectly updated with 'Main CL' fields which are after the 'Fix CL' fields. Change 2883755 on 2016/02/26 by Ben.Marsh Fix solution files having a Shipping configuration, even when -NoShippingConfigs is passed on the command line. Change 2886223 on 2016/02/29 by Ben.Marsh Ignore SignTool errors - we can recover from them. Change 2887414 on 2016/03/01 by Ben.Marsh Dump all the *.crash files produced while running commandlets, to make it easier to diagnose build system crashes cooking on Mac. Change 2888235 on 2016/03/01 by Ben.Marsh Add overloads for methods in FileFilter which take FileReference and DirectoryReference objects. Change 2889602 on 2016/03/02 by Ben.Marsh Treat shaders as code in UGS. Don't sync them as part of content-only syncs, and don't allow syncing past them without updated binaries. Change2889610on 2016/03/02 by Ben.Marsh Fix setting for using incremental builds not being saved. Also hide command to do incremental builds if the 'use incremental builds' option is not checked. Change 2891866 on 2016/03/03 by Matthew.Griffin Removed Rocket specific batch files and made sure installed build won't try to include them Removed last use of RocketGenerateProjectFiles.sh by using UBT directly instead Change2893349on 2016/03/03 by Ben.Marsh Add derived ReplicatedBranch to support mirroring the VR editor branch to GitHub. Change 2894703 on 2016/03/04 by Ben.Marsh Include *.usf when looking for the last code changelist. Also update version to 1.68. Change 2897991 on 2016/03/07 by Ben.Marsh Copy the changelist number to the clipboard when the user presses Ctrl-C. Update version number to 1.69. Change 2898005 on 2016/03/07 by Ben.Marsh Minor changes to support BuildGraph: * UE4Build now has a static function that can update version files. * Adding FileReference/DirectoryReference methods to FileFilter and CommandUtils. * FileFilter treats any pattern containing a slash as implictly starting from the root directory, unless it begins with "...". Change 2898095 on 2016/03/07 by Ben.Marsh UAT - Don't retry builds if we're using local executor; we don't encounter failures due to timeouts. Change 2898248 on 2016/03/07 by Ben.Marsh UBT - Add the standard game include paths back in to plugin modules. Existing game code relies on this. Change 2898615 on 2016/03/08 by Matthew.Griffin Removed last uses of RunningRocket function All seemed to be overly cautious about people using an Installed build to do non standard things, don't see any ill effects in the most common circumstances. Change 2898681 on 2016/03/08 by Matthew.Griffin Removed Automation.RunningRocket function as there are no more uses Changed the majority of comments referencing Rocket mode that are now either about the engine being installed or from the Launcher etc. #lockdown Nick.Penwarden [CL 2898813 by Matthew Griffin in Main branch]
319 lines
10 KiB
C#
319 lines
10 KiB
C#
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Diagnostics;
|
|
using System.Xml;
|
|
using System.Xml.Serialization;
|
|
|
|
|
|
namespace UnrealBuildTool
|
|
{
|
|
/// <summary>
|
|
/// Represents a color in the displayed graph. Values are between 0.0 and 1.0 inclusive.
|
|
/// </summary>
|
|
public struct GraphColor
|
|
{
|
|
public float R;
|
|
public float G;
|
|
public float B;
|
|
public float A;
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// A single "node" in a directed graph
|
|
/// </summary>
|
|
public class GraphNode
|
|
{
|
|
/// ID number, unique for all nodes. This must also be the array index into the main nodes array
|
|
public int Id;
|
|
|
|
/// Optional text label for this node
|
|
public string Label;
|
|
|
|
// Color of the node
|
|
public GraphColor Color = new GraphColor() { R = 1.0f, G = 1.0f, B = 1.0f, A = 1.0f };
|
|
|
|
// Size
|
|
public float Size = 1.0f;
|
|
|
|
// Other attributes
|
|
public Dictionary<string, Object> Attributes = new Dictionary<string, Object>(StringComparer.InvariantCultureIgnoreCase);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Describes a graph "edge" in a directed graph
|
|
/// </summary>
|
|
public class GraphEdge
|
|
{
|
|
/// ID number, unique for all edges. This must also be the array index into the main edges array.
|
|
public int Id;
|
|
|
|
/// Source node (directed graph)
|
|
public GraphNode Source;
|
|
|
|
/// Target node (directed graph)
|
|
public GraphNode Target;
|
|
|
|
/// Optional edge weight
|
|
public double Weight = 1.0f;
|
|
|
|
// Edge color
|
|
public GraphColor Color = new GraphColor() { R = 0.0f, G = 0.0f, B = 0.0f, A = 0.25f };
|
|
|
|
// Thickness
|
|
public float Thickness = 0.1f;
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Describes a type of attribute. This is derived internally from the attribute data on nodes.
|
|
/// </summary>
|
|
class GraphAttribute
|
|
{
|
|
/// Gexf ID for this attribute
|
|
public int ID;
|
|
|
|
/// Name of the attribute
|
|
public string Name;
|
|
|
|
/// Gexf type name
|
|
public string TypeName;
|
|
}
|
|
|
|
|
|
public static class GraphVisualization
|
|
{
|
|
/// <summary>
|
|
/// Writes a GEXF graph file for the specified graph nodes and edges
|
|
/// </summary>
|
|
/// <param name="Filename">The file name to write</param>
|
|
/// <param name="Description">The description to include in the graph file's metadata</param>
|
|
/// <param name="GraphNodes">List of all graph nodes. Index order is important and must match with the individual node Id members!</param>
|
|
/// <param name="GraphEdges">List of all graph edges. Index order is important and must match with the individual edge Id members!</param>
|
|
public static void WriteGraphFile(string Filename, string Description, List<GraphNode> GraphNodes, List<GraphEdge> GraphEdges)
|
|
{
|
|
XmlWriterSettings Settings = new XmlWriterSettings();
|
|
Settings.Indent = true;
|
|
Settings.IndentChars = " ";
|
|
|
|
// Figure out all of the custom attribute types we're dealing with
|
|
Dictionary<string, GraphAttribute> AllAttributes = new Dictionary<string, GraphAttribute>(StringComparer.InvariantCultureIgnoreCase);
|
|
int NextAttributeID = 0;
|
|
foreach (GraphNode GraphNode in GraphNodes)
|
|
{
|
|
foreach (string AttributeName in GraphNode.Attributes.Keys)
|
|
{
|
|
object AttributeValue = GraphNode.Attributes[AttributeName];
|
|
|
|
string AttributeTypeName;
|
|
if (AttributeValue.GetType() == typeof(int))
|
|
{
|
|
AttributeTypeName = "integer";
|
|
}
|
|
else if (AttributeValue.GetType() == typeof(float))
|
|
{
|
|
AttributeTypeName = "float";
|
|
}
|
|
else if (AttributeValue.GetType() == typeof(double))
|
|
{
|
|
AttributeTypeName = "double";
|
|
}
|
|
else if (AttributeValue.GetType() == typeof(string))
|
|
{
|
|
AttributeTypeName = "string";
|
|
}
|
|
else if (AttributeValue.GetType() == typeof(bool))
|
|
{
|
|
AttributeTypeName = "boolean";
|
|
}
|
|
else
|
|
{
|
|
// No other types supported yet!
|
|
throw new InvalidOperationException("Unsupported attribute data type encountered on graph node!");
|
|
}
|
|
|
|
|
|
GraphAttribute Attribute;
|
|
if (!AllAttributes.TryGetValue(AttributeName, out Attribute))
|
|
{
|
|
Attribute = new GraphAttribute();
|
|
Attribute.ID = NextAttributeID++;
|
|
Attribute.Name = AttributeName;
|
|
Attribute.TypeName = AttributeTypeName;
|
|
|
|
AllAttributes[AttributeName] = Attribute;
|
|
}
|
|
else
|
|
{
|
|
if (!Attribute.TypeName.Equals(AttributeTypeName))
|
|
{
|
|
throw new InvalidOperationException("Multiple graph nodes with the same attribute name but different types encountered!");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
using (XmlWriter Writer = XmlWriter.Create(Filename, Settings))
|
|
{
|
|
// NOTE: The GEXF XML format is defined here: http://gexf.net/1.2draft/gexf-12draft-primer.pdf
|
|
|
|
string GEXFNamespace = "http://www.gexf.net/1.2-draft";
|
|
string SchemaNamespace = "http://www.w3.org/2001/XMLSchema-instance";
|
|
string VizNamespace = "http://www.gexf.net/1.2draft/viz";
|
|
|
|
Writer.WriteStartElement("gexf", GEXFNamespace);
|
|
Writer.WriteAttributeString("xmlns", "xsi", null, SchemaNamespace);
|
|
Writer.WriteAttributeString("schemaLocation", SchemaNamespace, "http://www.gexf.net/1.2draft http://www.gexf.net/1.2draft/gexf.xsd");
|
|
Writer.WriteAttributeString("xmlns", "viz", null, VizNamespace);
|
|
Writer.WriteAttributeString("version", "1.2");
|
|
|
|
Writer.WriteStartElement("meta");
|
|
{
|
|
Writer.WriteAttributeString("creator", "UnrealBuildTool");
|
|
Writer.WriteAttributeString("description", Description);
|
|
}
|
|
Writer.WriteEndElement(); // meta
|
|
|
|
{
|
|
Writer.WriteStartElement("graph");
|
|
{
|
|
Writer.WriteAttributeString("mode", "static");
|
|
Writer.WriteAttributeString("defaultedgetype", "directed");
|
|
|
|
if (AllAttributes.Count > 0)
|
|
{
|
|
Writer.WriteStartElement("attributes");
|
|
{
|
|
// @todo: Add support for edge attributes, not just node attributes
|
|
Writer.WriteAttributeString("class", "node"); // Node attributes, not edges!
|
|
|
|
foreach (GraphAttribute Attribute in AllAttributes.Values)
|
|
{
|
|
Writer.WriteStartElement("attribute");
|
|
{
|
|
Writer.WriteAttributeString("id", Attribute.ID.ToString());
|
|
Writer.WriteAttributeString("title", Attribute.Name);
|
|
Writer.WriteAttributeString("type", Attribute.TypeName);
|
|
}
|
|
Writer.WriteEndElement(); // attribute
|
|
}
|
|
|
|
// @todo: Add support for attribute type default values
|
|
}
|
|
Writer.WriteEndElement(); // attributes
|
|
|
|
}
|
|
|
|
Writer.WriteStartElement("nodes");
|
|
{
|
|
foreach (GraphNode GraphNode in GraphNodes)
|
|
{
|
|
Writer.WriteStartElement("node");
|
|
{
|
|
Writer.WriteAttributeString("id", GraphNode.Id.ToString());
|
|
Writer.WriteAttributeString("label", GraphNode.Label);
|
|
|
|
Writer.WriteStartElement("color", VizNamespace);
|
|
{
|
|
Writer.WriteAttributeString("r", ((int)(GraphNode.Color.R * 255.0f)).ToString());
|
|
Writer.WriteAttributeString("g", ((int)(GraphNode.Color.G * 255.0f)).ToString());
|
|
Writer.WriteAttributeString("b", ((int)(GraphNode.Color.B * 255.0f)).ToString());
|
|
Writer.WriteAttributeString("a", GraphNode.Color.A.ToString());
|
|
}
|
|
Writer.WriteEndElement(); // viz:color
|
|
|
|
Writer.WriteStartElement("size", VizNamespace);
|
|
{
|
|
Writer.WriteAttributeString("value", GraphNode.Size.ToString());
|
|
}
|
|
Writer.WriteEndElement(); // viz:size
|
|
|
|
Writer.WriteStartElement("shape", VizNamespace);
|
|
{
|
|
// NOTE: Valid shapes are: disc, square, triangle, diamond, image
|
|
Writer.WriteAttributeString("value", "disc");
|
|
}
|
|
Writer.WriteEndElement(); // viz:shape
|
|
|
|
if (GraphNode.Attributes.Count > 0)
|
|
{
|
|
Writer.WriteStartElement("attvalues");
|
|
{
|
|
foreach (KeyValuePair<string, object> AttributeHashEntry in GraphNode.Attributes)
|
|
{
|
|
string AttributeName = AttributeHashEntry.Key;
|
|
object AttributeValue = AttributeHashEntry.Value;
|
|
|
|
GraphAttribute Attribute = AllAttributes[AttributeName];
|
|
|
|
Writer.WriteStartElement("attvalue");
|
|
{
|
|
Writer.WriteAttributeString("for", Attribute.ID.ToString());
|
|
Writer.WriteAttributeString("value", AttributeValue.ToString());
|
|
}
|
|
Writer.WriteEndElement();
|
|
}
|
|
}
|
|
Writer.WriteEndElement(); // attvalues
|
|
}
|
|
}
|
|
Writer.WriteEndElement(); // node
|
|
}
|
|
}
|
|
Writer.WriteEndElement(); // nodes
|
|
|
|
|
|
Writer.WriteStartElement("edges");
|
|
{
|
|
foreach (GraphEdge GraphEdge in GraphEdges)
|
|
{
|
|
Writer.WriteStartElement("edge");
|
|
{
|
|
Writer.WriteAttributeString("id", GraphEdge.Id.ToString());
|
|
Writer.WriteAttributeString("source", GraphEdge.Source.Id.ToString());
|
|
Writer.WriteAttributeString("target", GraphEdge.Target.Id.ToString());
|
|
Writer.WriteAttributeString("weight", GraphEdge.Weight.ToString());
|
|
|
|
Writer.WriteStartElement("color", VizNamespace);
|
|
{
|
|
Writer.WriteAttributeString("r", ((int)(GraphEdge.Color.R * 255.0f)).ToString());
|
|
Writer.WriteAttributeString("g", ((int)(GraphEdge.Color.G * 255.0f)).ToString());
|
|
Writer.WriteAttributeString("b", ((int)(GraphEdge.Color.B * 255.0f)).ToString());
|
|
Writer.WriteAttributeString("a", GraphEdge.Color.A.ToString());
|
|
}
|
|
Writer.WriteEndElement(); // viz:color
|
|
|
|
Writer.WriteStartElement("thickness", VizNamespace);
|
|
{
|
|
Writer.WriteAttributeString("value", GraphEdge.Thickness.ToString());
|
|
}
|
|
Writer.WriteEndElement(); // viz:thickness
|
|
|
|
Writer.WriteStartElement("shape", VizNamespace);
|
|
{
|
|
// NOTE: Valid shapes are: solid, dotted, dashed, double
|
|
Writer.WriteAttributeString("value", "solid");
|
|
}
|
|
Writer.WriteEndElement(); // viz:shape
|
|
}
|
|
Writer.WriteEndElement(); // edge
|
|
}
|
|
}
|
|
Writer.WriteEndElement(); // nodes
|
|
}
|
|
|
|
Writer.WriteEndElement(); // graph
|
|
}
|
|
Writer.WriteEndElement(); // gexf
|
|
|
|
Writer.Flush();
|
|
}
|
|
}
|
|
}
|
|
|
|
} |