Files
UnrealEngineUWP/Engine/Source/Programs/AutomationTool/Scripts/GetFileCommand.Automation.cs
Patrick Boutot 410c720ac7 Merging //UE4/Dev-Main @ 10886849 to Dev-Tools-Staging (//UE4/Dev-Tools-Staging)
#rb none
#rnx
#author jeanmichel.dignard

[CL 10992634 by Patrick Boutot in Dev-VirtualProduction branch]
2020-01-15 09:39:21 -05:00

38 lines
926 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 Tools.DotNETCommon;
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 **********");
}
}