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>2014-02-05 07:39:43 +0400
committerOliver Schneider <oliver@assarbad.net>2014-02-05 07:39:43 +0400
commitb4e109f0a4d0a31b0ca333ae0ab965ed48b8d482 (patch)
treeef8e1706bf56f0465de6a966dbae10b6ca986ca1
parentac4cf430c7b44818464c9d019469deaf79a432d5 (diff)
Updating to the latest state of (Lua) affairs
--HG-- branch : WDS-build
-rw-r--r--src/host/scripts.c39
1 files changed, 20 insertions, 19 deletions
diff --git a/src/host/scripts.c b/src/host/scripts.c
index 91d349c..217d50e 100644
--- a/src/host/scripts.c
+++ b/src/host/scripts.c
@@ -77,7 +77,7 @@ const char* builtin_scripts[] = {
/* base/cmdline.lua */
"newoption{trigger=\"cc\",value=\"VALUE\",description=\"Choose a C/C++ compiler set\",allowed={{\"gcc\",\"GNU GCC (gcc/g++)\"},{\"ow\",\"OpenWatcom\"},}}newoption{trigger=\"dotnet\",value=\"VALUE\",description=\"Choose a .NET compiler set\",allowed={{\"msnet\",\"Microsoft .NET (csc)\"},{\"mono\",\"Novell Mono (mcs)\"},{\"pnet\",\"Portable.NET (cscc)\"},}}newoption{trigger=\"file\",value=\"FILE\",description=\"Read FILE as a Premake script; default is 'premake4.lua'\"}newoption{trigger=\"help\",description=\"Display this information\"}newoption{trigger=\"os\",value=\"VALUE\",description=\"Generate files for a different operating system\",allowed={{\"bsd\",\"OpenBSD, NetBSD, or FreeBSD\"},{\"haiku\",\"Haiku\"},{\"linux\",\"Linux\"},{\"macosx\",\"Apple Mac OS X\"},{\"solaris\",\"Solaris\"},{\"windows\",\"Microsoft Windows\"},}}newoption{trigger=\"platform\",value=\"VALUE\",description=\"Add target architecture (if supported by action)\",allowed={{\"x32\",\"32-bit\"},{\"x64\",\"64-bit\"},{\"universal\",\"Mac OS X U"
- "niversal, 32- and 64-bit\"},{\"universal32\",\"Mac OS X Universal, 32-bit only\"},{\"universal64\",\"Mac OS X Universal, 64-bit only\"},{\"ps3\",\"Playstation 3 (experimental)\"},{\"xbox360\",\"Xbox 360 (experimental)\"},}}newoption{trigger=\"scripts\",value=\"path\",description=\"Search for additional scripts on the given path\"}newoption{trigger=\"version\",description=\"Display version information\"}",
+ "niversal, 32- and 64-bit\"},{\"universal32\",\"Mac OS X Universal, 32-bit only\"},{\"universal64\",\"Mac OS X Universal, 64-bit only\"},{\"ps3\",\"Playstation 3 (experimental)\"},{\"xbox360\",\"Xbox 360 (experimental)\"},}}newoption{trigger=\"scripts\",value=\"path\",description=\"Search for additional scripts on the given path\"}newoption{trigger=\"version\",description=\"Display version information\"}newoption{trigger=\"generate_user\",description=\"Generate (and remove when cleaning) .user VStudio files\"}",
/* tools/dotnet.lua */
"premake.dotnet={}premake.dotnet.namestyle=\"windows\"local t={FatalWarning=\"/warnaserror\",Optimize=\"/optimize\",OptimizeSize=\"/optimize\",OptimizeSpeed=\"/optimize\",Symbols=\"/debug\",Unsafe=\"/unsafe\"}function premake.dotnet.getbuildaction(e)local n=path.getextension(e.name):lower()if e.buildaction==\"Compile\"or n==\".cs\"then\nreturn\"Compile\"elseif e.buildaction==\"Embed\"or n==\".resx\"then\nreturn\"EmbeddedResource\"elseif e.buildaction==\"Copy\"or n==\".asax\"or n==\".aspx\"then\nreturn\"Content\"elseif e.buildaction==\"Page\"or n==\".xaml\"then\nif(path.getname(e.name)==\"App.xaml\")then\nreturn\"ApplicationDefinition\"else\nreturn\"Page\"end\nelse\nreturn\"None\"end\nend\nfunction premake.dotnet.getcompilervar(e)if(_OPTIONS.dotnet==\"msnet\")then\nreturn\"csc\"elseif(_OPTIONS.dotnet==\"mono\")then\nif(e.framework<=\"1.1\")then\nreturn\"mcs\"elseif(e.framework>=\"4.0\")then\nreturn\"dmcs\"else\nreturn\"gmcs\"end\nelse\nreturn\"cscc\"end\nend\nfunction premake.dotnet.getflags(e)local e=table.tran"
@@ -96,7 +96,7 @@ const char* builtin_scripts[] = {
"d\nreturn e\nend",
/* tools/snc.lua */
- "premake.snc={}premake.snc.cc=\"snc\"premake.snc.cxx=\"g++\"premake.snc.ar=\"ar\"local n={ExtraWarnings=\"-Xdiag=2\",FatalWarnings=\"-Xquit=2\",}local t={NoExceptions=\"\",NoRTTI=\"-Xc-=rtti\",}premake.snc.platforms={PS3={cc=\"ppu-lv2-g++\",cxx=\"ppu-lv2-g++\",ar=\"ppu-lv2-ar\",cppflags=\"-MMD -MP\",}}local a=premake.snc.platforms\nfunction premake.snc.getcppflags(n)local e={}table.insert(e,a[n.platform].cppflags)return e\nend\nfunction premake.snc.getcflags(e)local n=table.translate(e.flags,n)table.insert(n,a[e.platform].flags)if e.kind==\"SharedLib\"then\ntable.insert(n,\"-fPIC\")end\nreturn n\nend\nfunction premake.snc.getcxxflags(e)local e=table.translate(e.flags,t)return e\nend\nfunction premake.snc.getldflags(n)local e={}if not n.flags.Symbols then\ntable.insert(e,\"-s\")end\nif n.kind==\"SharedLib\"then\ntable.insert(e,\"-shared\")if not n.flags.NoImportLib then\ntable.insert(e,'-Wl,--out-implib=\"'..n.linktarget.fullpath..'\"')end\nend\nlocal n=a[n.platform]table.insert(e,n.flags)table.insert(e,n.ldflag"
+ "premake.snc={}premake.snc.cc=\"snc\"premake.snc.cxx=\"g++\"premake.snc.ar=\"ar\"local n={ExtraWarnings=\"-Xdiag=2\",FatalWarnings=\"-Xquit=2\",}local l={NoExceptions=\"\",NoRTTI=\"-Xc-=rtti\",}premake.snc.platforms={PS3={cc=\"ppu-lv2-g++\",cxx=\"ppu-lv2-g++\",ar=\"ppu-lv2-ar\",cppflags=\"-MMD -MP\",}}local a=premake.snc.platforms\nfunction premake.snc.getcppflags(n)local e={}table.insert(e,a[n.platform].cppflags)return e\nend\nfunction premake.snc.getcflags(e)local n=table.translate(e.flags,n)table.insert(n,a[e.platform].flags)if e.kind==\"SharedLib\"then\ntable.insert(n,\"-fPIC\")end\nreturn n\nend\nfunction premake.snc.getcxxflags(e)local e=table.translate(e.flags,l)return e\nend\nfunction premake.snc.getldflags(n)local e={}if not n.flags.Symbols then\ntable.insert(e,\"-s\")end\nif n.kind==\"SharedLib\"then\ntable.insert(e,\"-shared\")if not n.flags.NoImportLib then\ntable.insert(e,'-Wl,--out-implib=\"'..n.linktarget.fullpath..'\"')end\nend\nlocal n=a[n.platform]table.insert(e,n.flags)table.insert(e,n.ldflag"
"s)return e\nend\nfunction premake.snc.getlibdirflags(n)local e={}for a,n in ipairs(premake.getlinks(n,\"all\",\"directory\"))do\ntable.insert(e,'-L'.._MAKE.esc(n))end\nreturn e\nend\nfunction premake.snc.getlinkflags(n)local e={}for a,n in ipairs(premake.getlinks(n,\"system\",\"name\"))do\ntable.insert(e,'-l'.._MAKE.esc(n))end\nreturn e\nend\nfunction premake.snc.getdefines(n)local e={}for a,n in ipairs(n)do\ntable.insert(e,'-D'..n)end\nreturn e\nend\nfunction premake.snc.getincludedirs(n)local e={}for a,n in ipairs(n)do\ntable.insert(e,\"-I\".._MAKE.esc(n))end\nreturn e\nend",
/* base/validate.lua */
@@ -150,8 +150,8 @@ const char* builtin_scripts[] = {
"clude $(OBJDIR)/$(notdir $(PCH)).d')_p('endif')end\nfunction premake.gmake_cpp_header(p,e,i)_p('# %s project makefile autogenerated by Premake',premake.action.current().shortname)_p('ifndef config')_p(' config=%s',_MAKE.esc(premake.getconfigname(p.solution.configurations[1],i[1],true)))_p('endif')_p('')_p('ifndef verbose')_p(' SILENT = @')_p('endif')_p('')_p('CC = %s',e.cc)_p('CXX = %s',e.cxx)_p('AR = %s',e.ar)_p('')_p('ifndef RESCOMP')_p(' ifdef WINDRES')_p(' RESCOMP = $(WINDRES)')_p(' else')_p(' RESCOMP = windres')_p(' endif')_p('endif')_p('')end\nfunction premake.gmake_cpp_config(e,n)_p('ifeq ($(config),%s)',_MAKE.esc(e.shortname))p.platformtools(e,n)_p(' OBJDIR = %s',_MAKE.esc(e.objectsdir))_p(' TARGETDIR = %s',_MAKE.esc(e.buildtarget.directory))_p(' TARGET = $(TARGETDIR)/%s',_MAKE.esc(e.buildtarget.name))_p(' DEFINES +=%s',i.list(n.getdefines(e.defines)))_p(' INCLUDES +=%s',i.list(n.getincludedirs(e.includedirs)))p.pchconfig(e)p.flags(e,n)p.linker(e,n)_p(' define PREBUILDCMDS'"
")if#e.prebuildcommands>0 then\n_p('\\t@echo Running pre-build commands')_p('\\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')i.settings(e,n)_p('endif')_p('')end\nfunction p.platformtools(e,p)local e=p.platforms[e.platform]if e.cc then\n_p(' CC = %s',e.cc)end\nif e.cxx then\n_p(' CXX = %s',e.cxx)end\nif e.ar then\n_p(' AR = %s',e.ar)end\nend\nfunction p.flags(e,p)if e.pchheader and not e.flags.NoPCH then\n_p(' FORCE_INCLUDE += -include $(OBJDIR)/$(notdir $(PCH))')end\n_p(' ALL_CPPFLAGS += $(CPPFLAGS) %s $(DEFINES) $(INCLUDES)',table.concat(p.getcppflags(e),\" \"))_p(' ALL_CFLAGS += $(CFLAGS)"
" $(ALL_CPPFLAGS) $(ARCH)%s',i.list(table.join(p.getcflags(e),e.buildoptions)))_p(' ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)%s',i.list(p.getcxxflags(e)))_p(' ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)%s',i.list(table.join(p.getdefines(e.resdefines),p.getincludedirs(e.resincludedirs),e.resoptions)))end\nfunction p.linker(e,p)_p(' ALL_LDFLAGS += $(LDFLAGS)%s',i.list(table.join(p.getlibdirflags(e),p.getldflags(e),e.linkoptions)))_p(' LDDEPS +=%s',i.list(_MAKE.esc(premake.getlinks(e,\"siblings\",\"fullpath\"))))_p(' LIBS += $(LDDEPS)%s',i.list(p.getlinkflags(e)))if e.kind==\"StaticLib\"then\nif e.platform:startswith(\"Universal\")then\n_p(' LINKCMD = libtool -o $(TARGET) $(OBJECTS)')else\n_p(' LINKCMD = $(AR) -rcs $(TARGET) $(OBJECTS)')end\nelse\nlocal e=iif(e.language==\"C\",\"CC\",\"CXX\")_p(' LINKCMD = $(%s) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)',e)end\nend\nfunction p.pchconfig(e)if not e.pchheader or e.flags.NoPCH then\nreturn\nend\nlocal p=e."
- "pchheader\nfor n,i in ipairs(e.includedirs)do\nlocal i=path.getabsolute(path.join(e.project.location,i))local i=path.join(i,p)if os.isfile(i)then\np=path.getrelative(e.location,i)break\nend\nend\n_p(' PCH = %s',_MAKE.esc(p))_p(' GCH = $(OBJDIR)/$(notdir $(PCH)).gch')end\nfunction p.pchrules(e)_p('ifneq (,$(PCH))')_p('$(GCH): $(PCH)')_p('\\t@echo $(notdir $<)')local e=iif(e.language==\"C\",\"$(CC) -x c-header $(ALL_CFLAGS)\",\"$(CXX) -x c++-header $(ALL_CXXFLAGS)\")_p('\\t$(SILENT) %s -MMD -MP $(DEFINES) $(INCLUDES) -o \"$@\" -MF \"$(@:%%.gch=%%.d)\" -c \"$<\"',e)_p('endif')_p('')end\nfunction p.fileRules(e)for i,e in ipairs(e.files or{})do\nif path.iscppfile(e)then\n_p('$(OBJDIR)/%s.o: %s',_MAKE.esc(path.getbasename(e)),_MAKE.esc(e))_p('\\t@echo $(notdir $<)')p.buildcommand(path.iscfile(e),\"o\")_p('')elseif(path.getextension(e)==\".rc\")then\n_p('$(OBJDIR)/%s.res: %s',_MAKE.esc(path.getbasename(e)),_MAKE.esc(e))_p('\\t@echo $(notdir $<)')_p('\\t$(SILENT) $(RESCOMP) $< -O coff -o \"$@\" $(ALL_R"
- "ESFLAGS)')_p('')end\nend\nend\nfunction p.buildcommand(e,p)local e=iif(e,'$(CC) $(ALL_CFLAGS)','$(CXX) $(ALL_CXXFLAGS)')_p('\\t$(SILENT) %s $(FORCE_INCLUDE) -o \"$@\" -MF $(@:%%.%s=%%.d) -c \"$<\"',e,p)end",
+ "pchheader\nfor n,i in ipairs(e.includedirs)do\nlocal i=path.getabsolute(path.join(e.project.location,i))local i=path.join(i,p)if os.isfile(i)then\np=path.getrelative(e.location,i)break\nend\nend\n_p(' PCH = %s',_MAKE.esc(p))_p(' GCH = $(OBJDIR)/$(notdir $(PCH)).gch')end\nfunction p.pchrules(e)_p('ifneq (,$(PCH))')_p('.NOTPARALLEL: $(GCH) $(PCH)')_p('$(GCH): $(PCH)')_p('\\t@echo $(notdir $<)')local e=iif(e.language==\"C\",\"$(CC) -x c-header $(ALL_CFLAGS)\",\"$(CXX) -x c++-header $(ALL_CXXFLAGS)\")_p('\\t$(SILENT) %s -MMD -MP $(DEFINES) $(INCLUDES) -o \"$@\" -MF \"$(@:%%.gch=%%.d)\" -c \"$<\"',e)_p('endif')_p('')end\nfunction p.fileRules(e)for i,e in ipairs(e.files or{})do\nif path.iscppfile(e)then\n_p('$(OBJDIR)/%s.o: %s',_MAKE.esc(path.getbasename(e)),_MAKE.esc(e))_p('\\t@echo $(notdir $<)')p.buildcommand(path.iscfile(e),\"o\")_p('')elseif(path.getextension(e)==\".rc\")then\n_p('$(OBJDIR)/%s.res: %s',_MAKE.esc(path.getbasename(e)),_MAKE.esc(e))_p('\\t@echo $(notdir $<)')_p('\\t$(SILENT) $(RESC"
+ "OMP) $< -O coff -o \"$@\" $(ALL_RESFLAGS)')_p('')end\nend\nend\nfunction p.buildcommand(e,p)local e=iif(e,'$(CC) $(ALL_CFLAGS)','$(CXX) $(ALL_CXXFLAGS)')_p('\\t$(SILENT) %s $(FORCE_INCLUDE) -o \"$@\" -MF $(@:%%.%s=%%.d) -c \"$<\"',e,p)end",
/* actions/make/make_csharp.lua */
"local function o(n,e)if path.getextension(e)==\".resx\"then\nlocal n=n.buildtarget.basename..\".\"local i=path.getdirectory(e)if i~=\".\"then\nn=n..path.translate(i,\".\")..\".\"end\nreturn\"$(OBJDIR)/\".._MAKE.esc(n..path.getbasename(e))..\".resources\"else\nreturn e\nend\nend\nfunction premake.make_csharp(e)local p=premake.dotnet\nlocal s={}local i={}local l\nfor e in premake.eachconfig(e)do\nl=e\ns[e]=premake.getlinks(e,\"siblings\",\"fullpath\")i[e]={}for p,n in ipairs(s[e])do\nif path.getdirectory(n)~=e.buildtarget.directory then\ni[e][\"$(TARGETDIR)/\".._MAKE.esc(path.getname(n))]=_MAKE.esc(n)end\nend\nend\nlocal r={}local a={}local n={}for e in premake.project.eachfile(e)do\nlocal i=p.getbuildaction(e)if i==\"Compile\"then\ntable.insert(r,e.name)elseif i==\"EmbeddedResource\"then\ntable.insert(a,e.name)elseif i==\"Content\"then\nn[\"$(TARGETDIR)/\".._MAKE.esc(path.getname(e.name))]=_MAKE.esc(e.name)elseif path.getname(e.name):lower()==\"app.config\"then\nn[\"$(TARGET).config\"]=_MAKE.esc(e.name)end\nend"
@@ -162,17 +162,17 @@ 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(o)local s={}local n=premake.filterplatforms(o,e.platforms,\"Native\")local r=premake.hascppproject(o)local a=premake.hasdotnetproject(o)if a and(_ACTION>\"vs2008\"or r)then\ntable.insert(n,1,\"mixed\")end\nif a and(_ACTION<\"vs2010\"or not r)then\ntable.insert(n,1,\"any\")end\nif _ACTION>\"vs2008\"then\nlocal o={}for s,t in ipairs(n)do\nif e.platforms[t]==\"Win32\"then\nif r then\ntable.insert(o,t)end\nif a then\ntable.insert(o,\"x86\")end\nelse\ntable.insert(o,t)end\nend\nn=o\nend\nfor o,r in ipairs(o.configurations)do\nfor n,o in ipairs(n)do\nlocal n={}n.src_buildcfg=r\nn.src_platform=o\nif o~=\"PS3\"or _ACTION>\"vs2008\"then\nn.buildcfg=r\nn.platform=e.pla"
- "tforms[o]else\nn.buildcfg=o..\" \"..r\nn.platform=\"Win32\"end\nn.name=n.buildcfg..\"|\"..n.platform\nn.isreal=(o~=\"any\"and o~=\"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..\".vcproj.user\")os.remove(e..\".vcxproj\")os.remove(e..\".vcxproj.user\")os.remove(e..\".vcxproj.filters\")os.remove(e..\".csproj\")os.remove(e..\".csproj.user\")os.remove(e..\".pidb\")os.remove(e..\".sdf\")end\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.proje"
- "ct.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)premake.generate(n,\"%%.csproj.user\",e.cs2002.generate_user)else\npremake.generate(n,\"%%.vcproj\",e.vc200x.generate)premake.generate(n,\"%%.vcproj.user\",e.vc200x.generate_user)end\nend,oncleansolution=premake.vstudio.cleansolution,oncleanproject=premake.vstudio.cleanproject,oncleantarget=premake.vstudio.cleantarget,v"
- "studio={}}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)premake.generate(n,\"%%.csproj.user\",e.cs2002.generate_user)else\npremake.generate(n,\"%%.vcproj\",e.vc200x.generate)premake.generate(n,\"%%.vcproj.user\",e.vc200x.generate_user)end\nend,oncleansolution=premake.vstudio.cleansolution,oncleanproject=premake.vstudio.cleanproject,oncleantarget=premake.vstudio.cleantarget,vstudio={}}newaction{trigger=\"vs2005\",shortname=\"Visual Studio 2005\",description=\"Generate Microsoft Visual Studio 2005 project files\",os=\"windows\",valid_kinds={\"ConsoleApp\",\"WindowedApp\",\"StaticL"
- "ib\",\"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)premake.generate(n,\"%%.csproj.user\",e.cs2005.generate_user)else\npremake.generate(n,\"%%.vcproj\",e.vc200x.generate)premake.generate(n,\"%%.vcproj.user\",e.vc200x.generate_user)end\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=\"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)premake.generate(n,\"%%.csproj.user\",e.cs2005.generate_user)else\npremake.generate(n,\"%%.vcproj\",e.vc200x.generate)premake.generate(n,\"%%.vcproj.user\",e.vc200x.generate_user)end\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)premake.generate(n,\"%%.csproj.user\",e.cs2005.generate_user)else\npremake.generate(n,\""
- "%%.vcxproj\",premake.vs2010_vcxproj)premake.generate(n,\"%%.vcxproj.user\",premake.vs2010_vcxproj_user)premake.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\",}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\",}}",
/* actions/vstudio/vs2002_solution.lua */
- "premake.vstudio.sln2002={}local i=premake.vstudio\nlocal o=premake.vstudio.sln2002\nfunction o.generate(o)io.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(ExtensibilityGlobals) = postS"
- "olution')_p(1,'EndGlobalSection')_p(1,'GlobalSection(ExtensibilityAddIns) = postSolution')_p(1,'EndGlobalSection')_p('EndGlobal')end",
+ "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"
+ "lobals) = postSolution')_p(1,'EndGlobalSection')_p(1,'GlobalSection(ExtensibilityAddIns) = postSolution')_p(1,'EndGlobalSection')_p('EndGlobal')end",
/* actions/vstudio/vs2002_csproj.lua */
"premake.vstudio.cs2002={}local s=premake.vstudio\nlocal a=premake.vstudio.cs2002\nlocal function n(a,t,e)if t==\"Compile\"and e:endswith(\".cs\")then\nreturn\"SubTypeCode\"end\nif t==\"EmbeddedResource\"and e:endswith(\".resx\")then\nlocal e=e:sub(1,-6)local e=path.getname(e..\".cs\")if premake.findfile(a,e)then\nreturn\"Dependency\",e\nend\nend\nreturn\"None\"end\nfunction a.Files(a)local e=premake.project.buildsourcetree(a)premake.tree.traverse(e,{onleaf=function(e)local t=premake.dotnet.getbuildaction(e.cfg)local s=path.translate(premake.esc(e.cfg.name),\"\\\\\")local a,e=n(a,t,e.path)_p(4,'<File')_p(5,'RelPath = \"%s\"',s)_p(5,'BuildAction = \"%s\"',t)if e then\n_p(5,'DependentUpon = \"%s\"',premake.esc(path.translate(e,\"\\\\\")))end\nif a==\"SubTypeCode\"then\n_p(5,'SubType = \"Code\"')end\n_p(4,'/>')end},false)end\nfunction a.generate(t)io.eol=\"\\r\\n\"_p('<VisualStudioProject>')_p(1,'<CSHARP')_p(2,'ProjectType = \"Local\"')_p(2,'ProductVersion = \"%s\"',iif(_ACTION==\"vs2002\",\"7.0.9254\",\"7.10.3077"
@@ -206,12 +206,13 @@ const char* builtin_scripts[] = {
"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",
/* actions/vstudio/vs2003_solution.lua */
- "premake.vstudio.sln2003={}local e=premake.vstudio\nlocal o=premake.vstudio.sln2003\nfunction o.generate(o)io.eol='\\r\\n'o.vstudio_configs=premake.vstudio.buildconfigs(o)_p('Microsoft Visual Studio Solution File, Format Version 8.00')for t in premake.solution.eachproject(o)do\nlocal o=path.translate(path.getrelative(o.location,e.projectfile(t)))_p('Project(\"{%s}\") = \"%s\", \"%s\", \"{%s}\"',e.tool(t),t.name,o,t.uuid)local o=premake.getdependencies(t)if#o>0 then\n_p('\\tProjectSection(ProjectDependencies) = postProject')for t,o in ipairs(o)do\n_p('\\t\\t{%s} = {%s}',o.uuid,o.uuid)end\n_p('\\tEndProjectSection')end\n_p('EndProject')end\n_p('Global')_p('\\tGlobalSection(SolutionConfiguration) = preSolution')for t,o in ipairs(o.configurations)do\n_p('\\t\\t%s = %s',o,o)end\n_p('\\tEndGlobalSection')_p('\\tGlobalSection(ProjectDependencies) = postSolution')_p('\\tEndGlobalSection')_p('\\tGlobalSection(ProjectConfiguration) = postSolution')for t in premake.solution.eachproject(o)do\nfor i,o in ipairs(o.configurat"
- "ions)do\n_p('\\t\\t{%s}.%s.ActiveCfg = %s|%s',t.uuid,o,o,e.arch(t))_p('\\t\\t{%s}.%s.Build.0 = %s|%s',t.uuid,o,o,e.arch(t))end\nend\n_p('\\tEndGlobalSection')_p('\\tGlobalSection(ExtensibilityGlobals) = postSolution')_p('\\tEndGlobalSection')_p('\\tGlobalSection(ExtensibilityAddIns) = postSolution')_p('\\tEndGlobalSection')_p('EndGlobal')end",
+ "premake.vstudio.sln2003={}local i=premake.vstudio\nlocal o=premake.vstudio.sln2003\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 8.00')for t in premake.solution.eachproject(o)do\nlocal o=path.translate(path.getrelative(o.location,i.projectfile(t)))_p('Project(\"{%s}\") = \"%s\", \"%s\", \"{%s}\"',i.tool(t),t.name,o,t.uuid)local o=premake.getdependencies(t)if#o>0 then\n_p('\\tProjectSection(ProjectDependencies) = postProject')for t,o in ipairs(o)do\n_p('\\t\\t{%s} = {%s}',o.uuid,o.uuid)end\n_p('\\tEndProjectSection')end\n_p('EndProject')end\n_p('Global')_p('\\tGlobalSection(SolutionConfiguration) = preSolution')for t,o in ipairs(o.configurations)do\n_p('\\t\\t%s = %s',o,o)end\n_p('\\tEndGlobalSection')_p('\\tGlobalSection(ProjectDependencies) = postSolution')_p('\\tEndGlobalSection')_p('\\tGlobalSection(ProjectConfiguration) = postSolution')for t in premake.solution.eachproject(o)do\nfor e,o in ipai"
+ "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.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)_p('# Visual Studio %s',_ACTION:sub(3))end\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)do\n_p('\\t\\t{%s} = {%s}',o.uuid,o.uuid)end\n_p('\\tEndProjectSection')end\nend\nfunction o.platforms(o)_p('\\tGloba"
- "lSection(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(e)_p('\\tGlobalSection(ProjectConfigurationPlatforms) = postSolution')for i in premake.solution.eachproject(e)do\nfor n,t in ipairs(e.vstudio_configs)do\nlocal n\nif premake.isdotnetproject(i)then\nn=\"Any CPU\"else\nif t.platform==\"Any CPU\"or t.platform==\"Mixed Platforms\"then\nn=e.vstudio_configs[3].platform\nelse\nn=t.platform\nend\nend\no.project_platforms_sln2prj_mapping(e,i,t,n)end\nend\n_p('\\tEndGlobalSection')end\nfunction o.properties(o)_p('\\tGlobalSection(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)_p('# Visual Studio %s',_ACTION:sub(3))end\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)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(e)_p('\\tGlobalSection(ProjectConfigurationPlatforms) = postSolution')for i in premake.solution.eachproject(e)do\nfor n,t in ipairs(e.vstudio_configs)do\nlocal n\nif premake.isdotnetproject(i)then\nn=\"Any CPU\"else\nif t.platform==\"Any CPU\"or t.platform==\"Mixed Platforms\"then\nn=e.vstudio_configs[3].platform\nelse\nn=t.platform\nend\nend\no.project_platforms_sln2prj_mapping(e,i,t,n)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 "
@@ -289,8 +290,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
};