You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR)
#rb integration #lockdown nick.whiting [CL 4819818 by Ryan Vance in Dev-VR branch]
This commit is contained in:
@@ -1488,52 +1488,6 @@ namespace UnrealBuildTool
|
||||
return FileReference.Combine(UnrealBuildTool.EngineDirectory, "Build", "Windows", "Resources", "Default.ico");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Configures the resource compile environment for the given target
|
||||
/// </summary>
|
||||
/// <param name="ResourceCompileEnvironment">The compile environment</param>
|
||||
/// <param name="Target">The target being built</param>
|
||||
public static void SetupResourceCompileEnvironment(CppCompileEnvironment ResourceCompileEnvironment, ReadOnlyTargetRules Target)
|
||||
{
|
||||
// Figure the icon to use. We can only use a custom icon when compiling to a project-specific intemediate directory (and not for the shared editor executable, for example).
|
||||
FileReference IconFile;
|
||||
if(Target.ProjectFile != null && !ResourceCompileEnvironment.bUseSharedBuildEnvironment)
|
||||
{
|
||||
IconFile = WindowsPlatform.GetApplicationIcon(Target.ProjectFile);
|
||||
}
|
||||
else
|
||||
{
|
||||
IconFile = WindowsPlatform.GetApplicationIcon(null);
|
||||
}
|
||||
|
||||
// Setup the compile environment, setting the icon to use via a macro. This is used in Default.rc2.
|
||||
ResourceCompileEnvironment.Definitions.Add(String.Format("BUILD_ICON_FILE_NAME=\"\\\"{0}\\\"\"", IconFile.FullName.Replace("\\", "\\\\")));
|
||||
|
||||
// Apply the target settings for the resources
|
||||
if(!ResourceCompileEnvironment.bUseSharedBuildEnvironment)
|
||||
{
|
||||
if (!String.IsNullOrEmpty(Target.WindowsPlatform.CompanyName))
|
||||
{
|
||||
ResourceCompileEnvironment.Definitions.Add(String.Format("PROJECT_COMPANY_NAME={0}", SanitizeMacroValue(Target.WindowsPlatform.CompanyName)));
|
||||
}
|
||||
|
||||
if (!String.IsNullOrEmpty(Target.WindowsPlatform.CopyrightNotice))
|
||||
{
|
||||
ResourceCompileEnvironment.Definitions.Add(String.Format("PROJECT_COPYRIGHT_STRING={0}", SanitizeMacroValue(Target.WindowsPlatform.CopyrightNotice)));
|
||||
}
|
||||
|
||||
if (!String.IsNullOrEmpty(Target.WindowsPlatform.ProductName))
|
||||
{
|
||||
ResourceCompileEnvironment.Definitions.Add(String.Format("PROJECT_PRODUCT_NAME={0}", SanitizeMacroValue(Target.WindowsPlatform.ProductName)));
|
||||
}
|
||||
|
||||
if (Target.ProjectFile != null)
|
||||
{
|
||||
ResourceCompileEnvironment.Definitions.Add(String.Format("PROJECT_PRODUCT_IDENTIFIER={0}", SanitizeMacroValue(Target.ProjectFile.GetFileNameWithoutExtension())));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Modify the rules for a newly created module, in a target that's being built for this platform.
|
||||
/// This is not required - but allows for hiding details of a particular platform.
|
||||
@@ -1732,25 +1686,6 @@ namespace UnrealBuildTool
|
||||
LinkEnvironment.ModuleDefinitionFile = Target.WindowsPlatform.ModuleDefinitionFile;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Macros passed via the command line have their quotes stripped, and are tokenized before being re-stringized by the compiler. This conversion
|
||||
/// back and forth is normally ok, but certain characters such as single quotes must always be paired. Remove any such characters here.
|
||||
/// </summary>
|
||||
/// <param name="Value">The macro value</param>
|
||||
/// <returns>The sanitized value</returns>
|
||||
static string SanitizeMacroValue(string Value)
|
||||
{
|
||||
StringBuilder Result = new StringBuilder(Value.Length);
|
||||
for(int Idx = 0; Idx < Value.Length; Idx++)
|
||||
{
|
||||
if(Value[Idx] != '\'' && Value[Idx] != '\"')
|
||||
{
|
||||
Result.Append(Value[Idx]);
|
||||
}
|
||||
}
|
||||
return Result.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Setup the configuration environment for building
|
||||
/// </summary>
|
||||
@@ -1839,6 +1774,21 @@ namespace UnrealBuildTool
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Allows the platform to return various build metadata that is not tracked by other means. If the returned string changes, the makefile will be invalidated.
|
||||
/// </summary>
|
||||
/// <param name="ProjectFile">The project file being built</param>
|
||||
/// <param name="Metadata">String builder to contain build metadata</param>
|
||||
public override void GetExternalBuildMetadata(FileReference ProjectFile, StringBuilder Metadata)
|
||||
{
|
||||
base.GetExternalBuildMetadata(ProjectFile, Metadata);
|
||||
|
||||
if(ProjectFile != null)
|
||||
{
|
||||
Metadata.AppendLine("ICON: {0}", GetApplicationIcon(ProjectFile));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deploys the given target
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user