You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- Use this in CopyBuildToStagingDIrectory when reading the Packaging settings when staging. This allows plugins to add files/directories to stage without needing to modify every project. - Added a ConfigTester Turnkey command that can help test C# inis programmatically. Currently need to pass in these 3 params on commandline, it doesn't ask for them: -Branch=Engine -Section=SomeSection -Key=SomeKey #rb David.Harvey [CL 35927236 by josh adams in ue5-main branch]
41 lines
1.3 KiB
C#
41 lines
1.3 KiB
C#
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using EpicGames.Core;
|
|
using UnrealBuildTool;
|
|
using UnrealBuildBase;
|
|
|
|
namespace Turnkey.Commands
|
|
{
|
|
class ConfigTester : TurnkeyCommand
|
|
{
|
|
protected override CommandGroup Group => CommandGroup.Misc;
|
|
|
|
protected override void Execute(string[] CommandOptions)
|
|
{
|
|
FileReference ProjectFile = TurnkeyUtils.GetProjectFromCommandLineOrUser(CommandOptions);
|
|
List<UnrealTargetPlatform> Platforms = TurnkeyUtils.GetPlatformsFromCommandLineOrUser(CommandOptions, null);
|
|
string BranchName = TurnkeyUtils.ParseParamValue("Branch", null, CommandOptions);
|
|
string Section = TurnkeyUtils.ParseParamValue("Section", null, CommandOptions);
|
|
string Key = TurnkeyUtils.ParseParamValue("Key", null, CommandOptions);
|
|
|
|
ConfigHierarchyType Branch = Enum.Parse<ConfigHierarchyType>(BranchName);
|
|
|
|
// get a list of builds from config
|
|
foreach (UnrealTargetPlatform Platform in Platforms)
|
|
{
|
|
ConfigHierarchy Config = ConfigCache.ReadHierarchy(Branch, ProjectFile == null ? null : ProjectFile.Directory, Platform, IncludePluginsForTargetType:TargetType.Game);
|
|
|
|
string Value;
|
|
Config.GetString(Section, Key, out Value);
|
|
|
|
TurnkeyUtils.Log($"Value[{Platform}]: {Value}");
|
|
}
|
|
}
|
|
}
|
|
}
|