Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/windirstat.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Schneider <oliver@assarbad.net>2017-03-21 03:08:14 +0300
committerOliver Schneider <oliver@assarbad.net>2017-03-21 03:08:14 +0300
commit30dd07c538311096910adee20844b6ddcd541366 (patch)
treef07331cfbf6b240bacc5656a1d5444afb24e3604 /premake4.lua
parent5b0c1da8e52115d9344c63374df2392bfc9340c0 (diff)
Amended ignore file
Updated premake4.exe binary (again code-signed) Updated setvcvars.cmd script Adding projects missing from the VS2015 solution, migrated to VS2017 solution and projects All VS201x projects now include UTF-8 BOM upon generation premake4.lua now allows to generate v1??_xp projects for newer VS versions Updated two more .cmd scripts to make use of the --xp option to the premake4.lua
Diffstat (limited to 'premake4.lua')
-rw-r--r--premake4.lua37
1 files changed, 30 insertions, 7 deletions
diff --git a/premake4.lua b/premake4.lua
index bcdf387..713d992 100644
--- a/premake4.lua
+++ b/premake4.lua
@@ -7,7 +7,7 @@
]]
local assemblyName = "WinDirStat_Team.WinDirStat.windirstat"
local programVersion = "1.3" -- until we find a clever way to put this into an environment variable or so ...
-local publicKeyToken = "db89f19495b8f232" -- the token for the code-signing
+local publicKeyToken = "db89f19495b8f232" -- the token for the code-signing, TODO/FIXME: verify!
local action = _ACTION or ""
local release = false
local slnname = ""
@@ -55,9 +55,9 @@ do
-- Name the project files after their VS version
local orig_getbasename = premake.project.getbasename
premake.project.getbasename = function(prjname, pattern)
- -- The below is used to insert the .vs(8|9|10|11|12|14) into the file names for projects and solutions
+ -- The below is used to insert the .vs(8|9|10|11|12|14|15) into the file names for projects and solutions
if _ACTION then
- name_map = {vs2005 = "vs8", vs2008 = "vs9", vs2010 = "vs10", vs2012 = "vs11", vs2013 = "vs12", vs2015 = "vs14"}
+ name_map = {vs2005 = "vs8", vs2008 = "vs9", vs2010 = "vs10", vs2012 = "vs11", vs2013 = "vs12", vs2015 = "vs14", vs2017 = "vs15"}
if name_map[_ACTION] then
pattern = pattern:gsub("%%%%", "%%%%." .. name_map[_ACTION])
else
@@ -91,6 +91,31 @@ do
end
return orig_config_isincrementallink(cfg)
end
+ -- We want to output the file with UTF-8 BOM
+ local orig_vc2010_header = premake.vstudio.vc2010.header
+ premake.vstudio.vc2010.header = function(targets)
+ io.capture()
+ orig_vc2010_header(targets)
+ local captured = io.endcapture()
+ io.write("\239\187\191")
+ io.write(captured)
+ end
+ -- Make sure we can generate XP-compatible projects for newer Visual Studio versions
+ local orig_vc2010_configurationPropertyGroup = premake.vstudio.vc2010.configurationPropertyGroup
+ premake.vstudio.vc2010.configurationPropertyGroup = function(cfg, cfginfo)
+ io.capture()
+ orig_vc2010_configurationPropertyGroup(cfg, cfginfo)
+ local captured = io.endcapture()
+ local toolsets = { vs2012 = "v110", vs2013 = "v120", vs2015 = "v140", vs2017 = "v141" }
+ local toolset = toolsets[_ACTION]
+ if toolset then
+ if _OPTIONS["xp"] then
+ toolset = toolset .. "_xp"
+ captured = captured:gsub("(</PlatformToolset>)", "_xp%1")
+ end
+ end
+ io.write(captured)
+ end
-- Override the project creation to suppress unnecessary configurations
-- these get invoked by sln2005.generate per project ...
-- ... they depend on the values in the sln.vstudio_configs table
@@ -188,6 +213,7 @@ newoption { trigger = "resources", description = "Also create projects for the r
newoption { trigger = "sdk71", description = "Applies to VS 2005 and 2008. If you have the Windows 7 SP1\n SDK, use this to create projects for a feature-complete\n WinDirStat." }
newoption { trigger = "release", description = "Creates a solution suitable for a release build." }
newoption { trigger = "dev", description = "Add projects only relevant during development." }
+newoption { trigger = "xp", description = "Enable XP-compatible build for newer Visual Studio versions." }
solution (iif(release, slnname, "windirstat"))
configurations (iif(release, {"Release"}, {"Debug", "Release"}))
@@ -291,12 +317,9 @@ solution (iif(release, slnname, "windirstat"))
configuration {"vs2005", "windirstat/WDS_Lua_C.c"}
defines ("_CRT_SECURE_NO_WARNINGS") -- _CRT_SECURE_NO_DEPRECATE, _SCL_SECURE_NO_WARNINGS, _AFX_SECURE_NO_WARNINGS and _ATL_SECURE_NO_WARNINGS???
- configuration {"vs2013"}
+ configuration {"vs*"}
defines {"WINVER=0x0501"}
- configuration {"vs2002 or vs2003 or vs2005 or vs2008 or vs2010 or vs2012"}
- defines {"WINVER=0x0500"}
-
if _OPTIONS["sdk71"] then
configuration {"vs2005 or vs2008"}
defines {"HAVE_WIN7_SDK=1"}