Merge pull request #822 from Blizzard/vstudio-to-module
Move VStudio action into a module.
This commit is contained in:
commit
9dc4da43ed
@ -9,6 +9,8 @@
|
||||
|
||||
m.visuald = {}
|
||||
|
||||
require ("vstudio")
|
||||
|
||||
local vstudio = p.vstudio
|
||||
local workspace = p.workspace
|
||||
local project = p.project
|
||||
|
23
modules/vstudio/_manifest.lua
Normal file
23
modules/vstudio/_manifest.lua
Normal file
@ -0,0 +1,23 @@
|
||||
return {
|
||||
"_preload.lua",
|
||||
"vstudio.lua",
|
||||
"vs2005.lua",
|
||||
"vs2008.lua",
|
||||
"vs200x_vcproj.lua",
|
||||
"vs200x_vcproj_user.lua",
|
||||
"vs2005_solution.lua",
|
||||
"vs2005_csproj.lua",
|
||||
"vs2005_csproj_user.lua",
|
||||
"vs2010.lua",
|
||||
"vs2010_nuget.lua",
|
||||
"vs2010_vcxproj.lua",
|
||||
"vs2010_vcxproj_user.lua",
|
||||
"vs2010_vcxproj_filters.lua",
|
||||
"vs2010_rules_props.lua",
|
||||
"vs2010_rules_targets.lua",
|
||||
"vs2010_rules_xml.lua",
|
||||
"vs2012.lua",
|
||||
"vs2013.lua",
|
||||
"vs2015.lua",
|
||||
"vs2017.lua",
|
||||
}
|
37
modules/vstudio/_preload.lua
Normal file
37
modules/vstudio/_preload.lua
Normal file
@ -0,0 +1,37 @@
|
||||
--
|
||||
-- _preload.lua
|
||||
-- Define the makefile action(s).
|
||||
-- Copyright (c) 2002-2015 Jason Perkins and the Premake project
|
||||
--
|
||||
|
||||
local p = premake
|
||||
local project = p.project
|
||||
|
||||
-- initialize module.
|
||||
p.modules.vstudio = p.modules.vstudio or {}
|
||||
p.modules.vstudio._VERSION = p._VERSION
|
||||
p.vstudio = p.modules.vstudio
|
||||
|
||||
-- load actions.
|
||||
include("vs2005.lua")
|
||||
include("vs2008.lua")
|
||||
include("vs2010.lua")
|
||||
include("vs2012.lua")
|
||||
include("vs2013.lua")
|
||||
include("vs2015.lua")
|
||||
include("vs2017.lua")
|
||||
|
||||
--
|
||||
-- Decide when the full module should be loaded.
|
||||
--
|
||||
|
||||
return function(cfg)
|
||||
return
|
||||
_ACTION == "vs2005" or
|
||||
_ACTION == "vs2008" or
|
||||
_ACTION == "vs2010" or
|
||||
_ACTION == "vs2012" or
|
||||
_ACTION == "vs2013" or
|
||||
_ACTION == "vs2015" or
|
||||
_ACTION == "vs2017";
|
||||
end
|
86
modules/vstudio/tests/_tests.lua
Normal file
86
modules/vstudio/tests/_tests.lua
Normal file
@ -0,0 +1,86 @@
|
||||
require ("vstudio")
|
||||
|
||||
return {
|
||||
-- Visual Studio 2005-2013 C# projects
|
||||
"cs2005/test_assembly_refs.lua",
|
||||
"cs2005/test_build_events.lua",
|
||||
"cs2005/test_common_props.lua",
|
||||
"cs2005/test_compiler_props.lua",
|
||||
"cs2005/test_debug_props.lua",
|
||||
"cs2005/test_files.lua",
|
||||
"cs2005/test_icon.lua",
|
||||
"cs2005/test_nuget_config.lua",
|
||||
"cs2005/test_nuget_packages_config.lua",
|
||||
"cs2005/test_output_props.lua",
|
||||
"cs2005/projectelement.lua",
|
||||
"cs2005/test_platform_groups.lua",
|
||||
"cs2005/test_project_refs.lua",
|
||||
"cs2005/projectsettings.lua",
|
||||
"cs2005/test_targets.lua",
|
||||
"cs2005/test_user_file.lua",
|
||||
|
||||
-- Visual Studio 2005-2013 solutions
|
||||
"sln2005/test_dependencies.lua",
|
||||
"sln2005/test_header.lua",
|
||||
"sln2005/test_nested_projects.lua",
|
||||
"sln2005/test_projects.lua",
|
||||
"sln2005/test_platforms.lua",
|
||||
"sln2005/test_sections.lua",
|
||||
|
||||
-- Visual Studio 2002-2008 C/C++ projects
|
||||
"vc200x/test_assembly_refs.lua",
|
||||
"vc200x/test_build_steps.lua",
|
||||
"vc200x/test_configuration.lua",
|
||||
"vc200x/test_compiler_block.lua",
|
||||
"vc200x/test_debug_settings.lua",
|
||||
"vc200x/test_excluded_configs.lua",
|
||||
"vc200x/test_files.lua",
|
||||
"vc200x/test_linker_block.lua",
|
||||
"vc200x/test_manifest_block.lua",
|
||||
"vc200x/test_nmake_settings.lua",
|
||||
"vc200x/test_platforms.lua",
|
||||
"vc200x/test_project.lua",
|
||||
"vc200x/test_project_refs.lua",
|
||||
"vc200x/test_resource_compiler.lua",
|
||||
"vc200x/test_user_file.lua",
|
||||
|
||||
-- Visual Studio 2010-2013 C/C++ projects
|
||||
"vc2010/test_assembly_refs.lua",
|
||||
"vc2010/test_build_events.lua",
|
||||
"vc2010/test_build_log.lua",
|
||||
"vc2010/test_character_set.lua",
|
||||
"vc2010/test_compile_settings.lua",
|
||||
"vc2010/test_config_props.lua",
|
||||
"vc2010/test_debug_settings.lua",
|
||||
"vc2010/test_excluded_configs.lua",
|
||||
"vc2010/test_extension_settings.lua",
|
||||
"vc2010/test_extension_targets.lua",
|
||||
"vc2010/test_language_settings.lua",
|
||||
"vc2010/test_language_targets.lua",
|
||||
"vc2010/test_floatingpoint.lua",
|
||||
"vc2010/test_globals.lua",
|
||||
"vc2010/test_header.lua",
|
||||
"vc2010/test_files.lua",
|
||||
"vc2010/test_filter_ids.lua",
|
||||
"vc2010/test_filters.lua",
|
||||
"vc2010/test_imagexex_settings.lua",
|
||||
"vc2010/test_item_def_group.lua",
|
||||
"vc2010/test_link.lua",
|
||||
"vc2010/test_manifest.lua",
|
||||
"vc2010/test_nmake_props.lua",
|
||||
"vc2010/test_nuget_packages_config.lua",
|
||||
"vc2010/test_output_props.lua",
|
||||
"vc2010/test_platform_toolset.lua",
|
||||
"vc2010/test_project_configs.lua",
|
||||
"vc2010/test_project_refs.lua",
|
||||
"vc2010/test_prop_sheet.lua",
|
||||
"vc2010/test_resource_compile.lua",
|
||||
"vc2010/test_rule_props.lua",
|
||||
"vc2010/test_rule_targets.lua",
|
||||
"vc2010/test_rule_vars.lua",
|
||||
"vc2010/test_rule_xml.lua",
|
||||
"vc2010/test_target_machine.lua",
|
||||
"vc2010/test_user_file.lua",
|
||||
"vc2010/test_vectorextensions.lua",
|
||||
"vc2010/test_ensure_nuget_imports.lua",
|
||||
}
|
0
tests/actions/vstudio/cs2005/projectelement.lua → modules/vstudio/tests/cs2005/projectelement.lua
Executable file → Normal file
0
tests/actions/vstudio/cs2005/projectelement.lua → modules/vstudio/tests/cs2005/projectelement.lua
Executable file → Normal file
0
tests/actions/vstudio/cs2005/projectsettings.lua → modules/vstudio/tests/cs2005/projectsettings.lua
Executable file → Normal file
0
tests/actions/vstudio/cs2005/projectsettings.lua → modules/vstudio/tests/cs2005/projectsettings.lua
Executable file → Normal file
0
tests/actions/vstudio/cs2005/test_files.lua → modules/vstudio/tests/cs2005/test_files.lua
Executable file → Normal file
0
tests/actions/vstudio/cs2005/test_files.lua → modules/vstudio/tests/cs2005/test_files.lua
Executable file → Normal file
0
tests/actions/vstudio/sln2005/test_dependencies.lua → modules/vstudio/tests/sln2005/test_dependencies.lua
Executable file → Normal file
0
tests/actions/vstudio/sln2005/test_dependencies.lua → modules/vstudio/tests/sln2005/test_dependencies.lua
Executable file → Normal file
0
tests/actions/vstudio/sln2005/test_header.lua → modules/vstudio/tests/sln2005/test_header.lua
Executable file → Normal file
0
tests/actions/vstudio/sln2005/test_header.lua → modules/vstudio/tests/sln2005/test_header.lua
Executable file → Normal file
0
tests/actions/vstudio/sln2005/test_projects.lua → modules/vstudio/tests/sln2005/test_projects.lua
Executable file → Normal file
0
tests/actions/vstudio/sln2005/test_projects.lua → modules/vstudio/tests/sln2005/test_projects.lua
Executable file → Normal file
0
tests/actions/vstudio/vc200x/test_configuration.lua → modules/vstudio/tests/vc200x/test_configuration.lua
Executable file → Normal file
0
tests/actions/vstudio/vc200x/test_configuration.lua → modules/vstudio/tests/vc200x/test_configuration.lua
Executable file → Normal file
0
tests/actions/vstudio/vc200x/test_manifest_block.lua → modules/vstudio/tests/vc200x/test_manifest_block.lua
Executable file → Normal file
0
tests/actions/vstudio/vc200x/test_manifest_block.lua → modules/vstudio/tests/vc200x/test_manifest_block.lua
Executable file → Normal file
0
tests/actions/vstudio/vc200x/test_platforms.lua → modules/vstudio/tests/vc200x/test_platforms.lua
Executable file → Normal file
0
tests/actions/vstudio/vc200x/test_platforms.lua → modules/vstudio/tests/vc200x/test_platforms.lua
Executable file → Normal file
0
tests/actions/vstudio/vc2010/test_config_props.lua → modules/vstudio/tests/vc2010/test_config_props.lua
Executable file → Normal file
0
tests/actions/vstudio/vc2010/test_config_props.lua → modules/vstudio/tests/vc2010/test_config_props.lua
Executable file → Normal file
0
tests/actions/vstudio/vc2010/test_debug_settings.lua → modules/vstudio/tests/vc2010/test_debug_settings.lua
Executable file → Normal file
0
tests/actions/vstudio/vc2010/test_debug_settings.lua → modules/vstudio/tests/vc2010/test_debug_settings.lua
Executable file → Normal file
0
tests/actions/vstudio/vc2010/test_files.lua → modules/vstudio/tests/vc2010/test_files.lua
Executable file → Normal file
0
tests/actions/vstudio/vc2010/test_files.lua → modules/vstudio/tests/vc2010/test_files.lua
Executable file → Normal file
0
tests/actions/vstudio/vc2010/test_globals.lua → modules/vstudio/tests/vc2010/test_globals.lua
Executable file → Normal file
0
tests/actions/vstudio/vc2010/test_globals.lua → modules/vstudio/tests/vc2010/test_globals.lua
Executable file → Normal file
0
tests/actions/vstudio/vc2010/test_output_props.lua → modules/vstudio/tests/vc2010/test_output_props.lua
Executable file → Normal file
0
tests/actions/vstudio/vc2010/test_output_props.lua → modules/vstudio/tests/vc2010/test_output_props.lua
Executable file → Normal file
0
tests/actions/vstudio/vc2010/test_project_configs.lua → modules/vstudio/tests/vc2010/test_project_configs.lua
Executable file → Normal file
0
tests/actions/vstudio/vc2010/test_project_configs.lua → modules/vstudio/tests/vc2010/test_project_configs.lua
Executable file → Normal file
0
tests/actions/vstudio/vc2010/test_prop_sheet.lua → modules/vstudio/tests/vc2010/test_prop_sheet.lua
Executable file → Normal file
0
tests/actions/vstudio/vc2010/test_prop_sheet.lua → modules/vstudio/tests/vc2010/test_prop_sheet.lua
Executable file → Normal file
0
tests/actions/vstudio/vc2010/test_resource_compile.lua → modules/vstudio/tests/vc2010/test_resource_compile.lua
Executable file → Normal file
0
tests/actions/vstudio/vc2010/test_resource_compile.lua → modules/vstudio/tests/vc2010/test_resource_compile.lua
Executable file → Normal file
@ -17,7 +17,7 @@
|
||||
-- Map Premake tokens to the corresponding Visual Studio variables.
|
||||
---
|
||||
|
||||
vstudio.pathVars = {
|
||||
vs2010.pathVars = {
|
||||
["cfg.objdir"] = { absolute = true, token = "$(IntDir)" },
|
||||
["prj.location"] = { absolute = true, token = "$(ProjectDir)" },
|
||||
["prj.name"] = { absolute = false, token = "$(ProjectName)" },
|
||||
@ -163,7 +163,7 @@
|
||||
vstudio.cleanTarget(prj)
|
||||
end,
|
||||
|
||||
pathVars = vstudio.pathVars,
|
||||
pathVars = vs2010.pathVars,
|
||||
|
||||
-- This stuff is specific to the Visual Studio exporters
|
||||
|
0
src/actions/vstudio/vs2010_vcxproj_user.lua → modules/vstudio/vs2010_vcxproj_user.lua
Executable file → Normal file
0
src/actions/vstudio/vs2010_vcxproj_user.lua → modules/vstudio/vs2010_vcxproj_user.lua
Executable file → Normal file
@ -6,9 +6,6 @@
|
||||
|
||||
local p = premake
|
||||
local vstudio = p.vstudio
|
||||
local cs2005 = vstudio.cs2005
|
||||
local vc2010 = vstudio.vc2010
|
||||
|
||||
|
||||
---
|
||||
-- Define the Visual Studio 2010 export action.
|
||||
@ -56,7 +53,7 @@
|
||||
vstudio.cleanTarget(prj)
|
||||
end,
|
||||
|
||||
pathVars = vstudio.pathVars,
|
||||
pathVars = vstudio.vs2010.pathVars,
|
||||
|
||||
-- This stuff is specific to the Visual Studio exporters
|
||||
|
||||
@ -68,4 +65,3 @@
|
||||
platformToolset = "v110"
|
||||
}
|
||||
}
|
||||
|
@ -5,13 +5,7 @@
|
||||
--
|
||||
|
||||
local p = premake
|
||||
p.vstudio.vc2013 = {}
|
||||
|
||||
local vstudio = p.vstudio
|
||||
local vc2010 = vstudio.vc2010
|
||||
|
||||
local m = vstudio.vc2013
|
||||
|
||||
|
||||
---
|
||||
-- Define the Visual Studio 2013 export action.
|
||||
@ -59,7 +53,7 @@
|
||||
vstudio.cleanTarget(prj)
|
||||
end,
|
||||
|
||||
pathVars = vstudio.pathVars,
|
||||
pathVars = vstudio.vs2010.pathVars,
|
||||
|
||||
-- This stuff is specific to the Visual Studio exporters
|
||||
|
@ -5,13 +5,7 @@
|
||||
--
|
||||
|
||||
local p = premake
|
||||
p.vstudio.vc2015 = {}
|
||||
|
||||
local vstudio = p.vstudio
|
||||
local vc2010 = vstudio.vc2010
|
||||
|
||||
local m = vstudio.vc2015
|
||||
|
||||
|
||||
---
|
||||
-- Define the Visual Studio 2015 export action.
|
||||
@ -59,7 +53,7 @@
|
||||
vstudio.cleanTarget(prj)
|
||||
end,
|
||||
|
||||
pathVars = vstudio.pathVars,
|
||||
pathVars = vstudio.vs2010.pathVars,
|
||||
|
||||
-- This stuff is specific to the Visual Studio exporters
|
||||
|
@ -5,13 +5,7 @@
|
||||
--
|
||||
|
||||
local p = premake
|
||||
p.vstudio.vc2017 = {}
|
||||
|
||||
local vstudio = p.vstudio
|
||||
local vc2010 = vstudio.vc2010
|
||||
|
||||
local m = vstudio.vc2017
|
||||
|
||||
|
||||
---
|
||||
-- Define the Visual Studio 2017 export action.
|
||||
@ -40,26 +34,26 @@
|
||||
-- Workspace and project generation logic
|
||||
|
||||
onWorkspace = function(wks)
|
||||
vstudio.vs2005.generateSolution(wks)
|
||||
p.vstudio.vs2005.generateSolution(wks)
|
||||
end,
|
||||
onProject = function(prj)
|
||||
vstudio.vs2010.generateProject(prj)
|
||||
p.vstudio.vs2010.generateProject(prj)
|
||||
end,
|
||||
onRule = function(rule)
|
||||
vstudio.vs2010.generateRule(rule)
|
||||
p.vstudio.vs2010.generateRule(rule)
|
||||
end,
|
||||
|
||||
onCleanWorkspace = function(wks)
|
||||
vstudio.cleanSolution(wks)
|
||||
p.vstudio.cleanSolution(wks)
|
||||
end,
|
||||
onCleanProject = function(prj)
|
||||
vstudio.cleanProject(prj)
|
||||
p.vstudio.cleanProject(prj)
|
||||
end,
|
||||
onCleanTarget = function(prj)
|
||||
vstudio.cleanTarget(prj)
|
||||
p.vstudio.cleanTarget(prj)
|
||||
end,
|
||||
|
||||
pathVars = vstudio.pathVars,
|
||||
pathVars = vstudio.vs2010.pathVars,
|
||||
|
||||
-- This stuff is specific to the Visual Studio exporters
|
||||
|
@ -1,17 +1,21 @@
|
||||
--
|
||||
-- _vstudio.lua
|
||||
-- vstudio.lua
|
||||
-- Define the Visual Studio 200x actions.
|
||||
-- Copyright (c) 2008-2013 Jason Perkins and the Premake project
|
||||
-- Copyright (c) 2002-2017 Jason Perkins and the Premake project
|
||||
--
|
||||
|
||||
local p = premake
|
||||
p.vstudio = {}
|
||||
local vstudio = p.vstudio
|
||||
|
||||
p.modules.vstudio = p.modules.vstudio or {}
|
||||
p.modules.vstudio._VERSION = p._VERSION
|
||||
|
||||
-- for backwards compatibility.
|
||||
p.vstudio = p.modules.vstudio
|
||||
|
||||
local vstudio = p.vstudio
|
||||
local project = p.project
|
||||
local config = p.config
|
||||
|
||||
|
||||
--
|
||||
-- Mapping tables from Premake systems and architectures to Visual Studio
|
||||
-- identifiers. Broken out as tables so new values can be pushed in by
|
||||
@ -616,3 +620,22 @@
|
||||
end
|
||||
|
||||
|
||||
|
||||
--
|
||||
-- Load all required code, and return the module.
|
||||
--
|
||||
|
||||
include("vs200x_vcproj.lua")
|
||||
include("vs200x_vcproj_user.lua")
|
||||
include("vs2005_solution.lua")
|
||||
include("vs2005_csproj.lua")
|
||||
include("vs2005_csproj_user.lua")
|
||||
include("vs2010_nuget.lua")
|
||||
include("vs2010_vcxproj.lua")
|
||||
include("vs2010_vcxproj_user.lua")
|
||||
include("vs2010_vcxproj_filters.lua")
|
||||
include("vs2010_rules_props.lua")
|
||||
include("vs2010_rules_targets.lua")
|
||||
include("vs2010_rules_xml.lua")
|
||||
|
||||
return p.modules.vstudio
|
@ -64,28 +64,6 @@
|
||||
"tools/snc.lua",
|
||||
"tools/clang.lua",
|
||||
|
||||
-- Visual Studio actions
|
||||
"actions/vstudio/_vstudio.lua",
|
||||
"actions/vstudio/vs2005.lua",
|
||||
"actions/vstudio/vs2008.lua",
|
||||
"actions/vstudio/vs200x_vcproj.lua",
|
||||
"actions/vstudio/vs200x_vcproj_user.lua",
|
||||
"actions/vstudio/vs2005_solution.lua",
|
||||
"actions/vstudio/vs2005_csproj.lua",
|
||||
"actions/vstudio/vs2005_csproj_user.lua",
|
||||
"actions/vstudio/vs2010.lua",
|
||||
"actions/vstudio/vs2010_nuget.lua",
|
||||
"actions/vstudio/vs2010_vcxproj.lua",
|
||||
"actions/vstudio/vs2010_vcxproj_user.lua",
|
||||
"actions/vstudio/vs2010_vcxproj_filters.lua",
|
||||
"actions/vstudio/vs2010_rules_props.lua",
|
||||
"actions/vstudio/vs2010_rules_targets.lua",
|
||||
"actions/vstudio/vs2010_rules_xml.lua",
|
||||
"actions/vstudio/vs2012.lua",
|
||||
"actions/vstudio/vs2013.lua",
|
||||
"actions/vstudio/vs2015.lua",
|
||||
"actions/vstudio/vs2017.lua",
|
||||
|
||||
-- Clean action
|
||||
"actions/clean/_clean.lua",
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user