You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- this change just adds support to Turnkey and the editor UI to expose this support for supported platforms
- follow on changes will be required to support the feature on a given platform
- Turnkey now tracks the auto software update mode per device
- unknown/enable/disable
- will be unknown for devices which do not support auto software updates or platforms which have not yet implemented support
- new UAT platform method SetDeviceAutoSoftwareUpdateMode() must be implemented for supporting platforms
- new Turnkey command DeviceAutoSoftwareUpdates for changing auto software update state on a device
- edtior exposes this functionality under the device entries in the platforms menu
- devices which support auto software updates will expose an "Enable auto software updates" check box item in their Sdk Info menu
- toggling this checkbox changes the auto software update policy on the device
#rb David.Harvey, Wojciech.Krywult
#jira UE-160691
#preflight 64012d69d249add4a205fe9c, 64078e72aa0042333551c821
[CL 24552009 by eric mcdaniel in ue5-main branch]
52 lines
1.6 KiB
C#
52 lines
1.6 KiB
C#
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using AutomationTool;
|
|
using UnrealBuildTool;
|
|
|
|
namespace Turnkey.Commands
|
|
{
|
|
class DeviceAutoSoftwareUpdates : TurnkeyCommand
|
|
{
|
|
protected override CommandGroup Group => CommandGroup.Sdk;
|
|
|
|
protected override void Execute(string[] CommandOptions)
|
|
{
|
|
// Are we enabling or disabling auto updates on the devices?
|
|
bool bUnattended = TurnkeyUtils.ParseParam("Unattended", CommandOptions);
|
|
string EnableArg = TurnkeyUtils.ParseParamValue("Enable", null, CommandOptions);
|
|
|
|
bool bEnableAutoSoftwareUpdates = false;
|
|
if (string.IsNullOrEmpty(EnableArg))
|
|
{
|
|
if (bUnattended)
|
|
{
|
|
TurnkeyUtils.Log("Error: Desired state of device auto software updates must be specified via -Enable=true/false");
|
|
return;
|
|
}
|
|
else
|
|
{
|
|
bEnableAutoSoftwareUpdates = TurnkeyUtils.ReadInputInt("Enable device auto software updates?", new List<string> { "Disable", "Enable" }, false) != 0;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
bEnableAutoSoftwareUpdates = EnableArg.Equals("true", StringComparison.InvariantCultureIgnoreCase);
|
|
}
|
|
|
|
// Get list of devices
|
|
List<UnrealTargetPlatform> PlatformsWithSdks = TurnkeyManifest.GetPlatformsWithSdks();
|
|
List<DeviceInfo> ChosenDevices = TurnkeyUtils.GetDevicesFromCommandLineOrUser(CommandOptions, PlatformsWithSdks);
|
|
|
|
|
|
// Set the auto updates mode on each device
|
|
foreach (DeviceInfo Device in ChosenDevices)
|
|
{
|
|
AutomationTool.Platform AutomationPlatform = Platform.GetPlatform(Device.Platform);
|
|
AutomationPlatform.SetDeviceAutoSoftwareUpdateMode(Device, bEnableAutoSoftwareUpdates);
|
|
}
|
|
}
|
|
}
|
|
}
|