Fill in more command line properties; add file extension
This commit is contained in:
parent
7897d8dfca
commit
599e231d3a
@ -256,6 +256,14 @@
|
||||
removefiles(value)
|
||||
end
|
||||
|
||||
|
||||
api.register {
|
||||
name = "fileExtension",
|
||||
scope = "rule",
|
||||
kind = "string",
|
||||
}
|
||||
|
||||
|
||||
api.register {
|
||||
name = "filename",
|
||||
scope = { "project", "rule" },
|
||||
|
@ -151,6 +151,7 @@
|
||||
m.ruleCondition,
|
||||
m.commandLineTemplate,
|
||||
m.properties,
|
||||
m.additionalOptions,
|
||||
m.inputs,
|
||||
m.standardOutputImportance,
|
||||
}
|
||||
@ -194,6 +195,12 @@
|
||||
-- Implementations of individual elements.
|
||||
---
|
||||
|
||||
function m.additionalOptions(r)
|
||||
p.w('AdditionalOptions="%%(%s.AdditionalOptions)"', r.name)
|
||||
end
|
||||
|
||||
|
||||
|
||||
function m.commandLineTemplate(r)
|
||||
p.w('CommandLineTemplate="%%(%s.CommandLineTemplate)"', r.name)
|
||||
end
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
function m.generate(r)
|
||||
p.callArray(m.elements.project, r)
|
||||
p.pop('</ProjectSchemaDefinitions>')
|
||||
p.out('</ProjectSchemaDefinitions>')
|
||||
end
|
||||
|
||||
|
||||
@ -44,6 +44,13 @@
|
||||
m.categories,
|
||||
m.inputs,
|
||||
m.properties,
|
||||
m.commandLineTemplate,
|
||||
m.beforeTargets,
|
||||
m.afterTargets,
|
||||
m.outputs,
|
||||
m.executionDescription,
|
||||
m.additionalDependencies,
|
||||
m.additionalOptions,
|
||||
}
|
||||
end
|
||||
|
||||
@ -187,10 +194,117 @@
|
||||
-- Implementations of individual elements.
|
||||
---
|
||||
|
||||
function m.additionalDependencies(r)
|
||||
p.push('<StringListProperty')
|
||||
p.w('Name="AdditionalDependencies"')
|
||||
p.w('DisplayName="Additional Dependencies"')
|
||||
p.w('IncludeInCommandLine="False"')
|
||||
p.w('Visible="false" />')
|
||||
p.pop()
|
||||
end
|
||||
|
||||
|
||||
|
||||
function m.additionalOptions(r)
|
||||
p.push('<StringProperty')
|
||||
p.w('Subtype="AdditionalOptions"')
|
||||
p.w('Name="AdditionalOptions"')
|
||||
p.w('Category="Command Line">')
|
||||
p.push('<StringProperty.DisplayName>')
|
||||
p.w('<sys:String>Additional Options</sys:String>')
|
||||
p.pop('</StringProperty.DisplayName>')
|
||||
p.push('<StringProperty.Description>')
|
||||
p.w('<sys:String>Additional Options</sys:String>')
|
||||
p.pop('</StringProperty.Description>')
|
||||
p.pop('</StringProperty>')
|
||||
end
|
||||
|
||||
|
||||
|
||||
function m.afterTargets(r)
|
||||
p.push('<DynamicEnumProperty')
|
||||
p.w('Name="%sAfterTargets"', r.name)
|
||||
p.w('Category="General"')
|
||||
p.w('EnumProvider="Targets"')
|
||||
p.w('IncludeInCommandLine="False">')
|
||||
|
||||
p.push('<DynamicEnumProperty.DisplayName>')
|
||||
p.w('<sys:String>Execute After</sys:String>')
|
||||
p.pop('</DynamicEnumProperty.DisplayName>')
|
||||
|
||||
p.push('<DynamicEnumProperty.Description>')
|
||||
p.w('<sys:String>Specifies the targets for the build customization to run after.</sys:String>')
|
||||
p.pop('</DynamicEnumProperty.Description>')
|
||||
|
||||
p.push('<DynamicEnumProperty.ProviderSettings>')
|
||||
p.push('<NameValuePair')
|
||||
p.w('Name="Exclude"')
|
||||
p.w('Value="^%sAfterTargets|^Compute" />', r.name)
|
||||
p.pop()
|
||||
p.pop('</DynamicEnumProperty.ProviderSettings>')
|
||||
|
||||
p.push('<DynamicEnumProperty.DataSource>')
|
||||
p.push('<DataSource')
|
||||
p.w('Persistence="ProjectFile"')
|
||||
p.w('ItemType=""')
|
||||
p.w('HasConfigurationCondition="true" />')
|
||||
p.pop()
|
||||
p.pop('</DynamicEnumProperty.DataSource>')
|
||||
|
||||
p.pop('</DynamicEnumProperty>')
|
||||
end
|
||||
|
||||
|
||||
|
||||
function m.beforeTargets(r)
|
||||
p.push('<DynamicEnumProperty')
|
||||
p.w('Name="%sBeforeTargets"', r.name)
|
||||
p.w('Category="General"')
|
||||
p.w('EnumProvider="Targets"')
|
||||
p.w('IncludeInCommandLine="False">')
|
||||
|
||||
p.push('<DynamicEnumProperty.DisplayName>')
|
||||
p.w('<sys:String>Execute Before</sys:String>')
|
||||
p.pop('</DynamicEnumProperty.DisplayName>')
|
||||
|
||||
p.push('<DynamicEnumProperty.Description>')
|
||||
p.w('<sys:String>Specifies the targets for the build customization to run before.</sys:String>')
|
||||
p.pop('</DynamicEnumProperty.Description>')
|
||||
|
||||
p.push('<DynamicEnumProperty.ProviderSettings>')
|
||||
p.push('<NameValuePair')
|
||||
p.w('Name="Exclude"')
|
||||
p.w('Value="^%sBeforeTargets|^Compute" />', r.name)
|
||||
p.pop()
|
||||
p.pop('</DynamicEnumProperty.ProviderSettings>')
|
||||
|
||||
p.push('<DynamicEnumProperty.DataSource>')
|
||||
p.push('<DataSource')
|
||||
p.w('Persistence="ProjectFile"')
|
||||
p.w('HasConfigurationCondition="true" />')
|
||||
p.pop()
|
||||
p.pop('</DynamicEnumProperty.DataSource>')
|
||||
|
||||
p.pop('</DynamicEnumProperty>')
|
||||
end
|
||||
|
||||
|
||||
|
||||
function m.commandLineTemplate(r)
|
||||
p.push('<StringProperty')
|
||||
p.w('Name="CommandLineTemplate"')
|
||||
p.w('DisplayName="Command Line"')
|
||||
p.w('Visible="False"')
|
||||
p.w('IncludeInCommandLine="False" />')
|
||||
p.pop()
|
||||
end
|
||||
|
||||
|
||||
|
||||
function m.contentType(r)
|
||||
p.push('<ContentType')
|
||||
p.w('Name="%s"', r.name)
|
||||
p.w('DisplayName="%s"', r.name)
|
||||
p.w('DisplayName="%s"', r.display or r.name)
|
||||
p.w('ItemType="%s" />', r.name)
|
||||
p.pop()
|
||||
end
|
||||
@ -208,9 +322,20 @@
|
||||
|
||||
|
||||
|
||||
function m.executionDescription(r)
|
||||
p.push('<StringProperty')
|
||||
p.w('Name="ExecutionDescription"')
|
||||
p.w('DisplayName="Execution Description"')
|
||||
p.w('Visible="False"')
|
||||
p.w('IncludeInCommandLine="False" />')
|
||||
p.pop()
|
||||
end
|
||||
|
||||
|
||||
|
||||
function m.fileExtension(r)
|
||||
p.push('<FileExtension')
|
||||
p.w('Name="*.XYZ"')
|
||||
p.w('Name="*%s"', r.fileExtension)
|
||||
p.w('ContentType="%s" />', r.name)
|
||||
p.pop()
|
||||
end
|
||||
@ -237,10 +362,21 @@
|
||||
|
||||
|
||||
|
||||
function m.outputs(r)
|
||||
p.push('<StringListProperty')
|
||||
p.w('Name="Outputs"')
|
||||
p.w('DisplayName="Outputs"')
|
||||
p.w('Visible="False"')
|
||||
p.w('IncludeInCommandLine="False" />')
|
||||
p.pop()
|
||||
end
|
||||
|
||||
|
||||
|
||||
function m.ruleItem(r)
|
||||
p.push('<ItemType')
|
||||
p.w('Name="%s"', r.name)
|
||||
p.w('DisplayName="%s" />', r.name)
|
||||
p.w('DisplayName="%s" />', r.display or r.name)
|
||||
p.pop()
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user