You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Update the Localize UAT command to better handle gathering for plugins. - Introduced the -IncludePluginsDirectory parameter to include all plugins under a particular directory - Introduce the ExcludePluginsDirectory parameter to exclude all plugins under a particular directory - Introduce the EnableIncludedPlugins flag to add all included plugins that pass the exclude filter to the -EnablePlugins editor command line parameter to ensure the plugins are enabled for gathering. #rb: Jamie.Dale #jira: none #test Used the new commands to perform gathers for directories of plugins and enabling plugins that are not on by default. [CL 26161937 by leon huang in ue5-main branch]
54 lines
1.4 KiB
C#
54 lines
1.4 KiB
C#
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using UnrealBuildTool;
|
|
using EpicGames.Core;
|
|
|
|
namespace EpicGames.Localization
|
|
{
|
|
public static class LocalizationUtilities
|
|
{
|
|
public static HashSet<string> GetPluginNamesUnderDirectory(string PluginDirectoryPath, string PluginRoot, PluginType Type)
|
|
{
|
|
HashSet<string> ReturnList = new HashSet<string>();
|
|
if (!Directory.Exists(PluginDirectoryPath))
|
|
{
|
|
return ReturnList;
|
|
}
|
|
if (!Directory.Exists(PluginRoot))
|
|
{
|
|
return ReturnList;
|
|
}
|
|
|
|
DirectoryReference PluginDirectoryReference = new DirectoryReference(PluginDirectoryPath);
|
|
DirectoryReference PluginRootDirectoryReference = new DirectoryReference(PluginRoot);
|
|
bool bIsSubdirectory = PluginDirectoryReference.IsUnderDirectory(PluginRootDirectoryReference);
|
|
if (bIsSubdirectory)
|
|
{
|
|
string RelativePath = PluginDirectoryReference.MakeRelativeTo(PluginRootDirectoryReference);
|
|
IReadOnlyList<PluginInfo> PluginsUnderDirectory = Plugins.ReadPluginsFromDirectory(PluginRootDirectoryReference, RelativePath, Type);
|
|
foreach (var Plugin in PluginsUnderDirectory)
|
|
{
|
|
ReturnList.Add(Plugin.Name);
|
|
}
|
|
}
|
|
|
|
return ReturnList;
|
|
}
|
|
|
|
public static string[] GetModularConfigSuffixes()
|
|
{
|
|
string[] FileSuffixes = {
|
|
"_Gather",
|
|
"_Import",
|
|
"_Export",
|
|
"_Compile",
|
|
"_GenerateReports",
|
|
};
|
|
|
|
return FileSuffixes;
|
|
}
|
|
|
|
}
|
|
}
|