Files
UnrealEngineUWP/Engine/Source/Programs/UnrealBuildTool/Modes/DeployMode.cs
Ben Marsh 6f927647b1 Changing C# code over to using EpicGames.Core over DotNETCommon.
#rb none
#rnx

[CL 14962096 by Ben Marsh in ue5-main branch]
2020-12-21 23:07:37 -04:00

46 lines
1.3 KiB
C#

// Copyright Epic Games, Inc. All Rights Reserved.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using EpicGames.Core;
#nullable disable
namespace UnrealBuildTool
{
/// <summary>
/// Invokes the deployment handler for a target.
/// </summary>
[ToolMode("Deploy", ToolModeOptions.BuildPlatforms)]
class DeployMode : ToolMode
{
/// <summary>
/// If we are just running the deployment step, specifies the path to the given deployment settings
/// </summary>
[CommandLine("-Receipt", Required=true)]
public FileReference ReceiptFile = null;
/// <summary>
/// Execute the tool mode
/// </summary>
/// <param name="Arguments">Command line arguments</param>
/// <returns>Exit code</returns>
public override int Execute(CommandLineArguments Arguments)
{
// Apply the arguments
Arguments.ApplyTo(this);
Arguments.CheckAllArgumentsUsed();
// Execute the deploy
TargetReceipt Receipt = TargetReceipt.Read(ReceiptFile);
Log.WriteLine(LogEventType.Console, "Deploying {0} {1} {2}...", Receipt.TargetName, Receipt.Platform, Receipt.Configuration);
UEBuildPlatform.GetBuildPlatform(Receipt.Platform).Deploy(Receipt);
return (int)CompilationResult.Succeeded;
}
}
}