Files
UnrealEngineUWP/Engine/Source/Programs/AutomationTool/Scripts/UE4BuildUtils.cs
Richard Fawcett f7599b4696 Ensure that BuildPatchTool.exe is build in UAT when necessary.
[CL 2299411 by Richard Fawcett in Main branch]
2014-09-16 10:25:01 -04:00

50 lines
1.2 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AutomationTool;
using UnrealBuildTool;
/// <summary>
/// Common UEBuild utilities
/// </summary>
public class UE4BuildUtils : CommandUtils
{
/// <summary>
/// Builds BuildPatchTool for the specified platform.
/// </summary>
/// <param name="Command"></param>
/// <param name="InPlatform"></param>
public static void BuildBuildPatchTool(BuildCommand Command, UnrealBuildTool.UnrealTargetPlatform InPlatform)
{
Log("Building BuildPatchTool");
if (Command == null)
{
Command = new UE4BuildUtilDummyBuildCommand();
}
var UE4Build = new UE4Build(Command);
var Agenda = new UE4Build.BuildAgenda();
Agenda.Targets.Add(new UE4Build.BuildTarget()
{
ProjectName = "",
TargetName = "BuildPatchTool",
Platform = InPlatform,
Config = UnrealBuildTool.UnrealTargetConfiguration.Development,
});
UE4Build.Build(Agenda, InDeleteBuildProducts: true, InUpdateVersionFiles: true);
UE4Build.CheckBuildProducts(UE4Build.BuildProductFiles);
}
class UE4BuildUtilDummyBuildCommand : BuildCommand
{
public override void ExecuteBuild()
{
// noop
}
}
}