diff --git a/src/_premake_init.lua b/src/_premake_init.lua
index 6fb96911..48423f58 100644
--- a/src/_premake_init.lua
+++ b/src/_premake_init.lua
@@ -245,7 +245,7 @@
api.register {
- name = "displayName",
+ name = "display",
scope = "rule",
kind = "string",
}
diff --git a/src/actions/vstudio/vs2010_rules_props.lua b/src/actions/vstudio/vs2010_rules_props.lua
index 19961640..f2300ee0 100644
--- a/src/actions/vstudio/vs2010_rules_props.lua
+++ b/src/actions/vstudio/vs2010_rules_props.lua
@@ -108,7 +108,7 @@
local defs = r.propertyDefinition
for i = 1, #defs do
local def = defs[i]
- local value = def.defaultValue
+ local value = def.value
if value then
if def.kind == "path" then
value = path.translate(value)
diff --git a/src/actions/vstudio/vs2010_rules_xml.lua b/src/actions/vstudio/vs2010_rules_xml.lua
index f38b42d4..7a1dc089 100644
--- a/src/actions/vstudio/vs2010_rules_xml.lua
+++ b/src/actions/vstudio/vs2010_rules_xml.lua
@@ -42,6 +42,8 @@
return {
m.dataSource,
m.categories,
+ m.inputs,
+ m.properties,
}
end
@@ -96,41 +98,131 @@
+---
+-- Generate the list of property definitions.
+---
+
+ function m.properties(r)
+ local defs = r.propertyDefinition
+ for i = 1, #defs do
+ local def = defs[i]
+ if def.kind == "list" then
+ m.stringListProperty(def)
+ elseif type(def.values) == "table" then
+ m.enumProperty(def)
+ else
+ m.stringProperty(def)
+ end
+ end
+ end
+
+
+ function m.baseProperty(def)
+ p.w('Name="%s"', def.name)
+ p.w('HelpContext="0"')
+ p.w('DisplayName="%s"', def.display or def.name)
+ p.w('Description="%s"', def.description or def.display or def.name)
+ end
+
+
+ function m.enumProperty(def)
+ p.push('', switches[key] or values[key])
+ p.pop()
+ end
+
+ p.pop('')
+ end
+
+
+ function m.stringProperty(def)
+ p.push('')
+ p.pop()
+ end
+
+
+ function m.stringListProperty(def)
+ p.push('')
+ p.pop()
+ end
+
+
+
---
-- Implementations of individual elements.
---
function m.contentType(r)
- p.w('', r.name)
+ p.push('', r.name)
+ p.pop()
end
function m.dataSource(r)
p.push('')
- p.w('', r.name)
+ p.push('', r.name)
+ p.pop()
p.pop('')
end
function m.fileExtension(r)
- p.w('', r.name)
+ p.push('', r.name)
+ p.pop()
+ end
+
+
+
+ function m.inputs(r)
+ p.push('')
+
+ p.push('')
+ p.push('')
+ p.pop()
+
+ p.pop('')
+ p.pop('')
end
function m.ruleItem(r)
- p.w('', r.name)
+ p.push('', r.name)
+ p.pop()
end