2019-12-26 23:01:54 -05:00
|
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
2018-04-03 15:23:51 -04:00
|
|
|
|
|
|
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.IO;
|
|
|
|
|
|
using System.Threading;
|
|
|
|
|
|
using System.Reflection;
|
|
|
|
|
|
using AutomationTool;
|
|
|
|
|
|
using UnrealBuildTool;
|
2020-12-21 23:07:37 -04:00
|
|
|
|
using EpicGames.Core;
|
2023-03-08 12:43:35 -05:00
|
|
|
|
using Microsoft.Extensions.Logging;
|
2018-04-03 15:23:51 -04:00
|
|
|
|
|
2021-07-22 20:27:06 -04:00
|
|
|
|
namespace AutomationScripts
|
2018-04-03 15:23:51 -04:00
|
|
|
|
{
|
2021-07-22 20:27:06 -04:00
|
|
|
|
public partial class Project : CommandUtils
|
2018-04-03 15:23:51 -04:00
|
|
|
|
{
|
2021-07-22 20:27:06 -04:00
|
|
|
|
public static void GetFile(ProjectParams Params)
|
2018-04-03 15:23:51 -04:00
|
|
|
|
{
|
2021-07-22 20:27:06 -04:00
|
|
|
|
Params.ValidateAndLog();
|
|
|
|
|
|
if (string.IsNullOrEmpty(Params.GetFile))
|
|
|
|
|
|
{
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-03-08 12:43:35 -05:00
|
|
|
|
Logger.LogInformation("********** GETFILE COMMAND STARTED **********");
|
2022-05-05 03:40:01 -04:00
|
|
|
|
var StartTime = DateTime.UtcNow;
|
2021-07-22 20:27:06 -04:00
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
|
2023-03-08 12:43:35 -05:00
|
|
|
|
Logger.LogInformation("GetFile command time: {0:0.00} s", (DateTime.UtcNow - StartTime).TotalMilliseconds / 1000);
|
|
|
|
|
|
Logger.LogInformation("********** GETFILE COMMAND COMPLETED **********");
|
2018-04-03 15:23:51 -04:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|