Files
UnrealEngineUWP/Engine/Source/Programs/AutomationTool/Scripts/BuildProjectCommand.Automation.cs
Mike Beach 4578fc38d7 Copying //UE4/Dev-Blueprints to //UE4/Dev-Main (Source: //UE4/Dev-Blueprints @ 3042808)
#lockdown Nick.Penwarden
#rb none

==========================
MAJOR FEATURES + CHANGES
==========================

Change 3026763 on 2016/06/24 by Phillip.Kavan

	[UE-32259] Fix missing heat map coloration on pure nodes.

	change summary:
	- modified FScriptExecutionNode::RefreshStats() to ensure that child nodes are updated for 'standard' exec node types.

	#jira UE-32259

Change 3026829 on 2016/06/24 by Mike.Beach

	Mirroring CL 3025832 from Release-4.12

	Guarding GetClassDefault nodes against asserts while loading cyclically dependent content. Regenerating one Blueprint could trigger a ReconstructNode() in a separate Blueprint (that had already been regenerated). However, not all objects in that Blueprint's package have been post-loaded, so object Rename() will assert is you try to reset loaders with it.

	#jira UE-32356

Change 3026888 on 2016/06/24 by Mike.Beach

	PR #2460: Functionality to flag blueprint as abstract (Contributed by Pierdek)

Change 3027245 on 2016/06/24 by Phillip.Kavan

	[UEBP-180] Alternate treatment for Blueprint profiler tree view node expander icon (to differentiate from exec pin icons).

	change summary:
	- added SProfilerStatExpander (from BenC)
	- modified original to replace indicator icons w/ FontAwesome glyphs (they're a bit clearer) - see screenshot attached to JIRA

	#jira UEBP-180

Change 3027279 on 2016/06/24 by Ryan.Rauschkolb

	Fixed issue where unsupported pins could be added to custom Event nodes which can lead to a crash
	#jira UE-31148

Change 3027606 on 2016/06/25 by Dan.Oconnor

	Back out changelist 3027279, this change breaks custom events coupled to multicast delegate nodes (see ProjRocket.uasset in shooter game for an example)

Change 3028731 on 2016/06/27 by Ben.Cosh

	Minor change to the spacing around the new expander icons for the blueprint profiler.
	#Jira UEBP-180 - Pin icons are too similar to the tree expander icons in the node execution graph display.
	#Proj Kismet

Change 3028740 on 2016/06/27 by Ben.Cosh

	This change modifies the way the blueprint profiler detects and maps delegate events that are created at blueprint compile time.
	#Jira UE-32055 - Assert when profiling timelines in the blueprint profiler
	#Proj BlueprintProfiler, KismetCompiler, BlueprintGraph, LiveEditor, Kismet, Engine

Change 3028844 on 2016/06/27 by Maciej.Mroz

	#jira UE-32470 Nativized Orion: Sparrow has no Rentless ability.

	Better way to find Placeholder classes in BlueprintNativeCodeGenModule.

Change 3029573 on 2016/06/27 by Ryan.Rauschkolb

	Fixed issue where Preview Connection would be drawn incorrectly when an input and output pin share the same name
	#jira UE-32211

Change 3030335 on 2016/06/28 by Maciej.Mroz

	#jira UE-30858 Nativized Orion - Some particle effects are not rendering

	List of AssetRegistrySearchable properties, that should be stored for DynamicClasses in moved to .ini file.
	Added SearchDynamicClassCues function in GameplayCueManager.cpp

Change 3030492 on 2016/06/28 by Ben.Cosh

	CIS Mac Build fix

Change 3030494 on 2016/06/28 by Ben.Cosh

	This change reworks the way the blueprint profiler maps latent re-entry points to address problems that could be triggered when multiple re-entries happenned within close proximity.
	#Jira UE-32452 - Blueprint profiler asserts when a second latent entry is triggered
	#Proj BlueprintProfiler, CoreUObject, Engine, Kismet

Change 3030612 on 2016/06/28 by Maciej.Mroz

	typo fixed

Change 3031461 on 2016/06/28 by Dan.Oconnor

	Fixed for crash involving a stale UEdGraphPin after performing an undo/redo operation inolving UEdGraphNode(s)
	#jira UE-32553

Change 3031537 on 2016/06/28 by Ben.Cosh

	Fix for a problem introduced in CL 3030494 and recent graph pin changes that caused problems uniquely naming tunnel entry/exit pins.
	#Jira UE-32578 - Crash when profiling blueprint containing a for-loop
	#Proj BlueprintProfiler

Change 3031556 on 2016/06/28 by Ben.Cosh

	This fixes a problem with the profiler tracking of PIE actor instances adding a mechanism to refresh the actor references when a subsequent PIE session is started.
	#Jira UE-32595 - Running two subsequent PIE sessions with a latent entry point causes an assert.
	#Proj BlueprintProfiler, Kismet

Change 3031588 on 2016/06/28 by Ryan.Rauschkolb

	Fixed issue where unsupported pins could be added to custom Event nodes which can lead to a crash
	#jira UE-31148

Change 3031887 on 2016/06/28 by Dan.Oconnor

	Fix for crash caused by stale pin access in SGraphPin, also fixes 'double opacity' effect when ctrl+dragging off of a macro
	#jira UE-32604

Change 3031932 on 2016/06/28 by Dan.Oconnor

	Fix for major regression in pin value visibility
	#jira UE-32614

Change 3032568 on 2016/06/29 by Phillip.Kavan

	[UE-31681] Ensure that cached component data cache template objects are referenced during garbage collection.

	change summary:
	- modified AActor::AddReferencedObjects() to include CurrentTransactionAnnotation
	- added UChildActorComponent::AddReferencedObjects() to include CachedInstanceData
	- also added FChildActorComponentInstanceData::AddReferencedObjects() to include ComponentInstanceData (just in case some future task happens to trigger a reference gather during its lifetime)

	additional notes:
	- should also resolve UE-32558

	#jira UE-31681

Change 3032998 on 2016/06/29 by Dan.Oconnor

	Fixing shutdown crash after LinkedTo lists are corrupted. An ensure couldn't fire when a node had already been destroyed. UE-32631 tracks the actual ensure.
	#jira UE-32634

Change 3033448 on 2016/06/29 by Ryan.Rauschkolb

	Discard Return Nodes that have no outputs when collapsing to function
	#jira UE-23381

Change 3034407 on 2016/06/30 by Phillip.Kavan

	[UE-32675] Fix no-editor compile issue.

Change 3034691 on 2016/06/30 by Ryan.Rauschkolb

	Fixed issue where Macro nodes with ambiguous links could be collapsed into a function

Change 3034701 on 2016/06/30 by Ryan.Rauschkolb

	Cleaned up UEdGraphSchema_K2::GetVariableTypeTree to use a filter rather than several booleans

Change 3035093 on 2016/06/30 by Maciej.Mroz

	#jira UE-32683 BP_Hero Blueprint failing to compile in Orion - K2Node_CustomEvent_1050 is out of date

	Temporary fix.

Change 3035440 on 2016/07/01 by Maciej.Mroz

	#jira UE-32706 Nativized Orion crash - Cannot find "Root" subobject in ABP_HeroPedestal_C...

	Make sure, the CDO of DynamicClass (and its subobjects) have AsyncLoading flag cleared.

Change 3035442 on 2016/07/01 by Maciej.Mroz

	Added UDynamicClass::FindArchetype

	#jira UE-30667 Ground material in Agora incorrect in Nativized Orion

Change 3036233 on 2016/07/01 by Dan.Oconnor

	Proper handling of null pin references in compiler results logs

Change 3036541 on 2016/07/01 by Dan.Oconnor

	Fix for more assymetry in LinkedTo after undo/redo. This solution addresses both UE-32645 and UE-32553. The key to correct behavior is to explictly detect the case where only one of the two nodes in a peer (LinkedTo) relationship are in the transaction buffer. Added IsObjectTransacting to transaction interface to detect this.
	#jira UE-32645

Change 3036581 on 2016/07/02 by Dan.Oconnor

	Non-editor fix

Change 3036632 on 2016/07/02 by Maciej.Mroz

	Removed too strict check in BlueprintNativeCodeGenModule

Change 3036715 on 2016/07/02 by Maciej.Mroz

	#jira UE-32612 Odin emits a error when nativized - attempting to access a hidden boolean bitfield property

	- Private bitfield can be used as LHS expression in generated code.
	- Refactoring. Introduced ENativizedTermUsage.

Change 3037014 on 2016/07/04 by Maciej.Mroz

	#jira UE-32729 Orion failing to package for PS4 with Nativization

	Make sure that temporary variable used in ternary operator: "context ? context->variable : temp-variable", has exactly the same type as the wanted variable.

Change 3037300 on 2016/07/05 by Maciej.Mroz

	#jira UE-31756 Fixup hardcoded function names in BP=>Cpp backend

Change 3037303 on 2016/07/05 by Maciej.Mroz

	#jira UE-31756
	Nativization - fixed hardcoded string.

Change 3037307 on 2016/07/05 by Maciej.Mroz

	AutomationTool:
	Fixed issue: A nativized client was compiled with both client and server NativizedAssets plugins.

	Paths to nativized BP plugin is stored in a map.

Change 3037712 on 2016/07/05 by Mike.Beach

	Adding a non-const version of MultiFindPointer() for TMultiMap.

Change 3037790 on 2016/07/05 by Mike.Beach

	Fixing a bug where overridden components in Blueprints could load with cleared properties - this could happen in cyclically dependent parent/child Blueprints (where the child's component would be zeroed). In this case, the Blueprint's CDO would be deferred, so to solve this new issue we now defer the Blueprint's sub-object overrides as well.

	#jira UE-32693

Change 3038014 on 2016/07/05 by Ben.Cosh

	Refactor of the blueprint profiler tunnel mapping and playback to address issues blocking MVP
	#Jira UE-32056 - The blueprint profiler can still get hung up with cyclic links in the graph
	#Proj Kismet, BlueprintProfiler, KismetCompiler, BlueprintGraph, UnrealEd

Change 3038533 on 2016/07/05 by Mike.Beach

	PR #2558: Stopping Zoom-to-Fit On User Input (Fixed) (Contributed by MichaelSchoell)

Change 3038608 on 2016/07/05 by Dan.Oconnor

	Fix for crash when altering ConstructObjectFromClass nodes, removed now unused InvalidateAndTrash function from UEdGraphPin, removed subpin leak counter
	#jira FORT-26495

Change 3038770 on 2016/07/05 by Dan.Oconnor

	Hiding  TThreadSingleton<FBlueprintExceptionTracker>::Get() to fix clang for windows link error
	#jira UE-31935

Change 3038841 on 2016/07/05 by Dan.Oconnor

	Simple null check to prevent crash after loading a blueprint to diff. The diff'd blueprint is ending up in other blueprint's DependentBlueprintsToRecompile, for now this is the safest fix
	#jira UE-31115

Change 3039179 on 2016/07/06 by Maciej.Mroz

	#jira UE-31987 Editor crashes when transforming actor after applying instances changes

	Selected (in Level editor) instance components are still selected after they are converted to regular components.

Change 3039216 on 2016/07/06 by Maciej.Mroz

	#jira UE-31767 [CrashReport] UE4Editor_Engine!AActor::GetLevel() [actor.cpp:1663]

	FIxed unsafe code.

Change 3040046 on 2016/07/06 by Ben.Cosh

	This fixes a problem found where tunnel instances inside tunnel graphs fail to map correctly in the blueprint profiler
	#Jira UE-32862 - Tunnel instances inside tunnels do not map correctly in the blueprint profiler
	#Proj BlueprintProfiler

Change 3040061 on 2016/07/06 by Ben.Cosh

	fix for bad unshelve before submit in CL 3040046

	- Phillip already reviewed this version of the file and not what was actually submitted.

Change 3040346 on 2016/07/06 by Maciej.Mroz

	#jira UE-32840 //UE4/Dev-Blueprints: UE4_StaticAnalysis completed with Warnings - 2 Warnings

	Fix(?)  for warning C28182

Change 3040349 on 2016/07/06 by Dan.Oconnor

	Updating test data

Change 3040473 on 2016/07/06 by Dan.Oconnor

	Fix SMyBlueprint in blueprint diff tool so that kismet inspector is updated with the object selected in SMyBlueprint, needed to investigate UE-18200

Change 3040536 on 2016/07/06 by Dan.Oconnor

	Call to APITestFunction

Change 3040565 on 2016/07/06 by Dan.Oconnor

	Clone saved GeneratedClass when not doing COL. Groundwork to fix for UE-17268.

Change 3040603 on 2016/07/06 by Dan.Oconnor

	PR #2539: Option to disable Grid in the blueprint and material editor and change grid colors (Contributed by CelPlays)

	#jira UE-32497

Change 3040798 on 2016/07/07 by Maciej.Mroz

	Fixed warning C6011: Dereferencing NULL pointer 'Object'.
	Added some comments.

	#jira UE-32840

Change 3041185 on 2016/07/07 by Ben.Cosh

	This fixes problems with the blueprint profiler with name collisions for nodes in different graphs and improves nested tunnel detection.
	#Jira UE-32862 - Tunnel instances inside tunnels do not map correctly in the blueprint profiler
	#Jira UE-32889 - Name collisions can now occur in the blueprint profiler for stat nodes.
	#Proj BlueprintProfiler, Kismet

	Notes:

	This attempts to continue to address fall out from CL 3040046 to improve stability.
	Previously execution nodes were patched into the function contexts that called a tunnel instance. However this proved problematic after spotting a rare case where node names collide between
	between event and tunnel graphs and caused havok in the node mapping. This change moves to an approach that patches in tunnel contexts and any dependent contexts and instead attempts
	to locate critical path nodes using a new node search system making use of these child function contexts.

	CL 3040046 also modified TunnelContext's to be actually more representative of a tunnel instance context, I have updated naming conventions to reflect this for clarity.
	The changes here also add a single function context for tunnel graphs which contain the bulk of the nodes in the graph and the tunnel instance contexts reference this and make use of it to create
	non boundary / tunnel instance nodes so they are located in a single place for all instances of that tunnel graph.

Change 3041603 on 2016/07/07 by Dan.Oconnor

	Fix for check failure: PreviousCDO != nullptr, when loading blueprints that have circularly dependent interfaces
	#jira UE-31639

Change 3042058 on 2016/07/07 by Dan.Oconnor

	Ensures that the correct ComponentClass is assigned to our template node. This pins are normally allocated lazilly in BlueprintActionFilterImpl::HasMatchingPin, so not a huge change
	#jira UE-32769

Change 3042468 on 2016/07/08 by Maciej.Mroz

	#jira UE-32882, UE-32887

	Fixed Crash in UHT.
	Fixed "Ambiguous search" error, when delegate has owner class declared.

Change 3042739 on 2016/07/08 by Maciej.Mroz

	Nativization. Included headers for native subobjects.

Change 3042747 on 2016/07/08 by Maciej.Mroz

	Minor changes in Orion code, necessary to compile the project with nativized Blueprints

Change 3042758 on 2016/07/08 by Maciej.Mroz

	"OrionGame.h" is included in NativizedAssets module.

[CL 3043181 by Mike Beach in Main branch]
2016-07-08 14:59:19 -04:00

186 lines
6.9 KiB
C#

// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading;
using System.Reflection;
using System.Linq;
using AutomationTool;
using UnrealBuildTool;
[Flags]
public enum ProjectBuildTargets
{
None = 0,
Editor = 1 << 0,
ClientCooked = 1 << 1,
ServerCooked = 1 << 2,
Bootstrap = 1 << 3,
CrashReporter = 1 << 4,
Programs = 1 << 5,
// All targets
All = Editor | ClientCooked | ServerCooked | Bootstrap | CrashReporter | Programs,
}
/// <summary>
/// Helper command used for compiling.
/// </summary>
/// <remarks>
/// Command line params used by this command:
/// -cooked
/// -cookonthefly
/// -clean
/// -[platform]
/// </remarks>
public partial class Project : CommandUtils
{
#region Build Command
static string GetBlueprintPluginPathArgument(ProjectParams Params, bool Client, UnrealTargetPlatform TargetPlatform)
{
string ScriptPluginArgs = "";
// if we're utilizing an auto-generated code plugin/module (a product of
// the cook process), make sure to compile it along with the targets here
if (Params.RunAssetNativization)
{
ProjectParams.BlueprintPluginKey PluginKey = new ProjectParams.BlueprintPluginKey();
PluginKey.Client = Client;
PluginKey.TargetPlatform = TargetPlatform;
FileReference CodePlugin = null;
if(Params.BlueprintPluginPaths.TryGetValue(PluginKey, out CodePlugin))
{
ScriptPluginArgs += "-PLUGIN \"" + CodePlugin + "\" ";
}
else
{
LogWarning("BlueprintPluginPath for " + TargetPlatform + " " + (Client ? "client" : "server") + " was not found");
}
}
return ScriptPluginArgs;
}
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)
{
foreach (var BuildConfig in Params.ClientConfigsToBuild)
{
foreach (var ClientPlatform in Params.ClientTargetPlatforms)
{
string ScriptPluginArgs = GetBlueprintPluginPathArgument(Params, true, ClientPlatform);
CrashReportPlatforms.Add(ClientPlatform);
Agenda.AddTargets(Params.ClientCookedTargets.ToArray(), ClientPlatform, BuildConfig, Params.CodeBasedUprojectPath, InAddArgs: ScriptPluginArgs + " -remoteini=\"" + Params.RawProjectPath.Directory.FullName + "\"");
}
}
}
if (Params.HasServerCookedTargets && (TargetMask & ProjectBuildTargets.ServerCooked) == ProjectBuildTargets.ServerCooked)
{
foreach (var BuildConfig in Params.ServerConfigsToBuild)
{
foreach (var ServerPlatform in Params.ServerTargetPlatforms)
{
string ScriptPluginArgs = GetBlueprintPluginPathArgument(Params, false, ServerPlatform);
CrashReportPlatforms.Add(ServerPlatform);
Agenda.AddTargets(Params.ServerCookedTargets.ToArray(), ServerPlatform, 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 BootstrapPackagedGamePlatform in BootstrapPackagedGamePlatforms)
{
if(Params.ClientTargetPlatforms.Contains(BootstrapPackagedGamePlatform))
{
Agenda.AddTarget("BootstrapPackagedGame", BootstrapPackagedGamePlatform, 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)
{
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 **********");
}
#endregion
}