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]
170 lines
6.1 KiB
C#
170 lines
6.1 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
|
|
|
|
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);
|
|
}
|
|
}
|
|
|
|
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)
|
|
{
|
|
// Add every plugin:
|
|
foreach( var CodePlugin in Params.BlueprintPluginPaths)
|
|
{
|
|
ScriptPluginArgs = "-PLUGIN \"" + CodePlugin + "\"";
|
|
}
|
|
}
|
|
|
|
// Setup cooked targets
|
|
if (Params.HasClientCookedTargets && (TargetMask & ProjectBuildTargets.ClientCooked) == ProjectBuildTargets.ClientCooked)
|
|
{
|
|
foreach (var BuildConfig in Params.ClientConfigsToBuild)
|
|
{
|
|
foreach (var ClientPlatform in Params.ClientTargetPlatforms)
|
|
{
|
|
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)
|
|
{
|
|
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
|
|
}
|