Ejemplo n.º 1
0
 /// <summary>
 /// Creates the engine rules assembly
 /// </summary>
 /// <param name="bUsePrecompiled">Whether to use a precompiled engine</param>
 /// <param name="bSkipCompile">Whether to skip compilation for this assembly</param>
 /// <returns>New rules assembly</returns>
 public static RulesAssembly CreateEngineRulesAssembly(bool bUsePrecompiled, bool bSkipCompile)
 {
     if (EngineRulesAssembly == null)
     {
         IReadOnlyList <PluginInfo> IncludedPlugins = Plugins.ReadEnginePlugins(UnrealBuildTool.EngineDirectory);
         EngineRulesAssembly = CreateEngineOrEnterpriseRulesAssembly(UnrealBuildTool.EngineDirectory, ProjectFileGenerator.EngineProjectFileNameBase, IncludedPlugins, UnrealBuildTool.IsEngineInstalled() || bUsePrecompiled, bSkipCompile, null);
     }
     return(EngineRulesAssembly);
 }
Ejemplo n.º 2
0
		/// <summary>
		/// Creates the engine rules assembly
		/// </summary>
		/// <returns>New rules assembly</returns>
		public static RulesAssembly CreateEngineRulesAssembly()
		{
			if (EngineRulesAssembly == null)
			{
				IReadOnlyList<PluginInfo> IncludedPlugins = Plugins.ReadEnginePlugins(UnrealBuildTool.EngineDirectory);
				EngineRulesAssembly = CreateRulesAssembly(UnrealBuildTool.EngineDirectory, ProjectFileGenerator.EngineProjectFileNameBase, IncludedPlugins, null);
			}
			return EngineRulesAssembly;
		}
Ejemplo n.º 3
0
        /// <summary>
        /// Creates the engine rules assembly
        /// </summary>
        /// <param name="bUsePrecompiled">Whether to use a precompiled engine</param>
        /// <param name="bSkipCompile">Whether to skip compilation for this assembly</param>
        /// <returns>New rules assembly</returns>
        public static RulesAssembly CreateEngineRulesAssembly(bool bUsePrecompiled, bool bSkipCompile)
        {
            if (EngineRulesAssembly == null)
            {
                List <PluginInfo> IncludedPlugins = new List <PluginInfo>();

                // search for all engine plugins
                IncludedPlugins.AddRange(Plugins.ReadEnginePlugins(UnrealBuildTool.EngineDirectory));

                RulesScope EngineScope = new RulesScope("Engine", null);

                EngineRulesAssembly = CreateEngineOrEnterpriseRulesAssembly(EngineScope, UnrealBuildTool.GetAllEngineDirectories().ToList(), ProjectFileGenerator.EngineProjectFileNameBase, IncludedPlugins, UnrealBuildTool.IsEngineInstalled() || bUsePrecompiled, bSkipCompile, null);
            }
            return(EngineRulesAssembly);
        }
        /// <summary>
        /// Creates the engine rules assembly
        /// </summary>
        /// <param name="ForeignPlugins">List of plugins to include in this assembly</param>
        /// <returns>New rules assembly</returns>
        public static RulesAssembly CreateEngineRulesAssembly()
        {
            if (EngineRulesAssembly == null)
            {
                // Find all the rules files
                List <FileReference> ModuleFiles = new List <FileReference>(FindAllRulesFiles(UnrealBuildTool.EngineSourceDirectory, RulesFileType.Module));
                List <FileReference> TargetFiles = new List <FileReference>(FindAllRulesFiles(UnrealBuildTool.EngineSourceDirectory, RulesFileType.Target));

                // Add all the plugin modules too
                IReadOnlyList <PluginInfo>             EnginePlugins          = Plugins.ReadEnginePlugins(UnrealBuildTool.EngineDirectory);
                Dictionary <FileReference, PluginInfo> ModuleFileToPluginInfo = new Dictionary <FileReference, PluginInfo>();
                FindModuleRulesForPlugins(EnginePlugins, ModuleFiles, ModuleFileToPluginInfo);

                // Create a path to the assembly that we'll either load or compile
                FileReference AssemblyFileName = FileReference.Combine(UnrealBuildTool.EngineDirectory, BuildConfiguration.BaseIntermediateFolder, "BuildRules", "UE4Rules.dll");
                EngineRulesAssembly = new RulesAssembly(EnginePlugins, ModuleFiles, TargetFiles, ModuleFileToPluginInfo, AssemblyFileName, null);
            }
            return(EngineRulesAssembly);
        }
        /// <summary>
        /// Creates a rules assembly
        /// </summary>
        /// <param name="RootDirectory">The root directory to create rules for</param>
        /// <param name="AssemblyPrefix">A prefix for the assembly file name</param>
        /// <param name="Parent">The parent rules assembly</param>
        /// <returns>New rules assembly</returns>
        private static RulesAssembly CreateRulesAssembly(DirectoryReference RootDirectory, string AssemblyPrefix, RulesAssembly Parent)
        {
            DirectoryReference SourceDirectory = DirectoryReference.Combine(RootDirectory, "Source");

            // Find all the rules files
            List <FileReference> ModuleFiles = new List <FileReference>(FindAllRulesFiles(SourceDirectory, RulesFileType.Module));
            List <FileReference> TargetFiles = new List <FileReference>(FindAllRulesFiles(SourceDirectory, RulesFileType.Target));

            // Add all the plugin modules too
            IReadOnlyList <PluginInfo>             PluginInfos            = Plugins.ReadEnginePlugins(RootDirectory);
            Dictionary <FileReference, PluginInfo> ModuleFileToPluginInfo = new Dictionary <FileReference, PluginInfo>();

            FindModuleRulesForPlugins(PluginInfos, ModuleFiles, ModuleFileToPluginInfo);

            // Create a path to the assembly that we'll either load or compile
            FileReference AssemblyFileName = FileReference.Combine(RootDirectory, "Intermediate", "Build", "BuildRules", AssemblyPrefix + "Rules.dll");

            return(new RulesAssembly(PluginInfos, ModuleFiles, TargetFiles, ModuleFileToPluginInfo, AssemblyFileName, Parent));
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Creates the engine rules assembly
        /// </summary>
        /// <param name="bUsePrecompiled">Whether to use a precompiled engine</param>
        /// <param name="bSkipCompile">Whether to skip compilation for this assembly</param>
        /// <returns>New rules assembly</returns>
        public static RulesAssembly CreateEngineRulesAssembly(bool bUsePrecompiled, bool bSkipCompile)
        {
            if (EngineRulesAssembly == null)
            {
                List <PluginInfo> IncludedPlugins = new List <PluginInfo>();

                // look in the platform extensions engine directories for plugins
                List <DirectoryReference> RootDirectories = new List <DirectoryReference>();
                RootDirectories.AddRange(UnrealBuildTool.GetAllEngineDirectories());

                // search for all engine plugins
                foreach (DirectoryReference RootDir in RootDirectories)
                {
                    IncludedPlugins.AddRange(Plugins.ReadEnginePlugins(RootDir));
                }

                RulesScope EngineScope = new RulesScope("Engine", null);

                EngineRulesAssembly = CreateEngineOrEnterpriseRulesAssembly(EngineScope, RootDirectories, ProjectFileGenerator.EngineProjectFileNameBase, IncludedPlugins, UnrealBuildTool.IsEngineInstalled() || bUsePrecompiled, bSkipCompile, null);
            }
            return(EngineRulesAssembly);
        }