You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
* Missing ThinApp.sh * Missing some quotes around a variable in GenerateUniversalDSYM.sh * Correctly filter out the stub .app's and such when copying the Staged data directory into the .app * Disabled the Mac's Sign To Run Locally option by default, as that causes Xcode's Validation/Upload to not have the team name embedded in it, causing a hassle while pushing up to AppStore/TestFlight * Fixed the PRODUCT_NAME for BP projects * Made CrashReportClient be a sandboxed app that inherits from parent * Fix Hybrid apps to check all platforms before in the project generator, so that if a project needs a temp target for IOS (via a plugin) * Disabled the LoginFlow module from OnlineFramework plugin - this was causing issues with having CEF and EpicWebHelper embedded into a sandboxed .app, and LoginFlow isn't seemingly actually used by anything * Set the no-encryption setting in the template Mac plist to make uploading to TestFlight/AppStore easier * Fixed editor to not compile as universal when using -distribution, only the client should be universal * Further improvements to stripping out nested .app's in a final .app (remove them from the staged directory helps) * Changed how the Mac app name is displayed, since the .app name itself is shown in the Finder, unlike IOS where the CFBundleName is shown (the archived .app name in the .xcarchive is named by a project setting, falling back to the .uproject name if not set) * Disabled the SignExecutables function on Modern because they attempt to sign the wrong .apps, and one is no longer (previously it was uselessly signing .apps, but now it throws an error due to changes for the third item in this list) * Legacy Xcode mode is forced with Window's Remote Mac builds, so use the old legacy code when running under windows * Added a third party .cpp file to get copied to remote macs * Fix Tools -> Open Xcode not working with modern Xcode #jira UE-197465 [CL 28723100 by Josh Adams in 5.3 branch]
130 lines
5.3 KiB
C#
130 lines
5.3 KiB
C#
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using System.Linq;
|
|
using EpicGames.Core;
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
namespace UnrealBuildTool
|
|
{
|
|
/// <summary>
|
|
/// Stores all the registered platform project generators
|
|
/// </summary>
|
|
class PlatformProjectGeneratorCollection
|
|
{
|
|
Dictionary<UnrealTargetPlatform, PlatformProjectGenerator> ProjectGeneratorDictionary = new Dictionary<UnrealTargetPlatform, PlatformProjectGenerator>();
|
|
|
|
/// <summary>
|
|
/// Returns the list of platforms that have been registered in this collection
|
|
/// </summary>
|
|
/// <returns>Registered platforms</returns>
|
|
public List<UnrealTargetPlatform> GetRegisteredPlatforms()
|
|
{
|
|
return ProjectGeneratorDictionary.Keys.ToList();
|
|
}
|
|
|
|
/// <summary>
|
|
/// Register the given platforms UEPlatformProjectGenerator instance
|
|
/// </summary>
|
|
/// <param name="InPlatform"> The UnrealTargetPlatform to register with</param>
|
|
/// <param name="InProjectGenerator">The UEPlatformProjectGenerator instance to use for the InPlatform</param>
|
|
/// <param name="Logger">Logger for output</param>
|
|
public void RegisterPlatformProjectGenerator(UnrealTargetPlatform InPlatform, PlatformProjectGenerator InProjectGenerator, ILogger Logger)
|
|
{
|
|
// Make sure the build platform is legal
|
|
UEBuildPlatform? BuildPlatform;
|
|
if (UEBuildPlatform.TryGetBuildPlatform(InPlatform, out BuildPlatform))
|
|
{
|
|
if (ProjectGeneratorDictionary.ContainsKey(InPlatform) == true)
|
|
{
|
|
Logger.LogInformation("RegisterPlatformProjectGenerator Warning: Registering project generator {Generator} for {Platform} when it is already set to {ExistingGenerator}",
|
|
InProjectGenerator.ToString(), InPlatform.ToString(), ProjectGeneratorDictionary[InPlatform].ToString());
|
|
ProjectGeneratorDictionary[InPlatform] = InProjectGenerator;
|
|
}
|
|
else
|
|
{
|
|
ProjectGeneratorDictionary.Add(InPlatform, InProjectGenerator);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
Logger.LogDebug("Skipping project file generator registration for {Platform} due to no valid BuildPlatform.", InPlatform.ToString());
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Retrieve the UEPlatformProjectGenerator instance for the given TargetPlatform
|
|
/// </summary>
|
|
/// <param name="InPlatform"> The UnrealTargetPlatform being built</param>
|
|
/// <param name="bInAllowFailure"> If true, do not throw an exception and return null</param>
|
|
/// <returns>UEPlatformProjectGenerator The instance of the project generator</returns>
|
|
public PlatformProjectGenerator? GetPlatformProjectGenerator(UnrealTargetPlatform InPlatform, bool bInAllowFailure = false)
|
|
{
|
|
if (ProjectGeneratorDictionary.ContainsKey(InPlatform) == true)
|
|
{
|
|
return ProjectGeneratorDictionary[InPlatform];
|
|
}
|
|
if (bInAllowFailure == true)
|
|
{
|
|
return null;
|
|
}
|
|
throw new BuildException("GetPlatformProjectGenerator: No PlatformProjectGenerator found for {Platform}", InPlatform.ToString());
|
|
}
|
|
|
|
/// <summary>
|
|
/// Allow various platform project generators to generate stub projects if required
|
|
/// </summary>
|
|
/// <param name="InGenerator"></param>
|
|
/// <param name="InTargetName"></param>
|
|
/// <param name="InTargetFilepath"></param>
|
|
/// <param name="InTargetRules"></param>
|
|
/// <param name="InPlatforms"></param>
|
|
/// <param name="InConfigurations"></param>
|
|
/// <returns></returns>
|
|
public bool GenerateGameProjectStubs(ProjectFileGenerator InGenerator, string InTargetName, string InTargetFilepath, TargetRules InTargetRules,
|
|
List<UnrealTargetPlatform> InPlatforms, List<UnrealTargetConfiguration> InConfigurations)
|
|
{
|
|
foreach (KeyValuePair<UnrealTargetPlatform, PlatformProjectGenerator> Entry in ProjectGeneratorDictionary)
|
|
{
|
|
PlatformProjectGenerator ProjGen = Entry.Value;
|
|
ProjGen.GenerateGameProjectStub(InGenerator, InTargetName, InTargetFilepath, InTargetRules, InPlatforms, InConfigurations);
|
|
}
|
|
return true;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Allow various platform project generators to generate any special project properties if required
|
|
/// </summary>
|
|
/// <param name="InPlatform"></param>
|
|
/// <param name="Configuration"></param>
|
|
/// <param name="TargetType"></param>
|
|
/// <param name="VCProjectFileContent"></param>
|
|
/// <param name="RootDirectory"></param>
|
|
/// <param name="TargetFilePath"></param>
|
|
/// <returns></returns>
|
|
public bool GenerateGamePlatformSpecificProperties(UnrealTargetPlatform InPlatform, UnrealTargetConfiguration Configuration, TargetType TargetType, StringBuilder VCProjectFileContent, DirectoryReference RootDirectory, FileReference TargetFilePath)
|
|
{
|
|
if (ProjectGeneratorDictionary.ContainsKey(InPlatform) == true)
|
|
{
|
|
ProjectGeneratorDictionary[InPlatform].GenerateGameProperties(Configuration, VCProjectFileContent, TargetType, RootDirectory, TargetFilePath);
|
|
}
|
|
return true;
|
|
}
|
|
|
|
public bool PlatformRequiresVSUserFileGeneration(List<UnrealTargetPlatform> InPlatforms, List<UnrealTargetConfiguration> InConfigurations)
|
|
{
|
|
bool bRequiresVSUserFileGeneration = false;
|
|
foreach (KeyValuePair<UnrealTargetPlatform, PlatformProjectGenerator> Entry in ProjectGeneratorDictionary)
|
|
{
|
|
if (InPlatforms.Contains(Entry.Key))
|
|
{
|
|
PlatformProjectGenerator ProjGen = Entry.Value;
|
|
bRequiresVSUserFileGeneration |= ProjGen.RequiresVSUserFileGeneration();
|
|
}
|
|
}
|
|
return bRequiresVSUserFileGeneration;
|
|
}
|
|
}
|
|
}
|