Beispiel #1
0
    static IEnumerable <FileReference> FilterPluginFiles(FileReference PluginFile, IEnumerable <FileReference> BuildProducts)
    {
        // Set up the default filter
        FileFilter Filter = new FileFilter();

        Filter.AddRuleForFile(PluginFile, PluginFile.Directory, FileFilterType.Include);
        Filter.AddRuleForFiles(BuildProducts, PluginFile.Directory, FileFilterType.Include);
        Filter.Include("/Binaries/ThirdParty/...");
        Filter.Include("/Resources/...");
        Filter.Include("/Content/...");
        Filter.Include("/Intermediate/Build/.../Inc/...");
        Filter.Include("/Shaders/...");
        Filter.Include("/Source/...");

        // Add custom rules for each platform
        FileReference FilterFile = FileReference.Combine(PluginFile.Directory, "Config", "FilterPlugin.ini");

        if (FileReference.Exists(FilterFile))
        {
            CommandUtils.LogInformation("Reading filter rules from {0}", FilterFile);
            Filter.ReadRulesFromFile(FilterFile, "FilterPlugin");
        }

        // Apply the standard exclusion rules
        foreach (string RestrictedFolderName in RestrictedFolder.GetNames())
        {
            Filter.AddRule(String.Format(".../{0}/...", RestrictedFolderName), FileFilterType.Exclude);
        }

        // Apply the filter to the plugin directory
        return(Filter.ApplyToDirectory(PluginFile.Directory, true));
    }
Beispiel #2
0
    static List <string> FilterPluginFiles(string PluginFileName, List <BuildProduct> BuildProducts)
    {
        string PluginDirectory = Path.GetDirectoryName(PluginFileName);

        // Set up the default filter
        FileFilter Filter = new FileFilter();

        Filter.AddRuleForFile(PluginFileName, PluginDirectory, FileFilterType.Include);
        Filter.AddRuleForFiles(BuildProducts.Select(x => x.Path), PluginDirectory, FileFilterType.Include);
        Filter.Include("/Resources/...");
        Filter.Include("/Content/...");
        Filter.Include("/Intermediate/Build/.../Inc/...");
        Filter.Include("/Source/...");

        // Add custom rules for each platform
        string FilterFileName = Path.Combine(Path.GetDirectoryName(PluginFileName), "Config", "FilterPlugin.ini");

        if (File.Exists(FilterFileName))
        {
            Filter.ReadRulesFromFile(FilterFileName, "FilterPlugin");
        }

        // Apply the standard exclusion rules
        Filter.ExcludeConfidentialFolders();
        Filter.ExcludeConfidentialPlatforms();

        // Apply the filter to the plugin directory
        return(new List <string>(Filter.ApplyToDirectory(PluginDirectory, true)));
    }
    static List<string> FilterPluginFiles(string PluginFileName, List<BuildProduct> BuildProducts)
    {
        string PluginDirectory = Path.GetDirectoryName(PluginFileName);

        // Set up the default filter
        FileFilter Filter = new FileFilter();
        Filter.AddRuleForFile(PluginFileName, PluginDirectory, FileFilterType.Include);
        Filter.AddRuleForFiles(BuildProducts.Select(x => x.Path), PluginDirectory, FileFilterType.Include);
        Filter.Include("/Resources/...");
        Filter.Include("/Content/...");
        Filter.Include("/Intermediate/Build/.../Inc/...");
        Filter.Include("/Source/...");

        // Add custom rules for each platform
        string FilterFileName = Path.Combine(Path.GetDirectoryName(PluginFileName), "Config", "FilterPlugin.ini");
        if(File.Exists(FilterFileName))
        {
            Filter.ReadRulesFromFile(FilterFileName, "FilterPlugin");
        }

        // Apply the standard exclusion rules
        Filter.ExcludeConfidentialFolders();
        Filter.ExcludeConfidentialPlatforms();

        // Apply the filter to the plugin directory
        return new List<string>(Filter.ApplyToDirectory(PluginDirectory, true));
    }
	static IEnumerable<FileReference> FilterPluginFiles(FileReference PluginFile, IEnumerable<FileReference> BuildProducts)
	{
		// Set up the default filter
		FileFilter Filter = new FileFilter();
		Filter.AddRuleForFile(PluginFile.FullName, PluginFile.Directory.FullName, FileFilterType.Include);
		Filter.AddRuleForFiles(BuildProducts, PluginFile.Directory, FileFilterType.Include);
		Filter.Include("/Binaries/ThirdParty/...");
		Filter.Include("/Resources/...");
		Filter.Include("/Content/...");
		Filter.Include("/Intermediate/Build/.../Inc/...");
		Filter.Include("/Source/...");

		// Add custom rules for each platform
		FileReference FilterFile = FileReference.Combine(PluginFile.Directory, "Config", "FilterPlugin.ini");
		if(FilterFile.Exists())
		{
			CommandUtils.Log("Reading filter rules from {0}", FilterFile);
			Filter.ReadRulesFromFile(FilterFile.FullName, "FilterPlugin");
		}

		// Apply the standard exclusion rules
		Filter.ExcludeConfidentialFolders();
		Filter.ExcludeConfidentialPlatforms();

		// Apply the filter to the plugin directory
		return Filter.ApplyToDirectory(PluginFile.Directory, true);
	}