本文整理汇总了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");
}
}
示例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 );
}
示例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);
}
}
示例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 );
}
示例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);
}
}
示例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 );
}
}
示例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 );
}
}
示例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 );
}
}
示例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 );
}
}
示例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 );
}
示例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 );
}