From 599e231d3a097f130a22b40fddc2cfe27fd2e82f Mon Sep 17 00:00:00 2001 From: Jason Perkins Date: Fri, 19 Sep 2014 15:26:56 -0400 Subject: [PATCH] Fill in more command line properties; add file extension --- src/_premake_init.lua | 8 ++ src/actions/vstudio/vs2010_rules_targets.lua | 7 + src/actions/vstudio/vs2010_rules_xml.lua | 144 ++++++++++++++++++- 3 files changed, 155 insertions(+), 4 deletions(-) diff --git a/src/_premake_init.lua b/src/_premake_init.lua index 4c7635b3..61784844 100644 --- a/src/_premake_init.lua +++ b/src/_premake_init.lua @@ -256,6 +256,14 @@ removefiles(value) end + + api.register { + name = "fileExtension", + scope = "rule", + kind = "string", + } + + api.register { name = "filename", scope = { "project", "rule" }, diff --git a/src/actions/vstudio/vs2010_rules_targets.lua b/src/actions/vstudio/vs2010_rules_targets.lua index 44989131..5501a34d 100644 --- a/src/actions/vstudio/vs2010_rules_targets.lua +++ b/src/actions/vstudio/vs2010_rules_targets.lua @@ -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 diff --git a/src/actions/vstudio/vs2010_rules_xml.lua b/src/actions/vstudio/vs2010_rules_xml.lua index a304c763..9674c6a7 100644 --- a/src/actions/vstudio/vs2010_rules_xml.lua +++ b/src/actions/vstudio/vs2010_rules_xml.lua @@ -29,7 +29,7 @@ function m.generate(r) p.callArray(m.elements.project, r) - p.pop('') + p.out('') 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('') + p.pop() + end + + + + function m.additionalOptions(r) + p.push('') + p.push('') + p.w('Additional Options') + p.pop('') + p.push('') + p.w('Additional Options') + p.pop('') + p.pop('') + end + + + + function m.afterTargets(r) + p.push('') + + p.push('') + p.w('Execute After') + p.pop('') + + p.push('') + p.w('Specifies the targets for the build customization to run after.') + p.pop('') + + p.push('') + p.push('', r.name) + p.pop() + p.pop('') + + p.push('') + p.push('') + p.pop() + p.pop('') + + p.pop('') + end + + + + function m.beforeTargets(r) + p.push('') + + p.push('') + p.w('Execute Before') + p.pop('') + + p.push('') + p.w('Specifies the targets for the build customization to run before.') + p.pop('') + + p.push('') + p.push('', r.name) + p.pop() + p.pop('') + + p.push('') + p.push('') + p.pop() + p.pop('') + + p.pop('') + end + + + + function m.commandLineTemplate(r) + p.push('') + p.pop() + end + + + function m.contentType(r) p.push('', r.name) p.pop() end @@ -208,9 +322,20 @@ + function m.executionDescription(r) + p.push('') + p.pop() + end + + + function m.fileExtension(r) p.push('', r.name) p.pop() end @@ -237,10 +362,21 @@ + function m.outputs(r) + p.push('') + p.pop() + end + + + function m.ruleItem(r) p.push('', r.name) + p.w('DisplayName="%s" />', r.display or r.name) p.pop() end