Files
UnrealEngineUWP/Engine/Source/Programs/AutomationToolLauncher/Launcher.cs
Ryan Durand 9ef3748747 Updating copyrights for Engine Programs.
#rnx
#rb none
#jira none

#ROBOMERGE-OWNER: ryan.durand
#ROBOMERGE-AUTHOR: ryan.durand
#ROBOMERGE-SOURCE: CL 10869242 in //Fortnite/Release-12.00/... via CL 10869536
#ROBOMERGE-BOT: FORTNITE (Main -> Dev-EngineMerge) (v613-10869866)

[CL 10870955 by Ryan Durand in Main branch]
2019-12-26 23:01:54 -05:00

42 lines
1.2 KiB
C#

// Copyright 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;
}
}
}