Files
UnrealEngineUWP/Engine/Source/Programs/AutomationTool/Turnkey/Commands/ListSdks.cs
Josh Adams 88c2ccf6bc Massive Turnkey refactor for simplicity for licensees:
- Moved installation from manifest.xml to Automtion platform functions
- SdkInfo has been removed, now it's just FIleSource, which can be used generically
- Redid Expansion stuff completely, so it's inline into the FileSource fields
- Added support for list expansions (so we can use a variable in the .xml instead of enumerating a CopyProvider, can speed things up)
- Allow full wildcard support in GoogleDrive provider
- Not all SDkInfos have been converted to FileSources

[CL 13965630 by Josh Adams in ue5-main branch]
2020-07-29 14:40:30 -04:00

53 lines
1.2 KiB
C#

// Copyright Epic Games, Inc. All Rights Reserved.
using System;
using System.Collections.Generic;
using UnrealBuildTool;
using AutomationTool;
using System.Linq;
namespace Turnkey.Commands
{
class ListSdks : TurnkeyCommand
{
protected override void Execute(string[] CommandOptions)
{
TurnkeyUtils.Log("");
TurnkeyUtils.Log("Available Installers:");
string TypeString = TurnkeyUtils.ParseParamValue("Type", null, CommandOptions);
string PlatformString = TurnkeyUtils.ParseParamValue("Platform", null, CommandOptions);
UnrealTargetPlatform? OptionalPlatform = null;
FileSource.SourceType? OptionalType = null;
if (TypeString != null)
{
FileSource.SourceType Type;
if (Enum.TryParse(TypeString, out Type))
{
OptionalType = Type;
}
}
if (PlatformString != null)
{
UnrealTargetPlatform Platform;
if (UnrealTargetPlatform.TryParse(PlatformString, out Platform))
{
OptionalPlatform = Platform;
}
}
List<FileSource> Sdks = TurnkeyManifest.FilterDiscoveredFileSources(OptionalPlatform, OptionalType);
foreach (FileSource Sdk in Sdks)
{
// TurnkeyUtils.Log(Sdk.ToString(2));
TurnkeyUtils.Log(Sdk.ToString());
}
}
}
}