You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
fixed problem with IP not being set for CotF #ue4 #codereview daniel.lamb, chris.gagnon [CL 2303312 by Peter Sauerbrei in Main branch]
76 lines
2.1 KiB
C#
76 lines
2.1 KiB
C#
// Copyright 1998-2014 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;
|
|
|
|
public partial class Project : CommandUtils
|
|
{
|
|
#region Deploy Command
|
|
|
|
public static void Deploy(ProjectParams Params)
|
|
{
|
|
Params.ValidateAndLog();
|
|
if (!Params.Deploy)
|
|
{
|
|
return;
|
|
}
|
|
|
|
Log("********** DEPLOY COMMAND STARTED **********");
|
|
|
|
if (!Params.NoClient)
|
|
{
|
|
var DeployContextList = CreateDeploymentContext(Params, false, false);
|
|
foreach ( var SC in DeployContextList )
|
|
{
|
|
if (SC.StageTargetPlatform.DeployViaUFE)
|
|
{
|
|
string ClientCmdLine = "-run=Deploy ";
|
|
ClientCmdLine += "-Device=" + Params.Device + " ";
|
|
ClientCmdLine += "-Targetplatform=" + SC.StageTargetPlatform.PlatformType.ToString() + " ";
|
|
ClientCmdLine += "-SourceDir=\"" + CombinePaths(Params.BaseStageDirectory, SC.StageTargetPlatform.PlatformType.ToString()) + "\" ";
|
|
string ClientApp = CombinePaths(CmdEnv.LocalRoot, "Engine/Binaries/Win64/UnrealFrontend.exe");
|
|
|
|
Log("Deploying via UFE:");
|
|
Log("\tClientCmdLine: " + ClientCmdLine + "");
|
|
|
|
//@todo UAT: Consolidate running of external applications like UFE (See 'RunProjectCommand' for other instances)
|
|
PushDir(Path.GetDirectoryName(ClientApp));
|
|
// Always start client process and don't wait for exit.
|
|
ProcessResult ClientProcess = Run(ClientApp, ClientCmdLine, null, ERunOptions.NoWaitForExit);
|
|
PopDir();
|
|
if (ClientProcess != null)
|
|
{
|
|
do
|
|
{
|
|
Thread.Sleep(100);
|
|
}
|
|
while (ClientProcess.HasExited == false);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
SC.StageTargetPlatform.Deploy(Params, SC);
|
|
}
|
|
}
|
|
}
|
|
if (Params.DedicatedServer)
|
|
{
|
|
ProjectParams ServerParams = new ProjectParams(Params);
|
|
ServerParams.Device = ServerParams.ServerDevice;
|
|
var DeployContextList = CreateDeploymentContext(ServerParams, true, false);
|
|
foreach ( var SC in DeployContextList )
|
|
{
|
|
SC.StageTargetPlatform.Deploy(ServerParams, SC);
|
|
}
|
|
}
|
|
|
|
Log("********** DEPLOY COMMAND COMPLETED **********");
|
|
}
|
|
|
|
#endregion
|
|
}
|