diff --git a/src/actions/vstudio/vs200x_vcproj.lua b/src/actions/vstudio/vs200x_vcproj.lua index ea7760ab..4a2a6ea5 100644 --- a/src/actions/vstudio/vs200x_vcproj.lua +++ b/src/actions/vstudio/vs200x_vcproj.lua @@ -208,10 +208,134 @@ --------------------------------------------------------------------------- -- --- Handlers for the individual tool sections of the project +-- Handlers for the individual tool sections of the project. +-- +-- There is a lot of repetition here; most of these tools are just +-- placeholders for modules to override as needed. -- --------------------------------------------------------------------------- + +--- +-- The implementation of a "normal" tool. Writes the opening tool element +-- and name attribute, calls the corresponding function list, and then +-- closes the element. +-- +-- @param name +-- The name of the tool, e.g. "VCCustomBuildTool". +-- @param ... +-- Any additional arguments required by the call list. +--- + + function _.VCTool(name, ...) + _p(3,'') + end + + + + _.elements.VCALinkTool = function(cfg) + return {} + end + + function _.VCALinkTool(cfg) + _.VCTool("VCALinkTool", cfg) + end + + + + _.elements.VCAppVerifierTool = function(cfg) + return {} + end + + function _.VCAppVerifierTool(cfg) + if cfg.kind ~= premake.STATICLIB then + _.VCTool("VCAppVerifierTool", cfg) + end + end + + + _.elements.VCBscMakeTool = function(cfg) + return {} + end + + function _.VCBscMakeTool(cfg) + _.VCTool("VCBscMakeTool", cfg) + end + + + + _.elements.VCCustomBuildTool = function(cfg) + return {} + end + + function _.VCCustomBuildTool(cfg) + _.VCTool("VCCustomBuildTool", cfg) + end + + + + _.elements.VCFxCopTool = function(cfg) + return {} + end + + function _.VCFxCopTool(cfg) + _.VCTool("VCFxCopTool", cfg) + end + + + + _.elements.VCManagedResourceCompilerTool = function(cfg) + return {} + end + + function _.VCManagedResourceCompilerTool(cfg) + _.VCTool("VCManagedResourceCompilerTool", cfg) + end + + + + _.elements.VCWebServiceProxyGeneratorTool = function(cfg) + return {} + end + + function _.VCWebServiceProxyGeneratorTool(cfg) + _.VCTool("VCWebServiceProxyGeneratorTool", cfg) + end + + + + _.elements.VCXDCMakeTool = function(cfg) + return {} + end + + function _.VCXDCMakeTool(cfg) + _.VCTool("VCXDCMakeTool", cfg) + end + + + + _.elements.VCXMLDataGeneratorTool = function(cfg) + return {} + end + + function _.VCXMLDataGeneratorTool(cfg) + _.VCTool("VCXMLDataGeneratorTool", cfg) + end + + + +--------------------------------------------------------------------------- +-- +-- EVERYTHING BELOW THIS NEEDS REWORK, which I'm in the process of +-- doing right now. Hold on tight. +-- +--------------------------------------------------------------------------- + + + --- -- Return the list of tools required to build a specific configuration. -- Each tool gets represented by an XML element in the project file. @@ -330,23 +454,15 @@ -- function _.tools(cfg) - for i, tool in ipairs(_.toolsForConfig(cfg)) do - if _.toolmap[tool] then - _.toolmap[tool](cfg) - else - _.tool(tool) + local calls = _.toolsForConfig(cfg) + for i, tool in ipairs(calls) do + if _[tool] then + _[tool](cfg) end end end - function _.VCAppVerifierTool(cfg) - if cfg.kind ~= premake.STATICLIB then - _.tool("VCAppVerifierTool") - end - end - - function _.VCCLCompilerTool(cfg) _p(3,'