2019-12-26 23:01:54 -05:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
2014-03-14 14:13:41 -04:00
|
|
|
using System;
|
|
|
|
|
using System.Reflection;
|
|
|
|
|
using System.IO;
|
2020-09-01 14:07:48 -04:00
|
|
|
using System.Linq;
|
|
|
|
|
using System.Diagnostics;
|
|
|
|
|
using System.Dynamic;
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
namespace AutomationToolLauncher
|
|
|
|
|
{
|
|
|
|
|
class Launcher
|
|
|
|
|
{
|
2019-01-14 12:11:24 -05:00
|
|
|
static int Main(string[] Arguments)
|
2020-09-01 14:07:48 -04:00
|
|
|
{
|
|
|
|
|
return Run(Arguments);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
static int Run(string[] Arguments)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
string ApplicationBase = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
|
2020-10-26 06:08:59 -04:00
|
|
|
string UATExecutable = Path.Combine(ApplicationBase, "..\\AutomationTool", "AutomationTool.exe");
|
2020-09-01 14:07:48 -04:00
|
|
|
|
|
|
|
|
if (!File.Exists(UATExecutable))
|
|
|
|
|
{
|
|
|
|
|
Console.WriteLine(string.Format("AutomationTool does not exist at: {0}", UATExecutable));
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
{
|
2020-10-26 06:08:59 -04:00
|
|
|
ProcessStartInfo StartInfo = new ProcessStartInfo(UATExecutable);
|
|
|
|
|
foreach (string s in Arguments)
|
|
|
|
|
{
|
|
|
|
|
StartInfo.ArgumentList.Add(s);
|
|
|
|
|
}
|
|
|
|
|
Process uatProcess = Process.Start(StartInfo);
|
|
|
|
|
uatProcess.WaitForExit();
|
|
|
|
|
Environment.Exit(uatProcess.ExitCode);
|
2020-09-01 14:07:48 -04:00
|
|
|
}
|
|
|
|
|
catch (Exception Ex)
|
|
|
|
|
{
|
|
|
|
|
Console.WriteLine(Ex.Message);
|
|
|
|
|
Console.WriteLine(Ex.StackTrace);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
|
|
}
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
}
|