Пример #1
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)));
        }