Files
UnrealEngineUWP/Engine/Source/Programs/AutomationToolLauncher/Launcher.cs
ben marsh cf4a18955c Copying //UE4/Dev-Build to Dev-Main (//UE4/Dev-Main)
#rb none
#rnx

#ROBOMERGE-OWNER: ryan.gerleve
#ROBOMERGE-AUTHOR: ben.marsh
#ROBOMERGE-SOURCE: CL 4718806 in //UE4/Main/...
#ROBOMERGE-BOT: ENGINE (Main -> Dev-Networking)

[CL 4718825 by ben marsh in Dev-Networking branch]
2019-01-14 12:15:37 -05:00

42 lines
1.2 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.Reflection;
using System.IO;
namespace AutomationToolLauncher
{
class Launcher
{
static int Main(string[] Arguments)
{
// Create application domain setup information.
var Domaininfo = new AppDomainSetup();
Domaininfo.ApplicationBase = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
Domaininfo.ShadowCopyFiles = "true";
// Create the application domain.
var Domain = AppDomain.CreateDomain("AutomationTool", AppDomain.CurrentDomain.Evidence, Domaininfo);
// Execute assembly and pass through command line
var UATExecutable = Path.Combine(Domaininfo.ApplicationBase, "AutomationTool.exe");
// Default exit code in case UAT does not even start, otherwise we always return UAT's exit code.
var ExitCode = 193;
try
{
ExitCode = Domain.ExecuteAssembly(UATExecutable, Arguments);
// Unload the application domain.
AppDomain.Unload(Domain);
}
catch (Exception Ex)
{
Console.WriteLine(Ex.Message);
Console.WriteLine(Ex.StackTrace);
}
return ExitCode;
}
}
}