- Fix a problem with BundleResources not being copied in to Mac and IOS .app bundles (plugin author reported - this is a feature Epic has not used)

#rb calvin.zheng
#jira UE-195538

[CL 27974501 by Josh Adams in 5.3 branch]
This commit is contained in:
Josh Adams
2023-09-18 17:01:19 -04:00
parent 2d51084423
commit 2dafa030de
4 changed files with 18 additions and 3 deletions

View File

@@ -122,6 +122,7 @@ namespace UnrealBuildTool.XcodeProjectXcconfig
".storyboard",
".xcframework",
".framework",
".bundle",
".lproj",
".png",
// no extensions will be folders, like "cookeddata" that we want to copy as a resource

View File

@@ -1486,6 +1486,15 @@ namespace UnrealBuildTool.XcodeProjectXcconfig
{
// look up to see if we had cached any Frameworks
Tuple<ProjectFile, UnrealTargetPlatform> FrameworkKey = Tuple.Create((ProjectFile)ProjectFile, Platform);
IEnumerable<UEBuildBundleResource>? Bundles;
if (XcodeProjectFileGenerator.TargetBundles.TryGetValue(FrameworkKey, out Bundles))
{
foreach (UEBuildBundleResource Bundle in Bundles)
{
ResourcesBuildPhase.AddFolderResource(new DirectoryReference(Bundle.ResourcePath!), "Resources");
}
}
IEnumerable<UEBuildFramework>? Frameworks;
if (XcodeProjectFileGenerator.TargetFrameworks.TryGetValue(FrameworkKey, out Frameworks))
{

View File

@@ -559,6 +559,7 @@ namespace UnrealBuildTool
foreach (UEBuildModule Module in Binary.Modules)
{
Dylibs.AddRange(Module.Rules.RuntimeDependencies.Inner.Where(x => x.Path.StartsWith("$(BinaryOutputDir)") && Path.GetExtension(x.SourcePath) == ".dylib"));
Bundles.AddRange(Module.Rules.AdditionalBundleResources.Select(x => new UEBuildBundleResource(x)));
}
}