You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
we now use an enum similar to UE4 with Fatal, Error, Warning, Display, Log, Verbose, and VeryVerbose Log will only go to the log file unless -verbose is passed on the command line reduced some of the output from UAT to be Log only [CL 2631062 by Peter Sauerbrei in Main branch]
52 lines
1.2 KiB
C#
52 lines
1.2 KiB
C#
using System.Collections.Generic;
|
|
using AutomationTool;
|
|
using UnrealBuildTool;
|
|
|
|
namespace AutomationScripts.Automation
|
|
{
|
|
public class ListMobileDevices : BuildCommand
|
|
{
|
|
public override void ExecuteBuild()
|
|
{
|
|
LogConsole("======= ListMobileDevices - Start =======");
|
|
|
|
var GlobalParams = new ProjectParams(
|
|
Command: this,
|
|
RawProjectPath: @"D:\UE-Main\UE4\Samples\Games\TappyChicken\TappyChicken.uproject"
|
|
);
|
|
|
|
if (ParseParam("android"))
|
|
{
|
|
GetConnectedDevices(GlobalParams, Platform.Platforms[UnrealTargetPlatform.Android]);
|
|
}
|
|
|
|
if (ParseParam("ios"))
|
|
{
|
|
throw new AutomationException("iOS is not yet implemented.");
|
|
}
|
|
|
|
LogConsole("======= ListMobileDevices - Done ========");
|
|
}
|
|
|
|
private static void GetConnectedDevices(ProjectParams Params, Platform TargetPlatform)
|
|
{
|
|
var PlatformName = TargetPlatform.PlatformType.ToString();
|
|
List<string> ConnectedDevices;
|
|
TargetPlatform.GetConnectedDevices(Params, out ConnectedDevices);
|
|
|
|
try
|
|
{
|
|
foreach (var DeviceName in ConnectedDevices)
|
|
{
|
|
LogConsole("Device:{0}:{1}", PlatformName, DeviceName);
|
|
}
|
|
}
|
|
catch
|
|
{
|
|
throw new AutomationException("No {0} devices", PlatformName);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|