当前位置: 首页>>代码示例>>C#>>正文


C# ProjectFile.AddFilesToProject方法代码示例

本文整理汇总了C#中UnrealBuildTool.ProjectFile.AddFilesToProject方法的典型用法代码示例。如果您正苦于以下问题:C# ProjectFile.AddFilesToProject方法的具体用法?C# ProjectFile.AddFilesToProject怎么用?C# ProjectFile.AddFilesToProject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UnrealBuildTool.ProjectFile的用法示例。


在下文中一共展示了ProjectFile.AddFilesToProject方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AddEngineDocumentation

        /// Adds engine documentation to the specified project
        protected void AddEngineDocumentation( ProjectFile EngineProject )
        {
            // NOTE: The project folder added here will actually be collapsed away later if not needed
            var DocumentationProjectDirectory = Path.Combine( EngineRelativePath, "Documentation" );
            var DocumentationSourceDirectory = Path.Combine( EngineRelativePath, "Documentation", "Source" );
            DirectoryInfo DirInfo = new DirectoryInfo( DocumentationProjectDirectory );
            if( DirInfo.Exists && Directory.Exists( DocumentationSourceDirectory ) )
            {
                Log.TraceVerbose( "Adding documentation files..." );

                var DirectoriesToSearch = new List<string>();
                DirectoriesToSearch.Add( DocumentationSourceDirectory );

                var SubdirectoryNamesToExclude = new List<string>();
                {
                    // We never want any of the images or attachment files included in our generated project
                    SubdirectoryNamesToExclude.Add( "Images" );
                    SubdirectoryNamesToExclude.Add( "Attachments" );

                    // The API directory is huge, so don't include any of it
                    SubdirectoryNamesToExclude.Add("API");

                    // Omit Javascript source because it just confuses the Visual Studio IDE
                    SubdirectoryNamesToExclude.Add( "Javascript" );
                }

                var DocumentationFiles = SourceFileSearch.FindFiles(
                    DirectoriesToSearch: DirectoriesToSearch,
                    ExcludeNoRedistFiles: bExcludeNoRedistFiles,
                    SubdirectoryNamesToExclude: SubdirectoryNamesToExclude );

                // Filter out non-English documentation files if we were configured to do so
                if( !bAllDocumentationLanguages )
                {
                    var FilteredDocumentationFiles = new List<string>();
                    foreach( var DocumentationFile in DocumentationFiles )
                    {
                        bool bPassesFilter = true;
                        if( DocumentationFile.EndsWith( ".udn", StringComparison.InvariantCultureIgnoreCase ) )
                        {
                            var LanguageSuffix = Path.GetExtension( Path.GetFileNameWithoutExtension( DocumentationFile ) );
                            if( !String.IsNullOrEmpty( LanguageSuffix ) &&
                                !LanguageSuffix.Equals( ".int", StringComparison.InvariantCultureIgnoreCase ) )
                            {
                                bPassesFilter = false;
                            }
                        }

                        if( bPassesFilter )
                        {
                            FilteredDocumentationFiles.Add( DocumentationFile );
                        }
                    }
                    DocumentationFiles = FilteredDocumentationFiles;
                }

                EngineProject.AddFilesToProject( DocumentationFiles, EngineRelativePath );
            }
            else
            {
                Log.TraceVerbose("Skipping documentation project... directory not found");
            }
        }
开发者ID:mymei,项目名称:UE4,代码行数:64,代码来源:ProjectFileGenerator.cs

示例2: AddEngineShaderSource

        /// Adds shader source code to the specified project
        protected void AddEngineShaderSource( ProjectFile EngineProject )
        {
            // Setup a project file entry for this module's project.  Remember, some projects may host multiple modules!
            var ShadersDirectory = Path.Combine( EngineRelativePath, "Shaders" );

            var DirectoriesToSearch = new List<string>();
            DirectoriesToSearch.Add( ShadersDirectory );
            var SubdirectoryNamesToExclude = new List<string>();
            {
                // Don't include binary shaders in the project file.
                SubdirectoryNamesToExclude.Add( "Binaries" );
                // We never want shader intermediate files in our project file
                SubdirectoryNamesToExclude.Add( "PDBDump" );
                SubdirectoryNamesToExclude.Add( "WorkingDirectory" );
            }
            EngineProject.AddFilesToProject( SourceFileSearch.FindFiles(
                DirectoriesToSearch: DirectoriesToSearch,
                ExcludeNoRedistFiles: bExcludeNoRedistFiles,
                SubdirectoryNamesToExclude: SubdirectoryNamesToExclude ), EngineRelativePath );
        }
开发者ID:mymei,项目名称:UE4,代码行数:21,代码来源:ProjectFileGenerator.cs

示例3: AddUnrealHeaderToolConfigFiles

        /// Adds UnrealHeaderTool config files to the specified project
        private void AddUnrealHeaderToolConfigFiles(ProjectFile EngineProject)
        {
            var UHTConfigDirectory = Path.Combine(EngineRelativePath, "Programs", "UnrealHeaderTool", "Config");
            if (Directory.Exists(UHTConfigDirectory))
            {
                var DirectoriesToSearch = new List<string>();
                DirectoriesToSearch.Add(UHTConfigDirectory);

                EngineProject.AddFilesToProject(SourceFileSearch.FindFiles(DirectoriesToSearch, ExcludeNoRedistFiles: bExcludeNoRedistFiles), EngineRelativePath);
            }
        }
开发者ID:mymei,项目名称:UE4,代码行数:12,代码来源:ProjectFileGenerator.cs

示例4: AddEngineBuildFiles

        /// Adds engine build infrastructure files to the specified project
        protected void AddEngineBuildFiles( ProjectFile EngineProject )
        {
            var BuildDirectory = Path.Combine( EngineRelativePath, "Build" );

            var DirectoriesToSearch = new List<string>();
            DirectoriesToSearch.Add( BuildDirectory );
            var SubdirectoryNamesToExclude = new List<string>();
            {
                // Nothing to exclude, yet!
                // SubdirectoryNamesToExclude.Add( "DirectoryName" );
            }
            EngineProject.AddFilesToProject( SourceFileSearch.FindFiles(
                DirectoriesToSearch: DirectoriesToSearch,
                ExcludeNoRedistFiles: bExcludeNoRedistFiles,
                SubdirectoryNamesToExclude: SubdirectoryNamesToExclude ), EngineRelativePath );
        }
开发者ID:mymei,项目名称:UE4,代码行数:17,代码来源:ProjectFileGenerator.cs

示例5: AddUnrealHeaderToolConfigFiles

		/// Adds UnrealHeaderTool config files to the specified project
		private void AddUnrealHeaderToolConfigFiles(ProjectFile EngineProject)
		{
			DirectoryReference UHTConfigDirectory = DirectoryReference.Combine(UnrealBuildTool.EngineDirectory, "Programs", "UnrealHeaderTool", "Config");
			if (UHTConfigDirectory.Exists())
			{
				EngineProject.AddFilesToProject(SourceFileSearch.FindFiles(UHTConfigDirectory), UnrealBuildTool.EngineDirectory);
			}
		}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:9,代码来源:ProjectFileGenerator.cs

示例6: AddEngineTemplateFiles

 /// Adds all engine template text files to the specified project
 private void AddEngineTemplateFiles( ProjectFile EngineProject )
 {
     var EngineTemplateDirectory = Path.Combine(EngineRelativePath, "Content", "Editor", "Templates");
     if (Directory.Exists(EngineTemplateDirectory))
     {
         var DirectoriesToSearch = new List<string>();
         DirectoriesToSearch.Add( EngineTemplateDirectory );
         EngineProject.AddFilesToProject( SourceFileSearch.FindFiles( DirectoriesToSearch, ExcludeNoRedistFiles:bExcludeNoRedistFiles), EngineRelativePath );
     }
 }
开发者ID:mymei,项目名称:UE4,代码行数:11,代码来源:ProjectFileGenerator.cs

示例7: AddEngineConfigFiles

		/// Adds all engine config files to the specified project
		private void AddEngineConfigFiles( ProjectFile EngineProject )
		{
            DirectoryReference EngineConfigDirectory = DirectoryReference.Combine(UnrealBuildTool.EngineDirectory, "Config" );
			if( EngineConfigDirectory.Exists( ) )
			{
				EngineProject.AddFilesToProject( SourceFileSearch.FindFiles( EngineConfigDirectory ), UnrealBuildTool.EngineDirectory );
			}
		}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:9,代码来源:ProjectFileGenerator.cs

示例8: AddEngineTemplateFiles

        /// Adds all engine template text files to the specified project
        private void AddEngineTemplateFiles( ProjectFile EngineProject )
        {
            DirectoryReference EngineTemplateDirectory = DirectoryReference.Combine(UnrealBuildTool.EngineDirectory, "Content", "Editor", "Templates");
            if (EngineTemplateDirectory.Exists())
            {
				EngineProject.AddFilesToProject( SourceFileSearch.FindFiles( EngineTemplateDirectory ), UnrealBuildTool.EngineDirectory );
			}
        }
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:9,代码来源:ProjectFileGenerator.cs

示例9: AddEngineLocalizationFiles

		/// Adds all engine localization text files to the specified project
		private void AddEngineLocalizationFiles( ProjectFile EngineProject )
		{
			DirectoryReference EngineLocalizationDirectory = DirectoryReference.Combine( UnrealBuildTool.EngineDirectory, "Content", "Localization" );
			if( EngineLocalizationDirectory.Exists( ) )
			{
				EngineProject.AddFilesToProject( SourceFileSearch.FindFiles( EngineLocalizationDirectory ), UnrealBuildTool.EngineDirectory );
			}
		}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:9,代码来源:ProjectFileGenerator.cs

示例10: AddEngineBuildFiles

		/// Adds engine build infrastructure files to the specified project
		protected void AddEngineBuildFiles( ProjectFile EngineProject )
		{
			DirectoryReference BuildDirectory = DirectoryReference.Combine( UnrealBuildTool.EngineDirectory, "Build" );

			List<string> SubdirectoryNamesToExclude = new List<string>();
			SubdirectoryNamesToExclude.Add("Receipts");

			EngineProject.AddFilesToProject( SourceFileSearch.FindFiles( BuildDirectory, SubdirectoryNamesToExclude ), UnrealBuildTool.EngineDirectory );
		}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:10,代码来源:ProjectFileGenerator.cs

示例11: AddEngineShaderSource

		/// Adds shader source code to the specified project
		protected void AddEngineShaderSource( ProjectFile EngineProject )
		{
			// Setup a project file entry for this module's project.  Remember, some projects may host multiple modules!
			DirectoryReference ShadersDirectory = DirectoryReference.Combine( UnrealBuildTool.EngineDirectory, "Shaders" );

			List<string> SubdirectoryNamesToExclude = new List<string>();
			{
                // Don't include binary shaders in the project file.
                SubdirectoryNamesToExclude.Add( "Binaries" );
				// We never want shader intermediate files in our project file
				SubdirectoryNamesToExclude.Add( "PDBDump" );
				SubdirectoryNamesToExclude.Add( "WorkingDirectory" );
			}

			EngineProject.AddFilesToProject( SourceFileSearch.FindFiles( ShadersDirectory, SubdirectoryNamesToExclude ), UnrealBuildTool.EngineDirectory );
		}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:17,代码来源:ProjectFileGenerator.cs


注:本文中的UnrealBuildTool.ProjectFile.AddFilesToProject方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。