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

github.com/windirstat/premake-4.x-stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Schneider <oliver@assarbad.net>2022-02-27 04:07:42 +0300
committerOliver Schneider <oliver@assarbad.net>2022-02-27 04:07:42 +0300
commitec945dcfb3116421ba196476355c364f1405617d (patch)
tree088f9e6f670bf3c8289147b4571fef053ae2a715
parent68abe9eb99e5d8aec6a5dacfd8859a5bb01dce0b (diff)
Trying to align output better with vanilla VS output4.4-wds-877
Added tests for some VS versions that weren't currently tested --HG-- branch : WDS-build
-rw-r--r--src/actions/vstudio/_vstudio.lua3
-rw-r--r--src/actions/vstudio/vs2005_csproj.lua17
-rw-r--r--src/actions/vstudio/vs2010_vcxproj.lua15
-rw-r--r--src/host/scripts.c121
-rw-r--r--tests/actions/vstudio/cs2005/buildevents.lua53
-rw-r--r--tests/actions/vstudio/vc200x/header.lua21
-rw-r--r--tests/premake4.lua1
7 files changed, 168 insertions, 63 deletions
diff --git a/src/actions/vstudio/_vstudio.lua b/src/actions/vstudio/_vstudio.lua
index d0b75d4..46acb94 100644
--- a/src/actions/vstudio/_vstudio.lua
+++ b/src/actions/vstudio/_vstudio.lua
@@ -22,6 +22,9 @@
x64 = "x64",
PS3 = "PS3",
Xbox360 = "Xbox 360",
+ Itanium = "Itanium",
+ ARM = "ARM",
+ ARM64 = "ARM64",
}
diff --git a/src/actions/vstudio/vs2005_csproj.lua b/src/actions/vstudio/vs2005_csproj.lua
index 37258e2..b7d4bbf 100644
--- a/src/actions/vstudio/vs2005_csproj.lua
+++ b/src/actions/vstudio/vs2005_csproj.lua
@@ -207,6 +207,23 @@
end
end
+--
+-- Write the build events groups.
+--
+
+ function cs2005.buildevents(cfg)
+ if #cfg.prebuildcommands > 0 then
+ _p(' <PropertyGroup>')
+ _p(' <PreBuildEvent>%s</PreBuildEvent>', premake.esc(table.implode(cfg.prebuildcommands, "", "", "\r\n")))
+ _p(' </PropertyGroup>')
+ end
+ if #cfg.postbuildcommands > 0 then
+ _p(' <PropertyGroup>')
+ _p(' <PostBuildEvent>%s</PostBuildEvent>', premake.esc(table.implode(cfg.postbuildcommands, "", "", "\r\n")))
+ _p(' </PropertyGroup>')
+ end
+ end
+
--
-- The main function: write the project file.
diff --git a/src/actions/vstudio/vs2010_vcxproj.lua b/src/actions/vstudio/vs2010_vcxproj.lua
index 04deecd..0a6c4bc 100644
--- a/src/actions/vstudio/vs2010_vcxproj.lua
+++ b/src/actions/vstudio/vs2010_vcxproj.lua
@@ -576,12 +576,21 @@
io.eol = "\r\n"
_p('<?xml version="1.0" encoding="utf-8"?>')
- local t = ""
+ local action = premake.action.current()
+
+ local toolversion = ''
+ if (_ACTION >= "vs2010") and (_ACTION <= "vs2017") then
+ if action.vstudio.toolsVersion then
+ toolversion = string.format(' ToolsVersion="%s"', action.vstudio.toolsVersion)
+ end
+ end
+
+ local default_targets = ""
if targets then
- t = ' DefaultTargets="' .. targets .. '"'
+ default_targets = ' DefaultTargets="' .. targets .. '"'
end
- _p('<Project%s ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">', t)
+ _p('<Project%s%s xmlns="http://schemas.microsoft.com/developer/msbuild/2003">', default_targets, toolversion)
end
diff --git a/src/host/scripts.c b/src/host/scripts.c
index 8e64753..eb2f925 100644
--- a/src/host/scripts.c
+++ b/src/host/scripts.c
@@ -85,8 +85,8 @@ const char* builtin_scripts[] = {
/* tools/gcc.lua */
"premake.gcc={}premake.gcc.cc=\"gcc\"premake.gcc.cxx=\"g++\"premake.gcc.ar=\"ar\"local n={EnableSSE=\"-msse\",EnableSSE2=\"-msse2\",ExtraWarnings=\"-Wall -Wextra\",FatalWarnings=\"-Werror\",FloatFast=\"-ffast-math\",FloatStrict=\"-ffloat-store\",NoFramePointer=\"-fomit-frame-pointer\",Optimize=\"-O2\",OptimizeSize=\"-Os\",OptimizeSpeed=\"-O3\",Symbols=\"-g\",}local l={NoExceptions=\"-fno-exceptions\",NoRTTI=\"-fno-rtti\",}premake.gcc.platforms={Native={cppflags=\"-MMD\",},x32={cppflags=\"-MMD\",flags=\"-m32\",ldflags=\"-L/usr/lib32\",},x64={cppflags=\"-MMD\",flags=\"-m64\",ldflags=\"-L/usr/lib64\",},Universal={cppflags=\"\",flags=\"-arch i386 -arch x86_64 -arch ppc -arch ppc64\",},Universal32={cppflags=\"\",flags=\"-arch i386 -arch ppc\",},Universal64={cppflags=\"\",flags=\"-arch x86_64 -arch ppc64\",},PS3={cc=\"ppu-lv2-g++\",cxx=\"ppu-lv2-g++\",ar=\"ppu-lv2-ar\",cppflags=\"-MMD\",},WiiDev={cppflags=\"-MMD -MP -I$(LIBOGC_INC) $(MACHDEP)\",ldflags=\"-L$(LIBOGC_LIB) $(MACHDEP)\",cfgsettings=[[\n ifeq ($(strip $("
- "DEVKITPPC)),)\n $(error \"DEVKITPPC environment variable is not set\")'\n endif\n include $(DEVKITPPC)/wii_rules']],},}local t=premake.gcc.platforms\nfunction premake.gcc.getcppflags(a)local e={}table.insert(e,t[a.platform].cppflags)if e[1]:startswith(\"-MMD\")and a.system~=\"haiku\"then\ntable.insert(e,\"-MP\")end\nreturn e\nend\nfunction premake.gcc.getcflags(e)local a=table.translate(e.flags,n)table.insert(a,t[e.platform].flags)if e.system~=\"windows\"and e.kind==\"SharedLib\"then\ntable.insert(a,\"-fPIC\")end\nreturn a\nend\nfunction premake.gcc.getcxxflags(e)local e=table.translate(e.flags,l)return e\nend\nfunction premake.gcc.getldflags(e)local a={}if not e.flags.Symbols then\nif e.system==\"macosx\"then\ntable.insert(a,\"-Wl,-x\")else\ntable.insert(a,\"-s\")end\nend\nif e.kind==\"SharedLib\"then\nif e.system==\"macosx\"then\ntable.insert(a,\"-dynamiclib\")else\ntable.insert(a,\"-shared\")end\nif e.system==\"windows\"and not e.flags.NoImportLib then\ntable.insert(a,'-Wl,--out-implib=\"'..e.linktarget.f"
- "ullpath..'\"')end\nend\nif e.kind==\"WindowedApp\"and e.system==\"windows\"then\ntable.insert(a,\"-mwindows\")end\nlocal e=t[e.platform]table.insert(a,e.flags)table.insert(a,e.ldflags)return a\nend\nfunction premake.gcc.getlibdirflags(a)local e={}for t,a in ipairs(premake.getlinks(a,\"all\",\"directory\"))do\ntable.insert(e,'-L'.._MAKE.esc(a))end\nreturn e\nend\nfunction premake.gcc.getlinkflags(a)local e={}for t,a in ipairs(premake.getlinks(a,\"system\",\"name\"))do\nif path.getextension(a)==\".framework\"then\ntable.insert(e,'-framework '.._MAKE.esc(path.getbasename(a)))else\ntable.insert(e,'-l'.._MAKE.esc(a))end\nend\nreturn e\nend\nfunction premake.gcc.getdefines(a)local e={}for t,a in ipairs(a)do\ntable.insert(e,'-D'..a)end\nreturn e\nend\nfunction premake.gcc.getincludedirs(a)local e={}for t,a in ipairs(a)do\ntable.insert(e,\"-I\".._MAKE.esc(a))end\nreturn e\nend\nfunction premake.gcc.getcfgsettings(e)return t[e.platform].cfgsettings\nend",
+ "DEVKITPPC)),)\n $(error \"DEVKITPPC environment variable is not set\")'\n endif\n include $(DEVKITPPC)/wii_rules']],},}local t=premake.gcc.platforms\nfunction premake.gcc.getcppflags(a)local e={}table.insert(e,t[a.platform].cppflags)if e[1]:startswith(\"-MMD\")and a.system~=\"haiku\"then\ntable.insert(e,\"-MP\")end\nreturn e\nend\nfunction premake.gcc.getcflags(e)local a=table.translate(e.flags,n)table.insert(a,t[e.platform].flags)if e.system~=\"windows\"and e.kind==\"SharedLib\"then\ntable.insert(a,\"-fPIC\")end\nreturn a\nend\nfunction premake.gcc.getcxxflags(e)local e=table.translate(e.flags,l)return e\nend\nfunction premake.gcc.getldflags(e)local a={}if not e.flags.Symbols then\nif e.system==\"macosx\"then\ntable.insert(a,\"-Wl,-x\")else\ntable.insert(a,\"-s\")end\nend\nif e.kind==\"SharedLib\"then\nif e.system==\"macosx\"then\ntable.insert(a,\"-dynamiclib\")else\ntable.insert(a,\"-shared\")end\nif e.system==\"windows\"and not e.flags.NoImportLib then\ntable.insert(a,'-Wl,--out-implib=\"'..e.linktarge"
+ "t.fullpath..'\"')end\nend\nif e.kind==\"WindowedApp\"and e.system==\"windows\"then\ntable.insert(a,\"-mwindows\")end\nlocal e=t[e.platform]table.insert(a,e.flags)table.insert(a,e.ldflags)return a\nend\nfunction premake.gcc.getlibdirflags(a)local e={}for t,a in ipairs(premake.getlinks(a,\"all\",\"directory\"))do\ntable.insert(e,'-L'.._MAKE.esc(a))end\nreturn e\nend\nfunction premake.gcc.getlinkflags(a)local e={}for t,a in ipairs(premake.getlinks(a,\"system\",\"name\"))do\nif path.getextension(a)==\".framework\"then\ntable.insert(e,'-framework '.._MAKE.esc(path.getbasename(a)))else\ntable.insert(e,'-l'.._MAKE.esc(a))end\nend\nreturn e\nend\nfunction premake.gcc.getdefines(a)local e={}for t,a in ipairs(a)do\ntable.insert(e,'-D'..a)end\nreturn e\nend\nfunction premake.gcc.getincludedirs(a)local e={}for t,a in ipairs(a)do\ntable.insert(e,\"-I\".._MAKE.esc(a))end\nreturn e\nend\nfunction premake.gcc.getcfgsettings(e)return t[e.platform].cfgsettings\nend",
/* tools/msc.lua */
"premake.msc={}premake.msc.namestyle=\"windows\"",
@@ -162,16 +162,16 @@ const char* builtin_scripts[] = {
"'\\t%s',table.implode(e.prebuildcommands,\"\",\"\",\"\\n\\t\"))end\n_p(' endef')_p(' define PRELINKCMDS')if#e.prelinkcommands>0 then\n_p('\\t@echo Running pre-link commands')_p('\\t%s',table.implode(e.prelinkcommands,\"\",\"\",\"\\n\\t\"))end\n_p(' endef')_p(' define POSTBUILDCMDS')if#e.postbuildcommands>0 then\n_p('\\t@echo Running post-build commands')_p('\\t%s',table.implode(e.postbuildcommands,\"\",\"\",\"\\n\\t\"))end\n_p(' endef')_p('endif')_p('')end",
/* actions/vstudio/_vstudio.lua */
- "premake.vstudio={}local e=premake.vstudio\ne.platforms={any=\"Any CPU\",mixed=\"Mixed Platforms\",Native=\"Win32\",x86=\"x86\",x32=\"Win32\",x64=\"x64\",PS3=\"PS3\",Xbox360=\"Xbox 360\",}function e.arch(e)if(e.language==\"C#\")then\nif(_ACTION<\"vs2005\")then\nreturn\".NET\"else\nreturn\"Any CPU\"end\nelse\nreturn\"Win32\"end\nend\nfunction e.buildconfigs(r)local s={}local n=premake.filterplatforms(r,e.platforms,\"Native\")local o=premake.hascppproject(r)local a=premake.hasdotnetproject(r)if a and(_ACTION>\"vs2008\"or o)then\ntable.insert(n,1,\"mixed\")end\nif a and(_ACTION<\"vs2010\"or not o)then\ntable.insert(n,1,\"any\")end\nif _ACTION>\"vs2008\"then\nlocal r={}for s,t in ipairs(n)do\nif e.platforms[t]==\"Win32\"then\nif o then\ntable.insert(r,t)end\nif a then\ntable.insert(r,\"x86\")end\nelse\ntable.insert(r,t)end\nend\nn=r\nend\nfor r,o in ipairs(r.configurations)do\nfor n,r in ipairs(n)do\nlocal n={}n.src_buildcfg=o\nn.src_platform=r\nif r~=\"PS3\"or _ACTION>\"vs2008\"then\nn.buildcfg=o\nn.platform=e.pla"
- "tforms[r]else\nn.buildcfg=r..\" \"..o\nn.platform=\"Win32\"end\nn.name=n.buildcfg..\"|\"..n.platform\nn.isreal=(r~=\"any\"and r~=\"mixed\")table.insert(s,n)end\nend\nreturn s\nend\nfunction e.cleansolution(e)premake.clean.file(e,\"%%.sln\")premake.clean.file(e,\"%%.suo\")premake.clean.file(e,\"%%.ncb\")premake.clean.file(e,\"%%.userprefs\")premake.clean.file(e,\"%%.usertasks\")end\nfunction e.cleanproject(e)local e=premake.project.getfilename(e,\"%%\")os.remove(e..\".vcproj\")os.remove(e..\".vcxproj\")os.remove(e..\".vcxproj.filters\")os.remove(e..\".csproj\")os.remove(e..\".pidb\")os.remove(e..\".sdf\")if _OPTIONS.generate_user then\nos.remove(e..\".vcproj.user\")os.remove(e..\".vcxproj.user\")os.remove(e..\".csproj.user\")end\nend\nfunction e.cleantarget(e)os.remove(e..\".pdb\")os.remove(e..\".idb\")os.remove(e..\".ilk\")os.remove(e..\".vshost.exe\")os.remove(e..\".exe.manifest\")end\nfunction e.projectfile(n)local e\nif n.language==\"C#\"then\ne=\"%%.csproj\"else\ne=iif(_ACTION>\"vs2008\",\"%%.vcxproj\",\"%"
- "%.vcproj\")end\nlocal e=premake.project.getbasename(n.name,e)e=path.join(n.location,e)return e\nend\nfunction e.tool(e)if(e.language==\"C#\")then\nreturn\"FAE04EC0-301F-11D3-BF4B-00C04F79EFBC\"else\nreturn\"8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942\"end\nend\nnewaction{trigger=\"vs2002\",shortname=\"Visual Studio 2002\",description=\"Generate Microsoft Visual Studio 2002 project files\",os=\"windows\",valid_kinds={\"ConsoleApp\",\"WindowedApp\",\"StaticLib\",\"SharedLib\"},valid_languages={\"C\",\"C++\",\"C#\"},valid_tools={cc={\"msc\"},dotnet={\"msnet\"},},onsolution=function(n)premake.generate(n,\"%%.sln\",e.sln2002.generate)end,onproject=function(n)if premake.isdotnetproject(n)then\npremake.generate(n,\"%%.csproj\",e.cs2002.generate)if _OPTIONS.generate_user then\npremake.generate(n,\"%%.csproj.user\",e.cs2002.generate_user)end\nelse\npremake.generate(n,\"%%.vcproj\",e.vc200x.generate)if _OPTIONS.generate_user then\npremake.generate(n,\"%%.vcproj.user\",e.vc200x.generate_user)end\nend\nend,oncleansolution=premak"
- "e.vstudio.cleansolution,oncleanproject=premake.vstudio.cleanproject,oncleantarget=premake.vstudio.cleantarget,vstudio={}}newaction{trigger=\"vs2003\",shortname=\"Visual Studio 2003\",description=\"Generate Microsoft Visual Studio 2003 project files\",os=\"windows\",valid_kinds={\"ConsoleApp\",\"WindowedApp\",\"StaticLib\",\"SharedLib\"},valid_languages={\"C\",\"C++\",\"C#\"},valid_tools={cc={\"msc\"},dotnet={\"msnet\"},},onsolution=function(n)premake.generate(n,\"%%.sln\",e.sln2003.generate)end,onproject=function(n)if premake.isdotnetproject(n)then\npremake.generate(n,\"%%.csproj\",e.cs2002.generate)if _OPTIONS.generate_user then\npremake.generate(n,\"%%.csproj.user\",e.cs2002.generate_user)end\nelse\npremake.generate(n,\"%%.vcproj\",e.vc200x.generate)if _OPTIONS.generate_user then\npremake.generate(n,\"%%.vcproj.user\",e.vc200x.generate_user)end\nend\nend,oncleansolution=premake.vstudio.cleansolution,oncleanproject=premake.vstudio.cleanproject,oncleantarget=premake.vstudio.cleantarget,vstudio={}}newaction{tri"
- "gger=\"vs2005\",shortname=\"Visual Studio 2005\",description=\"Generate Microsoft Visual Studio 2005 project files\",os=\"windows\",valid_kinds={\"ConsoleApp\",\"WindowedApp\",\"StaticLib\",\"SharedLib\"},valid_languages={\"C\",\"C++\",\"C#\"},valid_tools={cc={\"msc\"},dotnet={\"msnet\"},},onsolution=function(n)premake.generate(n,\"%%.sln\",e.sln2005.generate)end,onproject=function(n)if premake.isdotnetproject(n)then\npremake.generate(n,\"%%.csproj\",e.cs2005.generate)if _OPTIONS.generate_user then\npremake.generate(n,\"%%.csproj.user\",e.cs2005.generate_user)end\nelse\npremake.generate(n,\"%%.vcproj\",e.vc200x.generate)if _OPTIONS.generate_user then\npremake.generate(n,\"%%.vcproj.user\",e.vc200x.generate_user)end\nend\nend,oncleansolution=e.cleansolution,oncleanproject=e.cleanproject,oncleantarget=e.cleantarget,vstudio={productVersion=\"8.0.50727\",solutionVersion=\"9\",}}newaction{trigger=\"vs2008\",shortname=\"Visual Studio 2008\",description=\"Generate Microsoft Visual Studio 2008 project files\",os=\"win"
- "dows\",valid_kinds={\"ConsoleApp\",\"WindowedApp\",\"StaticLib\",\"SharedLib\"},valid_languages={\"C\",\"C++\",\"C#\"},valid_tools={cc={\"msc\"},dotnet={\"msnet\"},},onsolution=function(n)premake.generate(n,\"%%.sln\",e.sln2005.generate)end,onproject=function(n)if premake.isdotnetproject(n)then\npremake.generate(n,\"%%.csproj\",e.cs2005.generate)if _OPTIONS.generate_user then\npremake.generate(n,\"%%.csproj.user\",e.cs2005.generate_user)end\nelse\npremake.generate(n,\"%%.vcproj\",e.vc200x.generate)if _OPTIONS.generate_user then\npremake.generate(n,\"%%.vcproj.user\",e.vc200x.generate_user)end\nend\nend,oncleansolution=e.cleansolution,oncleanproject=e.cleanproject,oncleantarget=e.cleantarget,vstudio={productVersion=\"9.0.21022\",solutionVersion=\"10\",toolsVersion=\"3.5\",}}newaction{trigger=\"vs2010\",shortname=\"Visual Studio 2010\",description=\"Generate Microsoft Visual Studio 2010 project files\",os=\"windows\",valid_kinds={\"ConsoleApp\",\"WindowedApp\",\"StaticLib\",\"SharedLib\"},valid_languages={\"C\","
- "\"C++\",\"C#\"},valid_tools={cc={\"msc\"},dotnet={\"msnet\"},},onsolution=function(n)premake.generate(n,\"%%.sln\",e.sln2005.generate)end,onproject=function(n)if premake.isdotnetproject(n)then\npremake.generate(n,\"%%.csproj\",e.cs2005.generate)if _OPTIONS.generate_user then\npremake.generate(n,\"%%.csproj.user\",e.cs2005.generate_user)end\nelse\npremake.generate(n,\"%%.vcxproj\",premake.vs2010_vcxproj)if _OPTIONS.generate_user then\npremake.generate(n,\"%%.vcxproj.user\",premake.vs2010_vcxproj_user)end\npremake.generate(n,\"%%.vcxproj.filters\",e.vc2010.generate_filters)end\nend,oncleansolution=premake.vstudio.cleansolution,oncleanproject=premake.vstudio.cleanproject,oncleantarget=premake.vstudio.cleantarget,vstudio={productVersion=\"8.0.30703\",solutionVersion=\"11\",targetFramework=\"4.0\",toolsVersion=\"4.0\",}}",
+ "premake.vstudio={}local e=premake.vstudio\ne.platforms={any=\"Any CPU\",mixed=\"Mixed Platforms\",Native=\"Win32\",x86=\"x86\",x32=\"Win32\",x64=\"x64\",PS3=\"PS3\",Xbox360=\"Xbox 360\",Itanium=\"Itanium\",ARM=\"ARM\",ARM64=\"ARM64\",}function e.arch(e)if(e.language==\"C#\")then\nif(_ACTION<\"vs2005\")then\nreturn\".NET\"else\nreturn\"Any CPU\"end\nelse\nreturn\"Win32\"end\nend\nfunction e.buildconfigs(r)local s={}local n=premake.filterplatforms(r,e.platforms,\"Native\")local t=premake.hascppproject(r)local a=premake.hasdotnetproject(r)if a and(_ACTION>\"vs2008\"or t)then\ntable.insert(n,1,\"mixed\")end\nif a and(_ACTION<\"vs2010\"or not t)then\ntable.insert(n,1,\"any\")end\nif _ACTION>\"vs2008\"then\nlocal r={}for s,o in ipairs(n)do\nif e.platforms[o]==\"Win32\"then\nif t then\ntable.insert(r,o)end\nif a then\ntable.insert(r,\"x86\")end\nelse\ntable.insert(r,o)end\nend\nn=r\nend\nfor r,t in ipairs(r.configurations)do\nfor n,r in ipairs(n)do\nlocal n={}n.src_buildcfg=t\nn.src_platform=r\nif r~=\"PS3\"or _ACTIO"
+ "N>\"vs2008\"then\nn.buildcfg=t\nn.platform=e.platforms[r]else\nn.buildcfg=r..\" \"..t\nn.platform=\"Win32\"end\nn.name=n.buildcfg..\"|\"..n.platform\nn.isreal=(r~=\"any\"and r~=\"mixed\")table.insert(s,n)end\nend\nreturn s\nend\nfunction e.cleansolution(e)premake.clean.file(e,\"%%.sln\")premake.clean.file(e,\"%%.suo\")premake.clean.file(e,\"%%.ncb\")premake.clean.file(e,\"%%.userprefs\")premake.clean.file(e,\"%%.usertasks\")end\nfunction e.cleanproject(e)local e=premake.project.getfilename(e,\"%%\")os.remove(e..\".vcproj\")os.remove(e..\".vcxproj\")os.remove(e..\".vcxproj.filters\")os.remove(e..\".csproj\")os.remove(e..\".pidb\")os.remove(e..\".sdf\")if _OPTIONS.generate_user then\nos.remove(e..\".vcproj.user\")os.remove(e..\".vcxproj.user\")os.remove(e..\".csproj.user\")end\nend\nfunction e.cleantarget(e)os.remove(e..\".pdb\")os.remove(e..\".idb\")os.remove(e..\".ilk\")os.remove(e..\".vshost.exe\")os.remove(e..\".exe.manifest\")end\nfunction e.projectfile(n)local e\nif n.language==\"C#\"then\ne=\"%%.csproj\"e"
+ "lse\ne=iif(_ACTION>\"vs2008\",\"%%.vcxproj\",\"%%.vcproj\")end\nlocal e=premake.project.getbasename(n.name,e)e=path.join(n.location,e)return e\nend\nfunction e.tool(e)if(e.language==\"C#\")then\nreturn\"FAE04EC0-301F-11D3-BF4B-00C04F79EFBC\"else\nreturn\"8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942\"end\nend\nnewaction{trigger=\"vs2002\",shortname=\"Visual Studio 2002\",description=\"Generate Microsoft Visual Studio 2002 project files\",os=\"windows\",valid_kinds={\"ConsoleApp\",\"WindowedApp\",\"StaticLib\",\"SharedLib\"},valid_languages={\"C\",\"C++\",\"C#\"},valid_tools={cc={\"msc\"},dotnet={\"msnet\"},},onsolution=function(n)premake.generate(n,\"%%.sln\",e.sln2002.generate)end,onproject=function(n)if premake.isdotnetproject(n)then\npremake.generate(n,\"%%.csproj\",e.cs2002.generate)if _OPTIONS.generate_user then\npremake.generate(n,\"%%.csproj.user\",e.cs2002.generate_user)end\nelse\npremake.generate(n,\"%%.vcproj\",e.vc200x.generate)if _OPTIONS.generate_user then\npremake.generate(n,\"%%.vcproj.user\",e.vc200x.ge"
+ "nerate_user)end\nend\nend,oncleansolution=premake.vstudio.cleansolution,oncleanproject=premake.vstudio.cleanproject,oncleantarget=premake.vstudio.cleantarget,vstudio={}}newaction{trigger=\"vs2003\",shortname=\"Visual Studio 2003\",description=\"Generate Microsoft Visual Studio 2003 project files\",os=\"windows\",valid_kinds={\"ConsoleApp\",\"WindowedApp\",\"StaticLib\",\"SharedLib\"},valid_languages={\"C\",\"C++\",\"C#\"},valid_tools={cc={\"msc\"},dotnet={\"msnet\"},},onsolution=function(n)premake.generate(n,\"%%.sln\",e.sln2003.generate)end,onproject=function(n)if premake.isdotnetproject(n)then\npremake.generate(n,\"%%.csproj\",e.cs2002.generate)if _OPTIONS.generate_user then\npremake.generate(n,\"%%.csproj.user\",e.cs2002.generate_user)end\nelse\npremake.generate(n,\"%%.vcproj\",e.vc200x.generate)if _OPTIONS.generate_user then\npremake.generate(n,\"%%.vcproj.user\",e.vc200x.generate_user)end\nend\nend,oncleansolution=premake.vstudio.cleansolution,oncleanproject=premake.vstudio.cleanproject,oncleantarget=prem"
+ "ake.vstudio.cleantarget,vstudio={}}newaction{trigger=\"vs2005\",shortname=\"Visual Studio 2005\",description=\"Generate Microsoft Visual Studio 2005 project files\",os=\"windows\",valid_kinds={\"ConsoleApp\",\"WindowedApp\",\"StaticLib\",\"SharedLib\"},valid_languages={\"C\",\"C++\",\"C#\"},valid_tools={cc={\"msc\"},dotnet={\"msnet\"},},onsolution=function(n)premake.generate(n,\"%%.sln\",e.sln2005.generate)end,onproject=function(n)if premake.isdotnetproject(n)then\npremake.generate(n,\"%%.csproj\",e.cs2005.generate)if _OPTIONS.generate_user then\npremake.generate(n,\"%%.csproj.user\",e.cs2005.generate_user)end\nelse\npremake.generate(n,\"%%.vcproj\",e.vc200x.generate)if _OPTIONS.generate_user then\npremake.generate(n,\"%%.vcproj.user\",e.vc200x.generate_user)end\nend\nend,oncleansolution=e.cleansolution,oncleanproject=e.cleanproject,oncleantarget=e.cleantarget,vstudio={productVersion=\"8.0.50727\",solutionVersion=\"9\",}}newaction{trigger=\"vs2008\",shortname=\"Visual Studio 2008\",description=\"Generate Micro"
+ "soft Visual Studio 2008 project files\",os=\"windows\",valid_kinds={\"ConsoleApp\",\"WindowedApp\",\"StaticLib\",\"SharedLib\"},valid_languages={\"C\",\"C++\",\"C#\"},valid_tools={cc={\"msc\"},dotnet={\"msnet\"},},onsolution=function(n)premake.generate(n,\"%%.sln\",e.sln2005.generate)end,onproject=function(n)if premake.isdotnetproject(n)then\npremake.generate(n,\"%%.csproj\",e.cs2005.generate)if _OPTIONS.generate_user then\npremake.generate(n,\"%%.csproj.user\",e.cs2005.generate_user)end\nelse\npremake.generate(n,\"%%.vcproj\",e.vc200x.generate)if _OPTIONS.generate_user then\npremake.generate(n,\"%%.vcproj.user\",e.vc200x.generate_user)end\nend\nend,oncleansolution=e.cleansolution,oncleanproject=e.cleanproject,oncleantarget=e.cleantarget,vstudio={productVersion=\"9.0.21022\",solutionVersion=\"10\",toolsVersion=\"3.5\",}}newaction{trigger=\"vs2010\",shortname=\"Visual Studio 2010\",description=\"Generate Microsoft Visual Studio 2010 project files\",os=\"windows\",valid_kinds={\"ConsoleApp\",\"WindowedApp\",\"St"
+ "aticLib\",\"SharedLib\"},valid_languages={\"C\",\"C++\",\"C#\"},valid_tools={cc={\"msc\"},dotnet={\"msnet\"},},onsolution=function(n)premake.generate(n,\"%%.sln\",e.sln2005.generate)end,onproject=function(n)if premake.isdotnetproject(n)then\npremake.generate(n,\"%%.csproj\",e.cs2005.generate)if _OPTIONS.generate_user then\npremake.generate(n,\"%%.csproj.user\",e.cs2005.generate_user)end\nelse\npremake.generate(n,\"%%.vcxproj\",premake.vs2010_vcxproj)if _OPTIONS.generate_user then\npremake.generate(n,\"%%.vcxproj.user\",premake.vs2010_vcxproj_user)end\npremake.generate(n,\"%%.vcxproj.filters\",e.vc2010.generate_filters)end\nend,oncleansolution=premake.vstudio.cleansolution,oncleanproject=premake.vstudio.cleanproject,oncleantarget=premake.vstudio.cleantarget,vstudio={productVersion=\"8.0.30703\",solutionVersion=\"11\",targetFramework=\"4.0\",toolsVersion=\"4.0\",}}",
/* actions/vstudio/vs2002_solution.lua */
- "premake.vstudio.sln2002={}local i=premake.vstudio\nlocal o=premake.vstudio.sln2002\nfunction o.generate(o)io.indent=nil\nio.eol='\\r\\n'o.vstudio_configs=premake.vstudio.buildconfigs(o)_p('Microsoft Visual Studio Solution File, Format Version 7.00')for n in premake.solution.eachproject(o)do\nlocal o=path.translate(path.getrelative(o.location,i.projectfile(n)))_p('Project(\"{%s}\") = \"%s\", \"%s\", \"{%s}\"',i.tool(n),n.name,o,n.uuid)_p('EndProject')end\n_p('Global')_p(1,'GlobalSection(SolutionConfiguration) = preSolution')for o,i in ipairs(o.configurations)do\n_p(2,'ConfigName.%d = %s',o-1,i)end\n_p(1,'EndGlobalSection')_p(1,'GlobalSection(ProjectDependencies) = postSolution')_p(1,'EndGlobalSection')_p(1,'GlobalSection(ProjectConfiguration) = postSolution')for n in premake.solution.eachproject(o)do\nfor e,o in ipairs(o.configurations)do\n_p(2,'{%s}.%s.ActiveCfg = %s|%s',n.uuid,o,o,i.arch(n))_p(2,'{%s}.%s.Build.0 = %s|%s',n.uuid,o,o,i.arch(n))end\nend\n_p(1,'EndGlobalSection')_p(1,'GlobalSection(ExtensibilityG"
+ "premake.vstudio.sln2002={}local i=premake.vstudio\nlocal o=premake.vstudio.sln2002\nfunction o.generate(o)io.indent=nil\nio.eol='\\r\\n'o.vstudio_configs=premake.vstudio.buildconfigs(o)_p('Microsoft Visual Studio Solution File, Format Version 7.00')for n in premake.solution.eachproject(o)do\nlocal o=path.translate(path.getrelative(o.location,i.projectfile(n)))_p('Project(\"{%s}\") = \"%s\", \"%s\", \"{%s}\"',i.tool(n),n.name,o,n.uuid)_p('EndProject')end\n_p('Global')_p(1,'GlobalSection(SolutionConfiguration) = preSolution')for o,i in ipairs(o.configurations)do\n_p(2,'ConfigName.%d = %s',o-1,i)end\n_p(1,'EndGlobalSection')_p(1,'GlobalSection(ProjectDependencies) = postSolution')_p(1,'EndGlobalSection')_p(1,'GlobalSection(ProjectConfiguration) = postSolution')for n in premake.solution.eachproject(o)do\nfor t,o in ipairs(o.configurations)do\n_p(2,'{%s}.%s.ActiveCfg = %s|%s',n.uuid,o,o,i.arch(n))_p(2,'{%s}.%s.Build.0 = %s|%s',n.uuid,o,o,i.arch(n))end\nend\n_p(1,'EndGlobalSection')_p(1,'GlobalSection(ExtensibilityG"
"lobals) = postSolution')_p(1,'EndGlobalSection')_p(1,'GlobalSection(ExtensibilityAddIns) = postSolution')_p(1,'EndGlobalSection')_p('EndGlobal')end",
/* actions/vstudio/vs2002_csproj.lua */
@@ -185,22 +185,22 @@ const char* builtin_scripts[] = {
" \"0\"')_p(3,'ProjectView = \"ProjectFiles\"')_p(3,'ProjectTrust = \"0\"')_p(2,'/>')_p(1,'</CSHARP>')_p('</VisualStudioProject>')end",
/* actions/vstudio/vs200x_vcproj.lua */
- "premake.vstudio.vc200x={}local e=premake.vstudio.vc200x\nlocal r=premake.tree\nlocal function n(e)if(_ACTION<\"vs2005\")then\nreturn iif(e,\"TRUE\",\"FALSE\")else\nreturn iif(e,\"true\",\"false\")end\nend\nfunction e.optimization(o)local e=0\nfor n,o in ipairs(o.flags)do\nif(o==\"Optimize\")then\ne=3\nelseif(o==\"OptimizeSize\")then\ne=1\nelseif(o==\"OptimizeSpeed\")then\ne=2\nend\nend\nreturn e\nend\nfunction e.header(e)io.eol=\"\\r\\n\"_p('<?xml version=\"1.0\" encoding=\"Windows-1252\"?>')_p('<%s',e)_p(1,'ProjectType=\"Visual C++\"')if _ACTION==\"vs2002\"then\n_p(1,'Version=\"7.00\"')elseif _ACTION==\"vs2003\"then\n_p(1,'Version=\"7.10\"')elseif _ACTION==\"vs2005\"then\n_p(1,'Version=\"8.00\"')elseif _ACTION==\"vs2008\"then\n_p(1,'Version=\"9.00\"')end\nend\nfunction e.Configuration(n,o)_p(2,'<Configuration')_p(3,'Name=\"%s\"',premake.esc(n))_p(3,'OutputDirectory=\"%s\"',premake.esc(o.buildtarget.directory))_p(3,'IntermediateDirectory=\"%s\"',premake.esc(o.objectsdir))local n\nif(o.kind==\"SharedLib\")then"
- "\nn=2\nelseif(o.kind==\"StaticLib\")then\nn=4\nelse\nn=1\nend\n_p(3,'ConfigurationType=\"%s\"',n)if(o.flags.MFC)then\n_p(3,'UseOfMFC=\"%d\"',iif(o.flags.StaticRuntime,1,2))end\nif(o.flags.ATL or o.flags.StaticATL)then\n_p(3,'UseOfATL=\"%d\"',iif(o.flags.StaticATL,1,2))end\n_p(3,'CharacterSet=\"%s\"',iif(o.flags.Unicode,1,2))if o.flags.Managed then\n_p(3,'ManagedExtensions=\"1\"')end\n_p(3,'>')end\ne.individualSourceFileOptions=nil\nfunction e.individualSourceFile(i,o,l,a)for n,t in ipairs(i.solution.vstudio_configs)do\nif t.isreal then\nlocal n=premake.getconfig(i,t.src_buildcfg,t.src_platform)local a=(not i.flags.NoPCH and i.pchsource==a.cfg.name)local s=path.iscppfile(l)local i=(path.iscfile(l)~=premake.project.iscproject(i))if a or(s and i)or(type(e.individualSourceFileOptions)=='function')then\n_p(o,'<FileConfiguration')_p(o,'\\tName=\"%s\"',t.name)_p(o,'\\t>')_p(o,'\\t<Tool')_p(o,'\\t\\tName=\"%s\"',iif(n.system==\"Xbox360\",\"VCCLX360CompilerTool\",\"VCCLCompilerTool\"))if i then\n_p(o,'\\t\\tCompileAs="
- "\"%s\"',iif(path.iscfile(l),1,2))end\nif a then\nif n.system==\"PS3\"then\nlocal e=table.join(premake.snc.getcflags(n),premake.snc.getcxxflags(n),n.buildoptions)e=table.concat(e,\" \");e=e..' --create_pch=\"$(IntDir)/$(TargetName).pch\"'_p(o,'\\t\\tAdditionalOptions=\"%s\"',premake.esc(e))else\n_p(o,'\\t\\tUsePrecompiledHeader=\"1\"')end\nend\n_p(o,'\\t/>')_p(o,'</FileConfiguration>')end\nend\nend\nend\nfunction e.Files(n)local o=premake.project.buildsourcetree(n)r.traverse(o,{onbranchenter=function(o,e)_p(e,'<Filter')_p(e,'\\tName=\"%s\"',o.name)_p(e,'\\tFilter=\"\"')_p(e,'\\t>')end,onbranchexit=function(o,e)_p(e,'</Filter>')end,onleaf=function(t,o)local i=t.cfg.name\n_p(o,'<File')_p(o,'\\tRelativePath=\"%s\"',path.translate(i,\"\\\\\"))_p(o,'\\t>')o=o+1\ne.individualSourceFile(n,o,i,t)o=o-1\n_p(o,'</File>')end,},false,2)end\nfunction e.Platforms(e)local o={}_p(1,'<Platforms>')for n,e in ipairs(e.solution.vstudio_configs)do\nif e.isreal and not table.contains(o,e.platform)then\ntable.insert(o,e.platform)_p(2,"
- "'<Platform')_p(3,'Name=\"%s\"',e.platform)_p(2,'/>')end\nend\n_p(1,'</Platforms>')end\nfunction e.Symbols(o)if(not o.flags.Symbols)then\nreturn 0\nelse\nif o.flags.NoEditAndContinue or\ne.optimization(o)~=0 or\no.flags.Managed or\no.platform==\"x64\"then\nreturn 3\nelse\nreturn 4\nend\nend\nend\nfunction e.VCCLCompilerTool(o)_p(3,'<Tool')_p(4,'Name=\"%s\"',iif(o.platform~=\"Xbox360\",\"VCCLCompilerTool\",\"VCCLX360CompilerTool\"))if#o.buildoptions>0 then\n_p(4,'AdditionalOptions=\"%s\"',table.concat(premake.esc(o.buildoptions),\" \"))end\n_p(4,'Optimization=\"%s\"',e.optimization(o))if o.flags.NoFramePointer then\n_p(4,'OmitFramePointers=\"%s\"',n(true))end\nif#o.includedirs>0 then\n_p(4,'AdditionalIncludeDirectories=\"%s\"',premake.esc(path.translate(table.concat(o.includedirs,\";\"),'\\\\')))end\nif#o.defines>0 then\n_p(4,'PreprocessorDefinitions=\"%s\"',premake.esc(table.concat(o.defines,\";\")))end\nif premake.config.isdebugbuild(o)and not o.flags.NoMinimalRebuild and not o.flags.Managed then\n_p(4,'Minima"
- "lRebuild=\"%s\"',n(true))end\nif o.flags.NoExceptions then\n_p(4,'ExceptionHandling=\"%s\"',iif(_ACTION<\"vs2005\",\"FALSE\",0))elseif o.flags.SEH and _ACTION>\"vs2003\"then\n_p(4,'ExceptionHandling=\"2\"')end\nif e.optimization(o)==0 and not o.flags.Managed then\n_p(4,'BasicRuntimeChecks=\"3\"')end\nif e.optimization(o)~=0 then\n_p(4,'StringPooling=\"%s\"',n(true))end\nlocal i\nif premake.config.isdebugbuild(o)then\ni=iif(o.flags.StaticRuntime,1,3)else\ni=iif(o.flags.StaticRuntime,0,2)end\n_p(4,'RuntimeLibrary=\"%s\"',i)_p(4,'EnableFunctionLevelLinking=\"%s\"',n(true))if _ACTION>\"vs2003\"and o.platform~=\"Xbox360\"and o.platform~=\"x64\"then\nif o.flags.EnableSSE then\n_p(4,'EnableEnhancedInstructionSet=\"1\"')elseif o.flags.EnableSSE2 then\n_p(4,'EnableEnhancedInstructionSet=\"2\"')end\nend\nif _ACTION<\"vs2005\"then\nif o.flags.FloatFast then\n_p(4,'ImproveFloatingPointConsistency=\"%s\"',n(false))elseif o.flags.FloatStrict then\n_p(4,'ImproveFloatingPointConsistency=\"%s\"',n(true))end\nelse\nif o.flags.F"
- "loatFast then\n_p(4,'FloatingPointModel=\"2\"')elseif o.flags.FloatStrict then\n_p(4,'FloatingPointModel=\"1\"')end\nend\nif _ACTION<\"vs2005\"and not o.flags.NoRTTI then\n_p(4,'RuntimeTypeInfo=\"%s\"',n(true))elseif _ACTION>\"vs2003\"and o.flags.NoRTTI and not o.flags.Managed then\n_p(4,'RuntimeTypeInfo=\"%s\"',n(false))end\nif o.flags.NativeWChar then\n_p(4,'TreatWChar_tAsBuiltInType=\"%s\"',n(true))elseif o.flags.NoNativeWChar then\n_p(4,'TreatWChar_tAsBuiltInType=\"%s\"',n(false))end\nif not o.flags.NoPCH and o.pchheader then\n_p(4,'UsePrecompiledHeader=\"%s\"',iif(_ACTION<\"vs2005\",3,2))_p(4,'PrecompiledHeaderThrough=\"%s\"',o.pchheader)else\n_p(4,'UsePrecompiledHeader=\"%s\"',iif(_ACTION>\"vs2003\"or o.flags.NoPCH,0,2))end\n_p(4,'WarningLevel=\"%s\"',iif(o.flags.ExtraWarnings,4,3))if o.flags.FatalWarnings then\n_p(4,'WarnAsError=\"%s\"',n(true))end\nif _ACTION<\"vs2008\"and not o.flags.Managed then\n_p(4,'Detect64BitPortabilityProblems=\"%s\"',n(not o.flags.No64BitChecks))end\n_p(4,'ProgramDataBaseFileN"
- "ame=\"$(OutDir)\\\\%s.pdb\"',path.getbasename(o.buildtarget.name))_p(4,'DebugInformationFormat=\"%s\"',e.Symbols(o))if o.language==\"C\"then\n_p(4,'CompileAs=\"1\"')end\n_p(3,'/>')end\nfunction e.VCLinkerTool(o)_p(3,'<Tool')if o.kind~=\"StaticLib\"then\n_p(4,'Name=\"%s\"',iif(o.platform~=\"Xbox360\",\"VCLinkerTool\",\"VCX360LinkerTool\"))if o.flags.NoImportLib then\n_p(4,'IgnoreImportLibrary=\"%s\"',n(true))end\nif#o.linkoptions>0 then\n_p(4,'AdditionalOptions=\"%s\"',table.concat(premake.esc(o.linkoptions),\" \"))end\nif#o.links>0 then\n_p(4,'AdditionalDependencies=\"%s\"',table.concat(premake.getlinks(o,\"all\",\"fullpath\"),\" \"))end\n_p(4,'OutputFile=\"$(OutDir)\\\\%s\"',o.buildtarget.name)_p(4,'LinkIncremental=\"%s\"',iif(premake.config.isincrementallink(o),2,1))_p(4,'AdditionalLibraryDirectories=\"%s\"',table.concat(premake.esc(path.translate(o.libdirs,'\\\\')),\";\"))local i=premake.findfile(o,\".def\")if i then\n_p(4,'ModuleDefinitionFile=\"%s\"',i)end\nif o.flags.NoManifest then\n_p(4,'GenerateManife"
- "st=\"%s\"',n(false))end\n_p(4,'GenerateDebugInformation=\"%s\"',n(e.Symbols(o)~=0))if e.Symbols(o)~=0 then\n_p(4,'ProgramDataBaseFileName=\"$(OutDir)\\\\%s.pdb\"',path.getbasename(o.buildtarget.name))end\n_p(4,'SubSystem=\"%s\"',iif(o.kind==\"ConsoleApp\",1,2))if e.optimization(o)~=0 then\n_p(4,'OptimizeReferences=\"2\"')_p(4,'EnableCOMDATFolding=\"2\"')end\nif(o.kind==\"ConsoleApp\"or o.kind==\"WindowedApp\")and not o.flags.WinMain then\n_p(4,'EntryPointSymbol=\"%s\"',iif(o.flags.Unicode,\"wmainCRTStartup\",\"mainCRTStartup\"))end\nif o.kind==\"SharedLib\"then\nlocal e=o.linktarget.fullpath\n_p(4,'ImportLibrary=\"%s\"',iif(o.flags.NoImportLib,o.objectsdir..\"\\\\\"..path.getname(e),e))end\n_p(4,'TargetMachine=\"%d\"',iif(o.platform==\"x64\",17,1))else\n_p(4,'Name=\"VCLibrarianTool\"')if#o.links>0 then\n_p(4,'AdditionalDependencies=\"%s\"',table.concat(premake.getlinks(o,\"all\",\"fullpath\"),\" \"))end\n_p(4,'OutputFile=\"$(OutDir)\\\\%s\"',o.buildtarget.name)if#o.libdirs>0 then\n_p(4,'AdditionalLibraryDirect"
- "ories=\"%s\"',premake.esc(path.translate(table.concat(o.libdirs,\";\"))))end\nlocal e={}if o.platform==\"x32\"then\ntable.insert(e,\"/MACHINE:X86\")elseif o.platform==\"x64\"then\ntable.insert(e,\"/MACHINE:X64\")end\ne=table.join(e,o.linkoptions)if#e>0 then\n_p(4,'AdditionalOptions=\"%s\"',table.concat(premake.esc(e),\" \"))end\nend\n_p(3,'/>')end\nfunction e.VCCLCompilerTool_PS3(e)_p(3,'<Tool')_p(4,'Name=\"VCCLCompilerTool\"')local o=table.join(premake.snc.getcflags(e),premake.snc.getcxxflags(e),e.buildoptions)if not e.flags.NoPCH and e.pchheader then\n_p(4,'UsePrecompiledHeader=\"%s\"',iif(_ACTION<\"vs2005\",3,2))_p(4,'PrecompiledHeaderThrough=\"%s\"',path.getname(e.pchheader))table.insert(o,'--use_pch=\"$(IntDir)/$(TargetName).pch\"')else\n_p(4,'UsePrecompiledHeader=\"%s\"',iif(_ACTION>\"vs2003\"or e.flags.NoPCH,0,2))end\n_p(4,'AdditionalOptions=\"%s\"',premake.esc(table.concat(o,\" \")))if#e.includedirs>0 then\n_p(4,'AdditionalIncludeDirectories=\"%s\"',premake.esc(path.translate(table.concat(e.includedirs"
- ",\";\"),'\\\\')))end\nif#e.defines>0 then\n_p(4,'PreprocessorDefinitions=\"%s\"',table.concat(premake.esc(e.defines),\";\"))end\n_p(4,'ProgramDataBaseFileName=\"$(OutDir)\\\\%s.pdb\"',path.getbasename(e.buildtarget.name))_p(4,'DebugInformationFormat=\"0\"')_p(4,'CompileAs=\"0\"')_p(3,'/>')end\nfunction e.VCLinkerTool_PS3(e)_p(3,'<Tool')if e.kind~=\"StaticLib\"then\n_p(4,'Name=\"VCLinkerTool\"')local o=table.join(premake.snc.getldflags(e),e.linkoptions)if#o>0 then\n_p(4,'AdditionalOptions=\"%s\"',premake.esc(table.concat(o,\" \")))end\nif#e.links>0 then\n_p(4,'AdditionalDependencies=\"%s\"',table.concat(premake.getlinks(e,\"all\",\"fullpath\"),\" \"))end\n_p(4,'OutputFile=\"$(OutDir)\\\\%s\"',e.buildtarget.name)_p(4,'LinkIncremental=\"0\"')_p(4,'AdditionalLibraryDirectories=\"%s\"',table.concat(premake.esc(path.translate(e.libdirs,'\\\\')),\";\"))_p(4,'GenerateManifest=\"%s\"',n(false))_p(4,'ProgramDatabaseFile=\"\"')_p(4,'RandomizedBaseAddress=\"1\"')_p(4,'DataExecutionPrevention=\"0\"')else\n_p(4,'Name=\"VCLi"
- "brarianTool\"')local o=table.join(premake.snc.getldflags(e),e.linkoptions)if#o>0 then\n_p(4,'AdditionalOptions=\"%s\"',premake.esc(table.concat(o,\" \")))end\nif#e.links>0 then\n_p(4,'AdditionalDependencies=\"%s\"',table.concat(premake.getlinks(e,\"all\",\"fullpath\"),\" \"))end\n_p(4,'OutputFile=\"$(OutDir)\\\\%s\"',e.buildtarget.name)if#e.libdirs>0 then\n_p(4,'AdditionalLibraryDirectories=\"%s\"',premake.esc(path.translate(table.concat(e.libdirs,\";\"))))end\nend\n_p(3,'/>')end\nfunction e.VCResourceCompilerTool(e)_p(3,'<Tool')_p(4,'Name=\"VCResourceCompilerTool\"')if#e.resoptions>0 then\n_p(4,'AdditionalOptions=\"%s\"',table.concat(premake.esc(e.resoptions),\" \"))end\nif#e.defines>0 or#e.resdefines>0 then\n_p(4,'PreprocessorDefinitions=\"%s\"',table.concat(premake.esc(table.join(e.defines,e.resdefines)),\";\"))end\nif#e.includedirs>0 or#e.resincludedirs>0 then\nlocal e=table.join(e.includedirs,e.resincludedirs)_p(4,'AdditionalIncludeDirectories=\"%s\"',premake.esc(path.translate(table.concat(e,\";\"),'"
- "\\\\')))end\n_p(3,'/>')end\nfunction e.VCManifestTool(o)local e={}for n,o in ipairs(o.files)do\nif path.getextension(o)==\".manifest\"then\ntable.insert(e,o)end\nend\n_p(3,'<Tool')_p(4,'Name=\"VCManifestTool\"')if#e>0 then\n_p(4,'AdditionalManifestFiles=\"%s\"',premake.esc(table.concat(e,\";\")))end\n_p(3,'/>')end\nfunction e.VCMIDLTool(e)_p(3,'<Tool')_p(4,'Name=\"VCMIDLTool\"')if e.platform==\"x64\"then\n_p(4,'TargetEnvironment=\"3\"')end\n_p(3,'/>')end\nfunction e.buildstepsblock(n,o)_p(3,'<Tool')_p(4,'Name=\"%s\"',n)if#o>0 then\n_p(4,'CommandLine=\"%s\"',premake.esc(table.implode(o,\"\",\"\",\"\\r\\n\")))end\n_p(3,'/>')end\ne.toolmap={VCCLCompilerTool=e.VCCLCompilerTool,VCCLCompilerTool_PS3=e.VCCLCompilerTool_PS3,VCLinkerTool=e.VCLinkerTool,VCLinkerTool_PS3=e.VCLinkerTool_PS3,VCManifestTool=e.VCManifestTool,VCMIDLTool=e.VCMIDLTool,VCResourceCompilerTool=e.VCResourceCompilerTool,VCPreBuildEventTool=function(o)e.buildstepsblock(\"VCPreBuildEventTool\",o.prebuildcommands)end,VCPreLinkEventTool=function(o)e.bui"
- "ldstepsblock(\"VCPreLinkEventTool\",o.prelinkcommands)end,VCPostBuildEventTool=function(o)e.buildstepsblock(\"VCPostBuildEventTool\",o.postbuildcommands)end,}local function t(o,e)if o==\"vs2002\"then\nreturn{\"VCCLCompilerTool\",\"VCCustomBuildTool\",\"VCLinkerTool\",\"VCMIDLTool\",\"VCPostBuildEventTool\",\"VCPreBuildEventTool\",\"VCPreLinkEventTool\",\"VCResourceCompilerTool\",\"VCWebServiceProxyGeneratorTool\",\"VCWebDeploymentTool\"}end\nif o==\"vs2003\"then\nreturn{\"VCCLCompilerTool\",\"VCCustomBuildTool\",\"VCLinkerTool\",\"VCMIDLTool\",\"VCPostBuildEventTool\",\"VCPreBuildEventTool\",\"VCPreLinkEventTool\",\"VCResourceCompilerTool\",\"VCWebServiceProxyGeneratorTool\",\"VCXMLDataGeneratorTool\",\"VCWebDeploymentTool\",\"VCManagedWrapperGeneratorTool\",\"VCAuxiliaryManagedWrapperGeneratorTool\"}end\nif e==\"Xbox360\"then\nreturn{\"VCPreBuildEventTool\",\"VCCustomBuildTool\",\"VCXMLDataGeneratorTool\",\"VCWebServiceProxyGeneratorTool\",\"VCMIDLTool\",\"VCCLCompilerTool\",\"VCManagedResourceCompilerTool\","
- "\"VCResourceCompilerTool\",\"VCPreLinkEventTool\",\"VCLinkerTool\",\"VCALinkTool\",\"VCX360ImageTool\",\"VCBscMakeTool\",\"VCX360DeploymentTool\",\"VCPostBuildEventTool\",\"DebuggerTool\",}end\nif e==\"PS3\"then\nreturn{\"VCPreBuildEventTool\",\"VCCustomBuildTool\",\"VCXMLDataGeneratorTool\",\"VCWebServiceProxyGeneratorTool\",\"VCMIDLTool\",\"VCCLCompilerTool_PS3\",\"VCManagedResourceCompilerTool\",\"VCResourceCompilerTool\",\"VCPreLinkEventTool\",\"VCLinkerTool_PS3\",\"VCALinkTool\",\"VCManifestTool\",\"VCXDCMakeTool\",\"VCBscMakeTool\",\"VCFxCopTool\",\"VCAppVerifierTool\",\"VCWebDeploymentTool\",\"VCPostBuildEventTool\"}else\nreturn{\"VCPreBuildEventTool\",\"VCCustomBuildTool\",\"VCXMLDataGeneratorTool\",\"VCWebServiceProxyGeneratorTool\",\"VCMIDLTool\",\"VCCLCompilerTool\",\"VCManagedResourceCompilerTool\",\"VCResourceCompilerTool\",\"VCPreLinkEventTool\",\"VCLinkerTool\",\"VCALinkTool\",\"VCManifestTool\",\"VCXDCMakeTool\",\"VCBscMakeTool\",\"VCFxCopTool\",\"VCAppVerifierTool\",\"VCWebDeploymentTool\",\"V"
- "CPostBuildEventTool\"}end\nend\nfunction e.generate(n)e.header('VisualStudioProject')_p(1,'Name=\"%s\"',premake.esc(n.name))_p(1,'ProjectGUID=\"{%s}\"',n.uuid)if _ACTION>\"vs2003\"then\n_p(1,'RootNamespace=\"%s\"',n.name)end\n_p(1,'Keyword=\"%s\"',iif(n.flags.Managed,\"ManagedCProj\",\"Win32Proj\"))_p(1,'>')e.Platforms(n)if _ACTION>\"vs2003\"then\n_p(1,'<ToolFiles>')_p(1,'</ToolFiles>')end\n_p(1,'<Configurations>')for o,i in ipairs(n.solution.vstudio_configs)do\nif i.isreal then\nlocal o=premake.getconfig(n,i.src_buildcfg,i.src_platform)e.Configuration(i.name,o)for i,n in ipairs(t(_ACTION,i.src_platform))do\nif e.toolmap[n]then\ne.toolmap[n](o)elseif n==\"VCX360DeploymentTool\"then\n_p(3,'<Tool')_p(4,'Name=\"VCX360DeploymentTool\"')_p(4,'DeploymentType=\"0\"')if#o.deploymentoptions>0 then\n_p(4,'AdditionalOptions=\"%s\"',table.concat(premake.esc(o.deploymentoptions),\" \"))end\n_p(3,'/>')elseif n==\"VCX360ImageTool\"then\n_p(3,'<Tool')_p(4,'Name=\"VCX360ImageTool\"')if#o.imageoptions>0 then\n_p(4,'AdditionalOp"
- "tions=\"%s\"',table.concat(premake.esc(o.imageoptions),\" \"))end\nif o.imagepath~=nil then\n_p(4,'OutputFileName=\"%s\"',premake.esc(path.translate(o.imagepath)))end\n_p(3,'/>')elseif n==\"DebuggerTool\"then\n_p(3,'<DebuggerTool')_p(3,'/>')else\n_p(3,'<Tool')_p(4,'Name=\"%s\"',n)_p(3,'/>')end\nend\n_p(2,'</Configuration>')end\nend\n_p(1,'</Configurations>')_p(1,'<References>')_p(1,'</References>')_p(1,'<Files>')e.Files(n)_p(1,'</Files>')_p(1,'<Globals>')_p(1,'</Globals>')_p('</VisualStudioProject>')end",
+ "premake.vstudio.vc200x={}local e=premake.vstudio.vc200x\nlocal d=premake.tree\nlocal function i(e)if(_ACTION<\"vs2005\")then\nreturn iif(e,\"TRUE\",\"FALSE\")else\nreturn iif(e,\"true\",\"false\")end\nend\nfunction e.optimization(o)local e=0\nfor i,o in ipairs(o.flags)do\nif(o==\"Optimize\")then\ne=3\nelseif(o==\"OptimizeSize\")then\ne=1\nelseif(o==\"OptimizeSpeed\")then\ne=2\nend\nend\nreturn e\nend\nfunction e.header(e)io.eol=\"\\r\\n\"_p('<?xml version=\"1.0\" encoding=\"Windows-1252\"?>')_p('<%s',e)_p(1,'ProjectType=\"Visual C++\"')if _ACTION==\"vs2002\"then\n_p(1,'Version=\"7.00\"')elseif _ACTION==\"vs2003\"then\n_p(1,'Version=\"7.10\"')elseif _ACTION==\"vs2005\"then\n_p(1,'Version=\"8.00\"')elseif _ACTION==\"vs2008\"then\n_p(1,'Version=\"9.00\"')end\nend\nfunction e.Configuration(i,o)_p(2,'<Configuration')_p(3,'Name=\"%s\"',premake.esc(i))_p(3,'OutputDirectory=\"%s\"',premake.esc(o.buildtarget.directory))_p(3,'IntermediateDirectory=\"%s\"',premake.esc(o.objectsdir))local i\nif(o.kind==\"SharedLib\")then"
+ "\ni=2\nelseif(o.kind==\"StaticLib\")then\ni=4\nelse\ni=1\nend\n_p(3,'ConfigurationType=\"%s\"',i)if(o.flags.MFC)then\n_p(3,'UseOfMFC=\"%d\"',iif(o.flags.StaticRuntime,1,2))end\nif(o.flags.ATL or o.flags.StaticATL)then\n_p(3,'UseOfATL=\"%d\"',iif(o.flags.StaticATL,1,2))end\n_p(3,'CharacterSet=\"%s\"',iif(o.flags.Unicode,1,2))if o.flags.Managed then\n_p(3,'ManagedExtensions=\"1\"')end\n_p(3,'>')end\ne.individualSourceFileOptions=nil\nfunction e.individualSourceFile(i,o,t,s)for n,l in ipairs(i.solution.vstudio_configs)do\nif l.isreal then\nlocal n=premake.getconfig(i,l.src_buildcfg,l.src_platform)local r=(not i.flags.NoPCH and i.pchsource==s.cfg.name)local p=path.iscppfile(t)local a=(path.iscfile(t)~=premake.project.iscproject(i))if r or(p and a)or(type(e.individualSourceFileOptions)=='function')then\n_p(o,'<FileConfiguration')_p(o,'\\tName=\"%s\"',l.name)_p(o,'\\t>')_p(o,'\\t<Tool')_p(o,'\\t\\tName=\"%s\"',iif(n.system==\"Xbox360\",\"VCCLX360CompilerTool\",\"VCCLCompilerTool\"))if a then\n_p(o,'\\t\\tCompileAs="
+ "\"%s\"',iif(path.iscfile(t),1,2))end\nif r then\nif n.system==\"PS3\"then\nlocal e=table.join(premake.snc.getcflags(n),premake.snc.getcxxflags(n),n.buildoptions)e=table.concat(e,\" \");e=e..' --create_pch=\"$(IntDir)/$(TargetName).pch\"'_p(o,'\\t\\tAdditionalOptions=\"%s\"',premake.esc(e))else\n_p(o,'\\t\\tUsePrecompiledHeader=\"1\"')end\nend\nif(type(e.individualSourceFileOptions)=='function')then\ne.individualSourceFileOptions(i,o,t,s)end\n_p(o,'\\t/>')_p(o,'</FileConfiguration>')end\nend\nend\nend\nfunction e.Files(i)local o=premake.project.buildsourcetree(i)d.traverse(o,{onbranchenter=function(o,e)_p(e,'<Filter')_p(e,'\\tName=\"%s\"',o.name)_p(e,'\\tFilter=\"\"')_p(e,'\\t>')end,onbranchexit=function(o,e)_p(e,'</Filter>')end,onleaf=function(n,o)local t=n.cfg.name\n_p(o,'<File')_p(o,'\\tRelativePath=\"%s\"',path.translate(t,\"\\\\\"))_p(o,'\\t>')o=o+1\ne.individualSourceFile(i,o,t,n)o=o-1\n_p(o,'</File>')end,},false,2)end\nfunction e.Platforms(e)local o={}_p(1,'<Platforms>')for i,e in ipairs(e.solution.vstud"
+ "io_configs)do\nif e.isreal and not table.contains(o,e.platform)then\ntable.insert(o,e.platform)_p(2,'<Platform')_p(3,'Name=\"%s\"',e.platform)_p(2,'/>')end\nend\n_p(1,'</Platforms>')end\nfunction e.Symbols(o)if(not o.flags.Symbols)then\nreturn 0\nelse\nif o.flags.NoEditAndContinue or\ne.optimization(o)~=0 or\no.flags.Managed or\no.platform==\"x64\"then\nreturn 3\nelse\nreturn 4\nend\nend\nend\nfunction e.VCCLCompilerTool(o)_p(3,'<Tool')_p(4,'Name=\"%s\"',iif(o.platform~=\"Xbox360\",\"VCCLCompilerTool\",\"VCCLX360CompilerTool\"))if#o.buildoptions>0 then\n_p(4,'AdditionalOptions=\"%s\"',table.concat(premake.esc(o.buildoptions),\" \"))end\n_p(4,'Optimization=\"%s\"',e.optimization(o))if o.flags.NoFramePointer then\n_p(4,'OmitFramePointers=\"%s\"',i(true))end\nif#o.includedirs>0 then\n_p(4,'AdditionalIncludeDirectories=\"%s\"',premake.esc(path.translate(table.concat(o.includedirs,\";\"),'\\\\')))end\nif#o.defines>0 then\n_p(4,'PreprocessorDefinitions=\"%s\"',premake.esc(table.concat(o.defines,\";\")))end\nif prema"
+ "ke.config.isdebugbuild(o)and not o.flags.NoMinimalRebuild and not o.flags.Managed then\n_p(4,'MinimalRebuild=\"%s\"',i(true))end\nif o.flags.NoExceptions then\n_p(4,'ExceptionHandling=\"%s\"',iif(_ACTION<\"vs2005\",\"FALSE\",0))elseif o.flags.SEH and _ACTION>\"vs2003\"then\n_p(4,'ExceptionHandling=\"2\"')end\nif e.optimization(o)==0 and not o.flags.Managed then\n_p(4,'BasicRuntimeChecks=\"3\"')end\nif e.optimization(o)~=0 then\n_p(4,'StringPooling=\"%s\"',i(true))end\nlocal n\nif premake.config.isdebugbuild(o)then\nn=iif(o.flags.StaticRuntime,1,3)else\nn=iif(o.flags.StaticRuntime,0,2)end\n_p(4,'RuntimeLibrary=\"%s\"',n)_p(4,'EnableFunctionLevelLinking=\"%s\"',i(true))if _ACTION>\"vs2003\"and o.platform~=\"Xbox360\"and o.platform~=\"x64\"then\nif o.flags.EnableSSE then\n_p(4,'EnableEnhancedInstructionSet=\"1\"')elseif o.flags.EnableSSE2 then\n_p(4,'EnableEnhancedInstructionSet=\"2\"')end\nend\nif _ACTION<\"vs2005\"then\nif o.flags.FloatFast then\n_p(4,'ImproveFloatingPointConsistency=\"%s\"',i(false))elseif o.f"
+ "lags.FloatStrict then\n_p(4,'ImproveFloatingPointConsistency=\"%s\"',i(true))end\nelse\nif o.flags.FloatFast then\n_p(4,'FloatingPointModel=\"2\"')elseif o.flags.FloatStrict then\n_p(4,'FloatingPointModel=\"1\"')end\nend\nif _ACTION<\"vs2005\"and not o.flags.NoRTTI then\n_p(4,'RuntimeTypeInfo=\"%s\"',i(true))elseif _ACTION>\"vs2003\"and o.flags.NoRTTI and not o.flags.Managed then\n_p(4,'RuntimeTypeInfo=\"%s\"',i(false))end\nif o.flags.NativeWChar then\n_p(4,'TreatWChar_tAsBuiltInType=\"%s\"',i(true))elseif o.flags.NoNativeWChar then\n_p(4,'TreatWChar_tAsBuiltInType=\"%s\"',i(false))end\nif not o.flags.NoPCH and o.pchheader then\n_p(4,'UsePrecompiledHeader=\"%s\"',iif(_ACTION<\"vs2005\",3,2))_p(4,'PrecompiledHeaderThrough=\"%s\"',o.pchheader)else\n_p(4,'UsePrecompiledHeader=\"%s\"',iif(_ACTION>\"vs2003\"or o.flags.NoPCH,0,2))end\n_p(4,'WarningLevel=\"%s\"',iif(o.flags.ExtraWarnings,4,3))if o.flags.FatalWarnings then\n_p(4,'WarnAsError=\"%s\"',i(true))end\nif _ACTION<\"vs2008\"and not o.flags.Managed then\n_p(4,"
+ "'Detect64BitPortabilityProblems=\"%s\"',i(not o.flags.No64BitChecks))end\n_p(4,'ProgramDataBaseFileName=\"$(OutDir)\\\\%s.pdb\"',path.getbasename(o.buildtarget.name))_p(4,'DebugInformationFormat=\"%s\"',e.Symbols(o))if o.language==\"C\"then\n_p(4,'CompileAs=\"1\"')end\n_p(3,'/>')end\nfunction e.VCLinkerTool(o)_p(3,'<Tool')if o.kind~=\"StaticLib\"then\n_p(4,'Name=\"%s\"',iif(o.platform~=\"Xbox360\",\"VCLinkerTool\",\"VCX360LinkerTool\"))if o.flags.NoImportLib then\n_p(4,'IgnoreImportLibrary=\"%s\"',i(true))end\nif#o.linkoptions>0 then\n_p(4,'AdditionalOptions=\"%s\"',table.concat(premake.esc(o.linkoptions),\" \"))end\nif#o.links>0 then\n_p(4,'AdditionalDependencies=\"%s\"',table.concat(premake.getlinks(o,\"all\",\"fullpath\"),\" \"))end\n_p(4,'OutputFile=\"$(OutDir)\\\\%s\"',o.buildtarget.name)_p(4,'LinkIncremental=\"%s\"',iif(premake.config.isincrementallink(o),2,1))_p(4,'AdditionalLibraryDirectories=\"%s\"',table.concat(premake.esc(path.translate(o.libdirs,'\\\\')),\";\"))local n=premake.findfile(o,\".def\")i"
+ "f n then\n_p(4,'ModuleDefinitionFile=\"%s\"',n)end\nif o.flags.NoManifest then\n_p(4,'GenerateManifest=\"%s\"',i(false))end\n_p(4,'GenerateDebugInformation=\"%s\"',i(e.Symbols(o)~=0))if e.Symbols(o)~=0 then\n_p(4,'ProgramDataBaseFileName=\"$(OutDir)\\\\%s.pdb\"',path.getbasename(o.buildtarget.name))end\n_p(4,'SubSystem=\"%s\"',iif(o.kind==\"ConsoleApp\",1,2))if e.optimization(o)~=0 then\n_p(4,'OptimizeReferences=\"2\"')_p(4,'EnableCOMDATFolding=\"2\"')end\nif(o.kind==\"ConsoleApp\"or o.kind==\"WindowedApp\")and not o.flags.WinMain then\n_p(4,'EntryPointSymbol=\"%s\"',iif(o.flags.Unicode,\"wmainCRTStartup\",\"mainCRTStartup\"))end\nif o.kind==\"SharedLib\"then\nlocal e=o.linktarget.fullpath\n_p(4,'ImportLibrary=\"%s\"',iif(o.flags.NoImportLib,o.objectsdir..\"\\\\\"..path.getname(e),e))end\n_p(4,'TargetMachine=\"%d\"',iif(o.platform==\"x64\",17,1))else\n_p(4,'Name=\"VCLibrarianTool\"')if#o.links>0 then\n_p(4,'AdditionalDependencies=\"%s\"',table.concat(premake.getlinks(o,\"all\",\"fullpath\"),\" \"))end\n_p(4,'O"
+ "utputFile=\"$(OutDir)\\\\%s\"',o.buildtarget.name)if#o.libdirs>0 then\n_p(4,'AdditionalLibraryDirectories=\"%s\"',premake.esc(path.translate(table.concat(o.libdirs,\";\"))))end\nlocal e={}if o.platform==\"x32\"then\ntable.insert(e,\"/MACHINE:X86\")elseif o.platform==\"x64\"then\ntable.insert(e,\"/MACHINE:X64\")end\ne=table.join(e,o.linkoptions)if#e>0 then\n_p(4,'AdditionalOptions=\"%s\"',table.concat(premake.esc(e),\" \"))end\nend\n_p(3,'/>')end\nfunction e.VCCLCompilerTool_PS3(e)_p(3,'<Tool')_p(4,'Name=\"VCCLCompilerTool\"')local o=table.join(premake.snc.getcflags(e),premake.snc.getcxxflags(e),e.buildoptions)if not e.flags.NoPCH and e.pchheader then\n_p(4,'UsePrecompiledHeader=\"%s\"',iif(_ACTION<\"vs2005\",3,2))_p(4,'PrecompiledHeaderThrough=\"%s\"',path.getname(e.pchheader))table.insert(o,'--use_pch=\"$(IntDir)/$(TargetName).pch\"')else\n_p(4,'UsePrecompiledHeader=\"%s\"',iif(_ACTION>\"vs2003\"or e.flags.NoPCH,0,2))end\n_p(4,'AdditionalOptions=\"%s\"',premake.esc(table.concat(o,\" \")))if#e.includedirs>0 th"
+ "en\n_p(4,'AdditionalIncludeDirectories=\"%s\"',premake.esc(path.translate(table.concat(e.includedirs,\";\"),'\\\\')))end\nif#e.defines>0 then\n_p(4,'PreprocessorDefinitions=\"%s\"',table.concat(premake.esc(e.defines),\";\"))end\n_p(4,'ProgramDataBaseFileName=\"$(OutDir)\\\\%s.pdb\"',path.getbasename(e.buildtarget.name))_p(4,'DebugInformationFormat=\"0\"')_p(4,'CompileAs=\"0\"')_p(3,'/>')end\nfunction e.VCLinkerTool_PS3(e)_p(3,'<Tool')if e.kind~=\"StaticLib\"then\n_p(4,'Name=\"VCLinkerTool\"')local o=table.join(premake.snc.getldflags(e),e.linkoptions)if#o>0 then\n_p(4,'AdditionalOptions=\"%s\"',premake.esc(table.concat(o,\" \")))end\nif#e.links>0 then\n_p(4,'AdditionalDependencies=\"%s\"',table.concat(premake.getlinks(e,\"all\",\"fullpath\"),\" \"))end\n_p(4,'OutputFile=\"$(OutDir)\\\\%s\"',e.buildtarget.name)_p(4,'LinkIncremental=\"0\"')_p(4,'AdditionalLibraryDirectories=\"%s\"',table.concat(premake.esc(path.translate(e.libdirs,'\\\\')),\";\"))_p(4,'GenerateManifest=\"%s\"',i(false))_p(4,'ProgramDatabaseFile="
+ "\"\"')_p(4,'RandomizedBaseAddress=\"1\"')_p(4,'DataExecutionPrevention=\"0\"')else\n_p(4,'Name=\"VCLibrarianTool\"')local o=table.join(premake.snc.getldflags(e),e.linkoptions)if#o>0 then\n_p(4,'AdditionalOptions=\"%s\"',premake.esc(table.concat(o,\" \")))end\nif#e.links>0 then\n_p(4,'AdditionalDependencies=\"%s\"',table.concat(premake.getlinks(e,\"all\",\"fullpath\"),\" \"))end\n_p(4,'OutputFile=\"$(OutDir)\\\\%s\"',e.buildtarget.name)if#e.libdirs>0 then\n_p(4,'AdditionalLibraryDirectories=\"%s\"',premake.esc(path.translate(table.concat(e.libdirs,\";\"))))end\nend\n_p(3,'/>')end\nfunction e.VCResourceCompilerTool(e)_p(3,'<Tool')_p(4,'Name=\"VCResourceCompilerTool\"')if#e.resoptions>0 then\n_p(4,'AdditionalOptions=\"%s\"',table.concat(premake.esc(e.resoptions),\" \"))end\nif#e.defines>0 or#e.resdefines>0 then\n_p(4,'PreprocessorDefinitions=\"%s\"',table.concat(premake.esc(table.join(e.defines,e.resdefines)),\";\"))end\nif#e.includedirs>0 or#e.resincludedirs>0 then\nlocal e=table.join(e.includedirs,e.resincluded"
+ "irs)_p(4,'AdditionalIncludeDirectories=\"%s\"',premake.esc(path.translate(table.concat(e,\";\"),'\\\\')))end\n_p(3,'/>')end\nfunction e.VCManifestTool(o)local e={}for i,o in ipairs(o.files)do\nif path.getextension(o)==\".manifest\"then\ntable.insert(e,o)end\nend\n_p(3,'<Tool')_p(4,'Name=\"VCManifestTool\"')if#e>0 then\n_p(4,'AdditionalManifestFiles=\"%s\"',premake.esc(table.concat(e,\";\")))end\n_p(3,'/>')end\nfunction e.VCMIDLTool(e)_p(3,'<Tool')_p(4,'Name=\"VCMIDLTool\"')if e.platform==\"x64\"then\n_p(4,'TargetEnvironment=\"3\"')end\n_p(3,'/>')end\nfunction e.buildstepsblock(i,o)_p(3,'<Tool')_p(4,'Name=\"%s\"',i)if#o>0 then\n_p(4,'CommandLine=\"%s\"',premake.esc(table.implode(o,\"\",\"\",\"\\r\\n\")))end\n_p(3,'/>')end\ne.toolmap={VCCLCompilerTool=e.VCCLCompilerTool,VCCLCompilerTool_PS3=e.VCCLCompilerTool_PS3,VCLinkerTool=e.VCLinkerTool,VCLinkerTool_PS3=e.VCLinkerTool_PS3,VCManifestTool=e.VCManifestTool,VCMIDLTool=e.VCMIDLTool,VCResourceCompilerTool=e.VCResourceCompilerTool,VCPreBuildEventTool=function(o)e.b"
+ "uildstepsblock(\"VCPreBuildEventTool\",o.prebuildcommands)end,VCPreLinkEventTool=function(o)e.buildstepsblock(\"VCPreLinkEventTool\",o.prelinkcommands)end,VCPostBuildEventTool=function(o)e.buildstepsblock(\"VCPostBuildEventTool\",o.postbuildcommands)end,}local function t(o,e)if o==\"vs2002\"then\nreturn{\"VCCLCompilerTool\",\"VCCustomBuildTool\",\"VCLinkerTool\",\"VCMIDLTool\",\"VCPostBuildEventTool\",\"VCPreBuildEventTool\",\"VCPreLinkEventTool\",\"VCResourceCompilerTool\",\"VCWebServiceProxyGeneratorTool\",\"VCWebDeploymentTool\"}end\nif o==\"vs2003\"then\nreturn{\"VCCLCompilerTool\",\"VCCustomBuildTool\",\"VCLinkerTool\",\"VCMIDLTool\",\"VCPostBuildEventTool\",\"VCPreBuildEventTool\",\"VCPreLinkEventTool\",\"VCResourceCompilerTool\",\"VCWebServiceProxyGeneratorTool\",\"VCXMLDataGeneratorTool\",\"VCWebDeploymentTool\",\"VCManagedWrapperGeneratorTool\",\"VCAuxiliaryManagedWrapperGeneratorTool\"}end\nif e==\"Xbox360\"then\nreturn{\"VCPreBuildEventTool\",\"VCCustomBuildTool\",\"VCXMLDataGeneratorTool\",\"VCWebS"
+ "erviceProxyGeneratorTool\",\"VCMIDLTool\",\"VCCLCompilerTool\",\"VCManagedResourceCompilerTool\",\"VCResourceCompilerTool\",\"VCPreLinkEventTool\",\"VCLinkerTool\",\"VCALinkTool\",\"VCX360ImageTool\",\"VCBscMakeTool\",\"VCX360DeploymentTool\",\"VCPostBuildEventTool\",\"DebuggerTool\",}end\nif e==\"PS3\"then\nreturn{\"VCPreBuildEventTool\",\"VCCustomBuildTool\",\"VCXMLDataGeneratorTool\",\"VCWebServiceProxyGeneratorTool\",\"VCMIDLTool\",\"VCCLCompilerTool_PS3\",\"VCManagedResourceCompilerTool\",\"VCResourceCompilerTool\",\"VCPreLinkEventTool\",\"VCLinkerTool_PS3\",\"VCALinkTool\",\"VCManifestTool\",\"VCXDCMakeTool\",\"VCBscMakeTool\",\"VCFxCopTool\",\"VCAppVerifierTool\",\"VCWebDeploymentTool\",\"VCPostBuildEventTool\"}else\nreturn{\"VCPreBuildEventTool\",\"VCCustomBuildTool\",\"VCXMLDataGeneratorTool\",\"VCWebServiceProxyGeneratorTool\",\"VCMIDLTool\",\"VCCLCompilerTool\",\"VCManagedResourceCompilerTool\",\"VCResourceCompilerTool\",\"VCPreLinkEventTool\",\"VCLinkerTool\",\"VCALinkTool\",\"VCManifestTool\",\"VC"
+ "XDCMakeTool\",\"VCBscMakeTool\",\"VCFxCopTool\",\"VCAppVerifierTool\",\"VCWebDeploymentTool\",\"VCPostBuildEventTool\"}end\nend\nfunction e.generate(i)e.header('VisualStudioProject')_p(1,'Name=\"%s\"',premake.esc(i.name))_p(1,'ProjectGUID=\"{%s}\"',i.uuid)if _ACTION>\"vs2003\"then\n_p(1,'RootNamespace=\"%s\"',i.name)end\n_p(1,'Keyword=\"%s\"',iif(i.flags.Managed,\"ManagedCProj\",\"Win32Proj\"))_p(1,'>')e.Platforms(i)if _ACTION>\"vs2003\"then\n_p(1,'<ToolFiles>')_p(1,'</ToolFiles>')end\n_p(1,'<Configurations>')for o,n in ipairs(i.solution.vstudio_configs)do\nif n.isreal then\nlocal o=premake.getconfig(i,n.src_buildcfg,n.src_platform)e.Configuration(n.name,o)for n,i in ipairs(t(_ACTION,n.src_platform))do\nif e.toolmap[i]then\ne.toolmap[i](o)elseif i==\"VCX360DeploymentTool\"then\n_p(3,'<Tool')_p(4,'Name=\"VCX360DeploymentTool\"')_p(4,'DeploymentType=\"0\"')if#o.deploymentoptions>0 then\n_p(4,'AdditionalOptions=\"%s\"',table.concat(premake.esc(o.deploymentoptions),\" \"))end\n_p(3,'/>')elseif i==\"VCX360ImageTool"
+ "\"then\n_p(3,'<Tool')_p(4,'Name=\"VCX360ImageTool\"')if#o.imageoptions>0 then\n_p(4,'AdditionalOptions=\"%s\"',table.concat(premake.esc(o.imageoptions),\" \"))end\nif o.imagepath~=nil then\n_p(4,'OutputFileName=\"%s\"',premake.esc(path.translate(o.imagepath)))end\n_p(3,'/>')elseif i==\"DebuggerTool\"then\n_p(3,'<DebuggerTool')_p(3,'/>')else\n_p(3,'<Tool')_p(4,'Name=\"%s\"',i)_p(3,'/>')end\nend\n_p(2,'</Configuration>')end\nend\n_p(1,'</Configurations>')_p(1,'<References>')_p(1,'</References>')_p(1,'<Files>')e.Files(i)_p(1,'</Files>')_p(1,'<Globals>')_p(1,'</Globals>')_p('</VisualStudioProject>')end",
/* actions/vstudio/vs200x_vcproj_user.lua */
"local e=premake.vstudio.vc200x\nfunction e.generate_user(i)e.header('VisualStudioUserFile')_p(1,'ShowAllFiles=\"false\"')_p(1,'>')_p(1,'<Configurations>')for r,n in ipairs(i.solution.vstudio_configs)do\nif n.isreal then\nlocal i=premake.getconfig(i,n.src_buildcfg,n.src_platform)_p(2,'<Configuration')_p(3,'Name=\"%s\"',premake.esc(n.name))_p(3,'>')e.debugdir(i)_p(2,'</Configuration>')end\nend\n_p(1,'</Configurations>')_p('</VisualStudioUserFile>')end\nfunction e.environmentargs(e)if e.environmentargs and#e.environmentargs>0 then\n_p(4,'Environment=\"%s\"',string.gsub(table.concat(e.environmentargs,\"&#x0A;\"),'\"','&quot;'))if e.flags.EnvironmentArgsDontMerge then\n_p(4,'EnvironmentMerge=\"false\"')end\nend\nend\nfunction e.debugdir(n)_p(3,'<DebugSettings')if n.debugdir then\n_p(4,'WorkingDirectory=\"%s\"',path.translate(n.debugdir,'\\\\'))end\nif#n.debugargs>0 then\n_p(4,'CommandArguments=\"%s\"',table.concat(n.debugargs,\" \"))end\ne.environmentargs(n)_p(3,'/>')end",
@@ -210,64 +210,65 @@ const char* builtin_scripts[] = {
"rs(o.configurations)do\n_p('\\t\\t{%s}.%s.ActiveCfg = %s|%s',t.uuid,o,o,i.arch(t))_p('\\t\\t{%s}.%s.Build.0 = %s|%s',t.uuid,o,o,i.arch(t))end\nend\n_p('\\tEndGlobalSection')_p('\\tGlobalSection(ExtensibilityGlobals) = postSolution')_p('\\tEndGlobalSection')_p('\\tGlobalSection(ExtensibilityAddIns) = postSolution')_p('\\tEndGlobalSection')_p('EndGlobal')end",
/* actions/vstudio/vs2005_solution.lua */
- "premake.vstudio.sln2005={}local t=premake.vstudio\nlocal o=premake.vstudio.sln2005\nfunction o.generate(e)io.indent=nil\nio.eol='\\r\\n'e.vstudio_configs=premake.vstudio.buildconfigs(e)_p('')o.header(e)for e in premake.solution.eachproject(e)do\no.project(e)end\n_p('Global')o.platforms(e)o.project_platforms(e)o.properties(e)_p('EndGlobal')end\nfunction o.header(o)local o=premake.action.current()_p('Microsoft Visual Studio Solution File, Format Version %d.00',o.vstudio.solutionVersion)if o.vstudio.shortSlnVersion~=nil then\n_p('# Visual Studio %s',o.vstudio.shortSlnVersion)else\n_p('# Visual Studio %s',_ACTION:sub(3))end\nend\nfunction o.project(e)local n=path.translate(path.getrelative(e.solution.location,t.projectfile(e)),\"\\\\\")_p('Project(\"{%s}\") = \"%s\", \"%s\", \"{%s}\"',t.tool(e),e.name,n,e.uuid)o.projectdependencies(e)_p('EndProject')end\nfunction o.projectdependencies(o)local o=premake.getdependencies(o)if#o>0 then\n_p('\\tProjectSection(ProjectDependencies) = postProject')for e,o in ipairs(o)d"
- "o\n_p('\\t\\t{%s} = {%s}',o.uuid,o.uuid)end\n_p('\\tEndProjectSection')end\nend\nfunction o.platforms(o)_p('\\tGlobalSection(SolutionConfigurationPlatforms) = preSolution')for e,o in ipairs(o.vstudio_configs)do\n_p('\\t\\t%s = %s',o.name,o.name)end\n_p('\\tEndGlobalSection')end\nfunction o.project_platforms_sln2prj_mapping(n,t,o,e)_p('\\t\\t{%s}.%s.ActiveCfg = %s|%s',t.uuid,o.name,o.buildcfg,e)if e==o.platform or o.platform==\"Mixed Platforms\"then\n_p('\\t\\t{%s}.%s.Build.0 = %s|%s',t.uuid,o.name,o.buildcfg,e)end\nend\nfunction o.project_platforms(t)_p('\\tGlobalSection(ProjectConfigurationPlatforms) = postSolution')for i in premake.solution.eachproject(t)do\nfor e,n in ipairs(t.vstudio_configs)do\nlocal e\nif premake.isdotnetproject(i)then\ne=\"Any CPU\"else\nif n.platform==\"Any CPU\"or n.platform==\"Mixed Platforms\"then\ne=t.vstudio_configs[3].platform\nelse\ne=n.platform\nend\nend\no.project_platforms_sln2prj_mapping(t,i,n,e)end\nend\n_p('\\tEndGlobalSection')end\nfunction o.properties(o)_p('\\tGlobalSec"
- "tion(SolutionProperties) = preSolution')_p('\\t\\tHideSolutionNode = FALSE')_p('\\tEndGlobalSection')end",
+ "premake.vstudio.sln2005={}local t=premake.vstudio\nlocal o=premake.vstudio.sln2005\nfunction o.generate(e)io.indent=nil\nio.eol='\\r\\n'e.vstudio_configs=premake.vstudio.buildconfigs(e)_p('')o.header(e)for e in premake.solution.eachproject(e)do\no.project(e)end\n_p('Global')o.platforms(e)o.project_platforms(e)o.properties(e)_p('EndGlobal')end\nfunction o.header(o)local o=premake.action.current()_p('Microsoft Visual Studio Solution File, Format Version %d.00',o.vstudio.solutionVersion)if o.vstudio.shortSlnVersion~=nil then\n_p('# Visual Studio Version %s',o.vstudio.shortSlnVersion)_p('VisualStudioVersion = %s.0.0.0',o.vstudio.shortSlnVersion)else\n_p('# Visual Studio %s',_ACTION:sub(3))end\nend\nfunction o.project(e)local n=path.translate(path.getrelative(e.solution.location,t.projectfile(e)),\"\\\\\")_p('Project(\"{%s}\") = \"%s\", \"%s\", \"{%s}\"',t.tool(e),e.name,n,e.uuid)o.projectdependencies(e)_p('EndProject')end\nfunction o.projectdependencies(o)local o=premake.getdependencies(o)if#o>0 then\n_p('\\tPr"
+ "ojectSection(ProjectDependencies) = postProject')for e,o in ipairs(o)do\n_p('\\t\\t{%s} = {%s}',o.uuid,o.uuid)end\n_p('\\tEndProjectSection')end\nend\nfunction o.platforms(o)_p('\\tGlobalSection(SolutionConfigurationPlatforms) = preSolution')for e,o in ipairs(o.vstudio_configs)do\n_p('\\t\\t%s = %s',o.name,o.name)end\n_p('\\tEndGlobalSection')end\nfunction o.project_platforms_sln2prj_mapping(n,t,o,e)_p('\\t\\t{%s}.%s.ActiveCfg = %s|%s',t.uuid,o.name,o.buildcfg,e)if e==o.platform or o.platform==\"Mixed Platforms\"then\n_p('\\t\\t{%s}.%s.Build.0 = %s|%s',t.uuid,o.name,o.buildcfg,e)end\nend\nfunction o.project_platforms(n)_p('\\tGlobalSection(ProjectConfigurationPlatforms) = postSolution')for i in premake.solution.eachproject(n)do\nfor e,t in ipairs(n.vstudio_configs)do\nlocal e\nif premake.isdotnetproject(i)then\ne=\"Any CPU\"else\nif t.platform==\"Any CPU\"or t.platform==\"Mixed Platforms\"then\ne=n.vstudio_configs[3].platform\nelse\ne=t.platform\nend\nend\no.project_platforms_sln2prj_mapping(n,i,t,e)end\nend\n"
+ "_p('\\tEndGlobalSection')end\nfunction o.properties(o)_p('\\tGlobalSection(SolutionProperties) = preSolution')_p('\\t\\tHideSolutionNode = FALSE')_p('\\tEndGlobalSection')end",
/* actions/vstudio/vs2005_csproj.lua */
- "premake.vstudio.cs2005={}local s=premake.vstudio\nlocal e=premake.vstudio.cs2005\nlocal function o(t,r,e)if r==\"Compile\"and e:endswith(\".cs\")then\nif e:endswith(\".Designer.cs\")then\nlocal n=e:sub(1,-13)local e=n..\".cs\"if premake.findfile(t,e)then\nreturn\"Dependency\",e\nend\ne=n..\".resx\"if premake.findfile(t,e)then\nreturn\"AutoGen\",e\nend\nelseif e:endswith(\".xaml.cs\")then\nlocal e=e:sub(1,-9)local e=e..\".xaml\"if premake.findfile(t,e)then\nreturn\"SubTypeCode\",e\nend\nelse\nlocal e=e:sub(1,-4)local e=e..\".Designer.cs\"if premake.findfile(t,e)then\nreturn\"SubTypeForm\"end\nend\nend\nif r==\"EmbeddedResource\"and e:endswith(\".resx\")then\nlocal n=e:sub(1,-6)local e=path.getname(n..\".cs\")if premake.findfile(t,e)then\nif premake.findfile(t,n..\".Designer.cs\")then\nreturn\"DesignerType\",e\nelse\nreturn\"Dependency\",e\nend\nelse\ne=path.getname(n..\".Designer.cs\")if premake.findfile(t,e)then\nreturn\"AutoGenerated\"end\nend\nend\nif e:endswith(\".xaml\")then\nreturn\"XamlDesigner\"end\nif "
- "r==\"Content\"then\nreturn\"CopyNewest\"end\nreturn\"None\"end\nfunction e.arch(e)return\"AnyCPU\"end\nfunction e.files(e)local t=premake.project.buildsourcetree(e)premake.tree.traverse(t,{onleaf=function(t)local n=premake.dotnet.getbuildaction(t.cfg)local r=path.translate(premake.esc(t.cfg.name),\"\\\\\")local e,o=o(e,n,t.path)if e==\"None\"then\n_p(' <%s Include=\"%s\" />',n,r)else\n_p(' <%s Include=\"%s\">',n,r)if e==\"AutoGen\"then\n_p(' <AutoGen>True</AutoGen>')elseif e==\"AutoGenerated\"then\n_p(' <SubType>Designer</SubType>')_p(' <Generator>ResXFileCodeGenerator</Generator>')_p(' <LastGenOutput>%s.Designer.cs</LastGenOutput>',premake.esc(path.getbasename(t.name)))elseif e==\"SubTypeDesigner\"then\n_p(' <SubType>Designer</SubType>')elseif e==\"SubTypeForm\"then\n_p(' <SubType>Form</SubType>')elseif e==\"SubTypeCode\"then\n_p(' <SubType>Code</SubType>')elseif e==\"XamlDesigner\"then\n_p(' <SubType>Designer</SubType>')_p(' <Generator>MSBuild:Compile</Gener"
- "ator>')elseif e==\"PreserveNewest\"then\n_p(' <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>')end\nif o then\n_p(' <DependentUpon>%s</DependentUpon>',path.translate(premake.esc(o),\"\\\\\"))end\n_p(' </%s>',n)end\nend},false)end\nfunction e.projectelement(e)local t=premake.action.current()local e=''if t.vstudio.toolsVersion then\ne=string.format(' ToolsVersion=\"%s\"',t.vstudio.toolsVersion)end\nif _ACTION>\"vs2008\"then\n_p('<?xml version=\"1.0\" encoding=\"utf-8\"?>')end\n_p('<Project%s DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">',e)end\nfunction e.projectsettings(t)_p(' <PropertyGroup>')_p(\" <Configuration Condition=\\\" '$(Configuration)' == '' \\\">%s</Configuration>\",premake.esc(t.solution.configurations[1]))_p(\" <Platform Condition=\\\" '$(Platform)' == '' \\\">%s</Platform>\",e.arch(t))local e=premake.action.current()if e.vstudio.productVersion then\n_p(' <ProductVersion>%s</ProductVersion>',e.vstudio.productVersion)en"
- "d\nif _ACTION<\"vs2012\"then\n_p(' <SchemaVersion>2.0</SchemaVersion>')end\n_p(' <ProjectGuid>{%s}</ProjectGuid>',t.uuid)_p(' <OutputType>%s</OutputType>',premake.dotnet.getkind(t))_p(' <AppDesignerFolder>Properties</AppDesignerFolder>')_p(' <RootNamespace>%s</RootNamespace>',t.buildtarget.basename)_p(' <AssemblyName>%s</AssemblyName>',t.buildtarget.basename)local e=t.framework or e.vstudio.targetFramework\nif e then\n_p(' <TargetFrameworkVersion>v%s</TargetFrameworkVersion>',e)end\nif _ACTION=='vs2010'then\n_p(' <TargetFrameworkProfile></TargetFrameworkProfile>')end\nif _ACTION>=\"vs2010\"then\n_p(' <FileAlignment>512</FileAlignment>')end\n_p(' </PropertyGroup>')end\nfunction e.propertygroup(t)_p(\" <PropertyGroup Condition=\\\" '$(Configuration)|$(Platform)' == '%s|%s' \\\">\",premake.esc(t.name),e.arch(t))if _ACTION>\"vs2008\"then\n_p(' <PlatformTarget>%s</PlatformTarget>',e.arch(t))end\nend\nfunction e.generate(n)io.eol=\"\\r\\n\"e.projectelement(n)if _ACTION>\"vs2010\"then"
- "\n_p(' <Import Project=\"$(MSBuildExtensionsPath)\\\\$(MSBuildToolsVersion)\\\\Microsoft.Common.props\" Condition=\"Exists(\\'$(MSBuildExtensionsPath)\\\\$(MSBuildToolsVersion)\\\\Microsoft.Common.props\\')\" />')end\ne.projectsettings(n)for t in premake.eachconfig(n)do\ne.propertygroup(t)if t.flags.Symbols then\n_p(' <DebugSymbols>true</DebugSymbols>')_p(' <DebugType>full</DebugType>')else\n_p(' <DebugType>pdbonly</DebugType>')end\n_p(' <Optimize>%s</Optimize>',iif(t.flags.Optimize or t.flags.OptimizeSize or t.flags.OptimizeSpeed,\"true\",\"false\"))_p(' <OutputPath>%s</OutputPath>',t.buildtarget.directory)_p(' <DefineConstants>%s</DefineConstants>',table.concat(premake.esc(t.defines),\";\"))_p(' <ErrorReport>prompt</ErrorReport>')_p(' <WarningLevel>4</WarningLevel>')if t.flags.Unsafe then\n_p(' <AllowUnsafeBlocks>true</AllowUnsafeBlocks>')end\nif t.flags.FatalWarnings then\n_p(' <TreatWarningsAsErrors>true</TreatWarningsAsErrors>')end\n_p(' </PropertyGroup>')end\n_p(' <ItemGr"
- "oup>')for t,e in ipairs(premake.getlinks(n,\"siblings\",\"object\"))do\n_p(' <ProjectReference Include=\"%s\">',path.translate(path.getrelative(n.location,s.projectfile(e)),\"\\\\\"))_p(' <Project>{%s}</Project>',e.uuid)_p(' <Name>%s</Name>',premake.esc(e.name))_p(' </ProjectReference>')end\nfor t,e in ipairs(premake.getlinks(n,\"system\",\"name\"))do\n_p(' <Reference Include=\"%s\" />',premake.esc(e))end\n_p(' </ItemGroup>')_p(' <ItemGroup>')e.files(n)_p(' </ItemGroup>')local e=iif(_ACTION<\"vs2012\",\"Bin\",\"Tools\")_p(' <Import Project=\"$(MSBuild%sPath)\\\\Microsoft.CSharp.targets\" />',e)_p(' <!-- To modify your build process, add your task inside one of the targets below and uncomment it.')_p(' Other similar extension points exist, see Microsoft.Common.targets.')_p(' <Target Name=\"BeforeBuild\">')_p(' </Target>')_p(' <Target Name=\"AfterBuild\">')_p(' </Target>')_p(' -->')_p('</Project>')end",
+ "premake.vstudio.cs2005={}local s=premake.vstudio\nlocal e=premake.vstudio.cs2005\nlocal function i(t,r,e)if r==\"Compile\"and e:endswith(\".cs\")then\nif e:endswith(\".Designer.cs\")then\nlocal n=e:sub(1,-13)local e=n..\".cs\"if premake.findfile(t,e)then\nreturn\"Dependency\",e\nend\ne=n..\".resx\"if premake.findfile(t,e)then\nreturn\"AutoGen\",e\nend\nelseif e:endswith(\".xaml.cs\")then\nlocal e=e:sub(1,-9)local e=e..\".xaml\"if premake.findfile(t,e)then\nreturn\"SubTypeCode\",e\nend\nelse\nlocal e=e:sub(1,-4)local e=e..\".Designer.cs\"if premake.findfile(t,e)then\nreturn\"SubTypeForm\"end\nend\nend\nif r==\"EmbeddedResource\"and e:endswith(\".resx\")then\nlocal n=e:sub(1,-6)local e=path.getname(n..\".cs\")if premake.findfile(t,e)then\nif premake.findfile(t,n..\".Designer.cs\")then\nreturn\"DesignerType\",e\nelse\nreturn\"Dependency\",e\nend\nelse\ne=path.getname(n..\".Designer.cs\")if premake.findfile(t,e)then\nreturn\"AutoGenerated\"end\nend\nend\nif e:endswith(\".xaml\")then\nreturn\"XamlDesigner\"end\nif "
+ "r==\"Content\"then\nreturn\"CopyNewest\"end\nreturn\"None\"end\nfunction e.arch(e)return\"AnyCPU\"end\nfunction e.files(e)local t=premake.project.buildsourcetree(e)premake.tree.traverse(t,{onleaf=function(n)local t=premake.dotnet.getbuildaction(n.cfg)local o=path.translate(premake.esc(n.cfg.name),\"\\\\\")local e,r=i(e,t,n.path)if e==\"None\"then\n_p(' <%s Include=\"%s\" />',t,o)else\n_p(' <%s Include=\"%s\">',t,o)if e==\"AutoGen\"then\n_p(' <AutoGen>True</AutoGen>')elseif e==\"AutoGenerated\"then\n_p(' <SubType>Designer</SubType>')_p(' <Generator>ResXFileCodeGenerator</Generator>')_p(' <LastGenOutput>%s.Designer.cs</LastGenOutput>',premake.esc(path.getbasename(n.name)))elseif e==\"SubTypeDesigner\"then\n_p(' <SubType>Designer</SubType>')elseif e==\"SubTypeForm\"then\n_p(' <SubType>Form</SubType>')elseif e==\"SubTypeCode\"then\n_p(' <SubType>Code</SubType>')elseif e==\"XamlDesigner\"then\n_p(' <SubType>Designer</SubType>')_p(' <Generator>MSBuild:Compile</Gener"
+ "ator>')elseif e==\"PreserveNewest\"then\n_p(' <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>')end\nif r then\n_p(' <DependentUpon>%s</DependentUpon>',path.translate(premake.esc(r),\"\\\\\"))end\n_p(' </%s>',t)end\nend},false)end\nfunction e.projectelement(e)local e=premake.action.current()local t=''if e.vstudio.toolsVersion then\nt=string.format(' ToolsVersion=\"%s\"',e.vstudio.toolsVersion)end\nif _ACTION>\"vs2008\"then\n_p('<?xml version=\"1.0\" encoding=\"utf-8\"?>')end\n_p('<Project%s DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">',t)end\nfunction e.projectsettings(t)_p(' <PropertyGroup>')_p(\" <Configuration Condition=\\\" '$(Configuration)' == '' \\\">%s</Configuration>\",premake.esc(t.solution.configurations[1]))_p(\" <Platform Condition=\\\" '$(Platform)' == '' \\\">%s</Platform>\",e.arch(t))local e=premake.action.current()if e.vstudio.productVersion then\n_p(' <ProductVersion>%s</ProductVersion>',e.vstudio.productVersion)en"
+ "d\nif _ACTION<\"vs2012\"then\n_p(' <SchemaVersion>2.0</SchemaVersion>')end\n_p(' <ProjectGuid>{%s}</ProjectGuid>',t.uuid)_p(' <OutputType>%s</OutputType>',premake.dotnet.getkind(t))_p(' <AppDesignerFolder>Properties</AppDesignerFolder>')_p(' <RootNamespace>%s</RootNamespace>',t.buildtarget.basename)_p(' <AssemblyName>%s</AssemblyName>',t.buildtarget.basename)local e=t.framework or e.vstudio.targetFramework\nif e then\n_p(' <TargetFrameworkVersion>v%s</TargetFrameworkVersion>',e)end\nif _ACTION=='vs2010'then\n_p(' <TargetFrameworkProfile></TargetFrameworkProfile>')end\nif _ACTION>=\"vs2010\"then\n_p(' <FileAlignment>512</FileAlignment>')end\n_p(' </PropertyGroup>')end\nfunction e.propertygroup(t)_p(\" <PropertyGroup Condition=\\\" '$(Configuration)|$(Platform)' == '%s|%s' \\\">\",premake.esc(t.name),e.arch(t))if _ACTION>\"vs2008\"then\n_p(' <PlatformTarget>%s</PlatformTarget>',e.arch(t))end\nend\nfunction e.buildevents(e)if#e.prebuildcommands>0 then\n_p(' <PropertyGroup>')_p(' "
+ " <PreBuildEvent>%s</PreBuildEvent>',premake.esc(table.implode(e.prebuildcommands,\"\",\"\",\"\\r\\n\")))_p(' </PropertyGroup>')end\nif#e.postbuildcommands>0 then\n_p(' <PropertyGroup>')_p(' <PostBuildEvent>%s</PostBuildEvent>',premake.esc(table.implode(e.postbuildcommands,\"\",\"\",\"\\r\\n\")))_p(' </PropertyGroup>')end\nend\nfunction e.generate(n)io.eol=\"\\r\\n\"e.projectelement(n)if _ACTION>\"vs2010\"then\n_p(' <Import Project=\"$(MSBuildExtensionsPath)\\\\$(MSBuildToolsVersion)\\\\Microsoft.Common.props\" Condition=\"Exists(\\'$(MSBuildExtensionsPath)\\\\$(MSBuildToolsVersion)\\\\Microsoft.Common.props\\')\" />')end\ne.projectsettings(n)for t in premake.eachconfig(n)do\ne.propertygroup(t)if t.flags.Symbols then\n_p(' <DebugSymbols>true</DebugSymbols>')_p(' <DebugType>full</DebugType>')else\n_p(' <DebugType>pdbonly</DebugType>')end\n_p(' <Optimize>%s</Optimize>',iif(t.flags.Optimize or t.flags.OptimizeSize or t.flags.OptimizeSpeed,\"true\",\"false\"))_p(' <OutputPath>%s</OutputPath>'"
+ ",t.buildtarget.directory)_p(' <DefineConstants>%s</DefineConstants>',table.concat(premake.esc(t.defines),\";\"))_p(' <ErrorReport>prompt</ErrorReport>')_p(' <WarningLevel>4</WarningLevel>')if t.flags.Unsafe then\n_p(' <AllowUnsafeBlocks>true</AllowUnsafeBlocks>')end\nif t.flags.FatalWarnings then\n_p(' <TreatWarningsAsErrors>true</TreatWarningsAsErrors>')end\n_p(' </PropertyGroup>')end\n_p(' <ItemGroup>')for t,e in ipairs(premake.getlinks(n,\"siblings\",\"object\"))do\n_p(' <ProjectReference Include=\"%s\">',path.translate(path.getrelative(n.location,s.projectfile(e)),\"\\\\\"))_p(' <Project>{%s}</Project>',e.uuid)_p(' <Name>%s</Name>',premake.esc(e.name))_p(' </ProjectReference>')end\nfor t,e in ipairs(premake.getlinks(n,\"system\",\"name\"))do\n_p(' <Reference Include=\"%s\" />',premake.esc(e))end\n_p(' </ItemGroup>')_p(' <ItemGroup>')e.files(n)_p(' </ItemGroup>')local e=iif(_ACTION<\"vs2012\",\"Bin\",\"Tools\")_p(' <Import Project=\"$(MSBuild%sPath)\\\\Microsoft.CShar"
+ "p.targets\" />',e)_p(' <!-- To modify your build process, add your task inside one of the targets below and uncomment it.')_p(' Other similar extension points exist, see Microsoft.Common.targets.')_p(' <Target Name=\"BeforeBuild\">')_p(' </Target>')_p(' <Target Name=\"AfterBuild\">')_p(' </Target>')_p(' -->')_p('</Project>')end",
/* actions/vstudio/vs2005_csproj_user.lua */
"local e=premake.vstudio.cs2005\nfunction e.generate_user(e)io.eol=\"\\r\\n\"_p('<Project xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">')_p(' <PropertyGroup>')local e=table.translate(e.libdirs,function(t)return path.getabsolute(e.location..\"/\"..t)end)_p(' <ReferencePath>%s</ReferencePath>',path.translate(table.concat(e,\";\"),\"\\\\\"))_p(' </PropertyGroup>')_p('</Project>')end",
/* actions/vstudio/vs2010_vcxproj.lua */
- "premake.vstudio.vc2010={}local e=premake.vstudio.vc2010\nlocal l=premake.vstudio\nlocal function p(e)_p(1,'<ItemGroup Label=\"ProjectConfigurations\">')for n,e in ipairs(e.solution.vstudio_configs)do\n_p(2,'<ProjectConfiguration Include=\"%s\">',premake.esc(e.name))_p(3,'<Configuration>%s</Configuration>',e.buildcfg)_p(3,'<Platform>%s</Platform>',e.platform)_p(2,'</ProjectConfiguration>')end\n_p(1,'</ItemGroup>')end\nlocal function r(e)_p(1,'<PropertyGroup Label=\"Globals\">')_p(2,'<ProjectGuid>{%s}</ProjectGuid>',e.uuid)_p(2,'<RootNamespace>%s</RootNamespace>',e.name)if e.flags and e.flags.Managed then\n_p(2,'<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>')_p(2,'<Keyword>ManagedCProj</Keyword>')else\n_p(2,'<Keyword>Win32Proj</Keyword>')end\n_p(1,'</PropertyGroup>')end\nfunction e.config_type(e)local n={SharedLib=\"DynamicLibrary\",StaticLib=\"StaticLibrary\",ConsoleApp=\"Application\",WindowedApp=\"Application\"}return n[e.kind]end\nlocal function i()return\"Condition=\\\"'$(Configuration)|$(Platform)'"
+ "premake.vstudio.vc2010={}local e=premake.vstudio.vc2010\nlocal u=premake.vstudio\nlocal function l(e)_p(1,'<ItemGroup Label=\"ProjectConfigurations\">')for n,e in ipairs(e.solution.vstudio_configs)do\n_p(2,'<ProjectConfiguration Include=\"%s\">',premake.esc(e.name))_p(3,'<Configuration>%s</Configuration>',e.buildcfg)_p(3,'<Platform>%s</Platform>',e.platform)_p(2,'</ProjectConfiguration>')end\n_p(1,'</ItemGroup>')end\nlocal function d(e)_p(1,'<PropertyGroup Label=\"Globals\">')_p(2,'<ProjectGuid>{%s}</ProjectGuid>',e.uuid)_p(2,'<RootNamespace>%s</RootNamespace>',e.name)if e.flags and e.flags.Managed then\n_p(2,'<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>')_p(2,'<Keyword>ManagedCProj</Keyword>')else\n_p(2,'<Keyword>Win32Proj</Keyword>')end\n_p(1,'</PropertyGroup>')end\nfunction e.config_type(e)local n={SharedLib=\"DynamicLibrary\",StaticLib=\"StaticLibrary\",ConsoleApp=\"Application\",WindowedApp=\"Application\"}return n[e.kind]end\nlocal function i()return\"Condition=\\\"'$(Configuration)|$(Platform)'"
"=='%s'\\\"\"end\nlocal function o(n)local e=\"Disabled\"for i,n in ipairs(n.flags)do\nif(n==\"Optimize\")then\ne=\"Full\"elseif(n==\"OptimizeSize\")then\ne=\"MinSpace\"elseif(n==\"OptimizeSpeed\")then\ne=\"MaxSpeed\"end\nend\nreturn e\nend\nfunction e.configurationPropertyGroup(n,t)_p(1,'<PropertyGroup '..i()..' Label=\"Configuration\">',premake.esc(t.name))_p(2,'<ConfigurationType>%s</ConfigurationType>',e.config_type(n))_p(2,'<UseDebugLibraries>%s</UseDebugLibraries>',iif(o(n)==\"Disabled\",\"true\",\"false\"))_p(2,'<CharacterSet>%s</CharacterSet>',iif(n.flags.Unicode,\"Unicode\",\"MultiByte\"))local e={vs2012=\"v110\",vs2013=\"v120\",vs2015=\"v140\",vs2017=\"v141\",vs2019=\"v142\",vs2022=\"v143\"}local e=e[_ACTION]if e then\n_p(2,'<PlatformToolset>%s</PlatformToolset>',e)end\nif n.flags.MFC then\n_p(2,'<UseOfMfc>%s</UseOfMfc>',iif(n.flags.StaticRuntime,\"Static\",\"Dynamic\"))end\nif n.flags.ATL or n.flags.StaticATL then\n_p(2,'<UseOfAtl>%s</UseOfAtl>',iif(n.flags.StaticATL,\"Static\",\"Dynamic\"))end\nif n"
- ".flags.Managed then\n_p(2,'<CLRSupport>true</CLRSupport>')end\n_p(1,'</PropertyGroup>')end\nlocal function s(n)for t,e in ipairs(n.solution.vstudio_configs)do\nlocal n=premake.getconfig(n,e.src_buildcfg,e.src_platform)_p(1,'<ImportGroup '..i()..' Label=\"PropertySheets\">',premake.esc(e.name))_p(2,'<Import Project=\"$(UserRootDir)\\\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists(\\'$(UserRootDir)\\\\Microsoft.Cpp.$(Platform).user.props\\')\" Label=\"LocalAppDataPlatform\" />')_p(1,'</ImportGroup>')end\nend\nfunction e.outputProperties(e)for n,t in ipairs(e.solution.vstudio_configs)do\nlocal e=premake.getconfig(e,t.src_buildcfg,t.src_platform)local n=e.buildtarget\n_p(1,'<PropertyGroup '..i()..'>',premake.esc(t.name))_p(2,'<OutDir>%s\\\\</OutDir>',premake.esc(n.directory))if e.platform==\"Xbox360\"then\n_p(2,'<OutputFile>$(OutDir)%s</OutputFile>',premake.esc(n.name))end\n_p(2,'<IntDir>%s\\\\</IntDir>',premake.esc(e.objectsdir))_p(2,'<TargetName>%s</TargetName>',premake.esc(path.getbasename(n.name)))"
- "_p(2,'<TargetExt>%s</TargetExt>',premake.esc(path.getextension(n.name)))if e.kind==\"SharedLib\"then\nlocal e=(e.flags.NoImportLib~=nil)_p(2,'<IgnoreImportLibrary>%s</IgnoreImportLibrary>',tostring(e))end\nif e.kind~=\"StaticLib\"then\n_p(2,'<LinkIncremental>%s</LinkIncremental>',tostring(premake.config.isincrementallink(e)))end\nif e.flags.NoManifest then\n_p(2,'<GenerateManifest>false</GenerateManifest>')end\n_p(1,'</PropertyGroup>')end\nend\nlocal function d(i)local n\nlocal e=i.flags\nif premake.config.isdebugbuild(i)then\nn=iif(e.StaticRuntime and not e.Managed,\"MultiThreadedDebug\",\"MultiThreadedDebugDLL\")else\nn=iif(e.StaticRuntime and not e.Managed,\"MultiThreaded\",\"MultiThreadedDLL\")end\nreturn n\nend\nlocal function C(e)if not e.flags.NoPCH and e.pchheader then\n_p(3,'<PrecompiledHeader>Use</PrecompiledHeader>')_p(3,'<PrecompiledHeaderFile>%s</PrecompiledHeaderFile>',e.pchheader)else\n_p(3,'<PrecompiledHeader></PrecompiledHeader>')end\nend\nlocal function t(n,e)if#e.defines>0 then\n_p(n,'<Prepr"
- "ocessorDefinitions>%s;%%(PreprocessorDefinitions)</PreprocessorDefinitions>',premake.esc(table.concat(e.defines,\";\")))else\n_p(n,'<PreprocessorDefinitions></PreprocessorDefinitions>')end\nend\nlocal function P(n,e)if#e.includedirs>0 then\n_p(n,'<AdditionalIncludeDirectories>%s;%%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>',premake.esc(path.translate(table.concat(e.includedirs,\";\"),'\\\\')))end\nend\nlocal function a(n,e)if#e.includedirs>0 or#e.resincludedirs>0 then\nlocal e=table.join(e.includedirs,e.resincludedirs)_p(n,'<AdditionalIncludeDirectories>%s;%%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>',premake.esc(path.translate(table.concat(e,\";\"),'\\\\')))end\nend\nlocal function f(e)_p(2,'<ResourceCompile>')t(3,e)a(3,e)_p(2,'</ResourceCompile>')end\nlocal function u(e)if e.flags.NoExceptions then\n_p(2,'<ExceptionHandling>false</ExceptionHandling>')elseif e.flags.SEH then\n_p(2,'<ExceptionHandling>Async</ExceptionHandling>')end\nend\nlocal function c(e)if e.flags.NoRTT"
- "I and not e.flags.Managed then\n_p(3,'<RuntimeTypeInfo>false</RuntimeTypeInfo>')end\nend\nlocal function m(e)if e.flags.NativeWChar then\n_p(3,'<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>')elseif e.flags.NoNativeWChar then\n_p(3,'<TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>')end\nend\nlocal function g(e)if e.flags.EnableSSE then\n_p(3,'<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>')elseif e.flags.EnableSSE2 then\n_p(3,'<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>')end\nend\nlocal function b(e)if e.flags.FloatFast then\n_p(3,'<FloatingPointModel>Fast</FloatingPointModel>')elseif e.flags.FloatStrict and not e.flags.Managed then\n_p(3,'<FloatingPointModel>Strict</FloatingPointModel>')end\nend\nlocal function a(e)local n=''if e.flags.Symbols then\nif e.platform==\"x64\"or e.flags.Managed\nor premake.config.isoptimizedbuild(e.flags)or e.flags.NoEditAndContinue\nthen\nn=\"ProgramDatabase\"else\nn=\"EditAnd"
- "Continue\"end\nend\n_p(3,'<DebugInformationFormat>%s</DebugInformationFormat>',n)end\nlocal function n(e)if premake.config.isdebugbuild(e)and not e.flags.NoMinimalRebuild then\n_p(3,'<MinimalRebuild>true</MinimalRebuild>')else\n_p(3,'<MinimalRebuild>false</MinimalRebuild>')end\nend\nlocal function _(e)if e.language==\"C\"then\n_p(3,'<CompileAs>CompileAsC</CompileAs>')end\nend\nlocal function h(e)_p(2,'<ClCompile>')if#e.buildoptions>0 then\n_p(3,'<AdditionalOptions>%s %%(AdditionalOptions)</AdditionalOptions>',table.concat(premake.esc(e.buildoptions),\" \"))end\n_p(3,'<Optimization>%s</Optimization>',o(e))P(3,e)t(3,e)n(e)if not premake.config.isoptimizedbuild(e.flags)then\nif not e.flags.Managed then\n_p(3,'<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>')end\nif e.flags.ExtraWarnings then\n_p(3,'<SmallerTypeCheck>true</SmallerTypeCheck>')end\nelse\n_p(3,'<StringPooling>true</StringPooling>')end\n_p(3,'<RuntimeLibrary>%s</RuntimeLibrary>',d(e))_p(3,'<FunctionLevelLinking>true</FunctionLevelLinking>')C"
- "(e)if e.flags.ExtraWarnings then\n_p(3,'<WarningLevel>Level4</WarningLevel>')else\n_p(3,'<WarningLevel>Level3</WarningLevel>')end\nif e.flags.FatalWarnings then\n_p(3,'<TreatWarningAsError>true</TreatWarningAsError>')end\nu(e)c(e)m(e)g(e)b(e)a(e)if e.flags.Symbols then\n_p(3,'<ProgramDataBaseFileName>$(OutDir)%s.pdb</ProgramDataBaseFileName>',path.getbasename(e.buildtarget.name))end\nif e.flags.NoFramePointer then\n_p(3,'<OmitFramePointers>true</OmitFramePointers>')end\n_(e)_p(2,'</ClCompile>')end\nlocal function c(e)if#e.postbuildcommands>0 then\n_p(2,'<PostBuildEvent>')_p(3,'<Command>%s</Command>',premake.esc(table.implode(e.postbuildcommands,\"\",\"\",\"\\r\\n\")))_p(2,'</PostBuildEvent>')end\nif#e.prebuildcommands>0 then\n_p(2,'<PreBuildEvent>')_p(3,'<Command>%s</Command>',premake.esc(table.implode(e.prebuildcommands,\"\",\"\",\"\\r\\n\")))_p(2,'</PreBuildEvent>')end\nif#e.prelinkcommands>0 then\n_p(2,'<PreLinkEvent>')_p(3,'<Command>%s</Command>',premake.esc(table.implode(e.prelinkcommands,\"\",\"\",\"\\r"
- "\\n\")))_p(2,'</PreLinkEvent>')end\nend\nlocal function o(n,e)if#e.linkoptions>0 then\n_p(n,'<AdditionalOptions>%s %%(AdditionalOptions)</AdditionalOptions>',table.concat(premake.esc(e.linkoptions),\" \"))end\nend\nlocal function t(i,e)local n={x32='MachineX86',x64='MachineX64'}if n[e.platform]then\n_p(i,'<TargetMachine>%s</TargetMachine>',n[e.platform])end\nend\nlocal function a(e)if e.kind=='StaticLib'and e.platform~=\"Xbox360\"then\n_p(1,'<Lib>')_p(2,'<OutputFile>$(OutDir)%s</OutputFile>',e.buildtarget.name)o(2,e)t(2,e)_p(1,'</Lib>')end\nend\nlocal function d(e)if e.kind==\"SharedLib\"then\nlocal n=e.linktarget.fullpath\n_p(3,'<ImportLibrary>%s</ImportLibrary>',iif(e.flags.NoImportLib,e.objectsdir..\"\\\\\"..path.getname(n),n))end\nend\nfunction e.link(n)_p(2,'<Link>')_p(3,'<SubSystem>%s</SubSystem>',iif(n.kind==\"ConsoleApp\",\"Console\",\"Windows\"))_p(3,'<GenerateDebugInformation>%s</GenerateDebugInformation>',tostring(n.flags.Symbols~=nil))if premake.config.isoptimizedbuild(n.flags)then\n_p(3,'<EnableCO"
- "MDATFolding>true</EnableCOMDATFolding>')_p(3,'<OptimizeReferences>true</OptimizeReferences>')end\nif n.kind~='StaticLib'then\ne.additionalDependencies(n)_p(3,'<OutputFile>$(OutDir)%s</OutputFile>',n.buildtarget.name)if#n.libdirs>0 then\n_p(3,'<AdditionalLibraryDirectories>%s;%%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>',premake.esc(path.translate(table.concat(n.libdirs,';'),'\\\\')))end\nif e.config_type(n)=='Application'and not n.flags.WinMain and not n.flags.Managed then\n_p(3,'<EntryPointSymbol>%s</EntryPointSymbol>',iif(n.flags.Unicode,\"wmainCRTStartup\",\"mainCRTStartup\"))end\nd(n)local e=premake.findfile(n,\".def\")if e then\n_p(3,'<ModuleDefinitionFile>%s</ModuleDefinitionFile>',e)end\nt(3,n)o(3,n)end\n_p(2,'</Link>')end\nfunction e.additionalDependencies(e)local e=premake.getlinks(e,\"system\",\"fullpath\")if#e>0 then\n_p(3,'<AdditionalDependencies>%s;%%(AdditionalDependencies)</AdditionalDependencies>',table.concat(e,\";\"))end\nend\nlocal function d(n)for o,t in ipairs(n.solution"
- ".vstudio_configs)do\nlocal n=premake.getconfig(n,t.src_buildcfg,t.src_platform)_p(1,'<ItemDefinitionGroup '..i()..'>',premake.esc(t.name))h(n)f(n)a(n)e.link(n)c(n)_p(1,'</ItemDefinitionGroup>')end\nend\nfunction e.getfilegroup(i,t)local e=i.vc2010sortedfiles\nif not e then\ne={ClCompile={},ClInclude={},None={},ResourceCompile={},}for n in premake.project.eachfile(i)do\nif path.iscppfile(n.name)then\ntable.insert(e.ClCompile,n)elseif path.iscppheader(n.name)then\ntable.insert(e.ClInclude,n)elseif path.isresourcefile(n.name)then\ntable.insert(e.ResourceCompile,n)else\ntable.insert(e.None,n)end\nend\ni.vc2010sortedfiles=e\nend\nreturn e[t]end\nfunction e.files(n)e.simplefilesgroup(n,\"ClInclude\")e.compilerfilesgroup(n)e.simplefilesgroup(n,\"None\")e.simplefilesgroup(n,\"ResourceCompile\")end\nfunction e.simplefilesgroup(i,n)local e=e.getfilegroup(i,n)if#e>0 then\n_p(1,'<ItemGroup>')for i,e in ipairs(e)do\n_p(2,'<%s Include=\"%s\" />',n,path.translate(e.name,\"\\\\\"))end\n_p(1,'</ItemGroup>')end\nend\nfunction e"
- ".individualSourceFileOptions(o,t,n)local e=o.solution.vstudio_configs\nlocal a=path.translate(n.name,\"\\\\\")for n,e in ipairs(e)do\nif t[e]and a==t[e]then\n_p(3,'<PrecompiledHeader '..i()..'>Create</PrecompiledHeader>',premake.esc(e.name))t[e]=nil\nend\nend\nif path.iscfile(n.name)~=premake.project.iscproject(o)then\n_p(3,'<CompileAs>%s</CompileAs>',iif(path.iscfile(n.name),'CompileAsC','CompileAsCpp'))end\nend\nfunction e.individualSourceFile(o,t,n)local i=path.translate(n.name,\"\\\\\")_p(2,'<ClCompile Include=\"%s\">',i)e.individualSourceFileOptions(o,t,n)_p(2,'</ClCompile>')end\nfunction e.compilerfilesgroup(n)local i=n.solution.vstudio_configs\nlocal o=e.getfilegroup(n,\"ClCompile\")if#o>0 then\nlocal t={}for e,i in ipairs(i)do\nlocal e=premake.getconfig(n,i.src_buildcfg,i.src_platform)if e.pchheader and e.pchsource and not e.flags.NoPCH then\nt[i]=path.translate(e.pchsource,\"\\\\\")end\nend\n_p(1,'<ItemGroup>')for o,i in ipairs(o)do\ne.individualSourceFile(n,t,i)end\n_p(1,'</ItemGroup>')end\nend\nfunc"
- "tion e.header(n)io.eol=\"\\r\\n\"_p('<?xml version=\"1.0\" encoding=\"utf-8\"?>')local e=\"\"if n then\ne=' DefaultTargets=\"'..n..'\"'end\n_p('<Project%s ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">',e)end\nfunction premake.vs2010_vcxproj(n)io.indent=\" \"e.header(\"Build\")p(n)r(n)_p(1,'<Import Project=\"$(VCTargetsPath)\\\\Microsoft.Cpp.Default.props\" />')for t,i in ipairs(n.solution.vstudio_configs)do\nlocal n=premake.getconfig(n,i.src_buildcfg,i.src_platform)e.configurationPropertyGroup(n,i)end\n_p(1,'<Import Project=\"$(VCTargetsPath)\\\\Microsoft.Cpp.props\" />')_p(1,'<ImportGroup Label=\"ExtensionSettings\">')_p(1,'</ImportGroup>')s(n)_p(1,'<PropertyGroup Label=\"UserMacros\" />')e.outputProperties(n)d(n)e.files(n)e.projectReferences(n)_p(1,'<Import Project=\"$(VCTargetsPath)\\\\Microsoft.Cpp.targets\" />')_p(1,'<ImportGroup Label=\"ExtensionTargets\">')_p(1,'</ImportGroup>')_p('</Project>')end\nfunction e.projectReferences(n)local e=premake.getdependencies(n)if"
- "#e>0 then\n_p(1,'<ItemGroup>')for i,e in ipairs(e)do\nlocal n=path.getrelative(n.location,l.projectfile(e))_p(2,'<ProjectReference Include=\"%s\">',path.translate(n,\"\\\\\"))_p(3,'<Project>{%s}</Project>',e.uuid)_p(2,'</ProjectReference>')end\n_p(1,'</ItemGroup>')end\nend\nfunction e.debugdir(e)if e.debugdir then\n_p(' <LocalDebuggerWorkingDirectory>%s</LocalDebuggerWorkingDirectory>',path.translate(e.debugdir,'\\\\'))_p(' <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>')end\nif e.debugargs then\n_p(' <LocalDebuggerCommandArguments>%s</LocalDebuggerCommandArguments>',table.concat(e.debugargs,\" \"))end\nend\nfunction e.debugenvs(e)if e.debugenvs and#e.debugenvs>0 then\n_p(2,'<LocalDebuggerEnvironment>%s%s</LocalDebuggerEnvironment>',table.concat(e.debugenvs,\"\\n\"),iif(e.flags.DebugEnvsInherit,'\\n$(LocalDebuggerEnvironment)',''))if e.flags.DebugEnvsDontMerge then\n_p(2,'<LocalDebuggerMergeEnvironment>false</LocalDebuggerMergeEnvironment>')end\nend\nend\nfunction premake.vs2010_vcxproj_user(t)"
- "io.indent=\" \"e.header()for o,n in ipairs(t.solution.vstudio_configs)do\nlocal t=premake.getconfig(t,n.src_buildcfg,n.src_platform)_p(' <PropertyGroup '..i()..'>',premake.esc(n.name))e.debugdir(t)e.debugenvs(t)_p(' </PropertyGroup>')end\n_p('</Project>')end",
+ ".flags.Managed then\n_p(2,'<CLRSupport>true</CLRSupport>')end\n_p(1,'</PropertyGroup>')end\nlocal function p(n)for t,e in ipairs(n.solution.vstudio_configs)do\nlocal n=premake.getconfig(n,e.src_buildcfg,e.src_platform)_p(1,'<ImportGroup '..i()..' Label=\"PropertySheets\">',premake.esc(e.name))_p(2,'<Import Project=\"$(UserRootDir)\\\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists(\\'$(UserRootDir)\\\\Microsoft.Cpp.$(Platform).user.props\\')\" Label=\"LocalAppDataPlatform\" />')_p(1,'</ImportGroup>')end\nend\nfunction e.outputProperties(e)for n,t in ipairs(e.solution.vstudio_configs)do\nlocal e=premake.getconfig(e,t.src_buildcfg,t.src_platform)local n=e.buildtarget\n_p(1,'<PropertyGroup '..i()..'>',premake.esc(t.name))_p(2,'<OutDir>%s\\\\</OutDir>',premake.esc(n.directory))if e.platform==\"Xbox360\"then\n_p(2,'<OutputFile>$(OutDir)%s</OutputFile>',premake.esc(n.name))end\n_p(2,'<IntDir>%s\\\\</IntDir>',premake.esc(e.objectsdir))_p(2,'<TargetName>%s</TargetName>',premake.esc(path.getbasename(n.name)))"
+ "_p(2,'<TargetExt>%s</TargetExt>',premake.esc(path.getextension(n.name)))if e.kind==\"SharedLib\"then\nlocal e=(e.flags.NoImportLib~=nil)_p(2,'<IgnoreImportLibrary>%s</IgnoreImportLibrary>',tostring(e))end\nif e.kind~=\"StaticLib\"then\n_p(2,'<LinkIncremental>%s</LinkIncremental>',tostring(premake.config.isincrementallink(e)))end\nif e.flags.NoManifest then\n_p(2,'<GenerateManifest>false</GenerateManifest>')end\n_p(1,'</PropertyGroup>')end\nend\nlocal function r(i)local n\nlocal e=i.flags\nif premake.config.isdebugbuild(i)then\nn=iif(e.StaticRuntime and not e.Managed,\"MultiThreadedDebug\",\"MultiThreadedDebugDLL\")else\nn=iif(e.StaticRuntime and not e.Managed,\"MultiThreaded\",\"MultiThreadedDLL\")end\nreturn n\nend\nlocal function a(e)if not e.flags.NoPCH and e.pchheader then\n_p(3,'<PrecompiledHeader>Use</PrecompiledHeader>')_p(3,'<PrecompiledHeaderFile>%s</PrecompiledHeaderFile>',e.pchheader)else\n_p(3,'<PrecompiledHeader></PrecompiledHeader>')end\nend\nlocal function t(e,n)if#n.defines>0 then\n_p(e,'<Prepr"
+ "ocessorDefinitions>%s;%%(PreprocessorDefinitions)</PreprocessorDefinitions>',premake.esc(table.concat(n.defines,\";\")))else\n_p(e,'<PreprocessorDefinitions></PreprocessorDefinitions>')end\nend\nlocal function s(n,e)if#e.includedirs>0 then\n_p(n,'<AdditionalIncludeDirectories>%s;%%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>',premake.esc(path.translate(table.concat(e.includedirs,\";\"),'\\\\')))end\nend\nlocal function n(n,e)if#e.includedirs>0 or#e.resincludedirs>0 then\nlocal e=table.join(e.includedirs,e.resincludedirs)_p(n,'<AdditionalIncludeDirectories>%s;%%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>',premake.esc(path.translate(table.concat(e,\";\"),'\\\\')))end\nend\nlocal function c(e)_p(2,'<ResourceCompile>')t(3,e)n(3,e)_p(2,'</ResourceCompile>')end\nlocal function f(e)if e.flags.NoExceptions then\n_p(2,'<ExceptionHandling>false</ExceptionHandling>')elseif e.flags.SEH then\n_p(2,'<ExceptionHandling>Async</ExceptionHandling>')end\nend\nlocal function h(e)if e.flags.NoRTT"
+ "I and not e.flags.Managed then\n_p(3,'<RuntimeTypeInfo>false</RuntimeTypeInfo>')end\nend\nlocal function _(e)if e.flags.NativeWChar then\n_p(3,'<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>')elseif e.flags.NoNativeWChar then\n_p(3,'<TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>')end\nend\nlocal function b(e)if e.flags.EnableSSE then\n_p(3,'<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>')elseif e.flags.EnableSSE2 then\n_p(3,'<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>')end\nend\nlocal function P(e)if e.flags.FloatFast then\n_p(3,'<FloatingPointModel>Fast</FloatingPointModel>')elseif e.flags.FloatStrict and not e.flags.Managed then\n_p(3,'<FloatingPointModel>Strict</FloatingPointModel>')end\nend\nlocal function C(e)local n=''if e.flags.Symbols then\nif e.platform==\"x64\"or e.flags.Managed\nor premake.config.isoptimizedbuild(e.flags)or e.flags.NoEditAndContinue\nthen\nn=\"ProgramDatabase\"else\nn=\"EditAnd"
+ "Continue\"end\nend\n_p(3,'<DebugInformationFormat>%s</DebugInformationFormat>',n)end\nlocal function g(e)if premake.config.isdebugbuild(e)and not e.flags.NoMinimalRebuild then\n_p(3,'<MinimalRebuild>true</MinimalRebuild>')else\n_p(3,'<MinimalRebuild>false</MinimalRebuild>')end\nend\nlocal function n(e)if e.language==\"C\"then\n_p(3,'<CompileAs>CompileAsC</CompileAs>')end\nend\nlocal function m(e)_p(2,'<ClCompile>')if#e.buildoptions>0 then\n_p(3,'<AdditionalOptions>%s %%(AdditionalOptions)</AdditionalOptions>',table.concat(premake.esc(e.buildoptions),\" \"))end\n_p(3,'<Optimization>%s</Optimization>',o(e))s(3,e)t(3,e)g(e)if not premake.config.isoptimizedbuild(e.flags)then\nif not e.flags.Managed then\n_p(3,'<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>')end\nif e.flags.ExtraWarnings then\n_p(3,'<SmallerTypeCheck>true</SmallerTypeCheck>')end\nelse\n_p(3,'<StringPooling>true</StringPooling>')end\n_p(3,'<RuntimeLibrary>%s</RuntimeLibrary>',r(e))_p(3,'<FunctionLevelLinking>true</FunctionLevelLinking>')a"
+ "(e)if e.flags.ExtraWarnings then\n_p(3,'<WarningLevel>Level4</WarningLevel>')else\n_p(3,'<WarningLevel>Level3</WarningLevel>')end\nif e.flags.FatalWarnings then\n_p(3,'<TreatWarningAsError>true</TreatWarningAsError>')end\nf(e)h(e)_(e)b(e)P(e)C(e)if e.flags.Symbols then\n_p(3,'<ProgramDataBaseFileName>$(OutDir)%s.pdb</ProgramDataBaseFileName>',path.getbasename(e.buildtarget.name))end\nif e.flags.NoFramePointer then\n_p(3,'<OmitFramePointers>true</OmitFramePointers>')end\nn(e)_p(2,'</ClCompile>')end\nlocal function a(e)if#e.postbuildcommands>0 then\n_p(2,'<PostBuildEvent>')_p(3,'<Command>%s</Command>',premake.esc(table.implode(e.postbuildcommands,\"\",\"\",\"\\r\\n\")))_p(2,'</PostBuildEvent>')end\nif#e.prebuildcommands>0 then\n_p(2,'<PreBuildEvent>')_p(3,'<Command>%s</Command>',premake.esc(table.implode(e.prebuildcommands,\"\",\"\",\"\\r\\n\")))_p(2,'</PreBuildEvent>')end\nif#e.prelinkcommands>0 then\n_p(2,'<PreLinkEvent>')_p(3,'<Command>%s</Command>',premake.esc(table.implode(e.prelinkcommands,\"\",\"\",\"\\r"
+ "\\n\")))_p(2,'</PreLinkEvent>')end\nend\nlocal function t(n,e)if#e.linkoptions>0 then\n_p(n,'<AdditionalOptions>%s %%(AdditionalOptions)</AdditionalOptions>',table.concat(premake.esc(e.linkoptions),\" \"))end\nend\nlocal function o(i,n)local e={x32='MachineX86',x64='MachineX64'}if e[n.platform]then\n_p(i,'<TargetMachine>%s</TargetMachine>',e[n.platform])end\nend\nlocal function f(e)if e.kind=='StaticLib'and e.platform~=\"Xbox360\"then\n_p(1,'<Lib>')_p(2,'<OutputFile>$(OutDir)%s</OutputFile>',e.buildtarget.name)t(2,e)o(2,e)_p(1,'</Lib>')end\nend\nlocal function r(e)if e.kind==\"SharedLib\"then\nlocal n=e.linktarget.fullpath\n_p(3,'<ImportLibrary>%s</ImportLibrary>',iif(e.flags.NoImportLib,e.objectsdir..\"\\\\\"..path.getname(n),n))end\nend\nfunction e.link(n)_p(2,'<Link>')_p(3,'<SubSystem>%s</SubSystem>',iif(n.kind==\"ConsoleApp\",\"Console\",\"Windows\"))_p(3,'<GenerateDebugInformation>%s</GenerateDebugInformation>',tostring(n.flags.Symbols~=nil))if premake.config.isoptimizedbuild(n.flags)then\n_p(3,'<EnableCO"
+ "MDATFolding>true</EnableCOMDATFolding>')_p(3,'<OptimizeReferences>true</OptimizeReferences>')end\nif n.kind~='StaticLib'then\ne.additionalDependencies(n)_p(3,'<OutputFile>$(OutDir)%s</OutputFile>',n.buildtarget.name)if#n.libdirs>0 then\n_p(3,'<AdditionalLibraryDirectories>%s;%%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>',premake.esc(path.translate(table.concat(n.libdirs,';'),'\\\\')))end\nif e.config_type(n)=='Application'and not n.flags.WinMain and not n.flags.Managed then\n_p(3,'<EntryPointSymbol>%s</EntryPointSymbol>',iif(n.flags.Unicode,\"wmainCRTStartup\",\"mainCRTStartup\"))end\nr(n)local e=premake.findfile(n,\".def\")if e then\n_p(3,'<ModuleDefinitionFile>%s</ModuleDefinitionFile>',e)end\no(3,n)t(3,n)end\n_p(2,'</Link>')end\nfunction e.additionalDependencies(e)local e=premake.getlinks(e,\"system\",\"fullpath\")if#e>0 then\n_p(3,'<AdditionalDependencies>%s;%%(AdditionalDependencies)</AdditionalDependencies>',table.concat(e,\";\"))end\nend\nlocal function s(n)for o,t in ipairs(n.solution"
+ ".vstudio_configs)do\nlocal n=premake.getconfig(n,t.src_buildcfg,t.src_platform)_p(1,'<ItemDefinitionGroup '..i()..'>',premake.esc(t.name))m(n)c(n)f(n)e.link(n)a(n)_p(1,'</ItemDefinitionGroup>')end\nend\nfunction e.getfilegroup(i,t)local e=i.vc2010sortedfiles\nif not e then\ne={ClCompile={},ClInclude={},None={},ResourceCompile={},}for n in premake.project.eachfile(i)do\nif path.iscppfile(n.name)then\ntable.insert(e.ClCompile,n)elseif path.iscppheader(n.name)then\ntable.insert(e.ClInclude,n)elseif path.isresourcefile(n.name)then\ntable.insert(e.ResourceCompile,n)else\ntable.insert(e.None,n)end\nend\ni.vc2010sortedfiles=e\nend\nreturn e[t]end\nfunction e.files(n)e.simplefilesgroup(n,\"ClInclude\")e.compilerfilesgroup(n)e.simplefilesgroup(n,\"None\")e.simplefilesgroup(n,\"ResourceCompile\")end\nfunction e.simplefilesgroup(n,i)local n=e.getfilegroup(n,i)if#n>0 then\n_p(1,'<ItemGroup>')for n,e in ipairs(n)do\n_p(2,'<%s Include=\"%s\" />',i,path.translate(e.name,\"\\\\\"))end\n_p(1,'</ItemGroup>')end\nend\ne.individu"
+ "alSourceFileOptions=nil\nfunction e.individualSourceFile(o,t,n)local r=o.solution.vstudio_configs\nlocal a=path.translate(n.name,\"\\\\\")_p(2,'<ClCompile Include=\"%s\">',a)for n,e in ipairs(r)do\nif t[e]and a==t[e]then\n_p(3,'<PrecompiledHeader '..i()..'>Create</PrecompiledHeader>',premake.esc(e.name))t[e]=nil\nend\nend\nif path.iscfile(n.name)~=premake.project.iscproject(o)then\n_p(3,'<CompileAs>%s</CompileAs>',iif(path.iscfile(n.name),'CompileAsC','CompileAsCpp'))end\nif(type(e.individualSourceFileOptions)=='function')then\ne.individualSourceFileOptions(o,t,n)end\n_p(2,'</ClCompile>')end\nfunction e.compilerfilesgroup(n)local i=n.solution.vstudio_configs\nlocal t=e.getfilegroup(n,\"ClCompile\")if#t>0 then\nlocal o={}for e,i in ipairs(i)do\nlocal e=premake.getconfig(n,i.src_buildcfg,i.src_platform)if e.pchheader and e.pchsource and not e.flags.NoPCH then\no[i]=path.translate(e.pchsource,\"\\\\\")end\nend\n_p(1,'<ItemGroup>')for t,i in ipairs(t)do\ne.individualSourceFile(n,o,i)end\n_p(1,'</ItemGroup>')end\ne"
+ "nd\nfunction e.header(e)io.eol=\"\\r\\n\"_p('<?xml version=\"1.0\" encoding=\"utf-8\"?>')local n=premake.action.current()local i=''if(_ACTION>=\"vs2010\")and(_ACTION<=\"vs2017\")then\nif n.vstudio.toolsVersion then\ni=string.format(' ToolsVersion=\"%s\"',n.vstudio.toolsVersion)end\nend\nlocal n=\"\"if e then\nn=' DefaultTargets=\"'..e..'\"'end\n_p('<Project%s%s xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">',n,i)end\nfunction premake.vs2010_vcxproj(n)io.indent=\" \"e.header(\"Build\")l(n)d(n)_p(1,'<Import Project=\"$(VCTargetsPath)\\\\Microsoft.Cpp.Default.props\" />')for t,i in ipairs(n.solution.vstudio_configs)do\nlocal n=premake.getconfig(n,i.src_buildcfg,i.src_platform)e.configurationPropertyGroup(n,i)end\n_p(1,'<Import Project=\"$(VCTargetsPath)\\\\Microsoft.Cpp.props\" />')_p(1,'<ImportGroup Label=\"ExtensionSettings\">')_p(1,'</ImportGroup>')p(n)_p(1,'<PropertyGroup Label=\"UserMacros\" />')e.outputProperties(n)s(n)e.files(n)e.projectReferences(n)_p(1,'<Import Project=\"$(VCTargetsPath)"
+ "\\\\Microsoft.Cpp.targets\" />')_p(1,'<ImportGroup Label=\"ExtensionTargets\">')_p(1,'</ImportGroup>')_p('</Project>')end\nfunction e.projectReferences(n)local e=premake.getdependencies(n)if#e>0 then\n_p(1,'<ItemGroup>')for i,e in ipairs(e)do\nlocal n=path.getrelative(n.location,u.projectfile(e))_p(2,'<ProjectReference Include=\"%s\">',path.translate(n,\"\\\\\"))_p(3,'<Project>{%s}</Project>',e.uuid)_p(2,'</ProjectReference>')end\n_p(1,'</ItemGroup>')end\nend\nfunction e.debugdir(e)if e.debugdir then\n_p(' <LocalDebuggerWorkingDirectory>%s</LocalDebuggerWorkingDirectory>',path.translate(e.debugdir,'\\\\'))_p(' <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>')end\nif e.debugargs then\n_p(' <LocalDebuggerCommandArguments>%s</LocalDebuggerCommandArguments>',table.concat(e.debugargs,\" \"))end\nend\nfunction e.debugenvs(e)if e.debugenvs and#e.debugenvs>0 then\n_p(2,'<LocalDebuggerEnvironment>%s%s</LocalDebuggerEnvironment>',table.concat(e.debugenvs,\"\\n\"),iif(e.flags.DebugEnvsInherit,'\\n$(LocalDe"
+ "buggerEnvironment)',''))if e.flags.DebugEnvsDontMerge then\n_p(2,'<LocalDebuggerMergeEnvironment>false</LocalDebuggerMergeEnvironment>')end\nend\nend\nfunction premake.vs2010_vcxproj_user(t)io.indent=\" \"e.header()for o,n in ipairs(t.solution.vstudio_configs)do\nlocal t=premake.getconfig(t,n.src_buildcfg,n.src_platform)_p(' <PropertyGroup '..i()..'>',premake.esc(n.name))e.debugdir(t)e.debugenvs(t)_p(' </PropertyGroup>')end\n_p('</Project>')end",
/* actions/vstudio/vs2010_vcxproj_filters.lua */
- "local e=premake.vstudio.vc2010\nlocal i=premake.project\nfunction e.filteridgroup(e)local l={}local t=false\nfor e in i.eachfile(e)do\nlocal i=string.explode(e.vpath,\"/\",true)local e=\"\"for r=1,#i-1 do\nif not t then\nt=true\n_p(1,'<ItemGroup>')end\ne=e..i[r]if not l[e]then\nl[e]=true\n_p(2,'<Filter Include=\"%s\">',e)_p(3,'<UniqueIdentifier>{%s}</UniqueIdentifier>',os.uuid())_p(2,'</Filter>')end\ne=e..\"\\\\\"end\nend\nif t then\n_p(1,'</ItemGroup>')end\nend\nfunction e.filefiltergroup(l,t)local e=e.getfilegroup(l,t)if#e>0 then\n_p(1,'<ItemGroup>')for l,e in ipairs(e)do\nlocal l\nif e.name~=e.vpath then\nl=path.getdirectory(e.vpath)else\nl=path.getdirectory(e.name)end\nif l~=\".\"then\n_p(2,'<%s Include=\"%s\">',t,path.translate(e.name,\"\\\\\"))_p(3,'<Filter>%s</Filter>',path.translate(l,\"\\\\\"))_p(2,'</%s>',t)else\n_p(2,'<%s Include=\"%s\" />',t,path.translate(e.name,\"\\\\\"))end\nend\n_p(1,'</ItemGroup>')end\nend\nfunction e.generate_filters(t)io.indent=\" \"e.header()e.filteridgroup(t)e.filefilterg"
+ "local e=premake.vstudio.vc2010\nlocal i=premake.project\nfunction e.filteridgroup(e)local l={}local t=false\nfor e in i.eachfile(e)do\nlocal i=string.explode(e.vpath,\"/\",true)local e=\"\"for n=1,#i-1 do\nif not t then\nt=true\n_p(1,'<ItemGroup>')end\ne=e..i[n]if not l[e]then\nl[e]=true\n_p(2,'<Filter Include=\"%s\">',e)_p(3,'<UniqueIdentifier>{%s}</UniqueIdentifier>',os.uuid())_p(2,'</Filter>')end\ne=e..\"\\\\\"end\nend\nif t then\n_p(1,'</ItemGroup>')end\nend\nfunction e.filefiltergroup(l,t)local e=e.getfilegroup(l,t)if#e>0 then\n_p(1,'<ItemGroup>')for l,e in ipairs(e)do\nlocal l\nif e.name~=e.vpath then\nl=path.getdirectory(e.vpath)else\nl=path.getdirectory(e.name)end\nif l~=\".\"then\n_p(2,'<%s Include=\"%s\">',t,path.translate(e.name,\"\\\\\"))_p(3,'<Filter>%s</Filter>',path.translate(l,\"\\\\\"))_p(2,'</%s>',t)else\n_p(2,'<%s Include=\"%s\" />',t,path.translate(e.name,\"\\\\\"))end\nend\n_p(1,'</ItemGroup>')end\nend\nfunction e.generate_filters(t)io.indent=\" \"e.header()e.filteridgroup(t)e.filefilterg"
"roup(t,\"None\")e.filefiltergroup(t,\"ClInclude\")e.filefiltergroup(t,\"ClCompile\")e.filefiltergroup(t,\"ResourceCompile\")_p('</Project>')end",
/* actions/vstudio/vs2012.lua */
- "premake.vstudio.vc2012={}local e=premake.vstudio.vc2012\nlocal r=premake.vstudio\nnewaction{trigger=\"vs2012\",shortname=\"Visual Studio 2012\",description=\"Generate Microsoft Visual Studio 2012 project files\",os=\"windows\",valid_kinds={\"ConsoleApp\",\"WindowedApp\",\"StaticLib\",\"SharedLib\"},valid_languages={\"C\",\"C++\",\"C#\"},valid_tools={cc={\"msc\"},dotnet={\"msnet\"},},onsolution=function(e)premake.generate(e,\"%%.sln\",r.sln2005.generate)end,onproject=function(e)if premake.isdotnetproject(e)then\npremake.generate(e,\"%%.csproj\",r.cs2005.generate)premake.generate(e,\"%%.csproj.user\",r.cs2005.generate_user)else\npremake.generate(e,\"%%.vcxproj\",premake.vs2010_vcxproj)premake.generate(e,\"%%.vcxproj.user\",premake.vs2010_vcxproj_user)premake.generate(e,\"%%.vcxproj.filters\",r.vc2010.generate_filters)end\nend,oncleansolution=premake.vstudio.cleansolution,oncleanproject=premake.vstudio.cleanproject,oncleantarget=premake.vstudio.cleantarget,vstudio={solutionVersion=\"12\",targetFramework=\"4.5\",t"
+ "premake.vstudio.vc2012={}local e=premake.vstudio.vc2012\nlocal o=premake.vstudio\nnewaction{trigger=\"vs2012\",shortname=\"Visual Studio 2012\",description=\"Generate Microsoft Visual Studio 2012 project files\",os=\"windows\",valid_kinds={\"ConsoleApp\",\"WindowedApp\",\"StaticLib\",\"SharedLib\"},valid_languages={\"C\",\"C++\",\"C#\"},valid_tools={cc={\"msc\"},dotnet={\"msnet\"},},onsolution=function(e)premake.generate(e,\"%%.sln\",o.sln2005.generate)end,onproject=function(e)if premake.isdotnetproject(e)then\npremake.generate(e,\"%%.csproj\",o.cs2005.generate)premake.generate(e,\"%%.csproj.user\",o.cs2005.generate_user)else\npremake.generate(e,\"%%.vcxproj\",premake.vs2010_vcxproj)premake.generate(e,\"%%.vcxproj.user\",premake.vs2010_vcxproj_user)premake.generate(e,\"%%.vcxproj.filters\",o.vc2010.generate_filters)end\nend,oncleansolution=premake.vstudio.cleansolution,oncleanproject=premake.vstudio.cleanproject,oncleantarget=premake.vstudio.cleantarget,vstudio={solutionVersion=\"12\",targetFramework=\"4.5\",t"
"oolsVersion=\"4.0\",}}",
/* actions/vstudio/vs2013.lua */
- "premake.vstudio.vc2013={}local e=premake.vstudio.vc2013\nlocal r=premake.vstudio\nnewaction{trigger=\"vs2013\",shortname=\"Visual Studio 2013\",description=\"Generate Microsoft Visual Studio 2013 project files\",os=\"windows\",valid_kinds={\"ConsoleApp\",\"WindowedApp\",\"StaticLib\",\"SharedLib\"},valid_languages={\"C\",\"C++\",\"C#\"},valid_tools={cc={\"msc\"},dotnet={\"msnet\"},},onsolution=function(e)premake.generate(e,\"%%.sln\",r.sln2005.generate)end,onproject=function(e)if premake.isdotnetproject(e)then\npremake.generate(e,\"%%.csproj\",r.cs2005.generate)premake.generate(e,\"%%.csproj.user\",r.cs2005.generate_user)else\npremake.generate(e,\"%%.vcxproj\",premake.vs2010_vcxproj)premake.generate(e,\"%%.vcxproj.user\",premake.vs2010_vcxproj_user)premake.generate(e,\"%%.vcxproj.filters\",r.vc2010.generate_filters)end\nend,oncleansolution=premake.vstudio.cleansolution,oncleanproject=premake.vstudio.cleanproject,oncleantarget=premake.vstudio.cleantarget,vstudio={solutionVersion=\"12\",targetFramework=\"4.5\",t"
+ "premake.vstudio.vc2013={}local e=premake.vstudio.vc2013\nlocal o=premake.vstudio\nnewaction{trigger=\"vs2013\",shortname=\"Visual Studio 2013\",description=\"Generate Microsoft Visual Studio 2013 project files\",os=\"windows\",valid_kinds={\"ConsoleApp\",\"WindowedApp\",\"StaticLib\",\"SharedLib\"},valid_languages={\"C\",\"C++\",\"C#\"},valid_tools={cc={\"msc\"},dotnet={\"msnet\"},},onsolution=function(e)premake.generate(e,\"%%.sln\",o.sln2005.generate)end,onproject=function(e)if premake.isdotnetproject(e)then\npremake.generate(e,\"%%.csproj\",o.cs2005.generate)premake.generate(e,\"%%.csproj.user\",o.cs2005.generate_user)else\npremake.generate(e,\"%%.vcxproj\",premake.vs2010_vcxproj)premake.generate(e,\"%%.vcxproj.user\",premake.vs2010_vcxproj_user)premake.generate(e,\"%%.vcxproj.filters\",o.vc2010.generate_filters)end\nend,oncleansolution=premake.vstudio.cleansolution,oncleanproject=premake.vstudio.cleanproject,oncleantarget=premake.vstudio.cleantarget,vstudio={solutionVersion=\"12\",targetFramework=\"4.5\",t"
"oolsVersion=\"12.0\",}}",
/* actions/vstudio/vs2015.lua */
- "premake.vstudio.vc2015={}local e=premake.vstudio.vc2015\nlocal r=premake.vstudio\nnewaction{trigger=\"vs2015\",shortname=\"Visual Studio 2015\",description=\"Generate Microsoft Visual Studio 2015 project files\",os=\"windows\",valid_kinds={\"ConsoleApp\",\"WindowedApp\",\"StaticLib\",\"SharedLib\"},valid_languages={\"C\",\"C++\",\"C#\"},valid_tools={cc={\"msc\"},dotnet={\"msnet\"},},onsolution=function(e)premake.generate(e,\"%%.sln\",r.sln2005.generate)end,onproject=function(e)if premake.isdotnetproject(e)then\npremake.generate(e,\"%%.csproj\",r.cs2005.generate)premake.generate(e,\"%%.csproj.user\",r.cs2005.generate_user)else\npremake.generate(e,\"%%.vcxproj\",premake.vs2010_vcxproj)premake.generate(e,\"%%.vcxproj.user\",premake.vs2010_vcxproj_user)premake.generate(e,\"%%.vcxproj.filters\",r.vc2010.generate_filters)end\nend,oncleansolution=premake.vstudio.cleansolution,oncleanproject=premake.vstudio.cleanproject,oncleantarget=premake.vstudio.cleantarget,vstudio={solutionVersion=\"12\",targetFramework=\"4.5.2\""
+ "premake.vstudio.vc2015={}local e=premake.vstudio.vc2015\nlocal o=premake.vstudio\nnewaction{trigger=\"vs2015\",shortname=\"Visual Studio 2015\",description=\"Generate Microsoft Visual Studio 2015 project files\",os=\"windows\",valid_kinds={\"ConsoleApp\",\"WindowedApp\",\"StaticLib\",\"SharedLib\"},valid_languages={\"C\",\"C++\",\"C#\"},valid_tools={cc={\"msc\"},dotnet={\"msnet\"},},onsolution=function(e)premake.generate(e,\"%%.sln\",o.sln2005.generate)end,onproject=function(e)if premake.isdotnetproject(e)then\npremake.generate(e,\"%%.csproj\",o.cs2005.generate)premake.generate(e,\"%%.csproj.user\",o.cs2005.generate_user)else\npremake.generate(e,\"%%.vcxproj\",premake.vs2010_vcxproj)premake.generate(e,\"%%.vcxproj.user\",premake.vs2010_vcxproj_user)premake.generate(e,\"%%.vcxproj.filters\",o.vc2010.generate_filters)end\nend,oncleansolution=premake.vstudio.cleansolution,oncleanproject=premake.vstudio.cleanproject,oncleantarget=premake.vstudio.cleantarget,vstudio={solutionVersion=\"12\",targetFramework=\"4.5.2\""
",toolsVersion=\"14.0\",shortSlnVersion=\"14\",}}",
/* actions/vstudio/vs2017.lua */
- "premake.vstudio.vc2017={}local e=premake.vstudio.vc2017\nlocal r=premake.vstudio\nnewaction{trigger=\"vs2017\",shortname=\"Visual Studio 2017\",description=\"Generate Microsoft Visual Studio 2017 project files\",os=\"windows\",valid_kinds={\"ConsoleApp\",\"WindowedApp\",\"StaticLib\",\"SharedLib\"},valid_languages={\"C\",\"C++\",\"C#\"},valid_tools={cc={\"msc\"},dotnet={\"msnet\"},},onsolution=function(e)premake.generate(e,\"%%.sln\",r.sln2005.generate)end,onproject=function(e)if premake.isdotnetproject(e)then\npremake.generate(e,\"%%.csproj\",r.cs2005.generate)premake.generate(e,\"%%.csproj.user\",r.cs2005.generate_user)else\npremake.generate(e,\"%%.vcxproj\",premake.vs2010_vcxproj)premake.generate(e,\"%%.vcxproj.user\",premake.vs2010_vcxproj_user)premake.generate(e,\"%%.vcxproj.filters\",r.vc2010.generate_filters)end\nend,oncleansolution=premake.vstudio.cleansolution,oncleanproject=premake.vstudio.cleanproject,oncleantarget=premake.vstudio.cleantarget,vstudio={solutionVersion=\"12\",targetFramework=\"4.5.2\""
+ "premake.vstudio.vc2017={}local e=premake.vstudio.vc2017\nlocal o=premake.vstudio\nnewaction{trigger=\"vs2017\",shortname=\"Visual Studio 2017\",description=\"Generate Microsoft Visual Studio 2017 project files\",os=\"windows\",valid_kinds={\"ConsoleApp\",\"WindowedApp\",\"StaticLib\",\"SharedLib\"},valid_languages={\"C\",\"C++\",\"C#\"},valid_tools={cc={\"msc\"},dotnet={\"msnet\"},},onsolution=function(e)premake.generate(e,\"%%.sln\",o.sln2005.generate)end,onproject=function(e)if premake.isdotnetproject(e)then\npremake.generate(e,\"%%.csproj\",o.cs2005.generate)premake.generate(e,\"%%.csproj.user\",o.cs2005.generate_user)else\npremake.generate(e,\"%%.vcxproj\",premake.vs2010_vcxproj)premake.generate(e,\"%%.vcxproj.user\",premake.vs2010_vcxproj_user)premake.generate(e,\"%%.vcxproj.filters\",o.vc2010.generate_filters)end\nend,oncleansolution=premake.vstudio.cleansolution,oncleanproject=premake.vstudio.cleanproject,oncleantarget=premake.vstudio.cleantarget,vstudio={solutionVersion=\"12\",targetFramework=\"4.5.2\""
",toolsVersion=\"15.0\",shortSlnVersion=\"15\",}}",
/* actions/vstudio/vs2019.lua */
- "premake.vstudio.vc2019={}local e=premake.vstudio.vc2019\nlocal r=premake.vstudio\nnewaction{trigger=\"vs2019\",shortname=\"Visual Studio 2019\",description=\"Generate Microsoft Visual Studio 2019 project files\",os=\"windows\",valid_kinds={\"ConsoleApp\",\"WindowedApp\",\"StaticLib\",\"SharedLib\"},valid_languages={\"C\",\"C++\",\"C#\"},valid_tools={cc={\"msc\"},dotnet={\"msnet\"},},onsolution=function(e)premake.generate(e,\"%%.sln\",r.sln2005.generate)end,onproject=function(e)if premake.isdotnetproject(e)then\npremake.generate(e,\"%%.csproj\",r.cs2005.generate)premake.generate(e,\"%%.csproj.user\",r.cs2005.generate_user)else\npremake.generate(e,\"%%.vcxproj\",premake.vs2010_vcxproj)premake.generate(e,\"%%.vcxproj.user\",premake.vs2010_vcxproj_user)premake.generate(e,\"%%.vcxproj.filters\",r.vc2010.generate_filters)end\nend,oncleansolution=premake.vstudio.cleansolution,oncleanproject=premake.vstudio.cleanproject,oncleantarget=premake.vstudio.cleantarget,vstudio={solutionVersion=\"12\",targetFramework=\"4.7\",t"
+ "premake.vstudio.vc2019={}local e=premake.vstudio.vc2019\nlocal o=premake.vstudio\nnewaction{trigger=\"vs2019\",shortname=\"Visual Studio 2019\",description=\"Generate Microsoft Visual Studio 2019 project files\",os=\"windows\",valid_kinds={\"ConsoleApp\",\"WindowedApp\",\"StaticLib\",\"SharedLib\"},valid_languages={\"C\",\"C++\",\"C#\"},valid_tools={cc={\"msc\"},dotnet={\"msnet\"},},onsolution=function(e)premake.generate(e,\"%%.sln\",o.sln2005.generate)end,onproject=function(e)if premake.isdotnetproject(e)then\npremake.generate(e,\"%%.csproj\",o.cs2005.generate)premake.generate(e,\"%%.csproj.user\",o.cs2005.generate_user)else\npremake.generate(e,\"%%.vcxproj\",premake.vs2010_vcxproj)premake.generate(e,\"%%.vcxproj.user\",premake.vs2010_vcxproj_user)premake.generate(e,\"%%.vcxproj.filters\",o.vc2010.generate_filters)end\nend,oncleansolution=premake.vstudio.cleansolution,oncleanproject=premake.vstudio.cleanproject,oncleantarget=premake.vstudio.cleantarget,vstudio={solutionVersion=\"12\",targetFramework=\"4.7\",t"
"oolsVersion=\"16.0\",shortSlnVersion=\"16\",}}",
/* actions/vstudio/vs2022.lua */
- "premake.vstudio.vc2022={}local e=premake.vstudio.vc2022\nlocal r=premake.vstudio\nnewaction{trigger=\"vs2022\",shortname=\"Visual Studio 2022\",description=\"Generate Microsoft Visual Studio 2022 project files\",os=\"windows\",valid_kinds={\"ConsoleApp\",\"WindowedApp\",\"StaticLib\",\"SharedLib\"},valid_languages={\"C\",\"C++\",\"C#\"},valid_tools={cc={\"msc\"},dotnet={\"msnet\"},},onsolution=function(e)premake.generate(e,\"%%.sln\",r.sln2005.generate)end,onproject=function(e)if premake.isdotnetproject(e)then\npremake.generate(e,\"%%.csproj\",r.cs2005.generate)premake.generate(e,\"%%.csproj.user\",r.cs2005.generate_user)else\npremake.generate(e,\"%%.vcxproj\",premake.vs2010_vcxproj)premake.generate(e,\"%%.vcxproj.user\",premake.vs2010_vcxproj_user)premake.generate(e,\"%%.vcxproj.filters\",r.vc2010.generate_filters)end\nend,oncleansolution=premake.vstudio.cleansolution,oncleanproject=premake.vstudio.cleanproject,oncleantarget=premake.vstudio.cleantarget,vstudio={solutionVersion=\"12\",targetFramework=\"4.7\",t"
+ "premake.vstudio.vc2022={}local e=premake.vstudio.vc2022\nlocal o=premake.vstudio\nnewaction{trigger=\"vs2022\",shortname=\"Visual Studio 2022\",description=\"Generate Microsoft Visual Studio 2022 project files\",os=\"windows\",valid_kinds={\"ConsoleApp\",\"WindowedApp\",\"StaticLib\",\"SharedLib\"},valid_languages={\"C\",\"C++\",\"C#\"},valid_tools={cc={\"msc\"},dotnet={\"msnet\"},},onsolution=function(e)premake.generate(e,\"%%.sln\",o.sln2005.generate)end,onproject=function(e)if premake.isdotnetproject(e)then\npremake.generate(e,\"%%.csproj\",o.cs2005.generate)premake.generate(e,\"%%.csproj.user\",o.cs2005.generate_user)else\npremake.generate(e,\"%%.vcxproj\",premake.vs2010_vcxproj)premake.generate(e,\"%%.vcxproj.user\",premake.vs2010_vcxproj_user)premake.generate(e,\"%%.vcxproj.filters\",o.vc2010.generate_filters)end\nend,oncleansolution=premake.vstudio.cleansolution,oncleanproject=premake.vstudio.cleanproject,oncleantarget=premake.vstudio.cleantarget,vstudio={solutionVersion=\"12\",targetFramework=\"4.7\",t"
"oolsVersion=\"17.0\",shortSlnVersion=\"17\",}}",
/* actions/xcode/_xcode.lua */
@@ -295,8 +296,8 @@ const char* builtin_scripts[] = {
"(n.configs[1]))_p(2,'};')_p('/* End XCConfigurationList section */')_p('')end\nfunction e.Footer()_p(1,'};')_p('\\trootObject = 08FB7793FE84155DC02AAC07 /* Project object */;')_p('}')end",
/* actions/xcode/xcode_project.lua */
- "local e=premake.xcode\nlocal r=premake.tree\nfunction e.buildprjtree(o)local n=premake.project.buildsourcetree(o)n.configs={}for t,i in ipairs(o.solution.configurations)do\nfor t,r in ipairs(o.solution.xcode.platforms)do\nlocal r=premake.getconfig(o,i,r)r.xcode={}r.xcode.targetid=e.newid(o.xcode.projectnode,i)r.xcode.projectid=e.newid(n,i)table.insert(n.configs,r)end\nend\nr.traverse(n,{onbranch=function(e)if path.getextension(e.name)==\".lproj\"then\nlocal i=path.getbasename(e.name)for n,o in ipairs(e.children)do\nlocal n=e.parent.children[o.name]if not n then\nn=r.insert(e.parent,r.new(o.name))n.kind=\"vgroup\"end\no.name=path.getbasename(i)r.insert(n,o)end\nr.remove(e)end\nend})n.frameworks=r.new(\"Frameworks\")for o in premake.eachconfig(o)do\nfor o,i in ipairs(premake.getlinks(o,\"system\",\"fullpath\"))do\nlocal o=path.getname(i)if e.isframework(o)and not n.frameworks.children[o]then\nnode=r.insert(n.frameworks,r.new(o))node.path=i\nend\nend\nend\nif#n.frameworks.children>0 then\nr.insert(n,n.frameworks)"
- "end\nn.products=r.insert(n,r.new(\"Products\"))n.projects=r.new(\"Projects\")for t,i in ipairs(premake.getdependencies(o,\"sibling\",\"object\"))do\nlocal t=e.getxcodeprojname(i)local n=r.insert(n.projects,r.new(path.getname(t)))n.path=t\nn.project=i\nn.productgroupid=e.newid(n,\"prodgrp\")n.productproxyid=e.newid(n,\"prodprox\")n.targetproxyid=e.newid(n,\"targprox\")n.targetdependid=e.newid(n,\"targdep\")local e=premake.getconfig(i,o.configurations[1])node=r.insert(n,r.new(e.linktarget.name))node.path=e.linktarget.fullpath\nnode.cfg=e\nend\nif#n.projects.children>0 then\nr.insert(n,n.projects)end\nr.traverse(n,{onnode=function(r)r.id=e.newid(r)if e.getbuildcategory(r)then\nr.buildid=e.newid(r,\"build\")end\nif string.endswith(r.name,\"Info.plist\")then\nn.infoplist=r\nend\nend},true)node=r.insert(n.products,o.xcode.projectnode)node.kind=\"product\"node.path=node.cfg.buildtarget.fullpath\nnode.cfgsection=e.newid(node,\"cfg\")node.resstageid=e.newid(node,\"rez\")node.sourcesid=e.newid(node,\"src\")node.fxstagei"
+ "local e=premake.xcode\nlocal o=premake.tree\nfunction e.buildprjtree(r)local n=premake.project.buildsourcetree(r)n.configs={}for t,i in ipairs(r.solution.configurations)do\nfor t,o in ipairs(r.solution.xcode.platforms)do\nlocal o=premake.getconfig(r,i,o)o.xcode={}o.xcode.targetid=e.newid(r.xcode.projectnode,i)o.xcode.projectid=e.newid(n,i)table.insert(n.configs,o)end\nend\no.traverse(n,{onbranch=function(e)if path.getextension(e.name)==\".lproj\"then\nlocal i=path.getbasename(e.name)for n,r in ipairs(e.children)do\nlocal n=e.parent.children[r.name]if not n then\nn=o.insert(e.parent,o.new(r.name))n.kind=\"vgroup\"end\nr.name=path.getbasename(i)o.insert(n,r)end\no.remove(e)end\nend})n.frameworks=o.new(\"Frameworks\")for r in premake.eachconfig(r)do\nfor r,i in ipairs(premake.getlinks(r,\"system\",\"fullpath\"))do\nlocal r=path.getname(i)if e.isframework(r)and not n.frameworks.children[r]then\nnode=o.insert(n.frameworks,o.new(r))node.path=i\nend\nend\nend\nif#n.frameworks.children>0 then\no.insert(n,n.frameworks)"
+ "end\nn.products=o.insert(n,o.new(\"Products\"))n.projects=o.new(\"Projects\")for t,i in ipairs(premake.getdependencies(r,\"sibling\",\"object\"))do\nlocal t=e.getxcodeprojname(i)local n=o.insert(n.projects,o.new(path.getname(t)))n.path=t\nn.project=i\nn.productgroupid=e.newid(n,\"prodgrp\")n.productproxyid=e.newid(n,\"prodprox\")n.targetproxyid=e.newid(n,\"targprox\")n.targetdependid=e.newid(n,\"targdep\")local e=premake.getconfig(i,r.configurations[1])node=o.insert(n,o.new(e.linktarget.name))node.path=e.linktarget.fullpath\nnode.cfg=e\nend\nif#n.projects.children>0 then\no.insert(n,n.projects)end\no.traverse(n,{onnode=function(o)o.id=e.newid(o)if e.getbuildcategory(o)then\no.buildid=e.newid(o,\"build\")end\nif string.endswith(o.name,\"Info.plist\")then\nn.infoplist=o\nend\nend},true)node=o.insert(n.products,r.xcode.projectnode)node.kind=\"product\"node.path=node.cfg.buildtarget.fullpath\nnode.cfgsection=e.newid(node,\"cfg\")node.resstageid=e.newid(node,\"rez\")node.sourcesid=e.newid(node,\"src\")node.fxstagei"
"d=e.newid(node,\"fxs\")return n\nend\nfunction premake.xcode.project(n)local n=e.buildprjtree(n)e.Header(n)e.PBXBuildFile(n)e.PBXContainerItemProxy(n)e.PBXFileReference(n)e.PBXFrameworksBuildPhase(n)e.PBXGroup(n)e.PBXNativeTarget(n)e.PBXProject(n)e.PBXReferenceProxy(n)e.PBXResourcesBuildPhase(n)e.PBXShellScriptBuildPhase(n)e.PBXSourcesBuildPhase(n)e.PBXVariantGroup(n)e.PBXTargetDependency(n)e.XCBuildConfiguration(n)e.XCBuildConfigurationList(n)e.Footer(n)end",
/* actions/xcode/xcode4_workspace.lua */
@@ -307,8 +308,8 @@ const char* builtin_scripts[] = {
"\",\"posix\",\"macosx\").fullpath)premake.clean.file(e,premake.gettarget(n,\"build\",\"posix\",\"PS3\",\"windows\").fullpath)if n.kind==\"WindowedApp\"then\npremake.clean.directory(e,premake.gettarget(n,\"build\",\"posix\",\"posix\",\"linux\").fullpath..\".app\")end\npremake.clean.file(e,premake.gettarget(n,\"link\",\"windows\",\"windows\",\"windows\").fullpath)premake.clean.file(e,premake.gettarget(n,\"link\",\"posix\",\"posix\",\"linux\").fullpath)local n=path.join(premake.project.getfilename(e,n.buildtarget.directory),n.buildtarget.basename)for e in premake.action.each()do\nif e.oncleantarget then\ne.oncleantarget(n)end\nend\nend\nend\nend}",
/* _premake_main.lua */
- "local t=\"premake4.lua\"local a=\"Type 'premake4 --help' for help\"local i=\"premake4 (Premake Build Script Generator) %s\"_WORKING_DIR=os.getcwd()local function o(r)if not r then return true end\nr=premake.checkvalue(r,premake.fields.platforms.allowed)for n in premake.solution.each()do\nlocal e=n.platforms or{}if#e==0 then\ntable.insert(e,\"Native\")end\nif not table.contains(e,\"Native\")then\nreturn false,n.name..\" does not target native platform\\nNative platform settings are required for the --platform feature.\"end\nif not table.contains(e,r)then\ntable.insert(e,r)end\nn.platforms=e\nend\nreturn true\nend\nfunction _premake_main(e)if(e)then\nlocal r=dofile(e..\"/_manifest.lua\")for n,r in ipairs(r)do\ndofile(e..\"/\"..r)end\nend\n_PREMAKE_COMMAND=path.getabsolute(_PREMAKE_COMMAND)premake.action.set(_ACTION)math.randomseed(os.time())local e=_OPTIONS[\"file\"]or t\nif(os.isfile(e))then\ndofile(e)end\nif(_OPTIONS[\"version\"])then\nprintf(i,_PREMAKE_VERSION)return 1\nend\nif(_OPTIONS[\"help\"])then\npremak"
- "e.showhelp()return 1\nend\nif(not _ACTION)then\nprint(a)return 1\nend\nif(not os.isfile(e))then\nerror(\"No Premake script (\"..t..\") found!\",2)end\naction=premake.action.current()if(not action)then\nerror(\"Error: no such action '\".._ACTION..\"'\",0)end\nok,err=premake.option.validate(_OPTIONS)if(not ok)then error(\"Error: \"..err,0)end\nok,err=premake.checktools()if(not ok)then error(\"Error: \"..err,0)end\nok,err=o(_OPTIONS[\"platform\"])if(not ok)then error(\"Error: \"..err,0)end\nprint(\"Building configurations...\")premake.bake.buildconfigs()ok,err=premake.checkprojects()if(not ok)then error(\"Error: \"..err,0)end\nprintf(\"Running action '%s'...\",action.trigger)premake.action.call(action.trigger)print(\"Done.\")return 0\nend",
+ "local t=\"premake4.lua\"local i=\"Type 'premake4 --help' for help\"local a=\"premake4 (Premake Build Script Generator) %s\"_WORKING_DIR=os.getcwd()local function o(r)if not r then return true end\nr=premake.checkvalue(r,premake.fields.platforms.allowed)for n in premake.solution.each()do\nlocal e=n.platforms or{}if#e==0 then\ntable.insert(e,\"Native\")end\nif not table.contains(e,\"Native\")then\nreturn false,n.name..\" does not target native platform\\nNative platform settings are required for the --platform feature.\"end\nif not table.contains(e,r)then\ntable.insert(e,r)end\nn.platforms=e\nend\nreturn true\nend\nfunction _premake_main(e)if(e)then\nlocal r=dofile(e..\"/_manifest.lua\")for n,r in ipairs(r)do\ndofile(e..\"/\"..r)end\nend\n_PREMAKE_COMMAND=path.getabsolute(_PREMAKE_COMMAND)premake.action.set(_ACTION)math.randomseed(os.time())local e=_OPTIONS[\"file\"]or t\nif(os.isfile(e))then\ndofile(e)end\nif(_OPTIONS[\"version\"])then\nprintf(a,_PREMAKE_VERSION)return 1\nend\nif(_OPTIONS[\"help\"])then\npremak"
+ "e.showhelp()return 1\nend\nif(not _ACTION)then\nprint(i)return 1\nend\nif(not os.isfile(e))then\nerror(\"No Premake script (\"..t..\") found!\",2)end\naction=premake.action.current()if(not action)then\nerror(\"Error: no such action '\".._ACTION..\"'\",0)end\nok,err=premake.option.validate(_OPTIONS)if(not ok)then error(\"Error: \"..err,0)end\nok,err=premake.checktools()if(not ok)then error(\"Error: \"..err,0)end\nok,err=o(_OPTIONS[\"platform\"])if(not ok)then error(\"Error: \"..err,0)end\nprint(\"Building configurations...\")premake.bake.buildconfigs()ok,err=premake.checkprojects()if(not ok)then error(\"Error: \"..err,0)end\nprintf(\"Running action '%s'...\",action.trigger)premake.action.call(action.trigger)print(\"Done.\")return 0\nend",
0
};
diff --git a/tests/actions/vstudio/cs2005/buildevents.lua b/tests/actions/vstudio/cs2005/buildevents.lua
new file mode 100644
index 0000000..213de1b
--- /dev/null
+++ b/tests/actions/vstudio/cs2005/buildevents.lua
@@ -0,0 +1,53 @@
+--
+-- tests/actions/vstudio/cs2005/buildevents.lua
+-- Validate the build events in Visual Studio 2005+ .csproj
+-- Copyright (c) 2009-2014 Jason Perkins and the Premake project
+--
+
+ T.vstudio_cs2005_buildevents = { }
+ local suite = T.vstudio_cs2005_buildevents
+ local cs2005 = premake.vstudio.cs2005
+
+--
+-- Setup
+--
+
+ local sln, prj
+
+ function suite.setup()
+ sln = test.createsolution()
+ end
+
+ local function prepare()
+ premake.bake.buildconfigs()
+ prj = premake.solution.getproject(sln, 1)
+ cs2005.buildevents(prj)
+ end
+
+--
+-- Prebuild events
+--
+
+ function suite.prebuildEvents()
+ prebuildcommands { "pre" }
+ prepare()
+ test.capture [[
+ <PropertyGroup>
+ <PreBuildEvent>pre</PreBuildEvent>
+ </PropertyGroup>
+ ]]
+ end
+
+--
+-- Postbuild events
+--
+
+ function suite.postbuildEvents()
+ postbuildcommands { "post" }
+ prepare()
+ test.capture [[
+ <PropertyGroup>
+ <PostBuildEvent>post</PostBuildEvent>
+ </PropertyGroup>
+ ]]
+ end
diff --git a/tests/actions/vstudio/vc200x/header.lua b/tests/actions/vstudio/vc200x/header.lua
index 18670ec..cde6570 100644
--- a/tests/actions/vstudio/vc200x/header.lua
+++ b/tests/actions/vstudio/vc200x/header.lua
@@ -42,6 +42,27 @@
]]
end
+ function suite.On2003()
+ _ACTION = 'vs2003'
+ prepare()
+ test.capture [[
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ ]]
+ end
+
+ function suite.On2005()
+ _ACTION = 'vs2005'
+ prepare()
+ test.capture [[
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ ]]
+ end
function suite.On2008()
_ACTION = 'vs2008'
diff --git a/tests/premake4.lua b/tests/premake4.lua
index b0ebde9..6c149e3 100644
--- a/tests/premake4.lua
+++ b/tests/premake4.lua
@@ -86,6 +86,7 @@
dofile("actions/vstudio/cs2005/projectelement.lua")
dofile("actions/vstudio/cs2005/projectsettings.lua")
dofile("actions/vstudio/cs2005/propertygroup.lua")
+ dofile("actions/vstudio/cs2005/buildevents.lua")
-- Visual Studio 2005-2010 solutions
dofile("actions/vstudio/sln2005/dependencies.lua")