Exemplo n.º 1
0
        /// <summary>
        /// Modify the rules for a newly created module, where the target is a different host platform.
        /// This is not required - but allows for hiding details of a particular platform.
        /// </summary>
        /// <param name="ModuleName">The name of the module</param>
        /// <param name="Rules">The module rules</param>
        /// <param name="Target">The target being build</param>
        public override void ModifyModuleRulesForOtherPlatform(string ModuleName, ModuleRules Rules, ReadOnlyTargetRules Target)
        {
            if ((Target.Platform == UnrealTargetPlatform.Win32) || (Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Mac) || (Target.Platform == UnrealTargetPlatform.Linux))
            {
                bool bBuildShaderFormats = Target.bForceBuildShaderFormats;
                if (!Target.bBuildRequiresCookedData)
                {
                    if (ModuleName == "Engine")
                    {
                        if (Target.bBuildDeveloperTools)
                        {
                            Rules.DynamicallyLoadedModuleNames.Add("LuminTargetPlatform");
                        }
                    }
                    else if (ModuleName == "TargetPlatform")
                    {
                        bBuildShaderFormats = true;
                        Rules.DynamicallyLoadedModuleNames.Add("TextureFormatASTC");
                    }
                }

                // allow standalone tools to use targetplatform modules, without needing Engine
                if (ModuleName == "TargetPlatform")
                {
                    if (Target.bForceBuildTargetPlatforms)
                    {
                        Rules.DynamicallyLoadedModuleNames.Add("LuminTargetPlatform");
                    }
                }
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Allow all registered build platforms to modify the newly created module
 /// passed in for the given platform.
 /// This is not required - but allows for hiding details of a particular platform.
 /// </summary>
 /// <param name="ModuleName">The name of the module</param>
 /// <param name="Rules">The module rules</param>
 /// <param name="Target">The target being build</param>
 public static void PlatformModifyHostModuleRules(string ModuleName, ModuleRules Rules, ReadOnlyTargetRules Target)
 {
     foreach (KeyValuePair <UnrealTargetPlatform, UEBuildPlatform> PlatformEntry in BuildPlatformDictionary)
     {
         PlatformEntry.Value.ModifyModuleRulesForOtherPlatform(ModuleName, Rules, Target);
     }
 }
Exemplo n.º 3
0
        /// <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.
        /// </summary>
        /// <param name="ModuleName">The name of the module</param>
        /// <param name="Rules">The module rules</param>
        /// <param name="Target">The target being build</param>
        public override void ModifyModuleRulesForActivePlatform(string ModuleName, ModuleRules Rules, ReadOnlyTargetRules Target)
        {
            bool bBuildShaderFormats = Target.bForceBuildShaderFormats;

            if (!Target.bBuildRequiresCookedData)
            {
                if (ModuleName == "TargetPlatform")
                {
                    bBuildShaderFormats = true;
                }
            }

            // allow standalone tools to use target platform modules, without needing Engine
            if (ModuleName == "TargetPlatform")
            {
                if (Target.bForceBuildTargetPlatforms)
                {
                    Rules.DynamicallyLoadedModuleNames.Add("LinuxTargetPlatform");
                    Rules.DynamicallyLoadedModuleNames.Add("LinuxNoEditorTargetPlatform");
                    Rules.DynamicallyLoadedModuleNames.Add("LinuxClientTargetPlatform");
                    Rules.DynamicallyLoadedModuleNames.Add("LinuxServerTargetPlatform");
                    Rules.DynamicallyLoadedModuleNames.Add("AllDesktopTargetPlatform");
                }

                if (bBuildShaderFormats)
                {
                    Rules.DynamicallyLoadedModuleNames.Add("ShaderFormatOpenGL");
                    Rules.DynamicallyLoadedModuleNames.Add("VulkanShaderFormat");
                }
            }
        }
Exemplo n.º 4
0
        /// <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.
        /// </summary>
        /// <param name="ModuleName">The name of the module</param>
        /// <param name="Rules">The module rules</param>
        /// <param name="Target">The target being build</param>
        public override void ModifyModuleRulesForActivePlatform(string ModuleName, ModuleRules Rules, TargetInfo Target)
        {
            bool bBuildShaderFormats = UEBuildConfiguration.bForceBuildShaderFormats;

            if (!UEBuildConfiguration.bBuildRequiresCookedData)
            {
                if (ModuleName == "TargetPlatform")
                {
                    bBuildShaderFormats = true;
                }
            }

            // allow standalone tools to use target platform modules, without needing Engine
            if (ModuleName == "TargetPlatform")
            {
                if (UEBuildConfiguration.bForceBuildTargetPlatforms)
                {
                    Rules.DynamicallyLoadedModuleNames.Add("MacTargetPlatform");
                    Rules.DynamicallyLoadedModuleNames.Add("MacNoEditorTargetPlatform");
                    Rules.DynamicallyLoadedModuleNames.Add("MacClientTargetPlatform");
                    Rules.DynamicallyLoadedModuleNames.Add("MacServerTargetPlatform");
                    Rules.DynamicallyLoadedModuleNames.Add("AllDesktopTargetPlatform");
                }

                if (bBuildShaderFormats)
                {
                    // Rules.DynamicallyLoadedModuleNames.Add("ShaderFormatD3D");
                    Rules.DynamicallyLoadedModuleNames.Add("ShaderFormatOpenGL");
                    Rules.DynamicallyLoadedModuleNames.Add("MetalShaderFormat");

                    Rules.DynamicallyLoadedModuleNames.Remove("VulkanRHI");
                    Rules.DynamicallyLoadedModuleNames.Add("VulkanShaderFormat");
                }
            }
        }
Exemplo n.º 5
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="InName">Name of the module</param>
        /// <param name="InType">Type of the module, for UHT</param>
        /// <param name="InModuleDirectory">Base directory for the module</param>
        /// <param name="InRules">Rules for this module</param>
        /// <param name="InRulesFile">Path to the rules file</param>
        /// <param name="InRuntimeDependencies">List of runtime dependencies</param>
        public UEBuildModule(string InName, UHTModuleType InType, DirectoryReference InModuleDirectory, ModuleRules InRules, FileReference InRulesFile, List <RuntimeDependency> InRuntimeDependencies)
        {
            Name            = InName;
            Type            = InType;
            ModuleDirectory = InModuleDirectory;
            Rules           = InRules;
            RulesFile       = InRulesFile;

            ModuleApiDefine = Name.ToUpperInvariant() + "_API";

            PublicDefinitions               = HashSetFromOptionalEnumerableStringParameter(InRules.PublicDefinitions);
            PublicIncludePaths              = CreateDirectoryHashSet(InRules.PublicIncludePaths);
            PublicSystemIncludePaths        = CreateDirectoryHashSet(InRules.PublicSystemIncludePaths);
            PublicLibraryPaths              = CreateDirectoryHashSet(InRules.PublicLibraryPaths);
            PublicAdditionalLibraries       = HashSetFromOptionalEnumerableStringParameter(InRules.PublicAdditionalLibraries);
            PublicFrameworks                = HashSetFromOptionalEnumerableStringParameter(InRules.PublicFrameworks);
            PublicWeakFrameworks            = HashSetFromOptionalEnumerableStringParameter(InRules.PublicWeakFrameworks);
            PublicAdditionalFrameworks      = InRules.PublicAdditionalFrameworks == null ? new HashSet <UEBuildFramework>() : new HashSet <UEBuildFramework>(InRules.PublicAdditionalFrameworks);
            PublicAdditionalShadowFiles     = HashSetFromOptionalEnumerableStringParameter(InRules.PublicAdditionalShadowFiles);
            PublicAdditionalBundleResources = InRules.AdditionalBundleResources == null ? new HashSet <UEBuildBundleResource>() : new HashSet <UEBuildBundleResource>(InRules.AdditionalBundleResources);
            PublicDelayLoadDLLs             = HashSetFromOptionalEnumerableStringParameter(InRules.PublicDelayLoadDLLs);
            PrivateIncludePaths             = CreateDirectoryHashSet(InRules.PrivateIncludePaths);
            RuntimeDependencies             = InRuntimeDependencies;
            IsRedistributableOverride       = InRules.IsRedistributableOverride;

            WhitelistRestrictedFolders = new HashSet <DirectoryReference>(InRules.WhitelistRestrictedFolders.Select(x => DirectoryReference.Combine(ModuleDirectory, x)));
        }
Exemplo n.º 6
0
        /// <summary>
        /// Modify the rules for a newly created module, where the target is a different host platform.
        /// This is not required - but allows for hiding details of a particular platform.
        /// </summary>
        /// <param name="ModuleName">The name of the module</param>
        /// <param name="Rules">The module rules</param>
        /// <param name="Target">The target being build</param>
        public override void ModifyModuleRulesForOtherPlatform(string ModuleName, ModuleRules Rules, ReadOnlyTargetRules Target)
        {
            if ((Target.Platform == UnrealTargetPlatform.Win32) || (Target.Platform == UnrealTargetPlatform.Win64))
            {
                if (!Target.bBuildRequiresCookedData)
                {
                    if (ModuleName == "Engine")
                    {
                        if (Target.bBuildDeveloperTools)
                        {
                            Rules.DynamicallyLoadedModuleNames.Add("LinuxTargetPlatform");
                            Rules.DynamicallyLoadedModuleNames.Add("LinuxNoEditorTargetPlatform");
                            Rules.DynamicallyLoadedModuleNames.Add("LinuxClientTargetPlatform");
                            Rules.DynamicallyLoadedModuleNames.Add("LinuxServerTargetPlatform");
                        }
                    }
                }

                // allow standalone tools to use targetplatform modules, without needing Engine
                if (Target.bForceBuildTargetPlatforms && ModuleName == "TargetPlatform")
                {
                    Rules.DynamicallyLoadedModuleNames.Add("LinuxTargetPlatform");
                    Rules.DynamicallyLoadedModuleNames.Add("LinuxNoEditorTargetPlatform");
                    Rules.DynamicallyLoadedModuleNames.Add("LinuxClientTargetPlatform");
                    Rules.DynamicallyLoadedModuleNames.Add("LinuxServerTargetPlatform");
                }
            }
        }
Exemplo n.º 7
0
        /// <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.
        /// </summary>
        /// <param name="ModuleName">The name of the module</param>
        /// <param name="Rules">The module rules</param>
        /// <param name="Target">The target being build</param>
        public override void ModifyModuleRulesForActivePlatform(string ModuleName, ModuleRules Rules, ReadOnlyTargetRules Target)
        {
            bool bBuildShaderFormats = Target.bForceBuildShaderFormats;

            if (!Target.bBuildRequiresCookedData)
            {
                if (ModuleName == "TargetPlatform")
                {
                    bBuildShaderFormats = true;
                }
            }

            // allow standalone tools to use target platform modules, without needing Engine
            if (ModuleName == "TargetPlatform")
            {
                if (Target.bForceBuildTargetPlatforms)
                {
                    Rules.DynamicallyLoadedModuleNames.Add("WindowsTargetPlatform");
                    Rules.DynamicallyLoadedModuleNames.Add("WindowsNoEditorTargetPlatform");
                    Rules.DynamicallyLoadedModuleNames.Add("WindowsServerTargetPlatform");
                    Rules.DynamicallyLoadedModuleNames.Add("WindowsClientTargetPlatform");
                    Rules.DynamicallyLoadedModuleNames.Add("AllDesktopTargetPlatform");
                }

                if (bBuildShaderFormats)
                {
                    Rules.DynamicallyLoadedModuleNames.Add("ShaderFormatD3D");
                    Rules.DynamicallyLoadedModuleNames.Add("ShaderFormatOpenGL");

                    Rules.DynamicallyLoadedModuleNames.Remove("VulkanRHI");
                    Rules.DynamicallyLoadedModuleNames.Add("VulkanShaderFormat");
                }
            }

            if (ModuleName == "D3D11RHI")
            {
                // To enable platform specific D3D11 RHI Types
                Rules.PrivateIncludePaths.Add("Runtime/Windows/D3D11RHI/Private/Windows");
            }

            if (ModuleName == "D3D12RHI")
            {
                if (Target.WindowsPlatform.bPixProfilingEnabled && Target.Platform == UnrealTargetPlatform.Win64 && Target.Configuration != UnrealTargetConfiguration.Shipping && Target.Configuration != UnrealTargetConfiguration.Test)
                {
                    // Define to indicate profiling enabled (64-bit only)
                    Rules.Definitions.Add("D3D12_PROFILING_ENABLED=1");
                    Rules.Definitions.Add("PROFILE");
                }
                else
                {
                    Rules.Definitions.Add("D3D12_PROFILING_ENABLED=0");
                }

                // To enable platform specific D3D12 RHI Types
                Rules.PrivateIncludePaths.Add("Runtime/Windows/D3D12RHI/Private/Windows");
            }

            // Delay-load D3D12 so we can use the latest features and still run on downlevel versions of the OS
            Rules.PublicDelayLoadDLLs.Add("d3d12.dll");
        }
Exemplo n.º 8
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="Rules">Rules for this module</param>
        public UEBuildModule(ModuleRules Rules)
        {
            this.Rules = Rules;

            ModuleApiDefine = Name.ToUpperInvariant() + "_API";

            PublicDefinitions               = HashSetFromOptionalEnumerableStringParameter(Rules.PublicDefinitions);
            PublicIncludePaths              = CreateDirectoryHashSet(Rules.PublicIncludePaths);
            PublicSystemIncludePaths        = CreateDirectoryHashSet(Rules.PublicSystemIncludePaths);
            PublicLibraryPaths              = CreateDirectoryHashSet(Rules.PublicLibraryPaths);
            PublicAdditionalLibraries       = HashSetFromOptionalEnumerableStringParameter(Rules.PublicAdditionalLibraries);
            PublicFrameworks                = HashSetFromOptionalEnumerableStringParameter(Rules.PublicFrameworks);
            PublicWeakFrameworks            = HashSetFromOptionalEnumerableStringParameter(Rules.PublicWeakFrameworks);
            PublicAdditionalFrameworks      = Rules.PublicAdditionalFrameworks == null ? new HashSet <UEBuildFramework>() : new HashSet <UEBuildFramework>(Rules.PublicAdditionalFrameworks);
            PublicAdditionalShadowFiles     = HashSetFromOptionalEnumerableStringParameter(Rules.PublicAdditionalShadowFiles);
            PublicAdditionalBundleResources = Rules.AdditionalBundleResources == null ? new HashSet <UEBuildBundleResource>() : new HashSet <UEBuildBundleResource>(Rules.AdditionalBundleResources);
            PublicDelayLoadDLLs             = HashSetFromOptionalEnumerableStringParameter(Rules.PublicDelayLoadDLLs);
            if (Rules.bUsePrecompiled)
            {
                PrivateIncludePaths = new HashSet <DirectoryReference>();
            }
            else
            {
                PrivateIncludePaths = CreateDirectoryHashSet(Rules.PrivateIncludePaths);
            }
            IsRedistributableOverride = Rules.IsRedistributableOverride;

            WhitelistRestrictedFolders = new HashSet <DirectoryReference>(Rules.WhitelistRestrictedFolders.Select(x => DirectoryReference.Combine(ModuleDirectory, x)));
        }
Exemplo n.º 9
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="InName">Name of the module</param>
        /// <param name="InType">Type of the module, for UHT</param>
        /// <param name="InModuleDirectory">Base directory for the module</param>
        /// <param name="InRules">Rules for this module</param>
        /// <param name="InRulesFile">Path to the rules file</param>
        public UEBuildModule(string InName, UHTModuleType InType, DirectoryReference InModuleDirectory, ModuleRules InRules, FileReference InRulesFile)
        {
            Name            = InName;
            Type            = InType;
            ModuleDirectory = InModuleDirectory;
            Rules           = InRules;
            RulesFile       = InRulesFile;

            NormalizedModuleIncludePath = Utils.CleanDirectorySeparators(ModuleDirectory.MakeRelativeTo(UnrealBuildTool.EngineSourceDirectory), '/');
            ModuleApiDefine             = Name.ToUpperInvariant() + "_API";

            PublicDefinitions               = HashSetFromOptionalEnumerableStringParameter(InRules.Definitions);
            PublicIncludePaths              = HashSetFromOptionalEnumerableStringParameter(InRules.PublicIncludePaths);
            PublicSystemIncludePaths        = HashSetFromOptionalEnumerableStringParameter(InRules.PublicSystemIncludePaths);
            PublicLibraryPaths              = HashSetFromOptionalEnumerableStringParameter(InRules.PublicLibraryPaths);
            PublicAdditionalLibraries       = HashSetFromOptionalEnumerableStringParameter(InRules.PublicAdditionalLibraries);
            PublicFrameworks                = HashSetFromOptionalEnumerableStringParameter(InRules.PublicFrameworks);
            PublicWeakFrameworks            = HashSetFromOptionalEnumerableStringParameter(InRules.PublicWeakFrameworks);
            PublicAdditionalFrameworks      = InRules.PublicAdditionalFrameworks == null ? new HashSet <UEBuildFramework>() : new HashSet <UEBuildFramework>(InRules.PublicAdditionalFrameworks);
            PublicAdditionalShadowFiles     = HashSetFromOptionalEnumerableStringParameter(InRules.PublicAdditionalShadowFiles);
            PublicAdditionalBundleResources = InRules.AdditionalBundleResources == null ? new HashSet <UEBuildBundleResource>() : new HashSet <UEBuildBundleResource>(InRules.AdditionalBundleResources);
            PublicDelayLoadDLLs             = HashSetFromOptionalEnumerableStringParameter(InRules.PublicDelayLoadDLLs);
            PrivateIncludePaths             = HashSetFromOptionalEnumerableStringParameter(InRules.PrivateIncludePaths);
            RuntimeDependencies             = (InRules.RuntimeDependencies == null) ? new RuntimeDependencyList() : new RuntimeDependencyList(InRules.RuntimeDependencies);
            IsRedistributableOverride       = InRules.IsRedistributableOverride;

            WhitelistRestrictedFolders = new HashSet <DirectoryReference>(InRules.WhitelistRestrictedFolders.Select(x => DirectoryReference.Combine(ModuleDirectory, x)));
        }
Exemplo n.º 10
0
		/// <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.
		/// </summary>
		/// <param name="ModuleName">The name of the module</param>
		/// <param name="Rules">The module rules</param>
		/// <param name="Target">The target being build</param>
		public override void ModifyModuleRulesForActivePlatform(string ModuleName, ModuleRules Rules, TargetInfo Target)
		{
			bool bBuildShaderFormats = UEBuildConfiguration.bForceBuildShaderFormats;

			if (!UEBuildConfiguration.bBuildRequiresCookedData)
			{
				if (ModuleName == "TargetPlatform")
				{
					bBuildShaderFormats = true;
				}
			}

			// allow standalone tools to use target platform modules, without needing Engine
			if (ModuleName == "TargetPlatform")
			{
				if (UEBuildConfiguration.bForceBuildTargetPlatforms)
				{
					Rules.DynamicallyLoadedModuleNames.Add("MacTargetPlatform");
					Rules.DynamicallyLoadedModuleNames.Add("MacNoEditorTargetPlatform");
					Rules.DynamicallyLoadedModuleNames.Add("MacClientTargetPlatform");
					Rules.DynamicallyLoadedModuleNames.Add("MacServerTargetPlatform");
					Rules.DynamicallyLoadedModuleNames.Add("AllDesktopTargetPlatform");
				}

				if (bBuildShaderFormats)
				{
					// Rules.DynamicallyLoadedModuleNames.Add("ShaderFormatD3D");
					Rules.DynamicallyLoadedModuleNames.Add("ShaderFormatOpenGL");
					Rules.DynamicallyLoadedModuleNames.Add("MetalShaderFormat");

					Rules.DynamicallyLoadedModuleNames.Remove("VulkanRHI");
					Rules.DynamicallyLoadedModuleNames.Add("VulkanShaderFormat");
				}
			}
		}
Exemplo n.º 11
0
        /// <summary>
        /// Modify the rules for a newly created module, where the target is a different host platform.
        /// This is not required - but allows for hiding details of a particular platform.
        /// </summary>
        /// <param name="ModuleName">The name of the module</param>
        /// <param name="Rules">The module rules</param>
        /// <param name="Target">The target being build</param>
        public override void ModifyModuleRulesForOtherPlatform(string ModuleName, ModuleRules Rules, ReadOnlyTargetRules Target)
        {
            if ((Target.Platform == UnrealTargetPlatform.Win32) || (Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Mac) || (Target.Platform == UnrealTargetPlatform.Linux))
            {
                bool bBuildShaderFormats = Target.bForceBuildShaderFormats;
                if (!Target.bBuildRequiresCookedData)
                {
                    if (ModuleName == "Engine")
                    {
                        if (Target.bBuildDeveloperTools)
                        {
                            Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("AndroidTargetPlatform");
                            Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("Android_PVRTCTargetPlatform");
                            Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("Android_ATCTargetPlatform");
                            Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("Android_DXTTargetPlatform");
                            Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("Android_ETC1TargetPlatform");
                            Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("Android_ETC1aTargetPlatform");
                            Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("Android_ETC2TargetPlatform");
                            Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("Android_ASTCTargetPlatform");
                            Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("Android_MultiTargetPlatform");
                        }
                    }
                    else if (ModuleName == "TargetPlatform")
                    {
                        bBuildShaderFormats = true;
                        Rules.DynamicallyLoadedModuleNames.Add("TextureFormatPVR");
                        Rules.DynamicallyLoadedModuleNames.Add("TextureFormatDXT");
                        Rules.DynamicallyLoadedModuleNames.Add("TextureFormatASTC");
                        Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("TextureFormatAndroid");                            // ATITC, ETC1 and ETC2
                        if (Target.bBuildDeveloperTools)
                        {
                            //Rules.DynamicallyLoadedModuleNames.Add("AudioFormatADPCM");	//@todo android: android audio
                        }
                    }
                }

                // allow standalone tools to use targetplatform modules, without needing Engine
                if (ModuleName == "TargetPlatform")
                {
                    if (Target.bForceBuildTargetPlatforms)
                    {
                        Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("AndroidTargetPlatform");
                        Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("Android_PVRTCTargetPlatform");
                        Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("Android_ATCTargetPlatform");
                        Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("Android_DXTTargetPlatform");
                        Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("Android_ETC1TargetPlatform");
                        Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("Android_ETC1aTargetPlatform");
                        Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("Android_ETC2TargetPlatform");
                        Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("Android_ASTCTargetPlatform");
                        Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("Android_MultiTargetPlatform");
                    }

                    if (bBuildShaderFormats)
                    {
                        //Rules.DynamicallyLoadedModuleNames.Add("ShaderFormatAndroid");		//@todo android: ShaderFormatAndroid
                    }
                }
            }
        }
Exemplo n.º 12
0
 public PrecompileHeaderEnvironment( string InitModuleName, string InitPCHHeaderNameInCode, FileItem InitPrecompiledHeaderIncludeFilename, CPPCLRMode InitCLRMode, ModuleRules.CodeOptimization InitOptimizeCode )
 {
     ModuleName = InitModuleName;
     PCHHeaderNameInCode = InitPCHHeaderNameInCode;
     PrecompiledHeaderIncludeFilename = InitPrecompiledHeaderIncludeFilename;
     CLRMode = InitCLRMode;
     OptimizeCode = InitOptimizeCode;
 }
Exemplo n.º 13
0
        /// <summary>
        /// Creates an instance of a module rules descriptor object for the specified module name
        /// </summary>
        /// <param name="ModuleName">Name of the module</param>
        /// <param name="Target">Information about the target associated with this module</param>
        /// <param name="ReferenceChain">Chain of references leading to this module</param>
        /// <returns>Compiled module rule info</returns>
        public ModuleRules CreateModuleRules(string ModuleName, ReadOnlyTargetRules Target, string ReferenceChain)
        {
            // Currently, we expect the user's rules object type name to be the same as the module name
            string ModuleTypeName = ModuleName;

            // Make sure the module file is known to us
            FileReference ModuleFileName;

            if (!ModuleNameToModuleFile.TryGetValue(ModuleName, out ModuleFileName))
            {
                if (Parent == null)
                {
                    throw new BuildException("Could not find definition for module '{0}' (referenced via {1})", ModuleName, ReferenceChain);
                }
                else
                {
                    return(Parent.CreateModuleRules(ModuleName, Target, ReferenceChain));
                }
            }

            // The build module must define a type named 'Rules' that derives from our 'ModuleRules' type.
            Type RulesObjectType = GetModuleRulesTypeInternal(ModuleName);

            if (RulesObjectType == null)
            {
                throw new BuildException("Expecting to find a type to be declared in a module rules named '{0}' in {1}.  This type must derive from the 'ModuleRules' type defined by Unreal Build Tool.", ModuleTypeName, CompiledAssembly.FullName);
            }

            // Create an instance of the module's rules object
            try
            {
                // Create an uninitialized ModuleRules object and set some defaults.
                ModuleRules RulesObject = (ModuleRules)FormatterServices.GetUninitializedObject(RulesObjectType);
                RulesObject.Name      = ModuleName;
                RulesObject.File      = ModuleFileName;
                RulesObject.Directory = ModuleFileName.Directory;
                ModuleFileToPluginInfo.TryGetValue(RulesObject.File, out RulesObject.Plugin);
                RulesObject.bTreatAsEngineModule            = bContainsEngineModules;
                RulesObject.bUseBackwardsCompatibleDefaults = bUseBackwardsCompatibleDefaults && Target.bUseBackwardsCompatibleDefaults;
                RulesObject.bPrecompile     = (RulesObject.bTreatAsEngineModule || ModuleName.Equals("UE4Game", StringComparison.OrdinalIgnoreCase)) && Target.bPrecompile;
                RulesObject.bUsePrecompiled = bReadOnly;

                // Call the constructor
                ConstructorInfo Constructor = RulesObjectType.GetConstructor(new Type[] { typeof(ReadOnlyTargetRules) });
                if (Constructor == null)
                {
                    throw new BuildException("No valid constructor found for {0}.", ModuleName);
                }
                Constructor.Invoke(RulesObject, new object[] { Target });

                return(RulesObject);
            }
            catch (Exception Ex)
            {
                Exception MessageEx = (Ex is TargetInvocationException && Ex.InnerException != null)? Ex.InnerException : Ex;
                throw new BuildException(Ex, "Unable to instantiate module '{0}': {1}\n(referenced via {2})", ModuleName, MessageEx.ToString(), ReferenceChain);
            }
        }
Exemplo n.º 14
0
 /// <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.
 /// </summary>
 /// <param name="ModuleName">The name of the module</param>
 /// <param name="Rules">The module rules</param>
 /// <param name="Target">The target being build</param>
 public override void ModifyModuleRulesForActivePlatform(string ModuleName, ModuleRules Rules, ReadOnlyTargetRules Target)
 {
     if (ModuleName == "Core")
     {
         //Rules.PrivateDependencyModuleNames.Add("HoloLensSDK");
     }
     else if (ModuleName == "Engine")
     {
         Rules.PrivateDependencyModuleNames.Add("zlib");
         Rules.PrivateDependencyModuleNames.Add("UElibPNG");
         Rules.PublicDependencyModuleNames.Add("UEOgg");
         Rules.PublicDependencyModuleNames.Add("Vorbis");
     }
     else if (ModuleName == "D3D11RHI")
     {
         Rules.PublicDefinitions.Add("D3D11_WITH_DWMAPI=0");
         Rules.PublicDefinitions.Add("WITH_DX_PERF=0");
     }
     else if (ModuleName == "D3D12RHI")
     {
         // To enable platform specific D3D12 RHI Types
         Rules.PrivateIncludePaths.Add("Runtime/D3D12RHI/Private/HoloLens");
     }
     else if (ModuleName == "DX11")
     {
         // Clear out all the Windows include paths and libraries...
         // The HoloLensSDK module handles proper paths and libs for HoloLens.
         // However, the D3D11RHI module will include the DX11 module.
         Rules.PublicIncludePaths.Clear();
         Rules.PublicSystemLibraryPaths.Clear();
         Rules.PublicSystemLibraries.Clear();
         Rules.PublicAdditionalLibraries.Clear();
         Rules.PublicDefinitions.Remove("WITH_D3DX_LIBS=1");
         Rules.PublicDefinitions.Add("WITH_D3DX_LIBS=0");
         Rules.PublicAdditionalLibraries.Remove("X3DAudio.lib");
         Rules.PublicAdditionalLibraries.Remove("XAPOFX.lib");
     }
     else if (ModuleName == "XAudio2")
     {
         Rules.PublicDefinitions.Add("XAUDIO_SUPPORTS_XMA2WAVEFORMATEX=0");
         Rules.PublicDefinitions.Add("XAUDIO_SUPPORTS_DEVICE_DETAILS=0");
         Rules.PublicDefinitions.Add("XAUDIO2_SUPPORTS_MUSIC=0");
         Rules.PublicDefinitions.Add("XAUDIO2_SUPPORTS_SENDLIST=1");
         Rules.PublicSystemLibraries.Add("XAudio2.lib");
     }
     else if (ModuleName == "DX11Audio")
     {
         Rules.PublicAdditionalLibraries.Remove("X3DAudio.lib");
         Rules.PublicAdditionalLibraries.Remove("XAPOFX.lib");
     }
 }
Exemplo n.º 15
0
        public override void ModifyModuleRulesForOtherPlatform(string ModuleName, ModuleRules Rules, ReadOnlyTargetRules Target)
        {
            base.ModifyModuleRulesForOtherPlatform(ModuleName, Rules, Target);

            if ((Target.Platform == UnrealTargetPlatform.Win32) || (Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Mac))
            {
                // allow standalone tools to use targetplatform modules, without needing Engine
                if (Target.bForceBuildTargetPlatforms)
                {
                    // @todo tvos: Make the module
                    // InModule.AddPlatformSpecificDynamicallyLoadedModule("TVOSTargetPlatform");
                }
            }
        }
Exemplo n.º 16
0
 /// <summary>
 /// Modify the rules for a newly created module, where the target is a different host platform.
 /// This is not required - but allows for hiding details of a particular platform.
 /// </summary>
 /// <param name="ModuleName">The name of the module</param>
 /// <param name="Rules">The module rules</param>
 /// <param name="Target">The target being build</param>
 public override void ModifyModuleRulesForOtherPlatform(string ModuleName, ModuleRules Rules, TargetInfo Target)
 {
     if (Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.Mac)
     {
         // allow standalone tools to use targetplatform modules, without needing Engine
         if ((!UEBuildConfiguration.bBuildRequiresCookedData &&
              ModuleName == "Engine" &&
              UEBuildConfiguration.bBuildDeveloperTools) ||
             (UEBuildConfiguration.bForceBuildTargetPlatforms && ModuleName == "TargetPlatform"))
         {
             Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("HTML5TargetPlatform");
         }
     }
 }
Exemplo n.º 17
0
 /// <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.
 /// </summary>
 /// <param name="ModuleName">The name of the module</param>
 /// <param name="Rules">The module rules</param>
 /// <param name="Target">The target being build</param>
 public override void ModifyModuleRulesForActivePlatform(string ModuleName, ModuleRules Rules, TargetInfo Target)
 {
     if (ModuleName == "Core")
     {
         Rules.PublicIncludePaths.Add("Runtime/Core/Public/HTML5");
         Rules.PublicDependencyModuleNames.Add("zlib");
     }
     else if (ModuleName == "Engine")
     {
         Rules.PrivateDependencyModuleNames.Add("zlib");
         Rules.PrivateDependencyModuleNames.Add("UElibPNG");
         Rules.PublicDependencyModuleNames.Add("UEOgg");
         Rules.PublicDependencyModuleNames.Add("Vorbis");
     }
 }
Exemplo n.º 18
0
		/// <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.
		/// </summary>
		/// <param name="ModuleName">The name of the module</param>
		/// <param name="Rules">The module rules</param>
		/// <param name="Target">The target being build</param>
		public override void ModifyModuleRulesForActivePlatform(string ModuleName, ModuleRules Rules, TargetInfo Target)
		{
			if (ModuleName == "Core")
			{
				Rules.PublicIncludePaths.Add("Runtime/Core/Public/HTML5");
				Rules.PublicDependencyModuleNames.Add("zlib");
			}
			else if (ModuleName == "Engine")
			{
				Rules.PrivateDependencyModuleNames.Add("zlib");
				Rules.PrivateDependencyModuleNames.Add("UElibPNG");
				Rules.PublicDependencyModuleNames.Add("UEOgg");
				Rules.PublicDependencyModuleNames.Add("Vorbis");
			}
		}
        /// <summary>
        /// Modify the rules for a newly created module, where the target is a different host platform.
        /// This is not required - but allows for hiding details of a particular platform.
        /// </summary>
        /// <param name="ModuleName">The name of the module</param>
        /// <param name="Rules">The module rules</param>
        /// <param name="Target">The target being build</param>
        public override void ModifyModuleRulesForOtherPlatform(string ModuleName, ModuleRules Rules, ReadOnlyTargetRules Target)
        {
            // don't do any target platform stuff if SDK is not available
            if (!UEBuildPlatform.IsPlatformAvailable(Platform))
            {
                return;
            }

            if ((Target.Platform == UnrealTargetPlatform.Win32) || (Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Mac) || (Target.Platform == UnrealTargetPlatform.Linux))
            {
                bool bBuildShaderFormats = Target.bForceBuildShaderFormats;
                if (!Target.bBuildRequiresCookedData)
                {
                    if (ModuleName == "Engine")
                    {
                        if (Target.bBuildDeveloperTools)
                        {
                            Rules.DynamicallyLoadedModuleNames.Add("AndroidTargetPlatform");
                        }
                    }
                    else if (ModuleName == "TargetPlatform")
                    {
                        bBuildShaderFormats = true;
                        Rules.DynamicallyLoadedModuleNames.Add("TextureFormatDXT");
                        Rules.DynamicallyLoadedModuleNames.Add("TextureFormatASTC");
                        Rules.DynamicallyLoadedModuleNames.Add("TextureFormatAndroid");                          // ETC2
                        if (Target.bBuildDeveloperTools)
                        {
                            //Rules.DynamicallyLoadedModuleNames.Add("AudioFormatADPCM");	//@todo android: android audio
                        }
                    }
                }

                // allow standalone tools to use targetplatform modules, without needing Engine
                if (ModuleName == "TargetPlatform")
                {
                    if (Target.bForceBuildTargetPlatforms)
                    {
                        Rules.DynamicallyLoadedModuleNames.Add("AndroidTargetPlatform");
                    }

                    if (bBuildShaderFormats)
                    {
                        //Rules.DynamicallyLoadedModuleNames.Add("ShaderFormatAndroid");		//@todo android: ShaderFormatAndroid
                    }
                }
            }
        }
Exemplo n.º 20
0
 public UEBuildModuleExternal(
     UHTModuleType InType,
     string InName,
     DirectoryReference InModuleDirectory,
     ModuleRules InRules,
     FileReference InRulesFile
     )
     : base(
         InType: InType,
         InName: InName,
         InModuleDirectory: InModuleDirectory,
         InRules: InRules,
         InRulesFile: InRulesFile
         )
 {
 }
Exemplo n.º 21
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="Rules">Rules for this module</param>
        public UEBuildModule(ModuleRules Rules)
        {
            this.Rules = Rules;

            ModuleApiDefine = Name.ToUpperInvariant() + "_API";

            PublicDefinitions         = HashSetFromOptionalEnumerableStringParameter(Rules.PublicDefinitions);
            PublicIncludePaths        = CreateDirectoryHashSet(Rules.PublicIncludePaths);
            PublicSystemIncludePaths  = CreateDirectoryHashSet(Rules.PublicSystemIncludePaths);
            PublicLibraryPaths        = CreateDirectoryHashSet(Rules.PublicLibraryPaths);
            PublicAdditionalLibraries = HashSetFromOptionalEnumerableStringParameter(Rules.PublicAdditionalLibraries);
            PublicFrameworks          = HashSetFromOptionalEnumerableStringParameter(Rules.PublicFrameworks);
            PublicWeakFrameworks      = HashSetFromOptionalEnumerableStringParameter(Rules.PublicWeakFrameworks);

            PublicAdditionalFrameworks = new HashSet <UEBuildFramework>();
            if (Rules.PublicAdditionalFrameworks != null)
            {
                foreach (ModuleRules.Framework FrameworkRules in Rules.PublicAdditionalFrameworks)
                {
                    UEBuildFramework Framework;
                    if (String.IsNullOrEmpty(FrameworkRules.ZipPath))
                    {
                        Framework = new UEBuildFramework(FrameworkRules.Name, FrameworkRules.CopyBundledAssets);
                    }
                    else
                    {
                        Framework = new UEBuildFramework(FrameworkRules.Name, FileReference.Combine(ModuleDirectory, FrameworkRules.ZipPath), DirectoryReference.Combine(UnrealBuildTool.EngineDirectory, "Intermediate", "UnzippedFrameworks", Name, Path.GetFileNameWithoutExtension(FrameworkRules.ZipPath)), FrameworkRules.CopyBundledAssets);
                    }
                    PublicAdditionalFrameworks.Add(Framework);
                }
            }

            PublicAdditionalBundleResources = Rules.AdditionalBundleResources == null ? new HashSet <UEBuildBundleResource>() : new HashSet <UEBuildBundleResource>(Rules.AdditionalBundleResources.Select(x => new UEBuildBundleResource(x)));
            PublicDelayLoadDLLs             = HashSetFromOptionalEnumerableStringParameter(Rules.PublicDelayLoadDLLs);
            if (Rules.bUsePrecompiled)
            {
                PrivateIncludePaths = new HashSet <DirectoryReference>();
            }
            else
            {
                PrivateIncludePaths = CreateDirectoryHashSet(Rules.PrivateIncludePaths);
            }
            IsRedistributableOverride = Rules.IsRedistributableOverride;

            WhitelistRestrictedFolders = new HashSet <DirectoryReference>(Rules.WhitelistRestrictedFolders.Select(x => DirectoryReference.Combine(ModuleDirectory, x)));
        }
Exemplo n.º 22
0
 /// <summary>
 /// Modify the rules for a newly created module, where the target is a different host platform.
 /// This is not required - but allows for hiding details of a particular platform.
 /// </summary>
 /// <param name="ModuleName">The name of the module</param>
 /// <param name="Rules">The module rules</param>
 /// <param name="Target">The target being build</param>
 public override void ModifyModuleRulesForOtherPlatform(string ModuleName, ModuleRules Rules, ReadOnlyTargetRules Target)
 {
     if (Target.Platform == UnrealTargetPlatform.Win32 ||
         Target.Platform == UnrealTargetPlatform.Win64 ||
         Target.Platform == UnrealTargetPlatform.Mac ||
         Target.Platform == UnrealTargetPlatform.Linux)
     {
         // allow standalone tools to use targetplatform modules, without needing Engine
         if ((!Target.bBuildRequiresCookedData &&
              ModuleName == "Engine" &&
              Target.bBuildDeveloperTools) ||
             (Target.bForceBuildTargetPlatforms && ModuleName == "TargetPlatform"))
         {
             Rules.DynamicallyLoadedModuleNames.Add("HTML5TargetPlatform");
         }
     }
 }
Exemplo n.º 23
0
 public UEBuildModuleExternal(
     UHTModuleType InType,
     string InName,
     DirectoryReference InModuleDirectory,
     ModuleRules InRules,
     FileReference InRulesFile,
     List <RuntimeDependency> InRuntimeDependencies
     )
     : base(
         InType: InType,
         InName: InName,
         InModuleDirectory: InModuleDirectory,
         InRules: InRules,
         InRulesFile: InRulesFile,
         InRuntimeDependencies: InRuntimeDependencies
         )
 {
 }
Exemplo n.º 24
0
        /// <summary>
        /// Modify the rules for a newly created module, where the target is a different host platform.
        /// This is not required - but allows for hiding details of a particular platform.
        /// </summary>
        /// <param name="ModuleName">The name of the module</param>
        /// <param name="Rules">The module rules</param>
        /// <param name="Target">The target being build</param>
        public override void ModifyModuleRulesForOtherPlatform(string ModuleName, ModuleRules Rules, ReadOnlyTargetRules Target)
        {
            if ((Target.Platform == UnrealTargetPlatform.Win32) || (Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Mac))
            {
                bool bBuildShaderFormats = Target.bForceBuildShaderFormats;
                if (!Target.bBuildRequiresCookedData)
                {
                    if (ModuleName == "Engine")
                    {
                        if (Target.bBuildDeveloperTools)
                        {
                            Rules.DynamicallyLoadedModuleNames.Add("IOSTargetPlatform");
                            Rules.DynamicallyLoadedModuleNames.Add("TVOSTargetPlatform");
                        }
                    }
                    else if (ModuleName == "TargetPlatform")
                    {
                        bBuildShaderFormats = true;
                        Rules.DynamicallyLoadedModuleNames.Add("TextureFormatPVR");
                        Rules.DynamicallyLoadedModuleNames.Add("TextureFormatASTC");
                        Rules.DynamicallyLoadedModuleNames.Add("TextureFormatETC2");
                        if (Target.bBuildDeveloperTools && Target.bCompileAgainstEngine)
                        {
                            Rules.DynamicallyLoadedModuleNames.Add("AudioFormatADPCM");
                        }
                    }
                }

                // allow standalone tools to use targetplatform modules, without needing Engine
                if (ModuleName == "TargetPlatform")
                {
                    if (Target.bForceBuildTargetPlatforms)
                    {
                        Rules.DynamicallyLoadedModuleNames.Add("IOSTargetPlatform");
                        Rules.DynamicallyLoadedModuleNames.Add("TVOSTargetPlatform");
                    }

                    if (bBuildShaderFormats)
                    {
                        Rules.DynamicallyLoadedModuleNames.Add("MetalShaderFormat");
                    }
                }
            }
        }
Exemplo n.º 25
0
        /// <summary>
        /// Modify the rules for a newly created module, where the target is a different host platform.
        /// This is not required - but allows for hiding details of a particular platform.
        /// </summary>
        /// <param name="ModuleName">The name of the module</param>
        /// <param name="Rules">The module rules</param>
        /// <param name="Target">The target being build</param>
        public override void ModifyModuleRulesForOtherPlatform(string ModuleName, ModuleRules Rules, TargetInfo Target)
        {
            if ((Target.Platform == UnrealTargetPlatform.Win32) || (Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Mac))
            {
                bool bBuildShaderFormats = UEBuildConfiguration.bForceBuildShaderFormats;
                if (!UEBuildConfiguration.bBuildRequiresCookedData)
                {
                    if (ModuleName == "Engine")
                    {
                        if (UEBuildConfiguration.bBuildDeveloperTools)
                        {
                            Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("IOSTargetPlatform");
                            Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("TVOSTargetPlatform");
                        }
                    }
                    else if (ModuleName == "TargetPlatform")
                    {
                        bBuildShaderFormats = true;
                        Rules.DynamicallyLoadedModuleNames.Add("TextureFormatPVR");
                        Rules.DynamicallyLoadedModuleNames.Add("TextureFormatASTC");
                        if (UEBuildConfiguration.bBuildDeveloperTools)
                        {
                            Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("AudioFormatADPCM");
                        }
                    }
                }

                // allow standalone tools to use targetplatform modules, without needing Engine
                if (ModuleName == "TargetPlatform")
                {
                    if (UEBuildConfiguration.bForceBuildTargetPlatforms)
                    {
                        Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("IOSTargetPlatform");
                        Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("TVOSTargetPlatform");
                    }

                    if (bBuildShaderFormats)
                    {
                        Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("MetalShaderFormat");
                    }
                }
            }
        }
Exemplo n.º 26
0
 /// <summary>
 /// Modify the rules for a newly created module, where the target is a different host platform.
 /// This is not required - but allows for hiding details of a particular platform.
 /// </summary>
 /// <param name="ModuleName">The name of the module</param>
 /// <param name="Rules">The module rules</param>
 /// <param name="Target">The target being build</param>
 public override void ModifyModuleRulesForOtherPlatform(string ModuleName, ModuleRules Rules, ReadOnlyTargetRules Target)
 {
     if (Target.Platform == UnrealTargetPlatform.Win64)
     {
         if (ProjectFileGenerator.bGenerateProjectFiles)
         {
             // Use latest SDK for Intellisense purposes
             WindowsCompiler CompilerForSdkRestriction = Target.HoloLensPlatform.Compiler != WindowsCompiler.Default ? Target.HoloLensPlatform.Compiler : Target.WindowsPlatform.Compiler;
             if (CompilerForSdkRestriction != WindowsCompiler.Default)
             {
                 Version            OutWin10SDKVersion;
                 DirectoryReference OutSdkDir;
                 if (WindowsExports.TryGetWindowsSdkDir(Target.HoloLensPlatform.Win10SDKVersionString, out OutWin10SDKVersion, out OutSdkDir))
                 {
                     Rules.PublicDefinitions.Add(string.Format("WIN10_SDK_VERSION={0}", OutWin10SDKVersion.Build));
                 }
             }
         }
     }
 }
Exemplo n.º 27
0
        /// <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.
        /// </summary>
        /// <param name="ModuleName">The name of the module</param>
        /// <param name="Rules">The module rules</param>
        /// <param name="Target">The target being build</param>
        public override void ModifyModuleRulesForActivePlatform(string ModuleName, ModuleRules Rules, ReadOnlyTargetRules Target)
        {
            bool bBuildShaderFormats = Target.bForceBuildShaderFormats;

            if (!Target.bBuildRequiresCookedData)
            {
                if (ModuleName == "TargetPlatform")
                {
                    bBuildShaderFormats = true;
                }
            }

            // allow standalone tools to use target platform modules, without needing Engine
            if (ModuleName == "TargetPlatform")
            {
                if (Target.bForceBuildTargetPlatforms)
                {
                    Rules.DynamicallyLoadedModuleNames.Add("LinuxTargetPlatform");
                    Rules.DynamicallyLoadedModuleNames.Add("LinuxNoEditorTargetPlatform");
                    Rules.DynamicallyLoadedModuleNames.Add("LinuxClientTargetPlatform");
                    Rules.DynamicallyLoadedModuleNames.Add("LinuxServerTargetPlatform");
                    Rules.DynamicallyLoadedModuleNames.Add("AllDesktopTargetPlatform");
                }

                if (bBuildShaderFormats)
                {
                    // Rules.DynamicallyLoadedModuleNames.Add("ShaderFormatD3D");
                    Rules.DynamicallyLoadedModuleNames.Add("ShaderFormatOpenGL");
                    Rules.DynamicallyLoadedModuleNames.Add("VulkanShaderFormat");
                }
            }
            else if (ModuleName == "Launch")
            {
                // this is a hack to influence symbol resolution on Linux that results in global delete being called from within CEF
                if (Target.LinkType != TargetLinkType.Monolithic && Target.bCompileCEF3)
                {
                    Rules.AddEngineThirdPartyPrivateStaticDependencies(Target, "CEF3");
                }
            }
        }
Exemplo n.º 28
0
        /// <summary>
        /// Modify the rules for a newly created module, where the target is a different host platform.
        /// This is not required - but allows for hiding details of a particular platform.
        /// </summary>
        /// <param name="ModuleName">The name of the module</param>
        /// <param name="Rules">The module rules</param>
        /// <param name="Target">The target being build</param>
        public override void ModifyModuleRulesForOtherPlatform(string ModuleName, ModuleRules Rules, ReadOnlyTargetRules Target)
        {
            // don't do any target platform stuff if SDK is not available
            if (!UEBuildPlatform.IsPlatformAvailable(Platform))
            {
                return;
            }

            if ((Target.Platform == UnrealTargetPlatform.Win32) || (Target.Platform == UnrealTargetPlatform.Win64))
            {
                if (!Target.bBuildRequiresCookedData)
                {
                    if (ModuleName == "Engine")
                    {
                        if (Target.bBuildDeveloperTools)
                        {
                            Rules.DynamicallyLoadedModuleNames.Add("LinuxTargetPlatform");
                            Rules.DynamicallyLoadedModuleNames.Add("LinuxNoEditorTargetPlatform");
                            Rules.DynamicallyLoadedModuleNames.Add("LinuxAArch64NoEditorTargetPlatform");
                            Rules.DynamicallyLoadedModuleNames.Add("LinuxClientTargetPlatform");
                            Rules.DynamicallyLoadedModuleNames.Add("LinuxAArch64ClientTargetPlatform");
                            Rules.DynamicallyLoadedModuleNames.Add("LinuxServerTargetPlatform");
                            Rules.DynamicallyLoadedModuleNames.Add("LinuxAArch64ServerTargetPlatform");
                        }
                    }
                }

                // allow standalone tools to use targetplatform modules, without needing Engine
                if (Target.bForceBuildTargetPlatforms && ModuleName == "TargetPlatform")
                {
                    Rules.DynamicallyLoadedModuleNames.Add("LinuxTargetPlatform");
                    Rules.DynamicallyLoadedModuleNames.Add("LinuxNoEditorTargetPlatform");
                    Rules.DynamicallyLoadedModuleNames.Add("LinuxAArch64NoEditorTargetPlatform");
                    Rules.DynamicallyLoadedModuleNames.Add("LinuxClientTargetPlatform");
                    Rules.DynamicallyLoadedModuleNames.Add("LinuxAArch64ClientTargetPlatform");
                    Rules.DynamicallyLoadedModuleNames.Add("LinuxServerTargetPlatform");
                    Rules.DynamicallyLoadedModuleNames.Add("LinuxAArch64ServerTargetPlatform");
                }
            }
        }
Exemplo n.º 29
0
        /// <summary>
        /// Modify the rules for a newly created module, where the target is a different host platform.
        /// This is not required - but allows for hiding details of a particular platform.
        /// </summary>
        /// <param name="ModuleName">The name of the module</param>
        /// <param name="Rules">The module rules</param>
        /// <param name="Target">The target being build</param>
        public override void ModifyModuleRulesForOtherPlatform(string ModuleName, ModuleRules Rules, ReadOnlyTargetRules Target)
        {
            // This code has been removed because it causes a full rebuild after generating project files (since response files are overwritten with different defines).
#if false
            if (Target.Platform == UnrealTargetPlatform.Win64)
            {
                if (ProjectFileGenerator.bGenerateProjectFiles)
                {
                    // Use latest SDK for Intellisense purposes
                    WindowsCompiler CompilerForSdkRestriction = Target.HoloLensPlatform.Compiler != WindowsCompiler.Default ? Target.HoloLensPlatform.Compiler : Target.WindowsPlatform.Compiler;
                    if (CompilerForSdkRestriction != WindowsCompiler.Default)
                    {
                        Version            OutWin10SDKVersion;
                        DirectoryReference OutSdkDir;
                        if (WindowsExports.TryGetWindowsSdkDir(Target.HoloLensPlatform.Win10SDKVersionString, out OutWin10SDKVersion, out OutSdkDir))
                        {
                            Rules.PublicDefinitions.Add(string.Format("WIN10_SDK_VERSION={0}", OutWin10SDKVersion.Build));
                        }
                    }
                }
            }
#endif
        }
Exemplo n.º 30
0
		/// <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.
		/// </summary>
		/// <param name="ModuleName">The name of the module</param>
		/// <param name="Rules">The module rules</param>
		/// <param name="Target">The target being build</param>
		public override void ModifyModuleRulesForActivePlatform(string ModuleName, ModuleRules Rules, TargetInfo Target)
		{
		}
Exemplo n.º 31
0
 public UEBuildModuleExternal(ModuleRules Rules, DirectoryReference IntermediateDirectory)
     : base(Rules, IntermediateDirectory)
 {
 }
Exemplo n.º 32
0
		/// <summary>
		/// Modify the rules for a newly created module, where the target is a different host platform.
		/// This is not required - but allows for hiding details of a particular platform.
		/// </summary>
		/// <param name="ModuleName">The name of the module</param>
		/// <param name="Rules">The module rules</param>
		/// <param name="Target">The target being build</param>
		public override void ModifyModuleRulesForOtherPlatform(string ModuleName, ModuleRules Rules, TargetInfo Target)
		{
			if ((Target.Platform == UnrealTargetPlatform.Win32) || (Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Mac) || (Target.Platform == UnrealTargetPlatform.Linux))
			{
				bool bBuildShaderFormats = UEBuildConfiguration.bForceBuildShaderFormats;
				if (!UEBuildConfiguration.bBuildRequiresCookedData)
				{
					if (ModuleName == "Engine")
					{
						if (UEBuildConfiguration.bBuildDeveloperTools)
						{
							Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("AndroidTargetPlatform");
							Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("Android_PVRTCTargetPlatform");
							Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("Android_ATCTargetPlatform");
							Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("Android_DXTTargetPlatform");
							Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("Android_ETC1TargetPlatform");
							Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("Android_ETC2TargetPlatform");
							Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("Android_ASTCTargetPlatform");
							Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("Android_MultiTargetPlatform");
						}
					}
					else if (ModuleName == "TargetPlatform")
					{
						bBuildShaderFormats = true;
						Rules.DynamicallyLoadedModuleNames.Add("TextureFormatPVR");
						Rules.DynamicallyLoadedModuleNames.Add("TextureFormatDXT");
						Rules.DynamicallyLoadedModuleNames.Add("TextureFormatASTC");
						Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("TextureFormatAndroid");    // ATITC, ETC1 and ETC2
						if (UEBuildConfiguration.bBuildDeveloperTools)
						{
							//Rules.DynamicallyLoadedModuleNames.Add("AudioFormatADPCM");	//@todo android: android audio
						}
					}
				}

				// allow standalone tools to use targetplatform modules, without needing Engine
				if (ModuleName == "TargetPlatform")
				{
					if (UEBuildConfiguration.bForceBuildTargetPlatforms)
					{
						Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("AndroidTargetPlatform");
						Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("Android_PVRTCTargetPlatform");
						Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("Android_ATCTargetPlatform");
						Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("Android_DXTTargetPlatform");
						Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("Android_ETC1TargetPlatform");
						Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("Android_ETC2TargetPlatform");
						Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("Android_ASTCTargetPlatform");
						Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("Android_MultiTargetPlatform");
					}

					if (bBuildShaderFormats)
					{
						//Rules.DynamicallyLoadedModuleNames.Add("ShaderFormatAndroid");		//@todo android: ShaderFormatAndroid
					}
				}
			}
		}
Exemplo n.º 33
0
        public UEBuildModuleCPPCLR(
			UEBuildTarget InTarget,
			string InName,
			UEBuildModuleType InType,
			string InModuleDirectory,
			string InGeneratedCodeDirectory,
			bool? InIsRedistributableOverride,
			IntelliSenseGatherer InIntelliSenseGatherer,
			IEnumerable<FileItem> InSourceFiles,
			IEnumerable<string> InPublicIncludePaths,
			IEnumerable<string> InPublicSystemIncludePaths,
			IEnumerable<string> InDefinitions,
			IEnumerable<string> InPrivateAssemblyReferences,
			IEnumerable<string> InPublicIncludePathModuleNames,
			IEnumerable<string> InPublicDependencyModuleNames,
			IEnumerable<string> InPublicDelayLoadDLLs,
			IEnumerable<string> InPublicAdditionalLibraries,
			IEnumerable<string> InPublicFrameworks,
			IEnumerable<string> InPublicWeakFrameworks,
			IEnumerable<UEBuildFramework> InPublicAdditionalFrameworks,
			IEnumerable<string> InPublicAdditionalShadowFiles,
			IEnumerable<UEBuildBundleResource> InPublicAdditionalBundleResources,
			IEnumerable<string> InPrivateIncludePaths,
			IEnumerable<string> InPrivateIncludePathModuleNames,
			IEnumerable<string> InPrivateDependencyModuleNames,
			IEnumerable<string> InCircularlyReferencedDependentModules,
			IEnumerable<string> InDynamicallyLoadedModuleNames,
            IEnumerable<string> InPlatformSpecificDynamicallyLoadedModuleNames,
			IEnumerable<RuntimeDependency> InRuntimeDependencies,
            ModuleRules.CodeOptimization InOptimizeCode,
			bool InAllowSharedPCH,
			string InSharedPCHHeaderFile,
			bool InUseRTTI,
			bool InEnableBufferSecurityChecks,
			bool InFasterWithoutUnity,
			int InMinFilesUsingPrecompiledHeaderOverride,
			bool InEnableExceptions,
			bool InEnableShadowVariableWarnings,
			bool bInBuildSourceFiles,
			string InBuildCsFilename,
			bool bInUseAVX
			)
            : base(InTarget,InName,InType,InModuleDirectory,InGeneratedCodeDirectory,InIsRedistributableOverride,InIntelliSenseGatherer,
			InSourceFiles,InPublicIncludePaths,InPublicSystemIncludePaths,null,InDefinitions,
			InPublicIncludePathModuleNames,InPublicDependencyModuleNames,InPublicDelayLoadDLLs,InPublicAdditionalLibraries,InPublicFrameworks,InPublicWeakFrameworks,InPublicAdditionalFrameworks,InPublicAdditionalShadowFiles,InPublicAdditionalBundleResources,
			InPrivateIncludePaths,InPrivateIncludePathModuleNames,InPrivateDependencyModuleNames,
            InCircularlyReferencedDependentModules, InDynamicallyLoadedModuleNames, InPlatformSpecificDynamicallyLoadedModuleNames, InRuntimeDependencies, InOptimizeCode,
			InAllowSharedPCH, InSharedPCHHeaderFile, InUseRTTI, InEnableBufferSecurityChecks, InFasterWithoutUnity, InMinFilesUsingPrecompiledHeaderOverride, true,
			InEnableExceptions, InEnableShadowVariableWarnings, bInBuildSourceFiles, InBuildCsFilename, bInUseAVX)
        {
            PrivateAssemblyReferences = HashSetFromOptionalEnumerableStringParameter(InPrivateAssemblyReferences);
        }
Exemplo n.º 34
0
		/// <summary>
		/// Modify the rules for a newly created module, where the target is a different host platform.
		/// This is not required - but allows for hiding details of a particular platform.
		/// </summary>
		/// <param name="ModuleName">The name of the module</param>
		/// <param name="Rules">The module rules</param>
		/// <param name="Target">The target being build</param>
		public override void ModifyModuleRulesForOtherPlatform(string ModuleName, ModuleRules Rules, TargetInfo Target)
		{
			if (Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.Mac)
			{
				// allow standalone tools to use targetplatform modules, without needing Engine
				if ((!UEBuildConfiguration.bBuildRequiresCookedData
					&& ModuleName == "Engine"
					&& UEBuildConfiguration.bBuildDeveloperTools)
					|| (UEBuildConfiguration.bForceBuildTargetPlatforms && ModuleName == "TargetPlatform"))
				{
					Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("HTML5TargetPlatform");
				}
			}
		}
Exemplo n.º 35
0
 /// <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.
 /// </summary>
 /// <param name="ModuleName">The name of the module</param>
 /// <param name="Rules">The module rules</param>
 /// <param name="Target">The target being build</param>
 public override void ModifyModuleRulesForActivePlatform(string ModuleName, ModuleRules Rules, ReadOnlyTargetRules Target)
 {
     // may need to put some stuff in here to keep Lumin out of other module .cs files
 }
Exemplo n.º 36
0
        public UEBuildModuleCPP(
			UEBuildTarget InTarget,
			string InName,
			UEBuildModuleType InType,
			string InModuleDirectory,
			string InGeneratedCodeDirectory,
			bool? InIsRedistributableOverride,
			IntelliSenseGatherer InIntelliSenseGatherer,
			IEnumerable<FileItem> InSourceFiles,
			IEnumerable<string> InPublicIncludePaths,
			IEnumerable<string> InPublicSystemIncludePaths,
            IEnumerable<string> InPublicLibraryPaths,
			IEnumerable<string> InDefinitions,
			IEnumerable<string> InPublicIncludePathModuleNames,
			IEnumerable<string> InPublicDependencyModuleNames,
			IEnumerable<string> InPublicDelayLoadDLLs,
			IEnumerable<string> InPublicAdditionalLibraries,
			IEnumerable<string> InPublicFrameworks,
			IEnumerable<string> InPublicWeakFrameworks,
			IEnumerable<UEBuildFramework> InPublicAdditionalFrameworks,
			IEnumerable<string> InPublicAdditionalShadowFiles,
			IEnumerable<UEBuildBundleResource> InPublicAdditionalBundleResources,
			IEnumerable<string> InPrivateIncludePaths,
			IEnumerable<string> InPrivateIncludePathModuleNames,
			IEnumerable<string> InPrivateDependencyModuleNames,
			IEnumerable<string> InCircularlyReferencedDependentModules,
			IEnumerable<string> InDynamicallyLoadedModuleNames,
            IEnumerable<string> InPlatformSpecificDynamicallyLoadedModuleNames,
			IEnumerable<RuntimeDependency> InRuntimeDependencies,
            ModuleRules.CodeOptimization InOptimizeCode,
			bool InAllowSharedPCH,
			string InSharedPCHHeaderFile,
			bool InUseRTTI,
			bool InEnableBufferSecurityChecks,
			bool InFasterWithoutUnity,
			int InMinFilesUsingPrecompiledHeaderOverride,
			bool InBuildLocallyWithSNDBS,
			bool InEnableExceptions,
			bool InEnableShadowVariableWarnings,
			bool bInBuildSourceFiles,
			string InBuildCsFilename,
			bool bInUseAVX
			)
            : base(InTarget,
					InName, 
					InType,
					InModuleDirectory,
					InIsRedistributableOverride,
					InDefinitions, 
					InPublicIncludePaths,
					InPublicSystemIncludePaths, 
					InPublicLibraryPaths, 
					InPublicAdditionalLibraries,
					InPublicFrameworks,
					InPublicWeakFrameworks,
					InPublicAdditionalFrameworks,
					InPublicAdditionalShadowFiles,
					InPublicAdditionalBundleResources,
					InPublicIncludePathModuleNames,
					InPublicDependencyModuleNames,
					InPublicDelayLoadDLLs,
					InPrivateIncludePaths, 
					InPrivateIncludePathModuleNames,
					InPrivateDependencyModuleNames, 
					InCircularlyReferencedDependentModules,
					InDynamicallyLoadedModuleNames,
                    InPlatformSpecificDynamicallyLoadedModuleNames,
					InRuntimeDependencies,
					InBuildCsFilename)
        {
            GeneratedCodeDirectory = InGeneratedCodeDirectory;
            IntelliSenseGatherer = InIntelliSenseGatherer;

            CategorizeSourceFiles(InSourceFiles, SourceFilesFound);
            if (bInBuildSourceFiles)
            {
                SourceFilesToBuild.CopyFrom(SourceFilesFound);
            }

            Definitions = HashSetFromOptionalEnumerableStringParameter(InDefinitions);
            foreach (var Def in Definitions)
            {
                Log.TraceVerbose("Compile Env {0}: {1}", Name, Def);
            }
            OptimizeCode                           = InOptimizeCode;
            bAllowSharedPCH                        = InAllowSharedPCH;
            SharedPCHHeaderFile                    = InSharedPCHHeaderFile;
            bUseRTTI                               = InUseRTTI;
            bUseAVX                                = bInUseAVX;
            bEnableBufferSecurityChecks 		   = InEnableBufferSecurityChecks;
            bFasterWithoutUnity                    = InFasterWithoutUnity;
            MinFilesUsingPrecompiledHeaderOverride = InMinFilesUsingPrecompiledHeaderOverride;
            bBuildLocallyWithSNDBS				   = InBuildLocallyWithSNDBS;
            bEnableExceptions                      = InEnableExceptions;
            bEnableShadowVariableWarnings          = InEnableShadowVariableWarnings;
        }
Exemplo n.º 37
0
		/// <summary>
		/// Modify the rules for a newly created module, where the target is a different host platform.
		/// This is not required - but allows for hiding details of a particular platform.
		/// </summary>
		/// <param name="ModuleName">The name of the module</param>
		/// <param name="Rules">The module rules</param>
		/// <param name="Target">The target being build</param>
		public override void ModifyModuleRulesForOtherPlatform(string ModuleName, ModuleRules Rules, TargetInfo Target)
		{
			if ((Target.Platform == UnrealTargetPlatform.Win32) || (Target.Platform == UnrealTargetPlatform.Win64))
			{
				if (!UEBuildConfiguration.bBuildRequiresCookedData)
				{
					if (ModuleName == "Engine")
					{
						if (UEBuildConfiguration.bBuildDeveloperTools)
						{
							Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("LinuxTargetPlatform");
							Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("LinuxNoEditorTargetPlatform");
							Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("LinuxClientTargetPlatform");
							Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("LinuxServerTargetPlatform");
						}
					}
				}

				// allow standalone tools to use targetplatform modules, without needing Engine
				if (UEBuildConfiguration.bForceBuildTargetPlatforms && ModuleName == "TargetPlatform")
				{
					Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("LinuxTargetPlatform");
					Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("LinuxNoEditorTargetPlatform");
					Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("LinuxClientTargetPlatform");
					Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("LinuxServerTargetPlatform");
				}
			}
		}
Exemplo n.º 38
0
        protected virtual UEBuildModule InstantiateModule(
			ModuleRules          RulesObject,
			string               ModuleName,
			UEBuildModuleType    ModuleType,
			string               ModuleDirectory,
			string               GeneratedCodeDirectory,
			IntelliSenseGatherer IntelliSenseGatherer,
			List<FileItem>       ModuleSourceFiles,
			bool                 bBuildSourceFiles,
			string               InBuildCsFile)
        {
            switch (RulesObject.Type)
            {
                case ModuleRules.ModuleType.CPlusPlus:
                    return new UEBuildModuleCPP(
                            InTarget: this,
                            InName: ModuleName,
                            InType: ModuleType,
                            InModuleDirectory: ModuleDirectory,
                            InGeneratedCodeDirectory: GeneratedCodeDirectory,
                            InIsRedistributableOverride: RulesObject.IsRedistributableOverride,
                            InIntelliSenseGatherer: IntelliSenseGatherer,
                            InSourceFiles: ModuleSourceFiles,
                            InPublicSystemIncludePaths: RulesObject.PublicSystemIncludePaths,
                            InPublicLibraryPaths: RulesObject.PublicLibraryPaths,
                            InPublicIncludePaths: RulesObject.PublicIncludePaths,
                            InDefinitions: RulesObject.Definitions,
                            InPublicIncludePathModuleNames: RulesObject.PublicIncludePathModuleNames,
                            InPublicDependencyModuleNames: RulesObject.PublicDependencyModuleNames,
                            InPublicDelayLoadDLLs: RulesObject.PublicDelayLoadDLLs,
                            InPublicAdditionalLibraries: RulesObject.PublicAdditionalLibraries,
                            InPublicFrameworks: RulesObject.PublicFrameworks,
                            InPublicWeakFrameworks: RulesObject.PublicWeakFrameworks,
                            InPublicAdditionalFrameworks: RulesObject.PublicAdditionalFrameworks,
                            InPublicAdditionalShadowFiles: RulesObject.PublicAdditionalShadowFiles,
                            InPublicAdditionalBundleResources: RulesObject.AdditionalBundleResources,
                            InPrivateIncludePaths: RulesObject.PrivateIncludePaths,
                            InPrivateIncludePathModuleNames: RulesObject.PrivateIncludePathModuleNames,
                            InPrivateDependencyModuleNames: RulesObject.PrivateDependencyModuleNames,
                            InCircularlyReferencedDependentModules: RulesObject.CircularlyReferencedDependentModules,
                            InDynamicallyLoadedModuleNames: RulesObject.DynamicallyLoadedModuleNames,
                            InPlatformSpecificDynamicallyLoadedModuleNames: RulesObject.PlatformSpecificDynamicallyLoadedModuleNames,
                            InRuntimeDependencies: RulesObject.RuntimeDependencies,
                            InOptimizeCode: RulesObject.OptimizeCode,
                            InAllowSharedPCH: (RulesObject.PCHUsage == ModuleRules.PCHUsageMode.NoSharedPCHs) ? false : true,
                            InSharedPCHHeaderFile: RulesObject.SharedPCHHeaderFile,
                            InUseRTTI: RulesObject.bUseRTTI,
                            InEnableBufferSecurityChecks: RulesObject.bEnableBufferSecurityChecks,
                            InFasterWithoutUnity: RulesObject.bFasterWithoutUnity,
                            InMinFilesUsingPrecompiledHeaderOverride: RulesObject.MinFilesUsingPrecompiledHeaderOverride,
                            InEnableExceptions: RulesObject.bEnableExceptions,
                            InEnableShadowVariableWarnings: RulesObject.bEnableShadowVariableWarnings,
                            bInBuildSourceFiles: bBuildSourceFiles,
                            InBuildCsFilename: InBuildCsFile
                        );

                case ModuleRules.ModuleType.CPlusPlusCLR:
                    return new UEBuildModuleCPPCLR(
                            InTarget: this,
                            InName: ModuleName,
                            InType: ModuleType,
                            InModuleDirectory: ModuleDirectory,
                            InGeneratedCodeDirectory: GeneratedCodeDirectory,
                            InIsRedistributableOverride: RulesObject.IsRedistributableOverride,
                            InIntelliSenseGatherer: IntelliSenseGatherer,
                            InSourceFiles: ModuleSourceFiles,
                            InDefinitions: RulesObject.Definitions,
                            InPublicSystemIncludePaths: RulesObject.PublicSystemIncludePaths,
                            InPublicIncludePaths: RulesObject.PublicIncludePaths,
                            InPublicIncludePathModuleNames: RulesObject.PublicIncludePathModuleNames,
                            InPublicDependencyModuleNames: RulesObject.PublicDependencyModuleNames,
                            InPublicDelayLoadDLLs: RulesObject.PublicDelayLoadDLLs,
                            InPublicAdditionalLibraries: RulesObject.PublicAdditionalLibraries,
                            InPublicFrameworks: RulesObject.PublicFrameworks,
                            InPublicWeakFrameworks: RulesObject.PublicWeakFrameworks,
                            InPublicAdditionalFrameworks: RulesObject.PublicAdditionalFrameworks,
                            InPublicAdditionalShadowFiles: RulesObject.PublicAdditionalShadowFiles,
                            InPublicAdditionalBundleResources: RulesObject.AdditionalBundleResources,
                            InPrivateIncludePaths: RulesObject.PrivateIncludePaths,
                            InPrivateIncludePathModuleNames: RulesObject.PrivateIncludePathModuleNames,
                            InPrivateDependencyModuleNames: RulesObject.PrivateDependencyModuleNames,
                            InPrivateAssemblyReferences: RulesObject.PrivateAssemblyReferences,
                            InCircularlyReferencedDependentModules: RulesObject.CircularlyReferencedDependentModules,
                            InDynamicallyLoadedModuleNames: RulesObject.DynamicallyLoadedModuleNames,
                            InPlatformSpecificDynamicallyLoadedModuleNames: RulesObject.PlatformSpecificDynamicallyLoadedModuleNames,
                            InRuntimeDependencies: RulesObject.RuntimeDependencies,
                            InOptimizeCode: RulesObject.OptimizeCode,
                            InAllowSharedPCH: (RulesObject.PCHUsage == ModuleRules.PCHUsageMode.NoSharedPCHs) ? false : true,
                            InSharedPCHHeaderFile: RulesObject.SharedPCHHeaderFile,
                            InUseRTTI: RulesObject.bUseRTTI,
                            InEnableBufferSecurityChecks: RulesObject.bEnableBufferSecurityChecks,
                            InFasterWithoutUnity: RulesObject.bFasterWithoutUnity,
                            InMinFilesUsingPrecompiledHeaderOverride: RulesObject.MinFilesUsingPrecompiledHeaderOverride,
                            InEnableExceptions: RulesObject.bEnableExceptions,
                            InEnableShadowVariableWarnings: RulesObject.bEnableShadowVariableWarnings,
                            bInBuildSourceFiles : bBuildSourceFiles,
                            InBuildCsFilename: InBuildCsFile
                        );

                case ModuleRules.ModuleType.External:
                    return new UEBuildExternalModule(
                            InTarget: this,
                            InName: ModuleName,
                            InType: ModuleType,
                            InModuleDirectory: ModuleDirectory,
                            InIsRedistributableOverride: RulesObject.IsRedistributableOverride,
                            InPublicDefinitions: RulesObject.Definitions,
                            InPublicSystemIncludePaths: RulesObject.PublicSystemIncludePaths,
                            InPublicIncludePaths: RulesObject.PublicIncludePaths,
                            InPublicLibraryPaths: RulesObject.PublicLibraryPaths,
                            InPublicAdditionalLibraries: RulesObject.PublicAdditionalLibraries,
                            InPublicFrameworks: RulesObject.PublicFrameworks,
                            InPublicWeakFrameworks: RulesObject.PublicWeakFrameworks,
                            InPublicAdditionalFrameworks: RulesObject.PublicAdditionalFrameworks,
                            InPublicAdditionalShadowFiles: RulesObject.PublicAdditionalShadowFiles,
                            InPublicAdditionalBundleResources: RulesObject.AdditionalBundleResources,
                            InPublicDependencyModuleNames: RulesObject.PublicDependencyModuleNames,
                            InPublicDelayLoadDLLs: RulesObject.PublicDelayLoadDLLs,
                            InRuntimeDependencies: RulesObject.RuntimeDependencies,
                            InBuildCsFilename: InBuildCsFile
                        );

                default:
                    throw new BuildException("Unrecognized module type specified by 'Rules' object {0}", RulesObject.ToString());
            }
        }
Exemplo n.º 39
0
        public UEBuildModuleCPPCLR(
			UEBuildTarget InTarget,
			string InName,
			UEBuildModuleType InType,
			string InModuleDirectory,
			string InOutputDirectory,
			IntelliSenseGatherer InIntelliSenseGatherer,
			IEnumerable<FileItem> InSourceFiles,
			IEnumerable<string> InPublicIncludePaths,
			IEnumerable<string> InPublicSystemIncludePaths,
			IEnumerable<string> InDefinitions,
			IEnumerable<string> InPrivateAssemblyReferences,
			IEnumerable<string> InPublicIncludePathModuleNames,
			IEnumerable<string> InPublicDependencyModuleNames,
			IEnumerable<string> InPublicDelayLoadDLLs,
			IEnumerable<string> InPublicAdditionalLibraries,
			IEnumerable<string> InPublicFrameworks,
			IEnumerable<string> InPublicAdditionalFrameworks,
			IEnumerable<string> InPrivateIncludePaths,
			IEnumerable<string> InPrivateIncludePathModuleNames,
			IEnumerable<string> InPrivateDependencyModuleNames,
			IEnumerable<string> InCircularlyReferencedDependentModules,
			IEnumerable<string> InDynamicallyLoadedModuleNames,
            IEnumerable<string> InPlatformSpecificDynamicallyLoadedModuleNames,
            ModuleRules.CodeOptimization InOptimizeCode,
			bool InAllowSharedPCH,
			string InSharedPCHHeaderFile,
			bool InUseRTTI,
			bool InEnableBufferSecurityChecks,
			bool InFasterWithoutUnity,
			int InMinFilesUsingPrecompiledHeaderOverride,
			bool InEnableExceptions,
			bool InEnableInlining
			)
            : base(InTarget,InName,InType,InModuleDirectory,InOutputDirectory,InIntelliSenseGatherer,
			InSourceFiles,InPublicIncludePaths,InPublicSystemIncludePaths,InDefinitions,
			InPublicIncludePathModuleNames,InPublicDependencyModuleNames,InPublicDelayLoadDLLs,InPublicAdditionalLibraries,InPublicFrameworks,InPublicAdditionalFrameworks,
			InPrivateIncludePaths,InPrivateIncludePathModuleNames,InPrivateDependencyModuleNames,
            InCircularlyReferencedDependentModules, InDynamicallyLoadedModuleNames, InPlatformSpecificDynamicallyLoadedModuleNames, InOptimizeCode,
			InAllowSharedPCH, InSharedPCHHeaderFile, InUseRTTI, InEnableBufferSecurityChecks, InFasterWithoutUnity, InMinFilesUsingPrecompiledHeaderOverride,
			InEnableExceptions, InEnableInlining)
        {
            PrivateAssemblyReferences = ListFromOptionalEnumerableStringParameter(InPrivateAssemblyReferences);
        }
Exemplo n.º 40
0
		public override void ModifyModuleRulesForOtherPlatform(string ModuleName, ModuleRules Rules, TargetInfo Target)
		{
			base.ModifyModuleRulesForOtherPlatform(ModuleName, Rules, Target);

			if ((Target.Platform == UnrealTargetPlatform.Win32) || (Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Mac))
			{
				// allow standalone tools to use targetplatform modules, without needing Engine
				if (UEBuildConfiguration.bForceBuildTargetPlatforms)
				{
					// @todo tvos: Make the module
					// InModule.AddPlatformSpecificDynamicallyLoadedModule("TVOSTargetPlatform");
				}
			}
		}
Exemplo n.º 41
0
		/// <summary>
		/// Add the standard default include paths to the given modulerules object
		/// </summary>
		/// <param name="InModuleName">The name of the module</param>
		/// <param name="InModuleFilename">The filename to the module rules file (Build.cs)</param>
		/// <param name="InModuleFileRelativeToEngineDirectory">The module file relative to the engine directory</param>
		/// <param name="IsGameModule">true if it is a game module, false if not</param>
		/// <param name="RulesObject">The module rules object itself</param>
		public static void AddDefaultIncludePathsToModuleRules(string InModuleName, string InModuleFilename, string InModuleFileRelativeToEngineDirectory, bool IsGameModule, ModuleRules RulesObject)
		{
			// Grab the absolute path of the Engine/Source folder for use later
			string AbsEngineSourceDirectory = Path.Combine(ProjectFileGenerator.RootRelativePath, "Engine/Source");
			AbsEngineSourceDirectory = Path.GetFullPath(AbsEngineSourceDirectory);
			AbsEngineSourceDirectory = AbsEngineSourceDirectory.Replace("\\", "/");

			// Find the module path relative to the Engine/Source folder
			string ModuleDirectoryRelativeToEngineSourceDirectory = Utils.MakePathRelativeTo(InModuleFilename, Path.Combine(ProjectFileGenerator.RootRelativePath, "Engine/Source"));
			ModuleDirectoryRelativeToEngineSourceDirectory = ModuleDirectoryRelativeToEngineSourceDirectory.Replace("\\", "/");
			// Remove the build.cs file from the directory if present
			if (ModuleDirectoryRelativeToEngineSourceDirectory.EndsWith("Build.cs", StringComparison.InvariantCultureIgnoreCase))
			{
				Int32 LastSlashIdx = ModuleDirectoryRelativeToEngineSourceDirectory.LastIndexOf("/");
				if (LastSlashIdx != -1)
				{
					ModuleDirectoryRelativeToEngineSourceDirectory = ModuleDirectoryRelativeToEngineSourceDirectory.Substring(0, LastSlashIdx + 1);
				}
			}
			else
			{
				throw new BuildException("Invalid module filename '{0}'.", InModuleFilename);
			}

			// Determine the 'Game/Source' folder
			//@todo.Rocket: This currently requires following our standard format for folder layout.
			//				Also, it assumes the module itself is not named Source...
			string GameSourceIncludePath = (IsGameModule == true) ? ModuleDirectoryRelativeToEngineSourceDirectory : "";
			if (string.IsNullOrEmpty(GameSourceIncludePath) == false)
			{
				Int32 SourceIdx = GameSourceIncludePath.IndexOf("/Source/");
				if (SourceIdx != -1)
				{
					GameSourceIncludePath = GameSourceIncludePath.Substring(0, SourceIdx + 8);
					RulesObject.PublicIncludePaths.Add(GameSourceIncludePath);
				}
			}

			// Setup the directories for Classes, Public, and Intermediate			
			string ClassesDirectory = Path.Combine(ModuleDirectoryRelativeToEngineSourceDirectory, "Classes/");	// @todo uht: Deprecate eventually.  Or force it to be manually specified...
			string PublicDirectory = Path.Combine(ModuleDirectoryRelativeToEngineSourceDirectory, "Public/");

			if(!Utils.IsFileUnderDirectory(InModuleFilename, AbsEngineSourceDirectory))
			{
				// This will be either the format 
				//		../<Game>/Source/<Module>
				// or
				//		c:/PATH/<Game>/Source/<Module>
                string SourceDirName = "Source";
                Int32 SourceSlashIdx = ModuleDirectoryRelativeToEngineSourceDirectory.IndexOf(SourceDirName);
				string SourceDirectoryPath = null;
				if(SourceSlashIdx != -1)
				{
					try
					{
                        SourceDirectoryPath = Path.GetFullPath(ModuleDirectoryRelativeToEngineSourceDirectory.Substring(0, SourceSlashIdx + SourceDirName.Length));
					}
					catch(Exception Exc)
					{
						throw new BuildException(Exc, "Failed to resolve module source directory for private include paths for module {0}.", InModuleName);
					}
				}
				else
				{
					//@todo. throw a build exception here?
				}

				// Resolve private include paths against the module source root so they are simpler and don't have to be engine root relative.
				if(SourceDirectoryPath != null)
				{
					List<string> ResolvedPrivatePaths = new List<string>();
					foreach(var PrivatePath in RulesObject.PrivateIncludePaths)
					{
						try
						{
							if(!Path.IsPathRooted(PrivatePath))
							{
								ResolvedPrivatePaths.Add(Path.Combine(SourceDirectoryPath, PrivatePath));
							}
							else
							{
								ResolvedPrivatePaths.Add(PrivatePath);
							}
						}
						catch(Exception Exc)
						{
							throw new BuildException(Exc, "Failed to resolve private include path {0}.", PrivatePath);
						}
					}
					RulesObject.PrivateIncludePaths = ResolvedPrivatePaths;
				}
			}

			string IncludePath_Classes = "";
			string IncludePath_Public = "";

			bool bModulePathIsRooted = Path.IsPathRooted(ModuleDirectoryRelativeToEngineSourceDirectory);

			string ClassesFolderName = (bModulePathIsRooted == false) ? Path.Combine(AbsEngineSourceDirectory, ClassesDirectory) : ClassesDirectory;
			if (Directory.Exists(ClassesFolderName) == true)
			{
				IncludePath_Classes = ClassesDirectory;
			}

			string PublicFolderName = (bModulePathIsRooted == false) ? Path.Combine(AbsEngineSourceDirectory, PublicDirectory) : PublicDirectory;
			if (Directory.Exists(PublicFolderName) == true)
			{
				IncludePath_Public = PublicDirectory;
			}

			// Add them if they are required...
			if (IncludePath_Classes.Length > 0)
			{
				RulesObject.PublicIncludePaths.Add(IncludePath_Classes);
			}
			if (IncludePath_Public.Length > 0)
			{
				RulesObject.PublicIncludePaths.Add(IncludePath_Public);

				// Add subdirectories of Public if present
				DirectoryInfo PublicInfo = new DirectoryInfo(IncludePath_Public);
				DirectoryInfo[] PublicSubDirs = PublicInfo.GetDirectories("*", SearchOption.AllDirectories);
				if (PublicSubDirs.Length > 0)
				{
					foreach (DirectoryInfo SubDir in PublicSubDirs)
					{
						string PartialDir = SubDir.FullName.Replace(PublicInfo.FullName, "");
						string NewDir = IncludePath_Public + PartialDir;
						NewDir = Utils.CleanDirectorySeparators(NewDir, '/');
						RulesObject.PublicIncludePaths.Add(NewDir);
					}
				}
			}
		}
Exemplo n.º 42
0
		/// <summary>
		/// Modify the rules for a newly created module, where the target is a different host platform.
		/// This is not required - but allows for hiding details of a particular platform.
		/// </summary>
		/// <param name="ModuleName">The name of the module</param>
		/// <param name="Rules">The module rules</param>
		/// <param name="Target">The target being build</param>
		public virtual void ModifyModuleRulesForOtherPlatform(string ModuleName, ModuleRules Rules, TargetInfo Target)
		{
		}
Exemplo n.º 43
0
		/// <summary>
		/// Allow all registered build platforms to modify the newly created module
		/// passed in for the given platform.
		/// This is not required - but allows for hiding details of a particular platform.
		/// </summary>
		/// <param name="">Name   The name of the module</param>
		/// <param name="Module">  The module rules</param>
		/// <param name="Target">  The target being build</param>
		/// <param name="Only">  If this is not unknown, then only run that platform</param>
		public static void PlatformModifyHostModuleRules(string ModuleName, ModuleRules Rules, TargetInfo Target, UnrealTargetPlatform Only = UnrealTargetPlatform.Unknown)
		{
			foreach (KeyValuePair<UnrealTargetPlatform, UEBuildPlatform> PlatformEntry in BuildPlatformDictionary)
			{
				if (Only == UnrealTargetPlatform.Unknown || PlatformEntry.Key == Only)
				{
					PlatformEntry.Value.ModifyModuleRulesForOtherPlatform(ModuleName, Rules, Target);
				}
			}
		}
Exemplo n.º 44
0
        public UEBuildModuleCPP(
			UEBuildTarget InTarget,
			string InName,
			UEBuildModuleType InType,
			string InModuleDirectory,
			string InOutputDirectory,
			IntelliSenseGatherer InIntelliSenseGatherer,
			IEnumerable<FileItem> InSourceFiles,
			IEnumerable<string> InPublicIncludePaths,
			IEnumerable<string> InPublicSystemIncludePaths,
			IEnumerable<string> InDefinitions,
			IEnumerable<string> InPublicIncludePathModuleNames,
			IEnumerable<string> InPublicDependencyModuleNames,
			IEnumerable<string> InPublicDelayLoadDLLs,
			IEnumerable<string> InPublicAdditionalLibraries,
			IEnumerable<string> InPublicFrameworks,
			IEnumerable<string> InPublicAdditionalFrameworks,
			IEnumerable<string> InPrivateIncludePaths,
			IEnumerable<string> InPrivateIncludePathModuleNames,
			IEnumerable<string> InPrivateDependencyModuleNames,
			IEnumerable<string> InCircularlyReferencedDependentModules,
			IEnumerable<string> InDynamicallyLoadedModuleNames,
            IEnumerable<string> InPlatformSpecificDynamicallyLoadedModuleNames,
            ModuleRules.CodeOptimization InOptimizeCode,
			bool InAllowSharedPCH,
			string InSharedPCHHeaderFile,
			bool InUseRTTI,
			bool InEnableBufferSecurityChecks,
			bool InFasterWithoutUnity,
			int InMinFilesUsingPrecompiledHeaderOverride,
			bool InEnableExceptions,
			bool InEnableInlining
			)
            : base(InTarget,
					InName, 
					InType,
					InModuleDirectory,
					InOutputDirectory, 
					InDefinitions, 
					InPublicIncludePaths,
					InPublicSystemIncludePaths, 
					null, 
					InPublicAdditionalLibraries,
					InPublicFrameworks,
					InPublicAdditionalFrameworks,
					null,
					InPublicIncludePathModuleNames,
					InPublicDependencyModuleNames,
					InPublicDelayLoadDLLs,
					InPrivateIncludePaths, 
					InPrivateIncludePathModuleNames,
					InPrivateDependencyModuleNames, 
					InCircularlyReferencedDependentModules,
					InDynamicallyLoadedModuleNames,
                    InPlatformSpecificDynamicallyLoadedModuleNames)
        {
            IntelliSenseGatherer = InIntelliSenseGatherer;
            SourceFiles = new List<FileItem>( InSourceFiles );
            Definitions = ListFromOptionalEnumerableStringParameter(InDefinitions);
            foreach (var Def in Definitions)
            {
                Log.TraceVerbose("Compile Env {0}: {1}", Name, Def);
            }
            OptimizeCode                           = InOptimizeCode;
            bAllowSharedPCH                        = InAllowSharedPCH;
            SharedPCHHeaderFile                    = InSharedPCHHeaderFile;
            bUseRTTI                               = InUseRTTI;
            bEnableBufferSecurityChecks 		   = InEnableBufferSecurityChecks;
            bFasterWithoutUnity                    = InFasterWithoutUnity;
            MinFilesUsingPrecompiledHeaderOverride = InMinFilesUsingPrecompiledHeaderOverride;
            bEnableExceptions                      = InEnableExceptions;
            bEnableInlining                        = InEnableInlining;
        }
Exemplo n.º 45
0
		public UEBuildModuleCPP(
			string InName,
			UHTModuleType InType,
			DirectoryReference InModuleDirectory,
			DirectoryReference InGeneratedCodeDirectory,
			IntelliSenseGatherer InIntelliSenseGatherer,
			IEnumerable<FileItem> InSourceFiles,
			ModuleRules InRules,
			bool bInBuildSourceFiles,
			FileReference InRulesFile
			)
			: base(
					InName,
					InType,
					InModuleDirectory,
					InRules,
					InRulesFile
				)
		{
			GeneratedCodeDirectory = InGeneratedCodeDirectory;
			IntelliSenseGatherer = InIntelliSenseGatherer;

			CategorizeSourceFiles(InSourceFiles, SourceFilesFound);
			if (bInBuildSourceFiles)
			{
				SourceFilesToBuild.CopyFrom(SourceFilesFound);
			}

			Definitions = HashSetFromOptionalEnumerableStringParameter(InRules.Definitions);
			foreach (string Def in Definitions)
			{
				Log.TraceVerbose("Compile Env {0}: {1}", Name, Def);
			}
		}
Exemplo n.º 46
0
		/// <summary>
		/// Creates an instance of a module rules descriptor object for the specified module name
		/// </summary>
		/// <param name="ModuleName">Name of the module</param>
		/// <param name="Target">Information about the target associated with this module</param>
		/// <param name="Rules">Output </param>
		/// <returns>Compiled module rule info</returns>
		public static bool TryCreateModuleRules( string ModuleName, TargetInfo Target, out ModuleRules Rules )
		{
			if(GetModuleFilename( ModuleName ) == null)
			{
				Rules = null;
				return false;
			}
			else
			{
				Rules = CreateModuleRules( ModuleName, Target );
				return true;
			}
		}
Exemplo n.º 47
0
		/// <summary>
		/// Modify the rules for a newly created module, where the target is a different host platform.
		/// This is not required - but allows for hiding details of a particular platform.
		/// </summary>
		/// <param name="ModuleName">The name of the module</param>
		/// <param name="Rules">The module rules</param>
		/// <param name="Target">The target being build</param>
		public override void ModifyModuleRulesForOtherPlatform(string ModuleName, ModuleRules Rules, TargetInfo Target)
		{
			if ((Target.Platform == UnrealTargetPlatform.Win32) || (Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Mac))
			{
				bool bBuildShaderFormats = UEBuildConfiguration.bForceBuildShaderFormats;
				if (!UEBuildConfiguration.bBuildRequiresCookedData)
				{
					if (ModuleName == "Engine")
					{
						if (UEBuildConfiguration.bBuildDeveloperTools)
						{
							Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("IOSTargetPlatform");
							Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("TVOSTargetPlatform");
						}
					}
					else if (ModuleName == "TargetPlatform")
					{
						bBuildShaderFormats = true;
						Rules.DynamicallyLoadedModuleNames.Add("TextureFormatPVR");
						Rules.DynamicallyLoadedModuleNames.Add("TextureFormatASTC");
						if (UEBuildConfiguration.bBuildDeveloperTools)
						{
							Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("AudioFormatADPCM");
						}
					}
				}

				// allow standalone tools to use targetplatform modules, without needing Engine
				if (ModuleName == "TargetPlatform")
				{
					if (UEBuildConfiguration.bForceBuildTargetPlatforms)
					{
						Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("IOSTargetPlatform");
						Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("TVOSTargetPlatform");
					}

					if (bBuildShaderFormats)
					{
						Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("MetalShaderFormat");
					}
				}
			}
		}
Exemplo n.º 48
0
 /// <summary>
 /// Modify the rules for a newly created module, where the target is a different host platform.
 /// This is not required - but allows for hiding details of a particular platform.
 /// </summary>
 /// <param name="ModuleName">The name of the module</param>
 /// <param name="Rules">The module rules</param>
 /// <param name="Target">The target being build</param>
 public override void ModifyModuleRulesForOtherPlatform(string ModuleName, ModuleRules Rules, TargetInfo Target)
 {
 }
Exemplo n.º 49
0
		public UEBuildModuleCPPCLR(
			string InName,
			UHTModuleType InType,
			DirectoryReference InModuleDirectory,
			DirectoryReference InGeneratedCodeDirectory,
			IntelliSenseGatherer InIntelliSenseGatherer,
			IEnumerable<FileItem> InSourceFiles,
			ModuleRules InRules,
			bool bInBuildSourceFiles,
			FileReference InRulesFile
			)
			: base(InName, InType, InModuleDirectory, InGeneratedCodeDirectory, InIntelliSenseGatherer,
			InSourceFiles, InRules,
			bInBuildSourceFiles, InRulesFile)
		{
			PrivateAssemblyReferences = HashSetFromOptionalEnumerableStringParameter(InRules.PrivateAssemblyReferences);
		}
Exemplo n.º 50
0
		public UEBuildModule(
			string InName,
			UHTModuleType InType,
			DirectoryReference InModuleDirectory,
			ModuleRules InRules,
			FileReference InRulesFile
			)
		{
			Name = InName;
			Type = InType;
			ModuleDirectory = InModuleDirectory;
			Rules = InRules;
			RulesFile = InRulesFile;

			NormalizedModuleIncludePath = Utils.CleanDirectorySeparators(ModuleDirectory.MakeRelativeTo(UnrealBuildTool.EngineSourceDirectory), '/');
			ModuleApiDefine = Name.ToUpperInvariant() + "_API";

			PublicDefinitions = HashSetFromOptionalEnumerableStringParameter(InRules.Definitions);
			PublicIncludePaths = HashSetFromOptionalEnumerableStringParameter(InRules.PublicIncludePaths);
			PublicSystemIncludePaths = HashSetFromOptionalEnumerableStringParameter(InRules.PublicSystemIncludePaths);
			PublicLibraryPaths = HashSetFromOptionalEnumerableStringParameter(InRules.PublicLibraryPaths);
			PublicAdditionalLibraries = HashSetFromOptionalEnumerableStringParameter(InRules.PublicAdditionalLibraries);
			PublicFrameworks = HashSetFromOptionalEnumerableStringParameter(InRules.PublicFrameworks);
			PublicWeakFrameworks = HashSetFromOptionalEnumerableStringParameter(InRules.PublicWeakFrameworks);
			PublicAdditionalFrameworks = InRules.PublicAdditionalFrameworks == null ? new HashSet<UEBuildFramework>() : new HashSet<UEBuildFramework>(InRules.PublicAdditionalFrameworks);
			PublicAdditionalShadowFiles = HashSetFromOptionalEnumerableStringParameter(InRules.PublicAdditionalShadowFiles);
			PublicAdditionalBundleResources = InRules.AdditionalBundleResources == null ? new HashSet<UEBuildBundleResource>() : new HashSet<UEBuildBundleResource>(InRules.AdditionalBundleResources);
			PublicDelayLoadDLLs = HashSetFromOptionalEnumerableStringParameter(InRules.PublicDelayLoadDLLs);
			PrivateIncludePaths = HashSetFromOptionalEnumerableStringParameter(InRules.PrivateIncludePaths);
			RuntimeDependencies = (InRules.RuntimeDependencies == null) ? new RuntimeDependencyList() : new RuntimeDependencyList(InRules.RuntimeDependencies);
			IsRedistributableOverride = InRules.IsRedistributableOverride;
		}
Exemplo n.º 51
0
		public UEBuildExternalModule(
			UHTModuleType InType,
			string InName,
			DirectoryReference InModuleDirectory,
			ModuleRules InRules,
			FileReference InRulesFile
			)
			: base(
				InType: InType,
				InName: InName,
				InModuleDirectory: InModuleDirectory,
				InRules: InRules,
				InRulesFile: InRulesFile
				)
		{
		}
 /// <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.
 /// </summary>
 /// <param name="ModuleName">The name of the module</param>
 /// <param name="Rules">The module rules</param>
 /// <param name="Target">The target being build</param>
 public override void ModifyModuleRulesForActivePlatform(string ModuleName, ModuleRules Rules, ReadOnlyTargetRules Target)
 {
 }
Exemplo n.º 53
0
		/// <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.
		/// </summary>
		/// <param name="ModuleName">The name of the module</param>
		/// <param name="Rules">The module rules</param>
		/// <param name="Target">The target being build</param>
		public override void ModifyModuleRulesForActivePlatform(string ModuleName, ModuleRules Rules, TargetInfo Target)
		{
			bool bBuildShaderFormats = UEBuildConfiguration.bForceBuildShaderFormats;

			if (!UEBuildConfiguration.bBuildRequiresCookedData)
			{
				if (ModuleName == "TargetPlatform")
				{
					bBuildShaderFormats = true;
				}
			}

			// allow standalone tools to use target platform modules, without needing Engine
			if (ModuleName == "TargetPlatform")
			{
				if (UEBuildConfiguration.bForceBuildTargetPlatforms)
				{
					Rules.DynamicallyLoadedModuleNames.Add("WindowsTargetPlatform");
					Rules.DynamicallyLoadedModuleNames.Add("WindowsNoEditorTargetPlatform");
					Rules.DynamicallyLoadedModuleNames.Add("WindowsServerTargetPlatform");
					Rules.DynamicallyLoadedModuleNames.Add("WindowsClientTargetPlatform");
					Rules.DynamicallyLoadedModuleNames.Add("AllDesktopTargetPlatform");
				}

				if (bBuildShaderFormats)
				{
					if (!SupportWindowsXP)
					{
						Rules.DynamicallyLoadedModuleNames.Add("ShaderFormatD3D");
					}
					Rules.DynamicallyLoadedModuleNames.Add("ShaderFormatOpenGL");

					Rules.DynamicallyLoadedModuleNames.Remove("VulkanRHI");
					Rules.DynamicallyLoadedModuleNames.Add("VulkanShaderFormat");
				}
			}

			if (ModuleName == "D3D11RHI")
			{
				// To enable platform specific D3D11 RHI Types
				Rules.PrivateIncludePaths.Add("Runtime/Windows/D3D11RHI/Private/Windows");
			}

			if (ModuleName == "D3D12RHI")
			{
				// To enable platform specific D3D12 RHI Types
				Rules.PrivateIncludePaths.Add("Runtime/Windows/D3D12RHI/Private/Windows");
			}

			if (SupportWindowsXP)
			{
                // Change libcurl path for XP as the default Win32 lib calls functions not supported on the platform
                // Remove path must exactly match what is created in libcurl.Build.cs
                string LibCurlOriginalLibPath = UEBuildConfiguration.UEThirdPartySourceDirectory + "libcurl/lib/" + ((Target.Platform == UnrealTargetPlatform.Win64) ? "Win64/" : "Win32/") + "VS" + WindowsPlatform.GetVisualStudioCompilerVersionName();
                Rules.PublicLibraryPaths.Remove(LibCurlOriginalLibPath);
                Rules.PublicLibraryPaths.Add(LibCurlOriginalLibPath + "_xp");

				Rules.DynamicallyLoadedModuleNames.Remove("D3D12RHI");
				Rules.DynamicallyLoadedModuleNames.Remove("D3D11RHI");
				Rules.DynamicallyLoadedModuleNames.Remove("ShaderFormatD3D");
				Rules.DynamicallyLoadedModuleNames.Remove("OculusRift");
				Rules.DynamicallyLoadedModuleNames.Remove("OculusLibrary");
				Rules.DynamicallyLoadedModuleNames.Remove("OculusInput");
				Rules.DynamicallyLoadedModuleNames.Remove("OculusAudio");
				Rules.DynamicallyLoadedModuleNames.Remove("VulkanRHI");
				Rules.PrivateDependencyModuleNames.Remove("DX11");
				Rules.PrivateDependencyModuleNames.Remove("DX12");
				Rules.PrivateDependencyModuleNames.Remove("D3D12RHI");
				Rules.PrivateDependencyModuleNames.Remove("D3D11RHI");
				Rules.PrivateDependencyModuleNames.Remove("OpenVR");

				// If we're targeting Windows XP, then always delay-load D3D11 as it won't exist on that architecture
				if (ModuleName == "DX11")
				{
					Rules.PublicDelayLoadDLLs.Add("d3d11.dll");
					Rules.PublicDelayLoadDLLs.Add("dxgi.dll");
				}
			}
		}