﻿<?xml version="1.0" encoding="utf-8"?>
<!--Copyright, Microsoft Corporation, All rights reserved.-->
<Rule Name="ConfigurationCustomBuildTool" 
      DisplayName="Custom Build Tool" 
      Order="110" 
      PageTemplate="tool"
      xmlns="http://schemas.microsoft.com/build/2009/properties">
  <Rule.DataSource>
    <DataSource Persistence="ProjectFile" ItemType="CustomBuild" HasConfigurationCondition="true"  />
  </Rule.DataSource>
  <Rule.Categories>
    <Category Name="General" DisplayName="General" Description="General" />
  </Rule.Categories>
  <StringProperty Name="Command" Category="General" DisplayName="Command Line" Description="Specifies a command line for the custom build tool." F1Keyword="VC.Project.VCCustomBuildTool.Command" >
    <StringProperty.ValueEditors>
      <ValueEditor EditorType="DefaultCommandPropertyEditor" DisplayName="&lt;Edit...&gt;"/>
    </StringProperty.ValueEditors>
  </StringProperty>
  <StringProperty Name="Message" Category="General" DisplayName="Description" Description="Specifies a description for the custom build tool." F1Keyword="VC.Project.VCCustomBuildTool.Message" />
  <StringListProperty Name="Outputs" Category="General" DisplayName="Outputs" Description="Specifies the output files the custom build tool generates." F1Keyword="VC.Project.VCCustomBuildTool.Outputs" />
  <StringListProperty Name="AdditionalInputs" Category="General" DisplayName="Additional Dependencies" Description="Specifies any additional input files to use for the custom build tool." F1Keyword="VC.Project.VCCustomBuildTool.AdditionalInputs" />
  <BoolProperty Name="VerifyInputsAndOutputsExist" Category="General" DisplayName="Verify Dependencies and Outputs Exist" F1Keyword="VC.Project.VCCustomBuildTool.VerifyInputsAndOutputsExist"
                      Description="Specifies whether the build should verify that all given dependencies and outputs exist and warn if they don't.">
  </BoolProperty>
  <BoolProperty Name="LinkObjects" Category="General" DisplayName="Link Objects" F1Keyword="VC.Project.VCCustomBuildTool.LinkObjects"
                      Description="Specify whether the Inputs and outputs files with specific extensions (.obj, .lib, .res, .rsc) are passed to the linker.">
  </BoolProperty>
  <DynamicEnumProperty Name="OutputItemType" DisplayName="Add Outputs to Item Type" Category="General"
                       Description="Specifies Item type to add output files to so they become sources for other build tools."
                       EnumProvider="ItemTypes"
                       F1Keyword="VC.Project.VCCustomBuildTool.OutputsItemType">
  </DynamicEnumProperty>
  <BoolProperty Name="TreatOutputAsContent" Category="General" DisplayName="Treat Output As Content" F1Keyword="VC.Project.VCCustomBuildTool.TreatOutputAsContent"
                      Description="Specify whether the output file is a deployable content.">
  </BoolProperty>
  <StringProperty Name="RootFolder" DisplayName="Content Root Folder"
                  Description="Content root folder to use for packaging."
                  Category="General"
                  Subtype="folder">
  </StringProperty>
  <BoolProperty Name="BuildInParallel" Category="General" DisplayName="Build In Parallel" F1Keyword="VC.Project.VCCustomBuildTool.BuildInParallel"
                      Description="Specifies that this item can be built in parallel with other custom build tool items.">
  </BoolProperty>
  <IntProperty Name="MaxProcesses" Category="General" DisplayName="Maximum Processes" F1Keyword="VC.Project.VCCustomBuildTool.MaxProcesses"
               Description="Maximum number of CPU cores to use for parallel build. A value of 0 utilizes all available processors.">
  </IntProperty>
  <IntProperty Name="MaxItemsInBatch" Category="General" DisplayName="Maximum Batch Size" F1Keyword="VC.Project.VCCustomBuildTool.MaxProcesses"
               Description="Maximum number of items to execute together during parallel build. A value of 0 divides items evenly into parallel batches. A value of 1 disables batching. Larger batches will improve performance if the custom build tool processes items quickly.">
  </IntProperty>
  <DynamicEnumProperty Name="CustomBuildAfterTargets" Category="General" DisplayName="Execute After" Description="Specifies the targets for the custom build step and tool to run after." F1Keyword="VC.Project.VCCustomBuildStep.CustomBuildAfterTargets"
                       EnumProvider="Targets">
    <DynamicEnumProperty.DataSource>
      <DataSource Persistence="ProjectFile" HasConfigurationCondition="true" ItemType="" />
    </DynamicEnumProperty.DataSource>
    <DynamicEnumProperty.ProviderSettings>
      <NameValuePair Name="Exclude" Value="^CustomBuild|^Compute"/>
    </DynamicEnumProperty.ProviderSettings>
  </DynamicEnumProperty>
  <DynamicEnumProperty Name="CustomBuildBeforeTargets" Category="General" DisplayName="Execute Before" Description="Specifies the targets for the custom build step and tool to run before." F1Keyword="VC.Project.VCCustomBuildStep.CustomBuildBeforeTargets"
                       EnumProvider="Targets">
    <DynamicEnumProperty.DataSource>
      <DataSource Persistence="ProjectFile" HasConfigurationCondition="true" ItemType="" />
    </DynamicEnumProperty.DataSource>
    <DynamicEnumProperty.ProviderSettings>
      <NameValuePair Name="Exclude" Value="^CustomBuild|^Compute"/>
    </DynamicEnumProperty.ProviderSettings>
  </DynamicEnumProperty>
</Rule>
