Files
ben marsh 4254b5b407 Fixes for running an editor with a unique build environment.
* Add support for running UAT with an absolute path to the editor executable, and pass a full path when cooking or packaging.
* Fix path to the editor executable when launching a standalone editor instance for preview.

#jira UE-70785
#rb none

#ROBOMERGE-SOURCE: CL 5238647 in //UE4/Release-4.22/...
#ROBOMERGE-BOT: RELEASE (Release-4.22 -> Main)

[CL 5238651 by ben marsh in Main branch]
2019-02-28 10:51:25 -05:00

101 lines
2.1 KiB
C#

// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Diagnostics;
using UnrealBuildTool;
namespace AutomationTool
{
class WindowsHostPlatform : HostPlatform
{
public override string GetMsBuildExe()
{
return WindowsExports.GetMSBuildToolPath();
}
public override string RelativeBinariesFolder
{
get { return @"Engine/Binaries/Win64/"; }
}
public override string GetUE4ExePath(string UE4Exe)
{
if(Path.IsPathRooted(UE4Exe))
{
return CommandUtils.CombinePaths(UE4Exe);
}
else
{
return CommandUtils.CombinePaths(CommandUtils.CmdEnv.LocalRoot, RelativeBinariesFolder, UE4Exe);
}
}
public override string LocalBuildsLogFolder
{
get { return CommandUtils.CombinePaths(PathSeparator.Slash, Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Unreal Engine", "AutomationTool", "Logs"); }
}
public override string P4Exe
{
get { return "p4.exe"; }
}
public override Process CreateProcess(string AppName)
{
var NewProcess = new Process();
return NewProcess;
}
public override void SetupOptionsForRun(ref string AppName, ref CommandUtils.ERunOptions Options, ref string CommandLine)
{
}
public override void SetConsoleCtrlHandler(ProcessManager.CtrlHandlerDelegate Handler)
{
ProcessManager.SetConsoleCtrlHandler(Handler, true);
}
public override bool IsScriptModuleSupported(string ModuleName)
{
return true;
}
public override UnrealTargetPlatform HostEditorPlatform
{
get { return UnrealTargetPlatform.Win64; }
}
public override string PdbExtension
{
get { return ".pdb"; }
}
static string[] SystemServices = new string[]
{
"winlogon",
"system idle process",
"taskmgr",
"spoolsv",
"csrss",
"smss",
"svchost",
"services",
"lsass",
"conhost",
"oobe",
"mmc"
};
public override string[] DontKillProcessList
{
get
{
return SystemServices;
}
}
}
}