Files
UnrealEngineUWP/Engine/Source/Programs/AutomationTool/Scripts/GetFileCommand.Automation.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

38 lines
922 B
C#

// Copyright Epic Games, Inc. All Rights Reserved.
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading;
using System.Reflection;
using AutomationTool;
using UnrealBuildTool;
using EpicGames.Core;
public partial class Project : CommandUtils
{
public static void GetFile(ProjectParams Params)
{
Params.ValidateAndLog();
if (string.IsNullOrEmpty(Params.GetFile))
{
return;
}
LogInformation("********** GETFILE COMMAND STARTED **********");
var FileName = Path.GetFileName(Params.GetFile);
var LocalFile = CombinePaths(CmdEnv.EngineSavedFolder, FileName);
var SC = CreateDeploymentContext(Params, false);
if (SC.Count == 0)
{
throw new AutomationException("Failed to create deployment context");
}
SC[0].StageTargetPlatform.GetTargetFile(Params.GetFile, LocalFile, Params);
LogInformation("********** GETFILE COMMAND COMPLETED **********");
}
}