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>2015-11-15 21:07:28 +0300
committerOliver Schneider <oliver@assarbad.net>2015-11-15 21:07:28 +0300
commit80f94bc24ec1020a48854f87817cf7bf3be2c473 (patch)
tree27a62a33fd3c489197fa6094cc7f711f7ff3f0d1
parent580dd18437c2225db07337d23d3ef1cfdefd1fcf (diff)
Forgot the embed step, so adding it to the release script
--HG-- branch : WDS-build
-rw-r--r--release.cmd2
-rw-r--r--src/host/scripts.c56
2 files changed, 32 insertions, 26 deletions
diff --git a/release.cmd b/release.cmd
index 39e001c..248fc7d 100644
--- a/release.cmd
+++ b/release.cmd
@@ -10,6 +10,8 @@ echo #define HG_TIP_ID "%HG_TIP_ID%" > %HGTIPFILE%
echo #define HG_TIP_REVNO "%HG_TIP_REVNO%" >> %HGTIPFILE%
if exist %HGTIPFILE% type %HGTIPFILE%
vcbuild /rebuild /time Premake4.vs8.sln "Publish|Win32"
+"%~dp0bin\release\premake4.exe" embed
+vcbuild /rebuild /time Premake4.vs8.sln "Publish|Win32"
set NEWNAME=%~dp0premake4.rev-%HG_TIP_REVNO%-%HG_TIP_ID%.exe
copy /y "%~dp0bin\release\premake4.exe" "%NEWNAME%"
sigcheck -a "%NEWNAME%"
diff --git a/src/host/scripts.c b/src/host/scripts.c
index 217d50e..b5fba27 100644
--- a/src/host/scripts.c
+++ b/src/host/scripts.c
@@ -4,17 +4,17 @@
const char* builtin_scripts[] = {
/* base/os.lua */
- "function os.executef(n,...)n=string.format(n,unpack(arg))return os.execute(n)end\nlocal function t(n)local e,i\nlocal o={}local n=io.open(n)if n==nil then\nreturn o\nend\nfor n in n:lines()do\ne=n:find(\"#\",1,true)if e~=nil then\nn=n:sub(1,e-1)end\nif n~=\"\"then\ne,i=n:find(\"include%s+\")if e~=nil then\nlocal n=n:sub(i+1)local n=os.matchfiles(n)for e,n in ipairs(n)do\no=table.join(o,t(n))end\nelse\ntable.insert(o,n)end\nend\nend\nreturn o\nend\nfunction os.findlib(e)local n,o\nif os.is(\"windows\")then\no={\"%s.dll\",\"%s\"}n=os.getenv(\"PATH\")elseif os.is(\"haiku\")then\no={\"lib%s.so\",\"%s.so\"}n=os.getenv(\"LIBRARY_PATH\")else\nif os.is(\"macosx\")then\no={\"lib%s.dylib\",\"%s.dylib\"}n=os.getenv(\"DYLD_LIBRARY_PATH\")else\no={\"lib%s.so\",\"%s.so\"}n=os.getenv(\"LD_LIBRARY_PATH\")or\"\"for e,o in ipairs(t(\"/etc/ld.so.conf\"))do\nn=n..\":\"..o\nend\nend\ntable.insert(o,\"%s\")n=n or\"\"if os.is64bit()then\nn=n..\":/lib64:/usr/lib64/:usr/local/lib64\"end\nn=n..\":/lib:/usr/lib:/usr/local/lib\"end\nfor "
- "i,o in ipairs(o)do\nlocal o=string.format(o,e)local n=os.pathsearch(o,n)if n then return n end\nend\nend\nfunction os.get()return _OPTIONS.os or _OS\nend\nfunction os.is(n)return(os.get():lower()==n:lower())end\nlocal o={\"x86_64\",\"ia64\",\"amd64\",\"ppc64\",\"powerpc64\",\"sparc64\"}function os.is64bit()if(os._is64bit())then\nreturn true\nend\nlocal n\nif _OS==\"windows\"then\nn=os.getenv(\"PROCESSOR_ARCHITECTURE\")elseif _OS==\"macosx\"then\nn=os.outputof(\"echo $HOSTTYPE\")else\nn=os.outputof(\"uname -m\")end\nn=n:lower()for e,o in ipairs(o)do\nif n:find(o)then\nreturn true\nend\nend\nreturn false\nend\nlocal function t(a,n,i)if n:startswith(\"./\")then\nn=n:sub(3)end\nlocal e=n\nlocal o=n:find(\"%*\")if o then\ne=e:sub(1,o-1)end\ne=path.getdirectory(e)if(e==\".\")then e=\"\"end\nlocal l=n:find(\"**\",nil,true)n=path.wildcards(n)local function t(e)local s=path.join(e,\"*\")local o=os.matchstart(s)while(os.matchnext(o))do\nlocal t=os.matchisfile(o)if((i and t)or(not i and not t))then\nlocal o=path.join(e,o"
- "s.matchname(o))if o:match(n)==o then\ntable.insert(a,o)end\nend\nend\nos.matchdone(o)if l then\no=os.matchstart(s)while(os.matchnext(o))do\nif not os.matchisfile(o)then\nlocal n=os.matchname(o)t(path.join(e,n))end\nend\nos.matchdone(o)end\nend\nt(e)end\nfunction os.matchdirs(...)local n={}for e,o in ipairs(arg)do\nt(n,o,false)end\nreturn n\nend\nfunction os.matchfiles(...)local n={}for e,o in ipairs(arg)do\nt(n,o,true)end\nreturn n\nend\nlocal e=os.mkdir\nfunction os.mkdir(o)local n=iif(o:startswith(\"/\"),\"/\",\"\")for o in o:gmatch(\"[^/]+\")do\nn=n..o\nif(o~=\"\"and not path.isabsolute(o)and not os.isdir(n))then\nlocal n,o=e(n)if(not n)then\nreturn nil,o\nend\nend\nn=n..\"/\"end\nreturn true\nend\nfunction os.outputof(n)local n=io.popen(n)local o=n:read('*a')n:close()return o\nend\nlocal e=os.rmdir\nfunction os.rmdir(n)local o=os.matchdirs(n..\"/*\")for o,n in ipairs(o)do\nos.rmdir(n)end\nlocal o=os.matchfiles(n..\"/*\")for o,n in ipairs(o)do\nos.remove(n)end\ne(n)end",
+ "function os.executef(n,...)n=string.format(n,unpack(arg))return os.execute(n)end\nlocal function i(n)local e,t\nlocal o={}local n=io.open(n)if n==nil then\nreturn o\nend\nfor n in n:lines()do\ne=n:find(\"#\",1,true)if e~=nil then\nn=n:sub(1,e-1)end\nif n~=\"\"then\ne,t=n:find(\"include%s+\")if e~=nil then\nlocal n=n:sub(t+1)local n=os.matchfiles(n)for e,n in ipairs(n)do\no=table.join(o,i(n))end\nelse\ntable.insert(o,n)end\nend\nend\nreturn o\nend\nfunction os.findlib(e)local n,o\nif os.is(\"windows\")then\no={\"%s.dll\",\"%s\"}n=os.getenv(\"PATH\")elseif os.is(\"haiku\")then\no={\"lib%s.so\",\"%s.so\"}n=os.getenv(\"LIBRARY_PATH\")else\nif os.is(\"macosx\")then\no={\"lib%s.dylib\",\"%s.dylib\"}n=os.getenv(\"DYLD_LIBRARY_PATH\")else\no={\"lib%s.so\",\"%s.so\"}n=os.getenv(\"LD_LIBRARY_PATH\")or\"\"for e,o in ipairs(i(\"/etc/ld.so.conf\"))do\nn=n..\":\"..o\nend\nend\ntable.insert(o,\"%s\")n=n or\"\"if os.is64bit()then\nn=n..\":/lib64:/usr/lib64/:usr/local/lib64\"end\nn=n..\":/lib:/usr/lib:/usr/local/lib\"end\nfor "
+ "i,o in ipairs(o)do\nlocal o=string.format(o,e)local n=os.pathsearch(o,n)if n then return n end\nend\nend\nfunction os.get()return _OPTIONS.os or _OS\nend\nfunction os.is(n)return(os.get():lower()==n:lower())end\nlocal o={\"x86_64\",\"ia64\",\"amd64\",\"ppc64\",\"powerpc64\",\"sparc64\"}function os.is64bit()if(os._is64bit())then\nreturn true\nend\nlocal n\nif _OS==\"windows\"then\nn=os.getenv(\"PROCESSOR_ARCHITECTURE\")elseif _OS==\"macosx\"then\nn=os.outputof(\"echo $HOSTTYPE\")else\nn=os.outputof(\"uname -m\")end\nn=n:lower()for e,o in ipairs(o)do\nif n:find(o)then\nreturn true\nend\nend\nreturn false\nend\nlocal function l(l,n,i)if n:startswith(\"./\")then\nn=n:sub(3)end\nlocal e=n\nlocal o=n:find(\"%*\")if o then\ne=e:sub(1,o-1)end\ne=path.getdirectory(e)if(e==\".\")then e=\"\"end\nlocal a=n:find(\"**\",nil,true)n=path.wildcards(n)local function t(e)local s=path.join(e,\"*\")local o=os.matchstart(s)while(os.matchnext(o))do\nlocal t=os.matchisfile(o)if((i and t)or(not i and not t))then\nlocal i=os.matchname("
+ "o)local o=path.join(e,i)if i~=\"..\"and o:match(n)==o then\ntable.insert(l,o)end\nend\nend\nos.matchdone(o)if a then\no=os.matchstart(s)while(os.matchnext(o))do\nif not os.matchisfile(o)then\nlocal n=os.matchname(o)if(not n:startswith(\".\"))then\nt(path.join(e,n))end\nend\nend\nos.matchdone(o)end\nend\nt(e)end\nfunction os.matchdirs(...)local n={}for e,o in ipairs(arg)do\nl(n,o,false)end\nreturn n\nend\nfunction os.matchfiles(...)local n={}for e,o in ipairs(arg)do\nl(n,o,true)end\nreturn n\nend\nlocal e=os.mkdir\nfunction os.mkdir(o)local n=iif(o:startswith(\"/\"),\"/\",\"\")for o in o:gmatch(\"[^/]+\")do\nn=n..o\nif(o~=\"\"and not path.isabsolute(o)and not os.isdir(n))then\nlocal n,o=e(n)if(not n)then\nreturn nil,o\nend\nend\nn=n..\"/\"end\nreturn true\nend\nfunction os.outputof(n)local n=io.popen(n)local o=n:read('*a')n:close()return o\nend\nlocal e=os.rmdir\nfunction os.rmdir(n)local o=os.matchdirs(n..\"/*\")for o,n in ipairs(o)do\nos.rmdir(n)end\nlocal o=os.matchfiles(n..\"/*\")for o,n in ipairs(o)do\nos."
+ "remove(n)end\ne(n)end",
/* base/path.lua */
- "function path.getabsolute(t)t=path.translate(t,\"/\")if(t==\"\")then t=\".\"end\nlocal e=iif(path.isabsolute(t),nil,os.getcwd())for n,t in ipairs(t:explode(\"/\",true))do\nif(t==\"\"and n==1)then\ne=\"/\"elseif(t==\"..\")then\ne=path.getdirectory(e)elseif(t~=\".\")then\nif(t:startswith(\"$\")and n>1)then\ne=e..\"/\"..t\nelse\ne=path.join(e,t)end\nend\nend\ne=iif(e:endswith(\"/\"),e:sub(1,-2),e)return e\nend\nfunction path.getbasename(e)local e=path.getname(e)local t=e:findlast(\".\",true)if(t)then\nreturn e:sub(1,t-1)else\nreturn e\nend\nend\nfunction path.getdirectory(t)local e=t:findlast(\"/\",true)if(e)then\nif e>1 then e=e-1 end\nreturn t:sub(1,e)else\nreturn\".\"end\nend\nfunction path.getdrive(e)local t=e:sub(1,1)local e=e:sub(2,2)if e==\":\"then\nreturn t\nend\nend\nfunction path.getextension(t)local e=t:findlast(\".\",true)if(e)then\nreturn t:sub(e)else\nreturn\"\"end\nend\nfunction path.getname(e)local t=e:findlast(\"[/\\\\]\")if(t)then\nreturn e:sub(t+1)else\nreturn e\nend\nend\nfunction path.getrela"
- "tive(e,t)e=path.getabsolute(e)t=path.getabsolute(t)if(e==t)then\nreturn\".\"end\nif t:startswith(\"$\")then\nreturn t\nend\ne=e..\"/\"t=t..\"/\"local n=0\nwhile(true)do\nlocal a=e:find(\"/\",n+1,true)if a then\nif e:sub(1,a)==t:sub(1,a)then\nn=a\nelse\nbreak\nend\nelse\nbreak\nend\nend\nlocal a=e:find(\"/\",0,true)if n<=a then\nreturn t:sub(1,-2)end\ne=e:sub(n+1)t=t:sub(n+1)local a=\"\"n=e:find(\"/\")while(n)do\na=a..\"../\"n=e:find(\"/\",n+1)end\na=a..t\nreturn a:sub(1,-2)end\nfunction path.iscfile(e)local t={\".c\",\".s\",\".m\"}local e=path.getextension(e):lower()return table.contains(t,e)end\nfunction path.iscppfile(e)local t={\".cc\",\".cpp\",\".cxx\",\".c\",\".s\",\".m\",\".mm\"}local e=path.getextension(e):lower()return table.contains(t,e)end\nfunction path.iscppheader(e)local t={\".h\",\".hh\",\".hpp\",\".hxx\"}local e=path.getextension(e):lower()return table.contains(t,e)end\nfunction path.isresourcefile(e)local t={\".rc\"}local e=path.getextension(e):lower()return table.contains(t,e)end\nfunction pat"
- "h.join(...)local e=select(\"#\",...)if e==0 then\nreturn\"\";end\nlocal t={}for e=e,1,-1 do\nlocal e=select(e,...)if e and#e>0 and e~=\".\"then\nwhile e:endswith(\"/\")do\ne=e:sub(1,-2)end\ntable.insert(t,1,e)if path.isabsolute(e)then\nbreak\nend\nend\nend\nreturn table.concat(t,\"/\")end\nfunction path.rebase(e,t,n)e=path.getabsolute(path.join(t,e))e=path.getrelative(n,e)return e\nend\nfunction path.translate(t,e)if(type(t)==\"table\")then\nlocal e={}for n,t in ipairs(t)do\ntable.insert(e,path.translate(t))end\nreturn e\nelse\nif(not e)then\nif(os.is(\"windows\"))then\ne=\"\\\\\"else\ne=\"/\"end\nend\nlocal e=t:gsub(\"[/\\\\]\",e)return e\nend\nend\nfunction path.wildcards(e)e=e:gsub(\"([%+%.%-%^%$%(%)%%])\",\"%%%1\")e=e:gsub(\"%*%*\",\"\\1\")e=e:gsub(\"%*\",\"\\2\")e=e:gsub(\"\\1\",\".*\")e=e:gsub(\"\\2\",\"[^/]*\")return e\nend",
+ "function path.getbasename(e)local e=path.getname(e)local n=e:findlast(\".\",true)if(n)then\nreturn e:sub(1,n-1)else\nreturn e\nend\nend\nfunction path.getdirectory(n)local e=n:findlast(\"/\",true)if(e)then\nif e>1 then e=e-1 end\nreturn n:sub(1,e)else\nreturn\".\"end\nend\nfunction path.getdrive(e)local n=e:sub(1,1)local e=e:sub(2,2)if e==\":\"then\nreturn n\nend\nend\nfunction path.getextension(e)local n=e:findlast(\".\",true)if(n)then\nreturn e:sub(n)else\nreturn\"\"end\nend\nfunction path.getname(e)local n=e:findlast(\"[/\\\\]\")if(n)then\nreturn e:sub(n+1)else\nreturn e\nend\nend\nfunction path.iscfile(e)local n={\".c\",\".s\",\".m\"}local e=path.getextension(e):lower()return table.contains(n,e)end\nfunction path.iscppfile(e)local n={\".cc\",\".cpp\",\".cxx\",\".c\",\".s\",\".m\",\".mm\"}local e=path.getextension(e):lower()return table.contains(n,e)end\nfunction path.iscppheader(e)local n={\".h\",\".hh\",\".hpp\",\".hxx\"}local e=path.getextension(e):lower()return table.contains(n,e)end\nfunction path.isre"
+ "sourcefile(e)local n={\".rc\"}local e=path.getextension(e):lower()return table.contains(n,e)end\nfunction path.rebase(e,t,n)e=path.getabsolute(path.join(t,e))e=path.getrelative(n,e)return e\nend\nlocal n=path.translate\nfunction path.translate(t,e)if not e then\nif os.is(\"windows\")then\ne=\"\\\\\"else\ne=\"/\"end\nend\nreturn n(t,e)end\nfunction path.wildcards(e)e=e:gsub(\"([%+%.%-%^%$%(%)%%])\",\"%%%1\")e=e:gsub(\"%*%*\",\"\\1\")e=e:gsub(\"%*\",\"\\2\")e=e:gsub(\"\\1\",\".*\")e=e:gsub(\"\\2\",\"[^/]*\")return e\nend",
/* base/string.lua */
- "function string.explode(e,r,i)if(r=='')then return false end\nlocal n=0\nlocal t={}for i,r in function()return e:find(r,n,i)end do\ntable.insert(t,e:sub(n,i-1))n=r+1\nend\ntable.insert(t,e:sub(n))return t\nend\nfunction string.findlast(r,e,t)local n=0\nrepeat\nlocal t=r:find(e,n+1,t)if(t)then n=t end\nuntil(not t)if(n>0)then\nreturn n\nend\nend\nfunction string.startswith(n,t)return(n:find(t,1,true)==1)end",
+ "function string.explode(e,i,r)if(i=='')then return false end\nlocal n=0\nlocal t={}for r,i in function()return e:find(i,n,r)end do\ntable.insert(t,e:sub(n,r-1))n=i+1\nend\ntable.insert(t,e:sub(n))return t\nend\nfunction string.findlast(i,e,t)local n=0\nrepeat\nlocal t=i:find(e,n+1,t)if(t)then n=t end\nuntil(not t)if(n>0)then\nreturn n\nend\nend\nfunction string.startswith(n,t)return(n:find(t,1,true)==1)end",
/* base/table.lua */
"function table.contains(n,e)for t,n in pairs(n)do\nif(n==e)then\nreturn true\nend\nend\nreturn false\nend\nfunction table.extract(n,t)local e={}for i,n in ipairs(n)do\ntable.insert(e,n[t])end\nreturn e\nend\nfunction table.flatten(i)local n={}local function t(e)for i,e in ipairs(e)do\nif type(e)==\"table\"then\nt(e)else\ntable.insert(n,e)end\nend\nend\nt(i)return n\nend\nfunction table.implode(r,t,i,n)local e=\"\"for a,r in ipairs(r)do\nif(e~=\"\"and n)then\ne=e..n\nend\ne=e..t..r..i\nend\nreturn e\nend\nfunction table.insertflat(n,e)if type(e)==\"table\"then\nfor t,e in ipairs(e)do\ntable.insertflat(n,e)end\nelse\ntable.insert(n,e)end\nend\nfunction table.isempty(e)return next(e)==nil\nend\nfunction table.join(...)local e={}for t,n in ipairs(arg)do\nif type(n)==\"table\"then\nfor t,n in ipairs(n)do\ntable.insert(e,n)end\nelse\ntable.insert(e,n)end\nend\nreturn e\nend\nfunction table.keys(n)local e={}for n,t in pairs(n)do\ntable.insert(e,n)end\nreturn e\nend\nfunction table.merge(...)local n={}for t,e in ipair"
@@ -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 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"
+ "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"
"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 */
@@ -149,9 +149,9 @@ const char* builtin_scripts[] = {
"else\n_p('all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)')end\n_p('\\t@:')_p('')_p('$(TARGET): $(GCH) $(OBJECTS) $(LDDEPS) $(RESOURCES)')_p('\\t@echo Linking %s',e.name)_p('\\t$(SILENT) $(LINKCMD)')_p('\\t$(POSTBUILDCMDS)')_p('')_p('$(TARGETDIR):')premake.make_mkdirrule(\"$(TARGETDIR)\")_p('$(OBJDIR):')premake.make_mkdirrule(\"$(OBJDIR)\")if os.is(\"MacOSX\")and e.kind==\"WindowedApp\"then\n_p('$(dir $(TARGETDIR))PkgInfo:')_p('$(dir $(TARGETDIR))Info.plist:')_p('')end\n_p('clean:')_p('\\t@echo Cleaning %s',e.name)_p('ifeq (posix,$(SHELLTYPE))')_p('\\t$(SILENT) rm -f $(TARGET)')_p('\\t$(SILENT) rm -rf $(OBJDIR)')_p('else')_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,$(TARGET)) del $(subst /,\\\\\\\\,$(TARGET))')_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,$(OBJDIR)) rmdir /s /q $(subst /,\\\\\\\\,$(OBJDIR))')_p('endif')_p('')_p('prebuild:')_p('\\t$(PREBUILDCMDS)')_p('')_p('prelink:')_p('\\t$(PRELINKCMDS)')_p('')p.pchrules(e)p.fileRules(e)_p('-include $(OBJECTS:%%.o=%%.d)')_p('ifneq (,$(PCH))')_p(' -in"
"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('.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",
+ " $(ALL_CPPFLAGS)%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) $(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('.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) $(RESCOMP) $< -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"
@@ -227,19 +227,19 @@ const char* builtin_scripts[] = {
/* actions/vstudio/vs2010_vcxproj.lua */
"premake.vstudio.vc2010={}local e=premake.vstudio.vc2010\nlocal s=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 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\"}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 a(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 f(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,'<PreprocessorDefinitions>%s;%%(PreprocessorDefinitions)</PreprocessorD"
- "efinitions>',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 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 g(e)_p(2,'<ResourceCompile>')t(3,e)n(3,e)_p(2,'</ResourceCompile>')end\nlocal function m(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 u(e)if e.flags.NoRTTI and not e.flags.Managed then\n_p(3,'<RuntimeTypeInfo>false</Ru"
- "ntimeTypeInfo>')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 C(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 l(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 r(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=\"EditAndContinue\"end\nend\n_p(3,'<DebugInformationFormat>%s</DebugInfor"
- "mationFormat>',n)end\nlocal function h(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 b(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)h(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>',f(e))_p(3,'<FunctionLevelLinking>true</FunctionLevelLinking>')c(e)if e.flags.ExtraWarnings then\n_p(3,'<WarningLevel>Level4</Wa"
- "rningLevel>')else\n_p(3,'<WarningLevel>Level3</WarningLevel>')end\nif e.flags.FatalWarnings then\n_p(3,'<TreatWarningAsError>true</TreatWarningAsError>')end\nm(e)u(e)_(e)C(e)l(e)r(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 r(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 c(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 l(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,'<EnableCOMDATFolding>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>mainCRTStartup</EntryPointSymbol>')end\nl(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 l(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))b(n)g(n)c(n)e.link(n)r(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.compilerfilesgroup(n)local t=n.solution.vstudio_configs\nlocal o=e.getfilegroup(n,\"ClCompile\")if#o>0 then\nloc"
- "al e={}for t,i in ipairs(t)do\nlocal n=premake.getconfig(n,i.src_buildcfg,i.src_platform)if n.pchheader and n.pchsource and not n.flags.NoPCH then\ne[i]=path.translate(n.pchsource,\"\\\\\")end\nend\n_p(1,'<ItemGroup>')for o,n in ipairs(o)do\nlocal o=path.translate(n.name,\"\\\\\")_p(2,'<ClCompile Include=\"%s\">',o)for t,n in ipairs(t)do\nif e[n]and o==e[n]then\n_p(3,'<PrecompiledHeader '..i()..'>Create</PrecompiledHeader>',premake.esc(n.name))e[n]=nil\nend\nend\n_p(2,'</ClCompile>')end\n_p(1,'</ItemGroup>')end\nend\nfunction e.header(e)io.eol=\"\\r\\n\"_p('<?xml version=\"1.0\" encoding=\"utf-8\"?>')local n=\"\"if e then\nn=' DefaultTargets=\"'..e..'\"'end\n_p('<Project%s ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">',n)end\nfunction premake.vs2010_vcxproj(n)io.indent=\" \"e.header(\"Build\")p(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.sr"
- "c_platform)e.configurationPropertyGroup(n,i)end\n_p(1,'<Import Project=\"$(VCTargetsPath)\\\\Microsoft.Cpp.props\" />')_p(1,'<ImportGroup Label=\"ExtensionSettings\">')_p(1,'</ImportGroup>')a(n)_p(1,'<PropertyGroup Label=\"UserMacros\" />')e.outputProperties(n)l(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,s.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",
+ "=='%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\"}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</CLR"
+ "Support>')end\n_p(1,'</PropertyGroup>')end\nlocal function a(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(pat"
+ "h.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 f(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,'<PreprocessorDefinitions>%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 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 g(e)_p(2,'<ResourceCompile>')t(3,e)n(3,e)_p(2,'</ResourceCompile>')end\nlocal function m(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 u(e)if e.flags.NoRTTI and not e.flags.Managed then\n_p(3,'<RuntimeTy"
+ "peInfo>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 C(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 l(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 r(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=\"EditAndContinue\"end\nend\n_p(3,'<DebugInformationForma"
+ "t>%s</DebugInformationFormat>',n)end\nlocal function h(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 b(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)h(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>',f(e))_p(3,'<FunctionLevelLinking>true</FunctionLevelLinking>')c(e)if e.flags.ExtraWarnings then\n_p(3,'<Warning"
+ "Level>Level4</WarningLevel>')else\n_p(3,'<WarningLevel>Level3</WarningLevel>')end\nif e.flags.FatalWarnings then\n_p(3,'<TreatWarningAsError>true</TreatWarningAsError>')end\nm(e)u(e)_(e)C(e)l(e)r(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 r(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 fu"
+ "nction 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 c(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 l(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,'<EnableCOMDATFolding>true</EnableCOMDATFolding>')_p(3,'<Op"
+ "timizeReferences>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>mainCRTStartup</EntryPointSymbol>')end\nl(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 l(n)for o,t in ipairs(n.solution.vstudio_configs)do\nlocal n=premake.getconfig(n,t.src_buildcfg,t.src_platform)_p(1,'<ItemDefinit"
+ "ionGroup '..i()..'>',premake.esc(t.name))b(n)g(n)c(n)e.link(n)r(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.compilerfilesgroup(n)local t=n.solution.vstudio_configs\nlocal o=e.getfilegroup(n,\"ClCompile\")"
+ "if#o>0 then\nlocal e={}for t,i in ipairs(t)do\nlocal n=premake.getconfig(n,i.src_buildcfg,i.src_platform)if n.pchheader and n.pchsource and not n.flags.NoPCH then\ne[i]=path.translate(n.pchsource,\"\\\\\")end\nend\n_p(1,'<ItemGroup>')for o,n in ipairs(o)do\nlocal o=path.translate(n.name,\"\\\\\")_p(2,'<ClCompile Include=\"%s\">',o)for t,n in ipairs(t)do\nif e[n]and o==e[n]then\n_p(3,'<PrecompiledHeader '..i()..'>Create</PrecompiledHeader>',premake.esc(n.name))e[n]=nil\nend\nend\n_p(2,'</ClCompile>')end\n_p(1,'</ItemGroup>')end\nend\nfunction e.header(e)io.eol=\"\\r\\n\"_p('<?xml version=\"1.0\" encoding=\"utf-8\"?>')local n=\"\"if e then\nn=' DefaultTargets=\"'..e..'\"'end\n_p('<Project%s ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">',n)end\nfunction premake.vs2010_vcxproj(n)io.indent=\" \"e.header(\"Build\")p(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.s"
+ "rc_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>')a(n)_p(1,'<PropertyGroup Label=\"UserMacros\" />')e.outputProperties(n)l(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,s.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</DebuggerFl"
+ "avor>')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",
/* 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"
@@ -253,6 +253,10 @@ const char* builtin_scripts[] = {
"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"
"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\""
+ ",toolsVersion=\"14.0\",}}",
+
/* actions/xcode/_xcode.lua */
"premake.xcode={}newaction{trigger=\"xcode3\",shortname=\"Xcode 3\",description=\"Generate Apple Xcode 3 project files (experimental)\",os=\"macosx\",valid_kinds={\"ConsoleApp\",\"WindowedApp\",\"SharedLib\",\"StaticLib\"},valid_languages={\"C\",\"C++\"},valid_tools={cc={\"gcc\"},},valid_platforms={Native=\"Native\",x32=\"Native 32-bit\",x64=\"Native 64-bit\",Universal32=\"32-bit Universal\",Universal64=\"64-bit Universal\",Universal=\"Universal\",},default_platform=\"Universal\",onsolution=function(e)premake.xcode.preparesolution(e)end,onproject=function(e)premake.generate(e,\"%%.xcodeproj/project.pbxproj\",premake.xcode.project)end,oncleanproject=function(e)premake.clean.directory(e,\"%%.xcodeproj\")end,oncheckproject=function(n)local e\nfor o in premake.eachconfig(n)do\nif e and e~=o.kind then\nerror(\"Project '\"..n.name..\"' uses more than one target kind; not supported by Xcode\",0)end\ne=o.kind\nend\nend,}newaction{trigger=\"xcode4\",shortname=\"Xcode 4\",description=\"Generate Apple Xcode 4 project file"
"s (experimental)\",os=\"macosx\",valid_kinds={\"ConsoleApp\",\"WindowedApp\",\"SharedLib\",\"StaticLib\"},valid_languages={\"C\",\"C++\"},valid_tools={cc={\"gcc\"},},valid_platforms={Native=\"Native\",x32=\"Native 32-bit\",x64=\"Native 64-bit\",Universal32=\"32-bit Universal\",Universal64=\"64-bit Universal\",Universal=\"Universal\",},default_platform=\"Universal\",onsolution=function(e)premake.generate(e,\"%%.xcworkspace/contents.xcworkspacedata\",premake.xcode4.workspace_generate)end,onproject=function(e)premake.generate(e,\"%%.xcodeproj/project.pbxproj\",premake.xcode.project)end,oncleanproject=function(e)premake.clean.directory(e,\"%%.xcodeproj\")premake.clean.directory(e,\"%%.xcworkspace\")end,oncheckproject=function(o)local e\nfor n in premake.eachconfig(o)do\nif e and e~=n.kind then\nerror(\"Project '\"..o.name..\"' uses more than one target kind; not supported by Xcode\",0)end\ne=n.kind\nend\nend,}",
@@ -290,8 +294,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 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",
+ "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",
0
};