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

scripts.c « host « src - github.com/windirstat/premake-4.x-stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b5fba27f1dae2a929ef6924e01b3976d34e08aea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
/* Premake's Lua scripts, as static data buffers for release mode builds */
/* DO NOT EDIT - this file is autogenerated - see BUILD.txt */
/* To regenerate this file, run: premake4 embed */ 

const char* builtin_scripts[] = {
	/* base/os.lua */
	"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.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,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"
	"s(arg)do\nif type(e)==\"table\"then\nfor e,t in pairs(e)do\nn[e]=t\nend\nelse\nerror(\"invalid value\")end\nend\nreturn n\nend\nfunction table.translate(e,n)local i={}for e,t in ipairs(e)do\nlocal e\nif type(n)==\"function\"then\ne=n(t)else\ne=n[t]end\nif(e)then\ntable.insert(i,e)end\nend\nreturn i\nend",

	/* base/io.lua */
	"function io.capture()io.captured=''end\nfunction io.endcapture()local e=io.captured\nio.captured=nil\nreturn e\nend\nlocal i=io.open\nfunction io.open(n,e)if(e)then\nif(e:find(\"w\"))then\nlocal e=path.getdirectory(n)ok,err=os.mkdir(e)if(not ok)then\nerror(err,0)end\nend\nend\nreturn i(n,e)end\nfunction io.printf(e,...)if not io.eol then\nio.eol=\"\\n\"end\nif not io.indent then\nio.indent=\"\\t\"end\nif type(e)==\"number\"then\ns=string.rep(io.indent,e)..string.format(unpack(arg))else\ns=string.format(e,unpack(arg))end\nif io.captured then\nio.captured=io.captured..s..io.eol\nelse\nio.write(s)io.write(io.eol)end\nend\n_p=io.printf",

	/* base/globals.lua */
	"premake={}premake.platforms={Native={cfgsuffix=\"\",},x32={cfgsuffix=\"32\",},x64={cfgsuffix=\"64\",},Universal={cfgsuffix=\"univ\",},Universal32={cfgsuffix=\"univ32\",},Universal64={cfgsuffix=\"univ64\",},PS3={cfgsuffix=\"ps3\",iscrosscompiler=true,nosharedlibs=true,namestyle=\"PS3\",},WiiDev={cfgsuffix=\"wii\",iscrosscompiler=true,namestyle=\"PS3\",},Xbox360={cfgsuffix=\"xbox360\",iscrosscompiler=true,namestyle=\"windows\",},}local n=dofile\nfunction dofile(e)local f=os.getcwd()local t=_SCRIPT\nif(not os.isfile(e))then\nlocal i=os.pathsearch(e,_OPTIONS[\"scripts\"],os.getenv(\"PREMAKE_PATH\"))if(i)then\ne=i..\"/\"..e\nend\nend\n_SCRIPT=path.getabsolute(e)local e=path.getdirectory(_SCRIPT)os.chdir(e)local o,r,n,i,s,e=n(_SCRIPT)_SCRIPT=t\nos.chdir(f)return o,r,n,i,s,e\nend\nfunction iif(i,e,n)if(i)then\nreturn e\nelse\nreturn n\nend\nend\nfunction include(e)return dofile(e..\"/premake4.lua\")end\nfunction printf(e,...)print(string.format(e,unpack(arg)))end\nlocal n=type\nfunction type(i)local e=getmetatable(i)"
	"if(e)then\nif(e.__type)then\nreturn e.__type\nend\nend\nreturn n(i)end",

	/* base/action.lua */
	"premake.action={}premake.action.list={}function premake.action.add(e)local n\nfor i,t in ipairs({\"description\",\"trigger\"})do\nif(not e[t])then\nn=t\nend\nend\nif(n)then\nerror(\"action needs a \"..n,3)end\npremake.action.list[e.trigger]=e\nend\nfunction premake.action.call(e)local e=premake.action.list[e]for n in premake.solution.each()do\nif e.onsolution then\ne.onsolution(n)end\nfor n in premake.solution.eachproject(n)do\nif e.onproject then\ne.onproject(n)end\nend\nend\nif e.execute then\ne.execute()end\nend\nfunction premake.action.current()return premake.action.get(_ACTION)end\nfunction premake.action.get(e)return premake.action.list[e]end\nfunction premake.action.each()local n={}for t,e in pairs(premake.action.list)do\ntable.insert(n,e.trigger)end\ntable.sort(n)local e=0\nreturn function()e=e+1\nreturn premake.action.list[n[e]]end\nend\nfunction premake.action.set(e)_ACTION=e\nlocal e=premake.action.get(e)if e then\n_OS=e.os or _OS\nend\nend\nfunction premake.action.supports(e,n)if not e then\nreturn"
	" false\nend\nif e.valid_languages then\nif table.contains(e.valid_languages,n)then\nreturn true\nend\nend\nif e.valid_kinds then\nif table.contains(e.valid_kinds,n)then\nreturn true\nend\nend\nreturn false\nend",

	/* base/option.lua */
	"premake.option={}premake.option.list={}function premake.option.add(e)local n\nfor t,o in ipairs({\"description\",\"trigger\"})do\nif(not e[o])then\nn=o\nend\nend\nif(n)then\nerror(\"option needs a \"..n,3)end\npremake.option.list[e.trigger]=e\nend\nfunction premake.option.get(e)return premake.option.list[e]end\nfunction premake.option.each()local e={}for o,n in pairs(premake.option.list)do\ntable.insert(e,n.trigger)end\ntable.sort(e)local n=0\nreturn function()n=n+1\nreturn premake.option.list[e[n]]end\nend\nfunction premake.option.validate(e)for n,o in pairs(e)do\nlocal e=premake.option.get(n)if(not e)then\nreturn false,\"invalid option '\"..n..\"'\"end\nif(e.value and o==\"\")then\nreturn false,\"no value specified for option '\"..n..\"'\"end\nif e.allowed then\nlocal t=false\nfor n,e in ipairs(e.allowed)do\nif e[1]==o then\nt=true\nbreak\nend\nend\nif not t then\nreturn false,string.format(\"invalid value '%s' for option '%s'\",o,n)end\nend\nend\nreturn true\nend",

	/* base/tree.lua */
	"premake.tree={}local t=premake.tree\nfunction premake.tree.new(e)local e={name=e,children={}}return e\nend\nfunction premake.tree.add(e,n,a)if n==\".\"then\nreturn e\nend\nlocal d=t.add(e,path.getdirectory(n),a)local r=path.getname(n)if r==\"..\"then\nreturn d\nend\nlocal e=d.children[r]if not e or e.path~=n then\ne=t.insert(d,t.new(r))e.path=n\nif a then\na(e)end\nend\nreturn e\nend\nfunction premake.tree.insert(n,e)table.insert(n.children,e)if e.name then\nn.children[e.name]=e\nend\ne.parent=n\nreturn e\nend\nfunction premake.tree.getlocalpath(e)if e.parent.path then\nreturn e.name\nelseif e.cfg then\nreturn e.cfg.name\nelse\nreturn e.path\nend\nend\nfunction premake.tree.remove(n)local e=n.parent.children\nfor t=1,#e do\nif e[t]==n then\ntable.remove(e,t)end\nend\nn.children={}end\nfunction premake.tree.sort(e)t.traverse(e,{onnode=function(e)table.sort(e.children,function(e,n)return e.name<n.name\nend)end},true)end\nfunction premake.tree.traverse(o,i,h,r)local d,a\nd=function(n,e,t)if n.isremoved then\nretu"
	"rn\nend\nif e.onnode then\ne.onnode(n,t)end\nif#n.children>0 then\nif e.onbranchenter then\ne.onbranchenter(n,t)end\nif e.onbranch then\ne.onbranch(n,t)end\na(n,e,t+1)if e.onbranchexit then\ne.onbranchexit(n,t)end\nelse\nif e.onleaf then\ne.onleaf(n,t)end\nend\nend\na=function(n,a,r)local e=1\nwhile e<=#n.children do\nlocal t=n.children[e]d(t,a,r)if t==n.children[e]then\ne=e+1\nend\nend\nend\nif not r then\nr=0\nend\nif h then\nd(o,i,r)else\na(o,i,r)end\nend",

	/* base/solution.lua */
	"premake.solution={}premake.solution.list={}function premake.solution.new(n)local e={}table.insert(premake.solution.list,e)premake.solution.list[n]=e\nsetmetatable(e,{__type=\"solution\"})e.name=n\ne.basedir=os.getcwd()e.projects={}e.blocks={}e.configurations={}return e\nend\nfunction premake.solution.each()local e=0\nreturn function()e=e+1\nif e<=#premake.solution.list then\nreturn premake.solution.list[e]end\nend\nend\nfunction premake.solution.eachproject(n)local e=0\nreturn function()e=e+1\nif(e<=#n.projects)then\nreturn premake.solution.getproject(n,e)end\nend\nend\nfunction premake.solution.get(e)return premake.solution.list[e]end\nfunction premake.solution.getproject(n,e)local e=n.projects[e]local n=premake.getconfig(e)n.name=e.name\nreturn n\nend",

	/* base/project.lua */
	"premake.project={}function premake.project.buildsourcetree(e)local n=premake.tree.new(e.name)n.project=e\nlocal t\nlocal function a(e)e.isvpath=t\nend\nfor e in premake.project.eachfile(e)do\nt=(e.name~=e.vpath)local n=premake.tree.add(n,e.vpath,a)n.cfg=e\nend\npremake.tree.sort(n)return n\nend\nfunction premake.eachconfig(e,a)if e.project then e=e.project end\nlocal t=e.solution.configurations\nlocal n=0\nreturn function()n=n+1\nif n<=#t then\nreturn premake.getconfig(e,t[n],a)end\nend\nend\nfunction premake.project.eachfile(e)if not e.project then e=premake.getconfig(e)end\nlocal n=0\nlocal t=e.files\nreturn function()n=n+1\nif(n<=#t)then\nlocal n=e.__fileconfigs[t[n]]n.vpath=premake.project.getvpath(e,n.name)return n\nend\nend\nend\nfunction premake.esc(e)if(type(e)==\"table\")then\nlocal n={}for t,e in ipairs(e)do\ntable.insert(n,premake.esc(e))end\nreturn n\nelse\ne=e:gsub('&',\"&amp;\")e=e:gsub('\"',\"&quot;\")e=e:gsub(\"'\",\"&apos;\")e=e:gsub('<',\"&lt;\")e=e:gsub('>',\"&gt;\")e=e:gsub('\\r',\"&#x0D;\""
	")e=e:gsub('\\n',\"&#x0A;\")return e\nend\nend\nfunction premake.filterplatforms(n,t,r)local e={}local a={}if n.platforms then\nfor r,n in ipairs(n.platforms)do\nif t[n]and not table.contains(a,t[n])then\ntable.insert(e,n)table.insert(a,t[n])end\nend\nend\nif#e==0 and r then\ntable.insert(e,r)end\nreturn e\nend\nfunction premake.findproject(n)for e in premake.solution.each()do\nfor e in premake.solution.eachproject(e)do\nif(e.name==n)then\nreturn e\nend\nend\nend\nend\nfunction premake.findfile(e,n)for t,e in ipairs(e.files)do\nif e:endswith(n)then return e end\nend\nend\nfunction premake.getconfig(e,t,n)e=e.project or e\nif n==\"Native\"or not table.contains(e.solution.platforms or{},n)then\nn=nil\nend\nlocal t=(t or\"\")if n then t=t..n end\nreturn e.__configs[t]end\nfunction premake.getconfigname(e,n,t)if e then\nlocal e=e\nif n and n~=\"Native\"then\nif t then\ne=e..premake.platforms[n].cfgsuffix\nelse\ne=e..\"|\"..n\nend\nend\nreturn iif(t,e:lower(),e)end\nend\nfunction premake.getdependencies(e)e=e.projec"
	"t or e\nlocal n={}for t,e in pairs(e.__configs)do\nfor t,e in ipairs(e.links)do\nlocal e=premake.findproject(e)if e and not table.contains(n,e)then\ntable.insert(n,e)end\nend\nend\nreturn n\nend\nfunction premake.project.getbasename(e,n)return n:gsub(\"%%%%\",e)end\nfunction premake.project.getfilename(n,e)local e=premake.project.getbasename(n.name,e)e=path.join(n.location,e)return path.getrelative(os.getcwd(),e)end\nfunction premake.getlinks(n,i,t)local l=iif(t==\"directory\"and i==\"all\",n.libdirs,{})local a=iif(n.name==n.project.name,\"\",n.name)local p=premake.getpathstyle(n)local d=premake.getnamestyle(n)local function c(n,e)if(e.kind~=\"SharedLib\"and e.kind~=\"StaticLib\")then\nreturn false\nend\nif premake.iscppproject(n)then\nreturn premake.iscppproject(e)elseif premake.isdotnetproject(n)then\nreturn premake.isdotnetproject(e)end\nend\nfor e,r in ipairs(n.links)do\nlocal e\nlocal o=premake.findproject(r)if o and i~=\"system\"then\nlocal a=premake.getconfig(o,a,n.platform)if i==\"dependencies\"or c(n,"
	"a)then\nif(t==\"directory\")then\ne=path.rebase(a.linktarget.directory,a.location,n.location)elseif(t==\"basename\")then\ne=a.linktarget.basename\nelseif(t==\"fullpath\")then\ne=path.rebase(a.linktarget.fullpath,a.location,n.location)elseif(t==\"object\")then\ne=a\nend\nend\nelseif not o and(i==\"system\"or i==\"all\")then\nif(t==\"directory\")then\ne=path.getdirectory(r)elseif(t==\"fullpath\")then\ne=r\nif d==\"windows\"then\nif premake.iscppproject(n)then\ne=e..\".lib\"elseif premake.isdotnetproject(n)then\ne=e..\".dll\"end\nend\nelseif t==\"name\"then\ne=path.getname(r)elseif t==\"basename\"then\ne=path.getbasename(r)else\ne=r\nend\nif e:find(\"/\",nil,true)then\ne=path.getrelative(n.project.location,e)end\nend\nif e then\nif p==\"windows\"and t~=\"object\"then\ne=path.translate(e,\"\\\\\")end\nif not table.contains(l,e)then\ntable.insert(l,e)end\nend\nend\nreturn l\nend\nfunction premake.getnamestyle(e)return premake.platforms[e.platform].namestyle or premake.gettool(e).namestyle or\"posix\"end\nfunction p"
	"remake.getpathstyle(e)if premake.action.current().os==\"windows\"then\nreturn\"windows\"else\nreturn\"posix\"end\nend\nfunction premake.gettarget(e,t,f,i,r)if r==\"bsd\"or r==\"solaris\"then\nr=\"linux\"end\nlocal n=e.kind\nif premake.iscppproject(e)then\nif(i==\"windows\"or r==\"windows\")and n==\"SharedLib\"and t==\"link\"and not e.flags.NoImportLib\nthen\nn=\"StaticLib\"end\nif i==\"posix\"and r==\"windows\"and n~=\"StaticLib\"then\ni=\"windows\"end\nend\nlocal o=\"build\"if t==\"link\"and e.kind==\"SharedLib\"then\no=\"implib\"end\nlocal c=e[o..\"name\"]or e.targetname or e.project.name\nlocal d=e[o..\"dir\"]or e.targetdir or path.getrelative(e.location,e.basedir)local a=\"\"local l=\"\"local t=\"\"local p,s\nif i==\"windows\"then\nif n==\"ConsoleApp\"or n==\"WindowedApp\"then\nt=\".exe\"elseif n==\"SharedLib\"then\nt=\".dll\"elseif n==\"StaticLib\"then\nt=\".lib\"end\nelseif i==\"posix\"then\nif n==\"WindowedApp\"and r==\"macosx\"then\ns=c..\".app\"p=path.join(d,s)d=path.join(p,\"Contents/MacOS\")elseif n"
	"==\"SharedLib\"then\na=\"lib\"t=iif(r==\"macosx\",\".dylib\",\".so\")elseif n==\"StaticLib\"then\na=\"lib\"t=\".a\"end\nelseif i==\"PS3\"then\nif n==\"ConsoleApp\"or n==\"WindowedApp\"then\nt=\".elf\"elseif n==\"StaticLib\"then\na=\"lib\"t=\".a\"end\nend\na=e[o..\"prefix\"]or e.targetprefix or a\nl=e[o..\"suffix\"]or e.targetsuffix or l\nt=e[o..\"extension\"]or e.targetextension or t\nlocal e={}e.basename=c..l\ne.name=a..c..l..t\ne.directory=d\ne.prefix=a\ne.suffix=l\ne.fullpath=path.join(e.directory,e.name)e.bundlepath=p or e.fullpath\nif f==\"windows\"then\ne.directory=path.translate(e.directory,\"\\\\\")e.fullpath=path.translate(e.fullpath,\"\\\\\")end\nreturn e\nend\nfunction premake.gettool(e)if premake.iscppproject(e)then\nif _OPTIONS.cc then\nreturn premake[_OPTIONS.cc]end\nlocal e=premake.action.current()if e.valid_tools then\nreturn premake[e.valid_tools.cc[1]]end\nreturn premake.gcc\nelse\nreturn premake.dotnet\nend\nend\nfunction premake.project.getvpath(e,t)local n=t\nlocal i=path.getname(t)local o"
	"=t:len()-i:len()for r,e in pairs(e.vpaths or{})do\nfor a,e in ipairs(e)do\nlocal a=t:find(path.wildcards(e))if a==1 then\na=e:find(\"*\",1,true)or(e:len()+1)local e\nif a<o then\ne=t:sub(a)else\ne=i\nend\nif e:startswith(\"/\")then\ne=e:sub(2)end\nlocal t=\"\"if r:len()>0 then\nt,stars=r:gsub(\"%*\",\"\")if stars==0 then\ne=path.getname(e)end\nelse\ne=path.getname(e)end\nn=path.join(t,e)end\nend\nend\nlocal e\nrepeat\ne=true\nif n:startswith(\"./\")then\nn=n:sub(3)elseif n:startswith(\"../\")then\nn=n:sub(4)else\ne=false\nend\nuntil not e\nreturn n\nend\nfunction premake.hascppproject(e)for e in premake.solution.eachproject(e)do\nif premake.iscppproject(e)then\nreturn true\nend\nend\nend\nfunction premake.hasdotnetproject(e)for e in premake.solution.eachproject(e)do\nif premake.isdotnetproject(e)then\nreturn true\nend\nend\nend\nfunction premake.project.iscproject(e)return e.language==\"C\"end\nfunction premake.iscppproject(e)return(e.language==\"C\"or e.language==\"C++\")end\nfunction premake.isdotnetproject("
	"e)return(e.language==\"C#\")end",

	/* base/config.lua */
	"premake.config={}local i=premake.config\nfunction premake.config.isdebugbuild(e)if e.flags.Optimize or e.flags.OptimizeSize or e.flags.OptimizeSpeed then\nreturn false\nend\nif not e.flags.Symbols then\nreturn false\nend\nreturn true\nend\nfunction premake.config.isincrementallink(e)if e.kind==\"StaticLib\"or i.isoptimizedbuild(e.flags)or e.flags.NoIncrementalLink then\nreturn false\nend\nreturn true\nend\nfunction premake.config.isoptimizedbuild(e)return e.Optimize or e.OptimizeSize or e.OptimizeSpeed\nend",

	/* base/bake.lua */
	"premake.bake={}local p=premake.bake\nlocal l={blocks=true,keywords=true,projects=true,__configs=true,}local e={makesettings=true,}local a={basedir=true,location=true,}function premake.getactiveterms()local e={_action=_ACTION:lower(),os=os.get()}for o,n in pairs(_OPTIONS)do\nif n~=\"\"then\ntable.insert(e,n:lower())else\ntable.insert(e,o:lower())end\nend\nreturn e\nend\nfunction premake.iskeywordmatch(e,n)if e:startswith(\"not \")then\nreturn not premake.iskeywordmatch(e:sub(5),n)end\nfor e,o in ipairs(e:explode(\" or \"))do\nfor n,e in pairs(n)do\nif e:match(o)==e then\nreturn n\nend\nend\nend\nend\nfunction premake.iskeywordsmatch(o,e)local n=false\nfor i,o in ipairs(o)do\nlocal e=premake.iskeywordmatch(o,e)if not e then\nreturn false\nend\nif e==\"required\"then\nn=true\nend\nend\nif e.required and not n then\nreturn false\nelse\nreturn true\nend\nend\nlocal function d(r,i)function adjustpathlist(e)for n,o in ipairs(e)do\ne[n]=path.getrelative(r,o)end\nend\nfor o,n in pairs(i)do\nlocal e=premake.fields[o]if "
	"e and n and not a[o]then\nif e.kind==\"path\"then\ni[o]=path.getrelative(r,n)elseif e.kind==\"dirlist\"or e.kind==\"filelist\"then\nadjustpathlist(n)elseif e.kind==\"keypath\"then\nfor n,e in pairs(n)do\nadjustpathlist(e)end\nend\nend\nend\nend\nlocal function t(o,e,n)local e=e or{}if o==\"keyvalue\"or o==\"keypath\"then\nfor n,o in pairs(n)do\ne[n]=t(\"list\",e[n],o)end\nelse\nfor o,n in ipairs(n)do\nif not e[n]then\ntable.insert(e,n)e[n]=n\nend\nend\nend\nreturn e\nend\nlocal function r(o,e)if not e then\nreturn\nend\nfor e,n in pairs(e)do\nif not l[e]then\nlocal i=premake.fields[e]if i then\nif type(n)==\"table\"then\no[e]=t(i.kind,o[e],n)else\no[e]=n\nend\nelse\no[e]=n\nend\nend\nend\nend\nlocal function l(s,t,l,n,a,o)local i=a or\"\"o=o or\"Native\"if o~=\"Native\"then\ni=i..o\nend\nn.config=(a or\"\"):lower()n.platform=o:lower()local e={}r(e,l[i])d(t.location,e)r(e,t)if(e.kind)then\nn['kind']=e.kind:lower()end\nfor i,o in ipairs(t.blocks)do\nif(premake.iskeywordsmatch(o.keywords,n))then\nr(e,o)if(e.kind "
	"and not e.terms.kind)then\ne.terms['kind']=e.kind:lower()n['kind']=e.kind:lower()end\nend\nend\ne.name=a\ne.platform=o\nfor o,n in pairs(n)do\ne.terms[o]=n\nend\ns[i]=e\nend\nlocal function c(n,e)local o={}e=e or{}local r=n.solution or n\nlocal t=premake.getactiveterms()l(o,n,e,t)for i,a in ipairs(r.configurations)do\nlocal i={}for n,e in pairs(t)do i[n]=e end\nl(o,n,e,i,a,\"Native\")for t,r in ipairs(r.platforms or{})do\nif r~=\"Native\"then\nl(o,n,e,i,a,r)end\nend\nend\nreturn o\nend\nlocal function k()local r=4\nlocal i={}local o={}for e in premake.solution.each()do\nfor n,e in ipairs(e.projects)do\nfor n,e in pairs(e.__configs)do\nlocal n={}n[1]=path.getabsolute(path.join(e.location,e.objdir or e.project.objdir or\"obj\"))n[2]=path.join(n[1],iif(e.platform==\"Native\",\"\",e.platform))n[3]=path.join(n[2],e.name)n[4]=path.join(n[3],e.project.name)i[e]=n\nlocal e=iif(e.name,2,1)for e=e,r do\nlocal e=n[e]o[e]=(o[e]or 0)+1\nend\nend\nend\nend\nfor e in premake.solution.each()do\nfor n,e in ipairs(e.projects)do"
	"\nfor n,e in pairs(e.__configs)do\nlocal n\nlocal t=iif(e.name,2,1)for r=t,r do\nn=i[e][r]if o[n]==1 then break end\nend\ne.objectsdir=path.getrelative(e.location,n)end\nend\nend\nend\nlocal function h()for e in premake.solution.each()do\nfor n,e in ipairs(e.projects)do\nfor n,e in pairs(e.__configs)do\nlocal n=premake.getpathstyle(e)local o=premake.getnamestyle(e)e.buildtarget=premake.gettarget(e,\"build\",n,o,e.system)e.linktarget=premake.gettarget(e,\"link\",n,o,e.system)if n==\"windows\"then\ne.objectsdir=path.translate(e.objectsdir,\"\\\\\")end\nend\nend\nend\nend\nlocal function s(e)if(e.kind)then\nreturn e.kind;end\nif(e.project.__configs[\"\"]and e.project.__configs[\"\"].kind)then\nreturn e.project.__configs[\"\"].kind;end\nreturn nil\nend\nlocal function t(d,r,n,a,i,l)if(not n)then return end\nlocal f={};for o,e in ipairs(n[i])do\nlocal e=e:lower();if((not r[e]))then\nlocal i=nil;local o=nil;for r,n in ipairs(n.project.solution.projects)do\nif(n.name:lower()==e)then\nif(n.usage)then\no=n;else\ni=n;en"
	"d\nend\nend\nif(o)then\nr[e]=true;local n={name=e,proj=i,usageProj=o,bLinkageOnly=l,};d[e]=n;table.insert(f,o);end\nend\nend\nfor n,e in ipairs(f)do\nif((i~=\"links\")or(s(e.__configs[a])==\"StaticLib\"))then\nt(d,r,e.__configs[a],a,i,l);end\nend\nend\nlocal function f(i,o)local e={};local n={};n[i.project.name:lower()]=true;t(e,n,i,o,\"uses\",false);local i={};for r,e in pairs(e)do\nt(i,n,e.usageProj.__configs[o],o,\"links\",true);end\nfor o,n in pairs(i)do\ne[o]=n;end\nreturn e;end\nlocal function l(n,e)local o=n.project.solution;local n=e:lower();for o,e in ipairs(o.projects)do\nif(e.name:lower()==n)then\nreturn true;end\nend\nreturn false;end\nlocal function t(n,o,e)local r=premake.fields[e];local i=e;if type(n[e])==\"table\"then\nif(r.kind==\"dirlist\"or r.kind==\"filelist\")and(not a[e])then\nfor r,e in ipairs(n[e])do\ntable.insert(o[i],path.rebase(e,n.project.location,o.project.location))end\nelse\nif(e==\"links\")then\nfor r,e in ipairs(n[e])do\nif(not l(o,e))then\ntable.insert(o[i],e)else\nprintf(\"Fa"
	"iled to copy '%s' from proj '%s'.\",e,n.project.name);end\nend\nelse\nfor n,e in ipairs(n[e])do\ntable.insert(o[i],e)end\nend\nend\nelse\nif(r.kind==\"path\"and(not a[e]))then\no[i]=path.rebase(n[e],prj.location,o.project.location);else\no[i]=n[e];end\nend\nend\nlocal function l(n,i,e)local o=n.project;local r=(s(n)==\"StaticLib\");for o,e in pairs(e)do\nlocal o=e.usageProj;local i=o.__configs[i];for o,a in pairs(premake.fields)do\nif(i[o])then\nif(a.usagecopy)then\nif(not e.bLinkageOnly)then\nt(i,n,o)end\nelseif(a.linkagecopy)then\nif((not r)and(not e.proj))then\nt(i,n,o)end\nend\nend\nend\nif((not r)and e.proj)then\ntable.insert(n.links,e.proj.name);end\nend\nend\nfunction premake.bake.buildconfigs()for n in premake.solution.each()do\nfor o,e in ipairs(n.projects)do\ne.location=e.location or n.location or e.basedir\nd(e.location,e)for o,n in ipairs(e.blocks)do\nd(e.location,n)end\nend\nn.location=n.location or n.basedir\nend\nfor e in premake.solution.each()do\nlocal n=c(e)for o,e in ipairs(e.projects)do\ne."
	"__configs=c(e,n)for o,n in pairs(e.__configs)do\np.postprocess(e,n)end\nend\nend\nfor e in premake.solution.each()do\nfor n,e in ipairs(e.projects)do\nif(not e.usage)then\nfor n,e in pairs(e.__configs)do\nlocal o=f(e,n);l(e,n,o)end\nend\nend\nend\nfor n in premake.solution.each()do\nlocal e={};for n,o in ipairs(n.projects)do\nif(o.usage)then\ntable.insert(e,1,n);end\nend\nfor o,e in ipairs(e)do\ntable.remove(n.projects,e);end\nend\nk()h(cfg)end\nfunction premake.bake.postprocess(n,e)e.project=n\ne.shortname=premake.getconfigname(e.name,e.platform,true)e.longname=premake.getconfigname(e.name,e.platform)e.location=e.location or e.basedir\nlocal n=premake.platforms[e.platform]if n.iscrosscompiler then\ne.system=e.platform\nelse\ne.system=os.get()end\nif e.kind==\"SharedLib\"and n.nosharedlibs then\ne.kind=\"StaticLib\"end\nlocal o={}for n,i in ipairs(e.files)do\nlocal n=false\nfor o,e in ipairs(e.excludes)do\nn=(i==e)if(n)then break end\nend\nif(not n)then\ntable.insert(o,i)end\nend\ne.files=o\nfor n,o in pairs(p"
	"remake.fields)do\nif o.isflags then\nlocal e=e[n]for o,n in ipairs(e)do e[n]=true end\nend\nend\ne.__fileconfigs={}for n,o in ipairs(e.files)do\ne.terms.required=o:lower()local n={}for i,o in ipairs(e.project.blocks)do\nif(premake.iskeywordsmatch(o.keywords,e.terms))then\nr(n,o)end\nend\nn.name=o\ne.__fileconfigs[o]=n\ntable.insert(e.__fileconfigs,n)end\nend",

	/* base/api.lua */
	"premake.fields={basedir={kind=\"path\",scope=\"container\",},buildaction={kind=\"string\",scope=\"config\",allowed={\"Compile\",\"Copy\",\"Embed\",\"None\"}},buildoptions={kind=\"list\",scope=\"config\",},configurations={kind=\"list\",scope=\"solution\",},debugargs={kind=\"list\",scope=\"config\",},debugdir={kind=\"path\",scope=\"config\",},debugenvs={kind=\"list\",scope=\"config\",},defines={kind=\"list\",scope=\"config\",},deploymentoptions={kind=\"list\",scope=\"config\",usagecopy=true,},excludes={kind=\"filelist\",scope=\"config\",},files={kind=\"filelist\",scope=\"config\",},flags={kind=\"list\",scope=\"config\",isflags=true,usagecopy=true,allowed=function(e)local n={ATL=1,DebugEnvsDontMerge=1,DebugEnvsInherit=1,EnableSSE=1,EnableSSE2=1,ExtraWarnings=1,FatalWarnings=1,FloatFast=1,FloatStrict=1,Managed=1,MFC=1,NativeWChar=1,No64BitChecks=1,NoEditAndContinue=1,NoExceptions=1,NoFramePointer=1,NoImportLib=1,NoIncrementalLink=1,NoManifest=1,NoMinimalRebuild=1,NoNativeWChar=1,NoPCH=1,NoRTTI=1,Optimize=1,Optimiz"
	"eSize=1,OptimizeSpeed=1,SEH=1,StaticATL=1,StaticRuntime=1,Symbols=1,Unicode=1,Unsafe=1,WinMain=1}local t={optimise='optimize',optimisesize='optimizesize',optimisespeed='optimizespeed',}local e=e:lower()e=t[e]or e\nfor n,t in pairs(n)do\nif n:lower()==e then\nreturn n\nend\nend\nreturn nil,\"invalid flag\"end,},framework={kind=\"string\",scope=\"container\",allowed={\"1.0\",\"1.1\",\"2.0\",\"3.0\",\"3.5\",\"4.0\",\"4.5\",}},imagepath={kind=\"path\",scope=\"config\",},imageoptions={kind=\"list\",scope=\"config\",},implibdir={kind=\"path\",scope=\"config\",},implibextension={kind=\"string\",scope=\"config\",},implibname={kind=\"string\",scope=\"config\",},implibprefix={kind=\"string\",scope=\"config\",},implibsuffix={kind=\"string\",scope=\"config\",},includedirs={kind=\"dirlist\",scope=\"config\",usagecopy=true,},kind={kind=\"string\",scope=\"config\",allowed={\"ConsoleApp\",\"WindowedApp\",\"StaticLib\",\"SharedLib\"}},language={kind=\"string\",scope=\"container\",allowed={\"C\",\"C++\",\"C#\"}},libdirs={kind="
	"\"dirlist\",scope=\"config\",linkagecopy=true,},linkoptions={kind=\"list\",scope=\"config\",},links={kind=\"list\",scope=\"config\",allowed=function(e)if e:find('/',nil,true)then\ne=path.getabsolute(e)end\nreturn e\nend,linkagecopy=true,},location={kind=\"path\",scope=\"container\",},makesettings={kind=\"list\",scope=\"config\",},objdir={kind=\"path\",scope=\"config\",},pchheader={kind=\"string\",scope=\"config\",},pchsource={kind=\"path\",scope=\"config\",},platforms={kind=\"list\",scope=\"solution\",allowed=table.keys(premake.platforms),},postbuildcommands={kind=\"list\",scope=\"config\",},prebuildcommands={kind=\"list\",scope=\"config\",},prelinkcommands={kind=\"list\",scope=\"config\",},resdefines={kind=\"list\",scope=\"config\",},resincludedirs={kind=\"dirlist\",scope=\"config\",},resoptions={kind=\"list\",scope=\"config\",},targetdir={kind=\"path\",scope=\"config\",},targetextension={kind=\"string\",scope=\"config\",},targetname={kind=\"string\",scope=\"config\",},targetprefix={kind=\"string\",scope=\"co"
	"nfig\",},targetsuffix={kind=\"string\",scope=\"config\",},trimpaths={kind=\"dirlist\",scope=\"config\",},uuid={kind=\"string\",scope=\"container\",allowed=function(e)local n=true\nif(#e~=36)then n=false end\nfor t=1,36 do\nlocal e=e:sub(t,t)if(not e:find(\"[ABCDEFabcdef0123456789-]\"))then n=false end\nend\nif(e:sub(9,9)~=\"-\")then n=false end\nif(e:sub(14,14)~=\"-\")then n=false end\nif(e:sub(19,19)~=\"-\")then n=false end\nif(e:sub(24,24)~=\"-\")then n=false end\nif(not n)then\nreturn nil,\"invalid UUID\"end\nreturn e:upper()end},uses={kind=\"list\",scope=\"config\",},vpaths={kind=\"keypath\",scope=\"container\",},}function premake.checkvalue(e,n)if(n)then\nif(type(n)==\"function\")then\nreturn n(e)else\nfor t,n in ipairs(n)do\nif(e:lower()==n:lower())then\nreturn n\nend\nend\nreturn nil,\"invalid value '\"..e..\"'\"end\nelse\nreturn e\nend\nend\nfunction premake.getobject(n)local e\nif(n==\"container\"or n==\"solution\")then\ne=premake.CurrentContainer\nelse\ne=premake.CurrentConfiguration\nend\nif n==\"so"
	"lution\"then\nif type(e)==\"project\"then\ne=e.solution\nend\nif type(e)~=\"solution\"then\ne=nil\nend\nend\nlocal t\nif(not e)then\nif(n==\"container\")then\nt=\"no active solution or project\"elseif(n==\"solution\")then\nt=\"no active solution\"else\nt=\"no active solution, project, or configuration\"end\nend\nreturn e,t\nend\nfunction premake.setarray(e,t,a,s)local n,i=premake.getobject(e)if(not n)then\nerror(i,4)end\nif(not n[t])then\nn[t]={}end\nlocal function r(e,o)if(type(e)==\"table\")then\nfor n,e in ipairs(e)do\nr(e,o+1)end\nelse\ne,i=premake.checkvalue(e,s)if(not e)then\nerror(i,o)end\ntable.insert(n[t],e)end\nend\nif(a)then\nr(a,5)end\nreturn n[t]end\nlocal function i(i,r,o,a)local t={}function makeabsolute(e,n)if(type(e)==\"table\")then\nfor t,e in ipairs(e)do\nmakeabsolute(e,n+1)end\nelseif type(e)==\"string\"then\nif e:find(\"*\")then\nmakeabsolute(a(e),n+1)else\ntable.insert(t,path.getabsolute(e))end\nelse\nerror(\"Invalid value in list: expected string, got \"..type(e),n)end\nend\nmakeabsolute"
	"(o,3)return premake.setarray(i,r,t)end\nfunction premake.setdirarray(n,e,t)return i(n,e,t,os.matchdirs)end\nfunction premake.setfilearray(t,e,n)return i(t,e,n,os.matchfiles)end\nfunction premake.setkeyvalue(e,n,t)local e,i=premake.getobject(e)if not e then\nerror(i,4)end\nif not e[n]then\ne[n]={}end\nif type(t)~=\"table\"then\nerror(\"invalid value; table expected\",4)end\nlocal e=e[n]for n,t in pairs(t)do\nif not e[n]then\ne[n]={}end\ntable.insertflat(e[n],t)end\nreturn e\nend\nfunction premake.setstring(n,i,e,r)local n,t=premake.getobject(n)if(not n)then\nerror(t,4)end\nif(e)then\ne,t=premake.checkvalue(e,r)if(not e)then\nerror(t,4)end\nn[i]=e\nend\nreturn n[i]end\nlocal function o(n,e)local t=premake.fields[n].kind\nlocal i=premake.fields[n].scope\nlocal r=premake.fields[n].allowed\nif(t==\"string\"or t==\"path\")and e then\nif type(e)~=\"string\"then\nerror(\"string value expected\",3)end\nend\nif t==\"string\"then\nreturn premake.setstring(i,n,e,r)elseif t==\"path\"then\nif e then e=path.getabsolute(e)end"
	"\nreturn premake.setstring(i,n,e)elseif t==\"list\"then\nreturn premake.setarray(i,n,e,r)elseif t==\"dirlist\"then\nreturn premake.setdirarray(i,n,e)elseif t==\"filelist\"then\nreturn premake.setfilearray(i,n,e)elseif t==\"keyvalue\"or t==\"keypath\"then\nreturn premake.setkeyvalue(i,n,e)end\nend\nfor e,n in pairs(premake.fields)do\n_G[e]=function(n)return o(e,n)end\nend\nfunction configuration(t)if not t then\nreturn premake.CurrentConfiguration\nend\nlocal n,e=premake.getobject(\"container\")if(not n)then\nerror(e,2)end\nlocal e={}e.terms=table.flatten({t})table.insert(n.blocks,e)premake.CurrentConfiguration=e\ne.keywords={}for t,n in ipairs(e.terms)do\ntable.insert(e.keywords,path.wildcards(n):lower())end\nfor t,n in pairs(premake.fields)do\nif(n.kind~=\"string\"and n.kind~=\"path\")then\ne[t]={}end\nend\nreturn e\nend\nlocal function r(t,n,i)local e={}setmetatable(e,{__type=\"project\",})table.insert(n.projects,e)if(i)then\nif(n.projects[t])then\nn.projects[t].usageProj=e;else\nn.projects[t]=e\nend\nelse\n"
	"if(n.projects[t])then\ne.usageProj=n.projects[t];end\nn.projects[t]=e\nend\ne.solution=n\ne.name=t\ne.basedir=os.getcwd()e.uuid=os.uuid()e.blocks={}e.usage=i;return e;end\nfunction usage(n)if(not n)then\nif(type(premake.CurrentContainer)~=\"project\")then return nil end\nif(not premake.CurrentContainer.usage)then return nil end\nreturn premake.CurrentContainer\nend\nlocal e\nif(type(premake.CurrentContainer)==\"project\")then\ne=premake.CurrentContainer.solution\nelse\ne=premake.CurrentContainer\nend\nif(type(e)~=\"solution\")then\nerror(\"no active solution\",2)end\nif((not e.projects[n])or((not e.projects[n].usage)and(not e.projects[n].usageProj)))then\npremake.CurrentContainer=r(n,e,true)else\npremake.CurrentContainer=iff(e.projects[n].usage,e.projects[n],e.projects[n].usageProj)end\nconfiguration{}return premake.CurrentContainer\nend\nfunction project(n)if(not n)then\nif(type(premake.CurrentContainer)~=\"project\")then return nil end\nif(premake.CurrentContainer.usage)then return nil end\nreturn premake.Cu"
	"rrentContainer\nend\nlocal e\nif(type(premake.CurrentContainer)==\"project\")then\ne=premake.CurrentContainer.solution\nelse\ne=premake.CurrentContainer\nend\nif(type(e)~=\"solution\")then\nerror(\"no active solution\",2)end\nif((not e.projects[n])or e.projects[n].usage)then\npremake.CurrentContainer=r(n,e)else\npremake.CurrentContainer=e.projects[n];end\nconfiguration{}return premake.CurrentContainer\nend\nfunction solution(e)if not e then\nif type(premake.CurrentContainer)==\"project\"then\nreturn premake.CurrentContainer.solution\nelse\nreturn premake.CurrentContainer\nend\nend\npremake.CurrentContainer=premake.solution.get(e)if(not premake.CurrentContainer)then\npremake.CurrentContainer=premake.solution.new(e)end\nconfiguration{}return premake.CurrentContainer\nend\nfunction newaction(e)premake.action.add(e)end\nfunction newoption(e)premake.option.add(e)end",

	/* 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\"}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"
	"slate(e.flags,t)return e\nend\nfunction premake.dotnet.getkind(e)if(e.kind==\"ConsoleApp\")then\nreturn\"Exe\"elseif(e.kind==\"WindowedApp\")then\nreturn\"WinExe\"elseif(e.kind==\"SharedLib\")then\nreturn\"Library\"end\nend",

	/* tools/gcc.lua */
	"premake.gcc={}premake.gcc.cc=\"gcc\"premake.gcc.cxx=\"g++\"premake.gcc.ar=\"ar\"local n={EnableSSE=\"-msse\",EnableSSE2=\"-msse2\",ExtraWarnings=\"-Wall -Wextra\",FatalWarnings=\"-Werror\",FloatFast=\"-ffast-math\",FloatStrict=\"-ffloat-store\",NoFramePointer=\"-fomit-frame-pointer\",Optimize=\"-O2\",OptimizeSize=\"-Os\",OptimizeSpeed=\"-O3\",Symbols=\"-g\",}local l={NoExceptions=\"-fno-exceptions\",NoRTTI=\"-fno-rtti\",}premake.gcc.platforms={Native={cppflags=\"-MMD\",},x32={cppflags=\"-MMD\",flags=\"-m32\",ldflags=\"-L/usr/lib32\",},x64={cppflags=\"-MMD\",flags=\"-m64\",ldflags=\"-L/usr/lib64\",},Universal={cppflags=\"\",flags=\"-arch i386 -arch x86_64 -arch ppc -arch ppc64\",},Universal32={cppflags=\"\",flags=\"-arch i386 -arch ppc\",},Universal64={cppflags=\"\",flags=\"-arch x86_64 -arch ppc64\",},PS3={cc=\"ppu-lv2-g++\",cxx=\"ppu-lv2-g++\",ar=\"ppu-lv2-ar\",cppflags=\"-MMD\",},WiiDev={cppflags=\"-MMD -MP -I$(LIBOGC_INC) $(MACHDEP)\",ldflags=\"-L$(LIBOGC_LIB) $(MACHDEP)\",cfgsettings=[[\n  ifeq ($(strip $("
	"DEVKITPPC)),)\n    $(error \"DEVKITPPC environment variable is not set\")'\n  endif\n  include $(DEVKITPPC)/wii_rules']],},}local t=premake.gcc.platforms\nfunction premake.gcc.getcppflags(a)local e={}table.insert(e,t[a.platform].cppflags)if e[1]:startswith(\"-MMD\")and a.system~=\"haiku\"then\ntable.insert(e,\"-MP\")end\nreturn e\nend\nfunction premake.gcc.getcflags(e)local a=table.translate(e.flags,n)table.insert(a,t[e.platform].flags)if e.system~=\"windows\"and e.kind==\"SharedLib\"then\ntable.insert(a,\"-fPIC\")end\nreturn a\nend\nfunction premake.gcc.getcxxflags(e)local e=table.translate(e.flags,l)return e\nend\nfunction premake.gcc.getldflags(e)local a={}if not e.flags.Symbols then\nif e.system==\"macosx\"then\ntable.insert(a,\"-Wl,-x\")else\ntable.insert(a,\"-s\")end\nend\nif e.kind==\"SharedLib\"then\nif e.system==\"macosx\"then\ntable.insert(a,\"-dynamiclib\")else\ntable.insert(a,\"-shared\")end\nif e.system==\"windows\"and not e.flags.NoImportLib then\ntable.insert(a,'-Wl,--out-implib=\"'..e.linktarge"
	"t.fullpath..'\"')end\nend\nif e.kind==\"WindowedApp\"and e.system==\"windows\"then\ntable.insert(a,\"-mwindows\")end\nlocal e=t[e.platform]table.insert(a,e.flags)table.insert(a,e.ldflags)return a\nend\nfunction premake.gcc.getlibdirflags(a)local e={}for t,a in ipairs(premake.getlinks(a,\"all\",\"directory\"))do\ntable.insert(e,'-L'.._MAKE.esc(a))end\nreturn e\nend\nfunction premake.gcc.getlinkflags(a)local e={}for t,a in ipairs(premake.getlinks(a,\"system\",\"name\"))do\nif path.getextension(a)==\".framework\"then\ntable.insert(e,'-framework '.._MAKE.esc(path.getbasename(a)))else\ntable.insert(e,'-l'.._MAKE.esc(a))end\nend\nreturn e\nend\nfunction premake.gcc.getdefines(a)local e={}for t,a in ipairs(a)do\ntable.insert(e,'-D'..a)end\nreturn e\nend\nfunction premake.gcc.getincludedirs(a)local e={}for t,a in ipairs(a)do\ntable.insert(e,\"-I\".._MAKE.esc(a))end\nreturn e\nend\nfunction premake.gcc.getcfgsettings(e)return t[e.platform].cfgsettings\nend",

	/* tools/msc.lua */
	"premake.msc={}premake.msc.namestyle=\"windows\"",

	/* tools/ow.lua */
	"premake.ow={}premake.ow.namestyle=\"windows\"premake.ow.cc=\"WCL386\"premake.ow.cxx=\"WCL386\"premake.ow.ar=\"ar\"local e={ExtraWarnings=\"-wx\",FatalWarning=\"-we\",FloatFast=\"-omn\",FloatStrict=\"-op\",Optimize=\"-ox\",OptimizeSize=\"-os\",OptimizeSpeed=\"-ot\",Symbols=\"-d2\",}local n={NoExceptions=\"-xd\",NoRTTI=\"-xr\",}premake.ow.platforms={Native={flags=\"\"},}function premake.ow.getcppflags(e)return{}end\nfunction premake.ow.getcflags(a)local e=table.translate(a.flags,e)if(a.flags.Symbols)then\ntable.insert(e,\"-hw\")end\nreturn e\nend\nfunction premake.ow.getcxxflags(e)local e=table.translate(e.flags,n)return e\nend\nfunction premake.ow.getldflags(a)local e={}if(a.flags.Symbols)then\ntable.insert(e,\"op symf\")end\nreturn e\nend\nfunction premake.ow.getlinkflags(e)local e={}return e\nend\nfunction premake.ow.getdefines(a)local e={}for n,a in ipairs(a)do\ntable.insert(e,'-D'..a)end\nreturn e\nend\nfunction premake.ow.getincludedirs(a)local e={}for n,a in ipairs(a)do\ntable.insert(e,'-I \"'..a..'\"')en"
	"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"
	"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 */
	"function premake.checkprojects()local n=premake.action.current()for e in premake.solution.each()do\nif(#e.projects==0)then\nreturn nil,\"solution '\"..e.name..\"' needs at least one project\"end\nif(#e.configurations==0)then\nreturn nil,\"solution '\"..e.name..\"' needs configurations\"end\nfor e in premake.solution.eachproject(e)do\nif(not e.language)then\nreturn nil,\"project '\"..e.name..\"' needs a language\"end\nif(n.valid_languages)then\nif(not table.contains(n.valid_languages,e.language))then\nreturn nil,\"the \"..n.shortname..\" action does not support \"..e.language..\" projects\"end\nend\nfor t in premake.eachconfig(e)do\nif(not t.kind)then\nreturn nil,\"project '\"..e.name..\"' needs a kind in configuration '\"..t.name..\"'\"end\nif(n.valid_kinds)then\nif(not table.contains(n.valid_kinds,t.kind))then\nreturn nil,\"the \"..n.shortname..\" action does not support \"..t.kind..\" projects\"end\nend\nend\nif n.oncheckproject then\nn.oncheckproject(e)end\nend\nend\nreturn true\nend\nfunction premake.check"
	"tools()local e=premake.action.current()if(not e.valid_tools)then\nreturn true\nend\nfor n,t in pairs(e.valid_tools)do\nif(_OPTIONS[n])then\nif(not table.contains(t,_OPTIONS[n]))then\nreturn nil,\"the \"..e.shortname..\" action does not support /\"..n..\"=\".._OPTIONS[n]..\" (yet)\"end\nelse\n_OPTIONS[n]=t[1]end\nend\nreturn true\nend",

	/* base/help.lua */
	"function premake.showhelp()printf(\"Premake %s, a build script generator\",_PREMAKE_VERSION)printf(_PREMAKE_COPYRIGHT)printf(\"%s %s\",_VERSION,_COPYRIGHT)printf(\"\")printf(\"Usage: premake4 [options] action [arguments]\")printf(\"\")printf(\"OPTIONS\")printf(\"\")for n in premake.option.each()do\nlocal i=n.trigger\nlocal e=n.description\nif(n.value)then i=i..\"=\"..n.value end\nif(n.allowed)then e=e..\"; one of:\"end\nprintf(\" --%-15s %s\",i,e)if(n.allowed)then\nfor i,n in ipairs(n.allowed)do\nprintf(\"     %-14s %s\",n[1],n[2])end\nend\nprintf(\"\")end\nprintf(\"ACTIONS\")printf(\"\")for n in premake.action.each()do\nprintf(\" %-17s %s\",n.trigger,n.description)end\nprintf(\"\")printf(\"For additional information, see http://industriousone.com/premake\")end",

	/* base/premake.lua */
	"function premake.generate(n,e,t)e=premake.project.getfilename(n,e)printf(\"Generating %s...\",e)local e,o=io.open(e,\"wb\")if(not e)then\nerror(o,0)end\nio.output(e)t(n)e:close()end",

	/* actions/codeblocks/_codeblocks.lua */
	"premake.codeblocks={}newaction{trigger=\"codeblocks\",shortname=\"Code::Blocks\",description=\"Generate Code::Blocks project files\",valid_kinds={\"ConsoleApp\",\"WindowedApp\",\"StaticLib\",\"SharedLib\"},valid_languages={\"C\",\"C++\"},valid_tools={cc={\"gcc\",\"ow\"},},onsolution=function(e)premake.generate(e,\"%%.workspace\",premake.codeblocks.workspace)end,onproject=function(e)premake.generate(e,\"%%.cbp\",premake.codeblocks.cbp)end,oncleansolution=function(e)premake.clean.file(e,\"%%.workspace\")end,oncleanproject=function(e)premake.clean.file(e,\"%%.cbp\")premake.clean.file(e,\"%%.depend\")premake.clean.file(e,\"%%.layout\")end}",

	/* actions/codeblocks/codeblocks_workspace.lua */
	"function premake.codeblocks.workspace(e)_p('<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\" ?>')_p('<CodeBlocks_workspace_file>')_p(1,'<Workspace title=\"%s\">',e.name)for o in premake.solution.eachproject(e)do\nlocal p=path.join(path.getrelative(e.location,o.location),o.name)local a=iif(o.project==e.projects[1],' active=\"1\"','')_p(2,'<Project filename=\"%s.cbp\"%s>',p,a)for a,o in ipairs(premake.getdependencies(o))do\n_p(3,'<Depends filename=\"%s.cbp\" />',path.join(path.getrelative(e.location,o.location),o.name))end\n_p(2,'</Project>')end\n_p(1,'</Workspace>')_p('</CodeBlocks_workspace_file>')end",

	/* actions/codeblocks/codeblocks_cbp.lua */
	"local p=premake.codeblocks\nfunction p.files(e)local o\nif(e.pchheader)then\no=path.getrelative(e.location,e.pchheader)end\nfor i in premake.project.eachfile(e)do\n_p(2,'<Unit filename=\"%s\">',premake.esc(i.name))if i.name~=i.vpath then\n_p(3,'<Option virtualFolder=\"%s\" />',path.getdirectory(i.vpath))end\nif path.isresourcefile(i.name)then\n_p(3,'<Option compilerVar=\"WINDRES\" />')elseif path.iscfile(i.name)and e.language==\"C++\"then\n_p(3,'<Option compilerVar=\"CC\" />')end\nif not e.flags.NoPCH and i.name==o then\n_p(3,'<Option compilerVar=\"%s\" />',iif(e.language==\"C\",\"CC\",\"CPP\"))_p(3,'<Option compile=\"1\" />')_p(3,'<Option weight=\"0\" />')_p(3,'<Add option=\"-x c++-header\" />')end\n_p(2,'</Unit>')end\nend\nfunction premake.codeblocks.debugenvs(i)if premake.gettool(i)==premake.gcc then\n_p(3,'<debugger>')_p(4,'<remote_debugging target=\"%s\">',premake.esc(i.longname))local e=''local n=#i.debugenvs\nfor o,i in ipairs(i.debugenvs)do\ne=e..'set env '..i\nif n~=o then e=e..'&#x0A;'end\nend\n_p(5,"
	"'<options additional_cmds_before=\"%s\" />',e)_p(4,'</remote_debugging>')_p(3,'</debugger>')else\nerror('Sorry at this moment there is no support for debug environment variables with this debugger and codeblocks')end\nend\nfunction premake.codeblocks.cbp(i)local o=premake.gettool(i)_p('<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\" ?>')_p('<CodeBlocks_project_file>')_p(1,'<FileVersion major=\"1\" minor=\"6\" />')_p(1,'<Project>')_p(2,'<Option title=\"%s\" />',premake.esc(i.name))_p(2,'<Option pch_mode=\"2\" />')_p(2,'<Option compiler=\"%s\" />',_OPTIONS.cc)local n=premake.filterplatforms(i.solution,o.platforms,\"Native\")for e=#n,1,-1 do\nif premake.platforms[n[e]].iscrosscompiler then\ntable.remove(n,e)end\nend\n_p(2,'<Build>')for n,e in ipairs(n)do\nfor e in premake.eachconfig(i,e)do\n_p(3,'<Target title=\"%s\">',premake.esc(e.longname))_p(4,'<Option output=\"%s\" prefix_auto=\"0\" extension_auto=\"0\" />',premake.esc(e.buildtarget.fullpath))if e.debugdir then\n_p(4,'<Option working_dir=\"%s\" /"
	">',premake.esc(e.debugdir))end\n_p(4,'<Option object_output=\"%s\" />',premake.esc(e.objectsdir))local i={WindowedApp=0,ConsoleApp=1,StaticLib=2,SharedLib=3}_p(4,'<Option type=\"%d\" />',i[e.kind])_p(4,'<Option compiler=\"%s\" />',_OPTIONS.cc)if(e.kind==\"SharedLib\")then\n_p(4,'<Option createDefFile=\"0\" />')_p(4,'<Option createStaticLib=\"%s\" />',iif(e.flags.NoImportLib,0,1))end\n_p(4,'<Compiler>')for i,e in ipairs(table.join(o.getcflags(e),o.getcxxflags(e),o.getdefines(e.defines),e.buildoptions))do\n_p(5,'<Add option=\"%s\" />',premake.esc(e))end\nif not e.flags.NoPCH and e.pchheader then\n_p(5,'<Add option=\"-Winvalid-pch\" />')_p(5,'<Add option=\"-include &quot;%s&quot;\" />',premake.esc(e.pchheader))end\nfor i,e in ipairs(e.includedirs)do\n_p(5,'<Add directory=\"%s\" />',premake.esc(e))end\n_p(4,'</Compiler>')_p(4,'<Linker>')for i,e in ipairs(table.join(o.getldflags(e),e.linkoptions))do\n_p(5,'<Add option=\"%s\" />',premake.esc(e))end\nfor i,e in ipairs(premake.getlinks(e,\"all\",\"directory\"))do\n_p("
	"5,'<Add directory=\"%s\" />',premake.esc(e))end\nfor i,e in ipairs(premake.getlinks(e,\"all\",\"basename\"))do\n_p(5,'<Add library=\"%s\" />',premake.esc(e))end\n_p(4,'</Linker>')if premake.findfile(e,\".rc\")then\n_p(4,'<ResourceCompiler>')for i,e in ipairs(e.includedirs)do\n_p(5,'<Add directory=\"%s\" />',premake.esc(e))end\nfor i,e in ipairs(e.resincludedirs)do\n_p(5,'<Add directory=\"%s\" />',premake.esc(e))end\n_p(4,'</ResourceCompiler>')end\nif#e.prebuildcommands>0 or#e.postbuildcommands>0 then\n_p(4,'<ExtraCommands>')for i,e in ipairs(e.prebuildcommands)do\n_p(5,'<Add before=\"%s\" />',premake.esc(e))end\nfor i,e in ipairs(e.postbuildcommands)do\n_p(5,'<Add after=\"%s\" />',premake.esc(e))end\n_p(4,'</ExtraCommands>')end\n_p(3,'</Target>')end\nend\n_p(2,'</Build>')p.files(i)_p(2,'<Extensions>')for o,e in ipairs(n)do\nfor e in premake.eachconfig(i,e)do\nif e.debugenvs and#e.debugenvs>0 then\npremake.codeblocks.debugenvs(e)end\nend\nend\n_p(2,'</Extensions>')_p(1,'</Project>')_p('</CodeBlocks_project_file"
	">')_p('')end",

	/* actions/codelite/_codelite.lua */
	"premake.codelite={}newaction{trigger=\"codelite\",shortname=\"CodeLite\",description=\"Generate CodeLite project files\",valid_kinds={\"ConsoleApp\",\"WindowedApp\",\"StaticLib\",\"SharedLib\"},valid_languages={\"C\",\"C++\"},valid_tools={cc={\"gcc\"},},onsolution=function(e)premake.generate(e,\"%%.workspace\",premake.codelite.workspace)end,onproject=function(e)premake.generate(e,\"%%.project\",premake.codelite.project)end,oncleansolution=function(e)premake.clean.file(e,\"%%.workspace\")premake.clean.file(e,\"%%_wsp.mk\")premake.clean.file(e,\"%%.tags\")end,oncleanproject=function(e)premake.clean.file(e,\"%%.project\")premake.clean.file(e,\"%%.mk\")premake.clean.file(e,\"%%.list\")premake.clean.file(e,\"%%.out\")end}",

	/* actions/codelite/codelite_workspace.lua */
	"function premake.codelite.workspace(e)_p('<?xml version=\"1.0\" encoding=\"utf-8\"?>')_p('<CodeLite_Workspace Name=\"%s\" Database=\"./%s.tags\">',premake.esc(e.name),premake.esc(e.name))for o,a in ipairs(e.projects)do\nlocal i=premake.esc(a.name)local a=path.join(path.getrelative(e.location,a.location),a.name)local e=iif(o==1,\"Yes\",\"No\")_p('  <Project Name=\"%s\" Path=\"%s.project\" Active=\"%s\" />',i,a,e)end\nlocal a=premake.filterplatforms(e,premake[_OPTIONS.cc].platforms,\"Native\")for e=#a,1,-1 do\nif premake.platforms[a[e]].iscrosscompiler then\ntable.remove(a,e)end\nend\n_p('  <BuildMatrix>')for a,o in ipairs(a)do\nfor i,a in ipairs(e.configurations)do\nlocal a=premake.getconfigname(a,o):gsub(\"|\",\"_\")_p('    <WorkspaceConfiguration Name=\"%s\" Selected=\"yes\">',a)for o,e in ipairs(e.projects)do\n_p('      <Project Name=\"%s\" ConfigName=\"%s\"/>',e.name,a)end\n_p('    </WorkspaceConfiguration>')end\nend\n_p('  </BuildMatrix>')_p('</CodeLite_Workspace>')end",

	/* actions/codelite/codelite_project.lua */
	"local e=premake.codelite\nlocal i=premake.tree\nfunction e.files(e)local e=premake.project.buildsourcetree(e)i.traverse(e,{onbranchenter=function(i,e)_p(e,'<VirtualDirectory Name=\"%s\">',i.name)end,onbranchexit=function(i,e)_p(e,'</VirtualDirectory>')end,onleaf=function(i,e)_p(e,'<File Name=\"%s\"/>',i.cfg.name)end,},true,1)end\nfunction premake.codelite.project(i)io.indent=\"  \"_p('<?xml version=\"1.0\" encoding=\"utf-8\"?>')_p('<CodeLite_Project Name=\"%s\">',premake.esc(i.name))e.files(i)local n={ConsoleApp=\"Executable\",WindowedApp=\"Executable\",StaticLib=\"Static Library\",SharedLib=\"Dynamic Library\",}_p('  <Settings Type=\"%s\">',n[i.kind])local o=premake.filterplatforms(i.solution,premake[_OPTIONS.cc].platforms,\"Native\")for e=#o,1,-1 do\nif premake.platforms[o[e]].iscrosscompiler then\ntable.remove(o,e)end\nend\nfor o,e in ipairs(o)do\nfor e in premake.eachconfig(i,e)do\nlocal o=premake.esc(e.longname):gsub(\"|\",\"_\")local i=iif(e.language==\"C\",\"gcc\",\"g++\")_p('    <Configuration Name=\"%"
	"s\" CompilerType=\"gnu %s\" DebuggerType=\"GNU gdb debugger\" Type=\"%s\">',o,i,n[e.kind])local r=premake.esc(e.buildtarget.fullpath)local l=premake.esc(e.objectsdir)local n=e.buildtarget.name\nlocal o=e.debugdir or e.buildtarget.directory\nlocal i=table.concat(e.debugargs,\" \")local a=iif(e.kind==\"WindowedApp\",\"no\",\"yes\")_p('      <General OutputFile=\"%s\" IntermediateDirectory=\"%s\" Command=\"./%s\" CommandArguments=\"%s\" WorkingDirectory=\"%s\" PauseExecWhenProcTerminates=\"%s\"/>',r,l,n,i,o,a)local i=premake.esc(table.join(premake.gcc.getcflags(e),premake.gcc.getcxxflags(e),e.buildoptions))_p('      <Compiler Required=\"yes\" Options=\"%s\">',table.concat(i,\";\"))for i,e in ipairs(e.includedirs)do\n_p('        <IncludePath Value=\"%s\"/>',premake.esc(e))end\nfor i,e in ipairs(e.defines)do\n_p('        <Preprocessor Value=\"%s\"/>',premake.esc(e))end\n_p('      </Compiler>')i=premake.esc(table.join(premake.gcc.getldflags(e),e.linkoptions))_p('      <Linker Required=\"yes\" Options=\"%s\">',table."
	"concat(i,\";\"))for i,e in ipairs(premake.getlinks(e,\"all\",\"directory\"))do\n_p('        <LibraryPath Value=\"%s\" />',premake.esc(e))end\nfor i,e in ipairs(premake.getlinks(e,\"siblings\",\"basename\"))do\n_p('        <Library Value=\"%s\" />',premake.esc(e))end\nfor i,e in ipairs(premake.getlinks(e,\"system\",\"name\"))do\n_p('        <Library Value=\"%s\" />',premake.esc(e))end\n_p('      </Linker>')if premake.findfile(e,\".rc\")then\nlocal i=table.implode(table.join(e.defines,e.resdefines),\"-D\",\";\",\"\")local o=table.concat(e.resoptions,\";\")_p('      <ResourceCompiler Required=\"yes\" Options=\"%s%s\">',i,o)for i,e in ipairs(table.join(e.includedirs,e.resincludedirs))do\n_p('        <IncludePath Value=\"%s\"/>',premake.esc(e))end\n_p('      </ResourceCompiler>')else\n_p('      <ResourceCompiler Required=\"no\" Options=\"\"/>')end\nif#e.prebuildcommands>0 then\n_p('      <PreBuild>')for i,e in ipairs(e.prebuildcommands)do\n_p('        <Command Enabled=\"yes\">%s</Command>',premake.esc(e))end\n_p(' "
	"     </PreBuild>')end\nif#e.postbuildcommands>0 then\n_p('      <PostBuild>')for i,e in ipairs(e.postbuildcommands)do\n_p('        <Command Enabled=\"yes\">%s</Command>',premake.esc(e))end\n_p('      </PostBuild>')end\n_p('      <CustomBuild Enabled=\"no\">')_p('        <CleanCommand></CleanCommand>')_p('        <BuildCommand></BuildCommand>')_p('        <SingleFileCommand></SingleFileCommand>')_p('        <MakefileGenerationCommand></MakefileGenerationCommand>')_p('        <ThirdPartyToolName>None</ThirdPartyToolName>')_p('        <WorkingDirectory></WorkingDirectory>')_p('      </CustomBuild>')_p('      <AdditionalRules>')_p('        <CustomPostBuild></CustomPostBuild>')_p('        <CustomPreBuild></CustomPreBuild>')_p('      </AdditionalRules>')_p('    </Configuration>')end\nend\n_p('  </Settings>')for o,e in ipairs(o)do\nfor e in premake.eachconfig(i,e)do\n_p('  <Dependencies name=\"%s\">',e.longname:gsub(\"|\",\"_\"))for i,e in ipairs(premake.getdependencies(i))do\n_p('    <Project Name=\"%s\"/>',e.name)e"
	"nd\n_p('  </Dependencies>')end\nend\n_p('</CodeLite_Project>')end",

	/* actions/make/_make.lua */
	"_MAKE={}premake.make={}local t=premake.make\nfunction _MAKE.esc(n)local e\nif(type(n)==\"table\")then\ne={}for t,n in ipairs(n)do\ntable.insert(e,_MAKE.esc(n))end\nreturn e\nelse\ne=n:gsub(\"\\\\\",\"\\\\\\\\\")e=e:gsub(\" \",\"\\\\ \")e=e:gsub(\"%(\",\"\\\\%(\")e=e:gsub(\"%)\",\"\\\\%)\")e=e:gsub(\"$\\\\%((.-)\\\\%)\",\"$%(%1%)\")return e\nend\nend\nfunction premake.make_copyrule(n,e)_p('%s: %s',e,n)_p('\\t@echo Copying $(notdir %s)',e)_p('ifeq (posix,$(SHELLTYPE))')_p('\\t$(SILENT) cp -fR %s %s',n,e)_p('else')_p('\\t$(SILENT) copy /Y $(subst /,\\\\\\\\,%s) $(subst /,\\\\\\\\,%s)',n,e)_p('endif')end\nfunction premake.make_mkdirrule(e)_p('\\t@echo Creating %s',e)_p('ifeq (posix,$(SHELLTYPE))')_p('\\t$(SILENT) mkdir -p %s',e)_p('else')_p('\\t$(SILENT) mkdir $(subst /,\\\\\\\\,%s)',e)_p('endif')_p('')end\nfunction t.list(e)if#e>0 then\nreturn\" \"..table.concat(e,\" \")else\nreturn\"\"end\nend\nfunction _MAKE.getmakefilename(n,a)local e=0\nfor t in premake.solution.each()do\nif(t.location==n.location)then e=e+1 "
	"end\nif(a)then\nfor a,t in ipairs(t.projects)do\nif(t.location==n.location)then e=e+1 end\nend\nend\nend\nif(e==1)then\nreturn\"Makefile\"else\nreturn n.name..\".make\"end\nend\nfunction _MAKE.getnames(e)local e=table.extract(e,\"name\")for t,n in pairs(e)do\ne[t]=_MAKE.esc(n)end\nreturn e\nend\nfunction t.settings(e,n)if#e.makesettings>0 then\nfor n,e in ipairs(e.makesettings)do\n_p(e)end\nend\nlocal e=n.platforms[e.platform].cfgsettings\nif e then\n_p(e)end\nend\nnewaction{trigger=\"gmake\",shortname=\"GNU Make\",description=\"Generate GNU makefiles for POSIX, MinGW, and Cygwin\",valid_kinds={\"ConsoleApp\",\"WindowedApp\",\"StaticLib\",\"SharedLib\"},valid_languages={\"C\",\"C++\",\"C#\"},valid_tools={cc={\"gcc\"},dotnet={\"mono\",\"msnet\",\"pnet\"},},onsolution=function(e)premake.generate(e,_MAKE.getmakefilename(e,false),premake.make_solution)end,onproject=function(e)local n=_MAKE.getmakefilename(e,true)if premake.isdotnetproject(e)then\npremake.generate(e,n,premake.make_csharp)else\npremake.generate(e,n,"
	"premake.make_cpp)end\nend,oncleansolution=function(e)premake.clean.file(e,_MAKE.getmakefilename(e,false))end,oncleanproject=function(e)premake.clean.file(e,_MAKE.getmakefilename(e,true))end}",

	/* actions/make/make_solution.lua */
	"function premake.make_solution(e)local o=premake[_OPTIONS.cc]local a=premake.filterplatforms(e,o.platforms,\"Native\")_p('# %s solution makefile autogenerated by Premake',premake.action.current().shortname)_p('# Type \"make help\" for usage help')_p('')_p('ifndef config')_p('  config=%s',_MAKE.esc(premake.getconfigname(e.configurations[1],a[1],true)))_p('endif')_p('export config')_p('')_p('PROJECTS := %s',table.concat(_MAKE.esc(table.extract(e.projects,\"name\")),\" \"))_p('')_p('.PHONY: all clean help $(PROJECTS)')_p('')_p('all: $(PROJECTS)')_p('')for a,o in ipairs(e.projects)do\n_p('%s: %s',_MAKE.esc(o.name),table.concat(_MAKE.esc(table.extract(premake.getdependencies(o),\"name\")),\" \"))_p('\\t@echo \"==== Building %s ($(config)) ====\"',o.name)_p('\\t@${MAKE} --no-print-directory -C %s -f %s',_MAKE.esc(path.getrelative(e.location,o.location)),_MAKE.esc(_MAKE.getmakefilename(o,true)))_p('')end\n_p('clean:')for a,o in ipairs(e.projects)do\n_p('\\t@${MAKE} --no-print-directory -C %s -f %s clean',_MAKE.esc(pa"
	"th.getrelative(e.location,o.location)),_MAKE.esc(_MAKE.getmakefilename(o,true)))end\n_p('')_p('help:')_p(1,'@echo \"Usage: make [config=name] [target]\"')_p(1,'@echo \"\"')_p(1,'@echo \"CONFIGURATIONS:\"')local o={}for a,o in ipairs(a)do\nfor a,e in ipairs(e.configurations)do\n_p(1,'@echo \"   %s\"',premake.getconfigname(e,o,true))end\nend\n_p(1,'@echo \"\"')_p(1,'@echo \"TARGETS:\"')_p(1,'@echo \"   all (default)\"')_p(1,'@echo \"   clean\"')for o,e in ipairs(e.projects)do\n_p(1,'@echo \"   %s\"',e.name)end\n_p(1,'@echo \"\"')_p(1,'@echo \"For more information, see http://industriousone.com/premake/quick-start\"')end",

	/* actions/make/make_cpp.lua */
	"premake.make.cpp={}local p=premake.make.cpp\nlocal i=premake.make\nfunction premake.make_cpp(e)local i=premake.gettool(e)local n=premake.filterplatforms(e.solution,i.platforms,\"Native\")premake.gmake_cpp_header(e,i,n)for n,p in ipairs(n)do\nfor e in premake.eachconfig(e,p)do\npremake.gmake_cpp_config(e,i)end\nend\n_p('OBJECTS := \\\\')for p,e in ipairs(e.files)do\nif path.iscppfile(e)then\n_p('\\t$(OBJDIR)/%s.o \\\\',_MAKE.esc(path.getbasename(e)))end\nend\n_p('')_p('RESOURCES := \\\\')for p,e in ipairs(e.files)do\nif path.isresourcefile(e)then\n_p('\\t$(OBJDIR)/%s.res \\\\',_MAKE.esc(path.getbasename(e)))end\nend\n_p('')_p('SHELLTYPE := msdos')_p('ifeq (,$(ComSpec)$(COMSPEC))')_p('  SHELLTYPE := posix')_p('endif')_p('ifeq (/bin,$(findstring /bin,$(SHELL)))')_p('  SHELLTYPE := posix')_p('endif')_p('')_p('.PHONY: clean prebuild prelink')_p('')if os.is(\"MacOSX\")and e.kind==\"WindowedApp\"then\n_p('all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET) $(dir $(TARGETDIR))PkgInfo $(dir $(TARGETDIR))Info.plist')"
	"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)%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"
	"\nlocal t=table.translate(e.libdirs,function(n)return path.join(e.basedir,n)end)t=table.join({e.basedir},t)for p,i in ipairs(premake.getlinks(e,\"system\",\"fullpath\"))do\nlocal p=os.pathsearch(i..\".dll\",unpack(t))if(p)then\nlocal t=\"$(TARGETDIR)/\".._MAKE.esc(path.getname(i))local e=path.getrelative(e.basedir,path.join(p,i))..\".dll\"n[t]=_MAKE.esc(e)end\nend\n_p('# %s project makefile autogenerated by Premake',premake.action.current().shortname)_p('')_p('ifndef config')_p('  config=%s',_MAKE.esc(e.configurations[1]:lower()))_p('endif')_p('')_p('ifndef verbose')_p('  SILENT = @')_p('endif')_p('')_p('ifndef CSC')_p('  CSC=%s',p.getcompilervar(e))_p('endif')_p('')_p('ifndef RESGEN')_p('  RESGEN=resgen')_p('endif')_p('')local t=premake.filterplatforms(e.solution,premake[_OPTIONS.cc].platforms)table.insert(t,1,\"\")for e in premake.eachconfig(e)do\npremake.gmake_cs_config(e,p,s)end\n_p('# To maintain compatibility with VS.NET, these values must be set at the project level')_p('TARGET     := $(TARGETDIR)/%s',_"
	"MAKE.esc(e.buildtarget.name))_p('FLAGS      += /t:%s %s',p.getkind(e):lower(),table.implode(_MAKE.esc(e.libdirs),\"/lib:\",\"\",\" \"))_p('REFERENCES += %s',table.implode(_MAKE.esc(premake.getlinks(e,\"system\",\"basename\")),\"/r:\",\".dll\",\" \"))_p('')_p('SOURCES := \\\\')for n,e in ipairs(r)do\n_p('\\t%s \\\\',_MAKE.esc(path.translate(e)))end\n_p('')_p('EMBEDFILES := \\\\')for i,n in ipairs(a)do\n_p('\\t%s \\\\',o(e,n))end\n_p('')_p('COPYFILES += \\\\')for e,n in pairs(i[l])do\n_p('\\t%s \\\\',e)end\nfor e,n in pairs(n)do\n_p('\\t%s \\\\',e)end\n_p('')_p('SHELLTYPE := msdos')_p('ifeq (,$(ComSpec)$(COMSPEC))')_p('  SHELLTYPE := posix')_p('endif')_p('ifeq (/bin,$(findstring /bin,$(SHELL)))')_p('  SHELLTYPE := posix')_p('endif')_p('')_p('.PHONY: clean prebuild prelink')_p('')_p('all: $(TARGETDIR) $(OBJDIR) prebuild $(EMBEDFILES) $(COPYFILES) prelink $(TARGET)')_p('')_p('$(TARGET): $(SOURCES) $(EMBEDFILES) $(DEPENDS)')_p('\\t$(SILENT) $(CSC) /nologo /out:$@ $(FLAGS) $(REFERENCES) $(SOURCES) $(patsubst %%,/res"
	"ource:%%,$(EMBEDFILES))')_p('\\t$(POSTBUILDCMDS)')_p('')_p('$(TARGETDIR):')premake.make_mkdirrule(\"$(TARGETDIR)\")_p('$(OBJDIR):')premake.make_mkdirrule(\"$(OBJDIR)\")_p('clean:')_p('\\t@echo Cleaning %s',e.name)_p('ifeq (posix,$(SHELLTYPE))')_p('\\t$(SILENT) rm -f $(TARGETDIR)/%s.* $(COPYFILES)',e.buildtarget.basename)_p('\\t$(SILENT) rm -rf $(OBJDIR)')_p('else')_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,$(TARGETDIR)/%s.*) del $(subst /,\\\\\\\\,$(TARGETDIR)/%s.*)',e.buildtarget.basename,e.buildtarget.basename)for e,n in pairs(i[l])do\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,%s) del $(subst /,\\\\\\\\,%s)',e,e)end\nfor e,n in pairs(n)do\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,%s) del $(subst /,\\\\\\\\,%s)',e,e)end\n_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('# Per-configuration copied file rules')for e in premake.eachconfig(e)do\n_p("
	"'ifneq (,$(findstring %s,$(config)))',_MAKE.esc(e.name:lower()))for e,n in pairs(i[e])do\npremake.make_copyrule(n,e)end\n_p('endif')_p('')end\n_p('# Copied file rules')for e,n in pairs(n)do\npremake.make_copyrule(n,e)end\n_p('# Embedded file rules')for i,n in ipairs(a)do\nif path.getextension(n)==\".resx\"then\n_p('%s: %s',o(e,n),_MAKE.esc(n))_p('\\t$(SILENT) $(RESGEN) $^ $@')end\n_p('')end\nend\nfunction premake.gmake_cs_config(e,i,n)_p('ifneq (,$(findstring %s,$(config)))',_MAKE.esc(e.name:lower()))_p('  TARGETDIR  := %s',_MAKE.esc(e.buildtarget.directory))_p('  OBJDIR     := %s',_MAKE.esc(e.objectsdir))_p('  DEPENDS    := %s',table.concat(_MAKE.esc(premake.getlinks(e,\"dependencies\",\"fullpath\")),\" \"))_p('  REFERENCES := %s',table.implode(_MAKE.esc(n[e]),\"/r:\",\"\",\" \"))_p('  FLAGS      += %s %s',table.implode(e.defines,\"/d:\",\"\",\" \"),table.concat(table.join(i.getflags(e),e.buildoptions),\" \"))_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')_p('endif')_p('')end",

	/* actions/vstudio/_vstudio.lua */
	"premake.vstudio={}local e=premake.vstudio\ne.platforms={any=\"Any CPU\",mixed=\"Mixed Platforms\",Native=\"Win32\",x86=\"x86\",x32=\"Win32\",x64=\"x64\",PS3=\"PS3\",Xbox360=\"Xbox 360\",}function e.arch(e)if(e.language==\"C#\")then\nif(_ACTION<\"vs2005\")then\nreturn\".NET\"else\nreturn\"Any CPU\"end\nelse\nreturn\"Win32\"end\nend\nfunction e.buildconfigs(r)local s={}local n=premake.filterplatforms(r,e.platforms,\"Native\")local o=premake.hascppproject(r)local a=premake.hasdotnetproject(r)if a and(_ACTION>\"vs2008\"or o)then\ntable.insert(n,1,\"mixed\")end\nif a and(_ACTION<\"vs2010\"or not o)then\ntable.insert(n,1,\"any\")end\nif _ACTION>\"vs2008\"then\nlocal r={}for s,t in ipairs(n)do\nif e.platforms[t]==\"Win32\"then\nif o then\ntable.insert(r,t)end\nif a then\ntable.insert(r,\"x86\")end\nelse\ntable.insert(r,t)end\nend\nn=r\nend\nfor r,o in ipairs(r.configurations)do\nfor n,r in ipairs(n)do\nlocal n={}n.src_buildcfg=o\nn.src_platform=r\nif r~=\"PS3\"or _ACTION>\"vs2008\"then\nn.buildcfg=o\nn.platform=e.pla"
	"tforms[r]else\nn.buildcfg=r..\" \"..o\nn.platform=\"Win32\"end\nn.name=n.buildcfg..\"|\"..n.platform\nn.isreal=(r~=\"any\"and r~=\"mixed\")table.insert(s,n)end\nend\nreturn s\nend\nfunction e.cleansolution(e)premake.clean.file(e,\"%%.sln\")premake.clean.file(e,\"%%.suo\")premake.clean.file(e,\"%%.ncb\")premake.clean.file(e,\"%%.userprefs\")premake.clean.file(e,\"%%.usertasks\")end\nfunction e.cleanproject(e)local e=premake.project.getfilename(e,\"%%\")os.remove(e..\".vcproj\")os.remove(e..\".vcxproj\")os.remove(e..\".vcxproj.filters\")os.remove(e..\".csproj\")os.remove(e..\".pidb\")os.remove(e..\".sdf\")if _OPTIONS.generate_user then\nos.remove(e..\".vcproj.user\")os.remove(e..\".vcxproj.user\")os.remove(e..\".csproj.user\")end\nend\nfunction e.cleantarget(e)os.remove(e..\".pdb\")os.remove(e..\".idb\")os.remove(e..\".ilk\")os.remove(e..\".vshost.exe\")os.remove(e..\".exe.manifest\")end\nfunction e.projectfile(n)local e\nif n.language==\"C#\"then\ne=\"%%.csproj\"else\ne=iif(_ACTION>\"vs2008\",\"%%.vcxproj\",\"%"
	"%.vcproj\")end\nlocal e=premake.project.getbasename(n.name,e)e=path.join(n.location,e)return e\nend\nfunction e.tool(e)if(e.language==\"C#\")then\nreturn\"FAE04EC0-301F-11D3-BF4B-00C04F79EFBC\"else\nreturn\"8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942\"end\nend\nnewaction{trigger=\"vs2002\",shortname=\"Visual Studio 2002\",description=\"Generate Microsoft Visual Studio 2002 project files\",os=\"windows\",valid_kinds={\"ConsoleApp\",\"WindowedApp\",\"StaticLib\",\"SharedLib\"},valid_languages={\"C\",\"C++\",\"C#\"},valid_tools={cc={\"msc\"},dotnet={\"msnet\"},},onsolution=function(n)premake.generate(n,\"%%.sln\",e.sln2002.generate)end,onproject=function(n)if premake.isdotnetproject(n)then\npremake.generate(n,\"%%.csproj\",e.cs2002.generate)if _OPTIONS.generate_user then\npremake.generate(n,\"%%.csproj.user\",e.cs2002.generate_user)end\nelse\npremake.generate(n,\"%%.vcproj\",e.vc200x.generate)if _OPTIONS.generate_user then\npremake.generate(n,\"%%.vcproj.user\",e.vc200x.generate_user)end\nend\nend,oncleansolution=premak"
	"e.vstudio.cleansolution,oncleanproject=premake.vstudio.cleanproject,oncleantarget=premake.vstudio.cleantarget,vstudio={}}newaction{trigger=\"vs2003\",shortname=\"Visual Studio 2003\",description=\"Generate Microsoft Visual Studio 2003 project files\",os=\"windows\",valid_kinds={\"ConsoleApp\",\"WindowedApp\",\"StaticLib\",\"SharedLib\"},valid_languages={\"C\",\"C++\",\"C#\"},valid_tools={cc={\"msc\"},dotnet={\"msnet\"},},onsolution=function(n)premake.generate(n,\"%%.sln\",e.sln2003.generate)end,onproject=function(n)if premake.isdotnetproject(n)then\npremake.generate(n,\"%%.csproj\",e.cs2002.generate)if _OPTIONS.generate_user then\npremake.generate(n,\"%%.csproj.user\",e.cs2002.generate_user)end\nelse\npremake.generate(n,\"%%.vcproj\",e.vc200x.generate)if _OPTIONS.generate_user then\npremake.generate(n,\"%%.vcproj.user\",e.vc200x.generate_user)end\nend\nend,oncleansolution=premake.vstudio.cleansolution,oncleanproject=premake.vstudio.cleanproject,oncleantarget=premake.vstudio.cleantarget,vstudio={}}newaction{tri"
	"gger=\"vs2005\",shortname=\"Visual Studio 2005\",description=\"Generate Microsoft Visual Studio 2005 project files\",os=\"windows\",valid_kinds={\"ConsoleApp\",\"WindowedApp\",\"StaticLib\",\"SharedLib\"},valid_languages={\"C\",\"C++\",\"C#\"},valid_tools={cc={\"msc\"},dotnet={\"msnet\"},},onsolution=function(n)premake.generate(n,\"%%.sln\",e.sln2005.generate)end,onproject=function(n)if premake.isdotnetproject(n)then\npremake.generate(n,\"%%.csproj\",e.cs2005.generate)if _OPTIONS.generate_user then\npremake.generate(n,\"%%.csproj.user\",e.cs2005.generate_user)end\nelse\npremake.generate(n,\"%%.vcproj\",e.vc200x.generate)if _OPTIONS.generate_user then\npremake.generate(n,\"%%.vcproj.user\",e.vc200x.generate_user)end\nend\nend,oncleansolution=e.cleansolution,oncleanproject=e.cleanproject,oncleantarget=e.cleantarget,vstudio={productVersion=\"8.0.50727\",solutionVersion=\"9\",}}newaction{trigger=\"vs2008\",shortname=\"Visual Studio 2008\",description=\"Generate Microsoft Visual Studio 2008 project files\",os=\"win"
	"dows\",valid_kinds={\"ConsoleApp\",\"WindowedApp\",\"StaticLib\",\"SharedLib\"},valid_languages={\"C\",\"C++\",\"C#\"},valid_tools={cc={\"msc\"},dotnet={\"msnet\"},},onsolution=function(n)premake.generate(n,\"%%.sln\",e.sln2005.generate)end,onproject=function(n)if premake.isdotnetproject(n)then\npremake.generate(n,\"%%.csproj\",e.cs2005.generate)if _OPTIONS.generate_user then\npremake.generate(n,\"%%.csproj.user\",e.cs2005.generate_user)end\nelse\npremake.generate(n,\"%%.vcproj\",e.vc200x.generate)if _OPTIONS.generate_user then\npremake.generate(n,\"%%.vcproj.user\",e.vc200x.generate_user)end\nend\nend,oncleansolution=e.cleansolution,oncleanproject=e.cleanproject,oncleantarget=e.cleantarget,vstudio={productVersion=\"9.0.21022\",solutionVersion=\"10\",toolsVersion=\"3.5\",}}newaction{trigger=\"vs2010\",shortname=\"Visual Studio 2010\",description=\"Generate Microsoft Visual Studio 2010 project files\",os=\"windows\",valid_kinds={\"ConsoleApp\",\"WindowedApp\",\"StaticLib\",\"SharedLib\"},valid_languages={\"C\","
	"\"C++\",\"C#\"},valid_tools={cc={\"msc\"},dotnet={\"msnet\"},},onsolution=function(n)premake.generate(n,\"%%.sln\",e.sln2005.generate)end,onproject=function(n)if premake.isdotnetproject(n)then\npremake.generate(n,\"%%.csproj\",e.cs2005.generate)if _OPTIONS.generate_user then\npremake.generate(n,\"%%.csproj.user\",e.cs2005.generate_user)end\nelse\npremake.generate(n,\"%%.vcxproj\",premake.vs2010_vcxproj)if _OPTIONS.generate_user then\npremake.generate(n,\"%%.vcxproj.user\",premake.vs2010_vcxproj_user)end\npremake.generate(n,\"%%.vcxproj.filters\",e.vc2010.generate_filters)end\nend,oncleansolution=premake.vstudio.cleansolution,oncleanproject=premake.vstudio.cleanproject,oncleantarget=premake.vstudio.cleantarget,vstudio={productVersion=\"8.0.30703\",solutionVersion=\"11\",targetFramework=\"4.0\",toolsVersion=\"4.0\",}}",

	/* actions/vstudio/vs2002_solution.lua */
	"premake.vstudio.sln2002={}local i=premake.vstudio\nlocal o=premake.vstudio.sln2002\nfunction o.generate(o)io.indent=nil\nio.eol='\\r\\n'o.vstudio_configs=premake.vstudio.buildconfigs(o)_p('Microsoft Visual Studio Solution File, Format Version 7.00')for n in premake.solution.eachproject(o)do\nlocal o=path.translate(path.getrelative(o.location,i.projectfile(n)))_p('Project(\"{%s}\") = \"%s\", \"%s\", \"{%s}\"',i.tool(n),n.name,o,n.uuid)_p('EndProject')end\n_p('Global')_p(1,'GlobalSection(SolutionConfiguration) = preSolution')for o,i in ipairs(o.configurations)do\n_p(2,'ConfigName.%d = %s',o-1,i)end\n_p(1,'EndGlobalSection')_p(1,'GlobalSection(ProjectDependencies) = postSolution')_p(1,'EndGlobalSection')_p(1,'GlobalSection(ProjectConfiguration) = postSolution')for n in premake.solution.eachproject(o)do\nfor e,o in ipairs(o.configurations)do\n_p(2,'{%s}.%s.ActiveCfg = %s|%s',n.uuid,o,o,i.arch(n))_p(2,'{%s}.%s.Build.0 = %s|%s',n.uuid,o,o,i.arch(n))end\nend\n_p(1,'EndGlobalSection')_p(1,'GlobalSection(ExtensibilityG"
	"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"
	"\"))_p(2,'SchemaVersion = \"%s\"',iif(_ACTION==\"vs2002\",\"1.0\",\"2.0\"))_p(2,'ProjectGuid = \"{%s}\"',t.uuid)_p(1,'>')_p(2,'<Build>')_p(3,'<Settings')_p(4,'ApplicationIcon = \"\"')_p(4,'AssemblyKeyContainerName = \"\"')_p(4,'AssemblyName = \"%s\"',t.buildtarget.basename)_p(4,'AssemblyOriginatorKeyFile = \"\"')_p(4,'DefaultClientScript = \"JScript\"')_p(4,'DefaultHTMLPageLayout = \"Grid\"')_p(4,'DefaultTargetSchema = \"IE50\"')_p(4,'DelaySign = \"false\"')if _ACTION==\"vs2002\"then\n_p(4,'NoStandardLibraries = \"false\"')end\n_p(4,'OutputType = \"%s\"',premake.dotnet.getkind(t))if _ACTION==\"vs2003\"then\n_p(4,'PreBuildEvent = \"\"')_p(4,'PostBuildEvent = \"\"')end\n_p(4,'RootNamespace = \"%s\"',t.buildtarget.basename)if _ACTION==\"vs2003\"then\n_p(4,'RunPostBuildEvent = \"OnBuildSuccess\"')end\n_p(4,'StartupObject = \"\"')_p(3,'>')for e in premake.eachconfig(t)do\n_p(4,'<Config')_p(5,'Name = \"%s\"',premake.esc(e.name))_p(5,'AllowUnsafeBlocks = \"%s\"',iif(e.flags.Unsafe,\"true\",\"false\"))_p(5,'BaseAddres"
	"s = \"285212672\"')_p(5,'CheckForOverflowUnderflow = \"false\"')_p(5,'ConfigurationOverrideFile = \"\"')_p(5,'DefineConstants = \"%s\"',premake.esc(table.concat(e.defines,\";\")))_p(5,'DocumentationFile = \"\"')_p(5,'DebugSymbols = \"%s\"',iif(e.flags.Symbols,\"true\",\"false\"))_p(5,'FileAlignment = \"4096\"')_p(5,'IncrementalBuild = \"false\"')if _ACTION==\"vs2003\"then\n_p(5,'NoStdLib = \"false\"')_p(5,'NoWarn = \"\"')end\n_p(5,'Optimize = \"%s\"',iif(e.flags.Optimize or e.flags.OptimizeSize or e.flags.OptimizeSpeed,\"true\",\"false\"))_p(5,'OutputPath = \"%s\"',premake.esc(e.buildtarget.directory))_p(5,'RegisterForComInterop = \"false\"')_p(5,'RemoveIntegerChecks = \"false\"')_p(5,'TreatWarningsAsErrors = \"%s\"',iif(e.flags.FatalWarnings,\"true\",\"false\"))_p(5,'WarningLevel = \"4\"')_p(4,'/>')end\n_p(3,'</Settings>')_p(3,'<References>')for t,e in ipairs(premake.getlinks(t,\"siblings\",\"object\"))do\n_p(4,'<Reference')_p(5,'Name = \"%s\"',e.buildtarget.basename)_p(5,'Project = \"{%s}\"',e.uuid)_p(5,'Pac"
	"kage = \"{%s}\"',s.tool(e))_p(4,'/>')end\nfor t,e in ipairs(premake.getlinks(t,\"system\",\"fullpath\"))do\n_p(4,'<Reference')_p(5,'Name = \"%s\"',path.getbasename(e))_p(5,'AssemblyName = \"%s\"',path.getname(e))if path.getdirectory(e)~=\".\"then\n_p(5,'HintPath = \"%s\"',path.translate(e,\"\\\\\"))end\n_p(4,'/>')end\n_p(3,'</References>')_p(2,'</Build>')_p(2,'<Files>')_p(3,'<Include>')a.Files(t)_p(3,'</Include>')_p(2,'</Files>')_p(1,'</CSHARP>')_p('</VisualStudioProject>')end",

	/* actions/vstudio/vs2002_csproj_user.lua */
	"local e=premake.vstudio.cs2002\nfunction e.generate_user(e)io.eol=\"\\r\\n\"_p('<VisualStudioProject>')_p(1,'<CSHARP>')_p(2,'<Build>')local t=table.translate(e.libdirs,function(t)return path.getabsolute(e.location..\"/\"..t)end)_p(3,'<Settings ReferencePath = \"%s\">',path.translate(table.concat(t,\";\"),\"\\\\\"))for e in premake.eachconfig(e)do\n_p(4,'<Config')_p(5,'Name = \"%s\"',premake.esc(e.name))_p(5,'EnableASPDebugging = \"false\"')_p(5,'EnableASPXDebugging = \"false\"')_p(5,'EnableUnmanagedDebugging = \"false\"')_p(5,'EnableSQLServerDebugging = \"false\"')_p(5,'RemoteDebugEnabled = \"false\"')_p(5,'RemoteDebugMachine = \"\"')_p(5,'StartAction = \"Project\"')_p(5,'StartArguments = \"\"')_p(5,'StartPage = \"\"')_p(5,'StartProgram = \"\"')_p(5,'StartURL = \"\"')_p(5,'StartWorkingDirectory = \"\"')_p(5,'StartWithIE = \"false\"')_p(4,'/>')end\n_p(3,'</Settings>')_p(2,'</Build>')_p(2,'<OtherProjectSettings')_p(3,'CopyProjectDestinationFolder = \"\"')_p(3,'CopyProjectUncPath = \"\"')_p(3,'CopyProjectOption ="
	" \"0\"')_p(3,'ProjectView = \"ProjectFiles\"')_p(3,'ProjectTrust = \"0\"')_p(2,'/>')_p(1,'</CSHARP>')_p('</VisualStudioProject>')end",

	/* actions/vstudio/vs200x_vcproj.lua */
	"premake.vstudio.vc200x={}local o=premake.vstudio.vc200x\nlocal i=premake.tree\nlocal function n(e)if(_ACTION<\"vs2005\")then\nreturn iif(e,\"TRUE\",\"FALSE\")else\nreturn iif(e,\"true\",\"false\")end\nend\nfunction o.optimization(o)local e=0\nfor n,o in ipairs(o.flags)do\nif(o==\"Optimize\")then\ne=3\nelseif(o==\"OptimizeSize\")then\ne=1\nelseif(o==\"OptimizeSpeed\")then\ne=2\nend\nend\nreturn e\nend\nfunction o.header(e)io.eol=\"\\r\\n\"_p('<?xml version=\"1.0\" encoding=\"Windows-1252\"?>')_p('<%s',e)_p(1,'ProjectType=\"Visual C++\"')if _ACTION==\"vs2002\"then\n_p(1,'Version=\"7.00\"')elseif _ACTION==\"vs2003\"then\n_p(1,'Version=\"7.10\"')elseif _ACTION==\"vs2005\"then\n_p(1,'Version=\"8.00\"')elseif _ACTION==\"vs2008\"then\n_p(1,'Version=\"9.00\"')end\nend\nfunction o.Configuration(o,e)_p(2,'<Configuration')_p(3,'Name=\"%s\"',premake.esc(o))_p(3,'OutputDirectory=\"%s\"',premake.esc(e.buildtarget.directory))_p(3,'IntermediateDirectory=\"%s\"',premake.esc(e.objectsdir))local o\nif(e.kind==\"SharedLib\")then"
	"\no=2\nelseif(e.kind==\"StaticLib\")then\no=4\nelse\no=1\nend\n_p(3,'ConfigurationType=\"%s\"',o)if(e.flags.MFC)then\n_p(3,'UseOfMFC=\"%d\"',iif(e.flags.StaticRuntime,1,2))end\nif(e.flags.ATL or e.flags.StaticATL)then\n_p(3,'UseOfATL=\"%d\"',iif(e.flags.StaticATL,1,2))end\n_p(3,'CharacterSet=\"%s\"',iif(e.flags.Unicode,1,2))if e.flags.Managed then\n_p(3,'ManagedExtensions=\"1\"')end\n_p(3,'>')end\nfunction o.Files(o)local e=premake.project.buildsourcetree(o)i.traverse(e,{onbranchenter=function(o,e)_p(e,'<Filter')_p(e,'\\tName=\"%s\"',o.name)_p(e,'\\tFilter=\"\"')_p(e,'\\t>')end,onbranchexit=function(o,e)_p(e,'</Filter>')end,onleaf=function(l,e)local t=l.cfg.name\n_p(e,'<File')_p(e,'\\tRelativePath=\"%s\"',path.translate(t,\"\\\\\"))_p(e,'\\t>')e=e+1\nfor n,i in ipairs(o.solution.vstudio_configs)do\nif i.isreal then\nlocal n=premake.getconfig(o,i.src_buildcfg,i.src_platform)local l=(not o.flags.NoPCH and o.pchsource==l.cfg.name)local a=path.iscppfile(t)local o=(path.iscfile(t)~=premake.project.iscproject(o))if "
	"l or(a and o)then\n_p(e,'<FileConfiguration')_p(e,'\\tName=\"%s\"',i.name)_p(e,'\\t>')_p(e,'\\t<Tool')_p(e,'\\t\\tName=\"%s\"',iif(n.system==\"Xbox360\",\"VCCLX360CompilerTool\",\"VCCLCompilerTool\"))if o then\n_p(e,'\\t\\tCompileAs=\"%s\"',iif(path.iscfile(t),1,2))end\nif l then\nif n.system==\"PS3\"then\nlocal o=table.join(premake.snc.getcflags(n),premake.snc.getcxxflags(n),n.buildoptions)o=table.concat(o,\" \");o=o..' --create_pch=\"$(IntDir)/$(TargetName).pch\"'_p(e,'\\t\\tAdditionalOptions=\"%s\"',premake.esc(o))else\n_p(e,'\\t\\tUsePrecompiledHeader=\"1\"')end\nend\n_p(e,'\\t/>')_p(e,'</FileConfiguration>')end\nend\nend\ne=e-1\n_p(e,'</File>')end,},false,2)end\nfunction o.Platforms(e)local o={}_p(1,'<Platforms>')for n,e in ipairs(e.solution.vstudio_configs)do\nif e.isreal and not table.contains(o,e.platform)then\ntable.insert(o,e.platform)_p(2,'<Platform')_p(3,'Name=\"%s\"',e.platform)_p(2,'/>')end\nend\n_p(1,'</Platforms>')end\nfunction o.Symbols(e)if(not e.flags.Symbols)then\nreturn 0\nelse\nif e.flags"
	".NoEditAndContinue or\no.optimization(e)~=0 or\ne.flags.Managed or\ne.platform==\"x64\"then\nreturn 3\nelse\nreturn 4\nend\nend\nend\nfunction o.VCCLCompilerTool(e)_p(3,'<Tool')_p(4,'Name=\"%s\"',iif(e.platform~=\"Xbox360\",\"VCCLCompilerTool\",\"VCCLX360CompilerTool\"))if#e.buildoptions>0 then\n_p(4,'AdditionalOptions=\"%s\"',table.concat(premake.esc(e.buildoptions),\" \"))end\n_p(4,'Optimization=\"%s\"',o.optimization(e))if e.flags.NoFramePointer then\n_p(4,'OmitFramePointers=\"%s\"',n(true))end\nif#e.includedirs>0 then\n_p(4,'AdditionalIncludeDirectories=\"%s\"',premake.esc(path.translate(table.concat(e.includedirs,\";\"),'\\\\')))end\nif#e.defines>0 then\n_p(4,'PreprocessorDefinitions=\"%s\"',premake.esc(table.concat(e.defines,\";\")))end\nif premake.config.isdebugbuild(e)and not e.flags.NoMinimalRebuild and not e.flags.Managed then\n_p(4,'MinimalRebuild=\"%s\"',n(true))end\nif e.flags.NoExceptions then\n_p(4,'ExceptionHandling=\"%s\"',iif(_ACTION<\"vs2005\",\"FALSE\",0))elseif e.flags.SEH and _ACTION>\"vs"
	"2003\"then\n_p(4,'ExceptionHandling=\"2\"')end\nif o.optimization(e)==0 and not e.flags.Managed then\n_p(4,'BasicRuntimeChecks=\"3\"')end\nif o.optimization(e)~=0 then\n_p(4,'StringPooling=\"%s\"',n(true))end\nlocal i\nif premake.config.isdebugbuild(e)then\ni=iif(e.flags.StaticRuntime,1,3)else\ni=iif(e.flags.StaticRuntime,0,2)end\n_p(4,'RuntimeLibrary=\"%s\"',i)_p(4,'EnableFunctionLevelLinking=\"%s\"',n(true))if _ACTION>\"vs2003\"and e.platform~=\"Xbox360\"and e.platform~=\"x64\"then\nif e.flags.EnableSSE then\n_p(4,'EnableEnhancedInstructionSet=\"1\"')elseif e.flags.EnableSSE2 then\n_p(4,'EnableEnhancedInstructionSet=\"2\"')end\nend\nif _ACTION<\"vs2005\"then\nif e.flags.FloatFast then\n_p(4,'ImproveFloatingPointConsistency=\"%s\"',n(false))elseif e.flags.FloatStrict then\n_p(4,'ImproveFloatingPointConsistency=\"%s\"',n(true))end\nelse\nif e.flags.FloatFast then\n_p(4,'FloatingPointModel=\"2\"')elseif e.flags.FloatStrict then\n_p(4,'FloatingPointModel=\"1\"')end\nend\nif _ACTION<\"vs2005\"and not e.flags.NoRT"
	"TI then\n_p(4,'RuntimeTypeInfo=\"%s\"',n(true))elseif _ACTION>\"vs2003\"and e.flags.NoRTTI and not e.flags.Managed then\n_p(4,'RuntimeTypeInfo=\"%s\"',n(false))end\nif e.flags.NativeWChar then\n_p(4,'TreatWChar_tAsBuiltInType=\"%s\"',n(true))elseif e.flags.NoNativeWChar then\n_p(4,'TreatWChar_tAsBuiltInType=\"%s\"',n(false))end\nif not e.flags.NoPCH and e.pchheader then\n_p(4,'UsePrecompiledHeader=\"%s\"',iif(_ACTION<\"vs2005\",3,2))_p(4,'PrecompiledHeaderThrough=\"%s\"',e.pchheader)else\n_p(4,'UsePrecompiledHeader=\"%s\"',iif(_ACTION>\"vs2003\"or e.flags.NoPCH,0,2))end\n_p(4,'WarningLevel=\"%s\"',iif(e.flags.ExtraWarnings,4,3))if e.flags.FatalWarnings then\n_p(4,'WarnAsError=\"%s\"',n(true))end\nif _ACTION<\"vs2008\"and not e.flags.Managed then\n_p(4,'Detect64BitPortabilityProblems=\"%s\"',n(not e.flags.No64BitChecks))end\n_p(4,'ProgramDataBaseFileName=\"$(OutDir)\\\\%s.pdb\"',path.getbasename(e.buildtarget.name))_p(4,'DebugInformationFormat=\"%s\"',o.Symbols(e))if e.language==\"C\"then\n_p(4,'CompileAs=\"1\""
	"')end\n_p(3,'/>')end\nfunction o.VCLinkerTool(e)_p(3,'<Tool')if e.kind~=\"StaticLib\"then\n_p(4,'Name=\"%s\"',iif(e.platform~=\"Xbox360\",\"VCLinkerTool\",\"VCX360LinkerTool\"))if e.flags.NoImportLib then\n_p(4,'IgnoreImportLibrary=\"%s\"',n(true))end\nif#e.linkoptions>0 then\n_p(4,'AdditionalOptions=\"%s\"',table.concat(premake.esc(e.linkoptions),\" \"))end\nif#e.links>0 then\n_p(4,'AdditionalDependencies=\"%s\"',table.concat(premake.getlinks(e,\"all\",\"fullpath\"),\" \"))end\n_p(4,'OutputFile=\"$(OutDir)\\\\%s\"',e.buildtarget.name)_p(4,'LinkIncremental=\"%s\"',iif(premake.config.isincrementallink(e),2,1))_p(4,'AdditionalLibraryDirectories=\"%s\"',table.concat(premake.esc(path.translate(e.libdirs,'\\\\')),\";\"))local i=premake.findfile(e,\".def\")if i then\n_p(4,'ModuleDefinitionFile=\"%s\"',i)end\nif e.flags.NoManifest then\n_p(4,'GenerateManifest=\"%s\"',n(false))end\n_p(4,'GenerateDebugInformation=\"%s\"',n(o.Symbols(e)~=0))if o.Symbols(e)~=0 then\n_p(4,'ProgramDataBaseFileName=\"$(OutDir)\\\\%s.pdb\"',"
	"path.getbasename(e.buildtarget.name))end\n_p(4,'SubSystem=\"%s\"',iif(e.kind==\"ConsoleApp\",1,2))if o.optimization(e)~=0 then\n_p(4,'OptimizeReferences=\"2\"')_p(4,'EnableCOMDATFolding=\"2\"')end\nif(e.kind==\"ConsoleApp\"or e.kind==\"WindowedApp\")and not e.flags.WinMain then\n_p(4,'EntryPointSymbol=\"mainCRTStartup\"')end\nif e.kind==\"SharedLib\"then\nlocal o=e.linktarget.fullpath\n_p(4,'ImportLibrary=\"%s\"',iif(e.flags.NoImportLib,e.objectsdir..\"\\\\\"..path.getname(o),o))end\n_p(4,'TargetMachine=\"%d\"',iif(e.platform==\"x64\",17,1))else\n_p(4,'Name=\"VCLibrarianTool\"')if#e.links>0 then\n_p(4,'AdditionalDependencies=\"%s\"',table.concat(premake.getlinks(e,\"all\",\"fullpath\"),\" \"))end\n_p(4,'OutputFile=\"$(OutDir)\\\\%s\"',e.buildtarget.name)if#e.libdirs>0 then\n_p(4,'AdditionalLibraryDirectories=\"%s\"',premake.esc(path.translate(table.concat(e.libdirs,\";\"))))end\nlocal o={}if e.platform==\"x32\"then\ntable.insert(o,\"/MACHINE:X86\")elseif e.platform==\"x64\"then\ntable.insert(o,\"/MACHINE:X64\""
	")end\no=table.join(o,e.linkoptions)if#o>0 then\n_p(4,'AdditionalOptions=\"%s\"',table.concat(premake.esc(o),\" \"))end\nend\n_p(3,'/>')end\nfunction o.VCCLCompilerTool_PS3(e)_p(3,'<Tool')_p(4,'Name=\"VCCLCompilerTool\"')local o=table.join(premake.snc.getcflags(e),premake.snc.getcxxflags(e),e.buildoptions)if not e.flags.NoPCH and e.pchheader then\n_p(4,'UsePrecompiledHeader=\"%s\"',iif(_ACTION<\"vs2005\",3,2))_p(4,'PrecompiledHeaderThrough=\"%s\"',path.getname(e.pchheader))table.insert(o,'--use_pch=\"$(IntDir)/$(TargetName).pch\"')else\n_p(4,'UsePrecompiledHeader=\"%s\"',iif(_ACTION>\"vs2003\"or e.flags.NoPCH,0,2))end\n_p(4,'AdditionalOptions=\"%s\"',premake.esc(table.concat(o,\" \")))if#e.includedirs>0 then\n_p(4,'AdditionalIncludeDirectories=\"%s\"',premake.esc(path.translate(table.concat(e.includedirs,\";\"),'\\\\')))end\nif#e.defines>0 then\n_p(4,'PreprocessorDefinitions=\"%s\"',table.concat(premake.esc(e.defines),\";\"))end\n_p(4,'ProgramDataBaseFileName=\"$(OutDir)\\\\%s.pdb\"',path.getbasename(e.buildtar"
	"get.name))_p(4,'DebugInformationFormat=\"0\"')_p(4,'CompileAs=\"0\"')_p(3,'/>')end\nfunction o.VCLinkerTool_PS3(e)_p(3,'<Tool')if e.kind~=\"StaticLib\"then\n_p(4,'Name=\"VCLinkerTool\"')local o=table.join(premake.snc.getldflags(e),e.linkoptions)if#o>0 then\n_p(4,'AdditionalOptions=\"%s\"',premake.esc(table.concat(o,\" \")))end\nif#e.links>0 then\n_p(4,'AdditionalDependencies=\"%s\"',table.concat(premake.getlinks(e,\"all\",\"fullpath\"),\" \"))end\n_p(4,'OutputFile=\"$(OutDir)\\\\%s\"',e.buildtarget.name)_p(4,'LinkIncremental=\"0\"')_p(4,'AdditionalLibraryDirectories=\"%s\"',table.concat(premake.esc(path.translate(e.libdirs,'\\\\')),\";\"))_p(4,'GenerateManifest=\"%s\"',n(false))_p(4,'ProgramDatabaseFile=\"\"')_p(4,'RandomizedBaseAddress=\"1\"')_p(4,'DataExecutionPrevention=\"0\"')else\n_p(4,'Name=\"VCLibrarianTool\"')local o=table.join(premake.snc.getldflags(e),e.linkoptions)if#o>0 then\n_p(4,'AdditionalOptions=\"%s\"',premake.esc(table.concat(o,\" \")))end\nif#e.links>0 then\n_p(4,'AdditionalDependencies=\"%s"
	"\"',table.concat(premake.getlinks(e,\"all\",\"fullpath\"),\" \"))end\n_p(4,'OutputFile=\"$(OutDir)\\\\%s\"',e.buildtarget.name)if#e.libdirs>0 then\n_p(4,'AdditionalLibraryDirectories=\"%s\"',premake.esc(path.translate(table.concat(e.libdirs,\";\"))))end\nend\n_p(3,'/>')end\nfunction o.VCResourceCompilerTool(e)_p(3,'<Tool')_p(4,'Name=\"VCResourceCompilerTool\"')if#e.resoptions>0 then\n_p(4,'AdditionalOptions=\"%s\"',table.concat(premake.esc(e.resoptions),\" \"))end\nif#e.defines>0 or#e.resdefines>0 then\n_p(4,'PreprocessorDefinitions=\"%s\"',table.concat(premake.esc(table.join(e.defines,e.resdefines)),\";\"))end\nif#e.includedirs>0 or#e.resincludedirs>0 then\nlocal e=table.join(e.includedirs,e.resincludedirs)_p(4,'AdditionalIncludeDirectories=\"%s\"',premake.esc(path.translate(table.concat(e,\";\"),'\\\\')))end\n_p(3,'/>')end\nfunction o.VCManifestTool(o)local e={}for n,o in ipairs(o.files)do\nif path.getextension(o)==\".manifest\"then\ntable.insert(e,o)end\nend\n_p(3,'<Tool')_p(4,'Name=\"VCManifestTool\"')if#e"
	">0 then\n_p(4,'AdditionalManifestFiles=\"%s\"',premake.esc(table.concat(e,\";\")))end\n_p(3,'/>')end\nfunction o.VCMIDLTool(e)_p(3,'<Tool')_p(4,'Name=\"VCMIDLTool\"')if e.platform==\"x64\"then\n_p(4,'TargetEnvironment=\"3\"')end\n_p(3,'/>')end\nfunction o.buildstepsblock(n,e)_p(3,'<Tool')_p(4,'Name=\"%s\"',n)if#e>0 then\n_p(4,'CommandLine=\"%s\"',premake.esc(table.implode(e,\"\",\"\",\"\\r\\n\")))end\n_p(3,'/>')end\no.toolmap={VCCLCompilerTool=o.VCCLCompilerTool,VCCLCompilerTool_PS3=o.VCCLCompilerTool_PS3,VCLinkerTool=o.VCLinkerTool,VCLinkerTool_PS3=o.VCLinkerTool_PS3,VCManifestTool=o.VCManifestTool,VCMIDLTool=o.VCMIDLTool,VCResourceCompilerTool=o.VCResourceCompilerTool,VCPreBuildEventTool=function(e)o.buildstepsblock(\"VCPreBuildEventTool\",e.prebuildcommands)end,VCPreLinkEventTool=function(e)o.buildstepsblock(\"VCPreLinkEventTool\",e.prelinkcommands)end,VCPostBuildEventTool=function(e)o.buildstepsblock(\"VCPostBuildEventTool\",e.postbuildcommands)end,}local function i(o,e)if o==\"vs2002\"then\nreturn{\"VCCLC"
	"ompilerTool\",\"VCCustomBuildTool\",\"VCLinkerTool\",\"VCMIDLTool\",\"VCPostBuildEventTool\",\"VCPreBuildEventTool\",\"VCPreLinkEventTool\",\"VCResourceCompilerTool\",\"VCWebServiceProxyGeneratorTool\",\"VCWebDeploymentTool\"}end\nif o==\"vs2003\"then\nreturn{\"VCCLCompilerTool\",\"VCCustomBuildTool\",\"VCLinkerTool\",\"VCMIDLTool\",\"VCPostBuildEventTool\",\"VCPreBuildEventTool\",\"VCPreLinkEventTool\",\"VCResourceCompilerTool\",\"VCWebServiceProxyGeneratorTool\",\"VCXMLDataGeneratorTool\",\"VCWebDeploymentTool\",\"VCManagedWrapperGeneratorTool\",\"VCAuxiliaryManagedWrapperGeneratorTool\"}end\nif e==\"Xbox360\"then\nreturn{\"VCPreBuildEventTool\",\"VCCustomBuildTool\",\"VCXMLDataGeneratorTool\",\"VCWebServiceProxyGeneratorTool\",\"VCMIDLTool\",\"VCCLCompilerTool\",\"VCManagedResourceCompilerTool\",\"VCResourceCompilerTool\",\"VCPreLinkEventTool\",\"VCLinkerTool\",\"VCALinkTool\",\"VCX360ImageTool\",\"VCBscMakeTool\",\"VCX360DeploymentTool\",\"VCPostBuildEventTool\",\"DebuggerTool\",}end\nif e==\"PS3\"then\nre"
	"turn{\"VCPreBuildEventTool\",\"VCCustomBuildTool\",\"VCXMLDataGeneratorTool\",\"VCWebServiceProxyGeneratorTool\",\"VCMIDLTool\",\"VCCLCompilerTool_PS3\",\"VCManagedResourceCompilerTool\",\"VCResourceCompilerTool\",\"VCPreLinkEventTool\",\"VCLinkerTool_PS3\",\"VCALinkTool\",\"VCManifestTool\",\"VCXDCMakeTool\",\"VCBscMakeTool\",\"VCFxCopTool\",\"VCAppVerifierTool\",\"VCWebDeploymentTool\",\"VCPostBuildEventTool\"}else\nreturn{\"VCPreBuildEventTool\",\"VCCustomBuildTool\",\"VCXMLDataGeneratorTool\",\"VCWebServiceProxyGeneratorTool\",\"VCMIDLTool\",\"VCCLCompilerTool\",\"VCManagedResourceCompilerTool\",\"VCResourceCompilerTool\",\"VCPreLinkEventTool\",\"VCLinkerTool\",\"VCALinkTool\",\"VCManifestTool\",\"VCXDCMakeTool\",\"VCBscMakeTool\",\"VCFxCopTool\",\"VCAppVerifierTool\",\"VCWebDeploymentTool\",\"VCPostBuildEventTool\"}end\nend\nfunction o.generate(e)o.header('VisualStudioProject')_p(1,'Name=\"%s\"',premake.esc(e.name))_p(1,'ProjectGUID=\"{%s}\"',e.uuid)if _ACTION>\"vs2003\"then\n_p(1,'RootNamespace=\"%s\"',e"
	".name)end\n_p(1,'Keyword=\"%s\"',iif(e.flags.Managed,\"ManagedCProj\",\"Win32Proj\"))_p(1,'>')o.Platforms(e)if _ACTION>\"vs2003\"then\n_p(1,'<ToolFiles>')_p(1,'</ToolFiles>')end\n_p(1,'<Configurations>')for t,n in ipairs(e.solution.vstudio_configs)do\nif n.isreal then\nlocal e=premake.getconfig(e,n.src_buildcfg,n.src_platform)o.Configuration(n.name,e)for i,n in ipairs(i(_ACTION,n.src_platform))do\nif o.toolmap[n]then\no.toolmap[n](e)elseif n==\"VCX360DeploymentTool\"then\n_p(3,'<Tool')_p(4,'Name=\"VCX360DeploymentTool\"')_p(4,'DeploymentType=\"0\"')if#e.deploymentoptions>0 then\n_p(4,'AdditionalOptions=\"%s\"',table.concat(premake.esc(e.deploymentoptions),\" \"))end\n_p(3,'/>')elseif n==\"VCX360ImageTool\"then\n_p(3,'<Tool')_p(4,'Name=\"VCX360ImageTool\"')if#e.imageoptions>0 then\n_p(4,'AdditionalOptions=\"%s\"',table.concat(premake.esc(e.imageoptions),\" \"))end\nif e.imagepath~=nil then\n_p(4,'OutputFileName=\"%s\"',premake.esc(path.translate(e.imagepath)))end\n_p(3,'/>')elseif n==\"DebuggerTool\"then\n_p(3,"
	"'<DebuggerTool')_p(3,'/>')else\n_p(3,'<Tool')_p(4,'Name=\"%s\"',n)_p(3,'/>')end\nend\n_p(2,'</Configuration>')end\nend\n_p(1,'</Configurations>')_p(1,'<References>')_p(1,'</References>')_p(1,'<Files>')o.Files(e)_p(1,'</Files>')_p(1,'<Globals>')_p(1,'</Globals>')_p('</VisualStudioProject>')end",

	/* actions/vstudio/vs200x_vcproj_user.lua */
	"local e=premake.vstudio.vc200x\nfunction e.generate_user(i)e.header('VisualStudioUserFile')_p(1,'ShowAllFiles=\"false\"')_p(1,'>')_p(1,'<Configurations>')for r,n in ipairs(i.solution.vstudio_configs)do\nif n.isreal then\nlocal i=premake.getconfig(i,n.src_buildcfg,n.src_platform)_p(2,'<Configuration')_p(3,'Name=\"%s\"',premake.esc(n.name))_p(3,'>')e.debugdir(i)_p(2,'</Configuration>')end\nend\n_p(1,'</Configurations>')_p('</VisualStudioUserFile>')end\nfunction e.environmentargs(e)if e.environmentargs and#e.environmentargs>0 then\n_p(4,'Environment=\"%s\"',string.gsub(table.concat(e.environmentargs,\"&#x0A;\"),'\"','&quot;'))if e.flags.EnvironmentArgsDontMerge then\n_p(4,'EnvironmentMerge=\"false\"')end\nend\nend\nfunction e.debugdir(n)_p(3,'<DebugSettings')if n.debugdir then\n_p(4,'WorkingDirectory=\"%s\"',path.translate(n.debugdir,'\\\\'))end\nif#n.debugargs>0 then\n_p(4,'CommandArguments=\"%s\"',table.concat(n.debugargs,\" \"))end\ne.environmentargs(n)_p(3,'/>')end",

	/* actions/vstudio/vs2003_solution.lua */
	"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.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 "
	"r==\"Content\"then\nreturn\"CopyNewest\"end\nreturn\"None\"end\nfunction e.arch(e)return\"AnyCPU\"end\nfunction e.files(e)local t=premake.project.buildsourcetree(e)premake.tree.traverse(t,{onleaf=function(t)local n=premake.dotnet.getbuildaction(t.cfg)local r=path.translate(premake.esc(t.cfg.name),\"\\\\\")local e,o=o(e,n,t.path)if e==\"None\"then\n_p('    <%s Include=\"%s\" />',n,r)else\n_p('    <%s Include=\"%s\">',n,r)if e==\"AutoGen\"then\n_p('      <AutoGen>True</AutoGen>')elseif e==\"AutoGenerated\"then\n_p('      <SubType>Designer</SubType>')_p('      <Generator>ResXFileCodeGenerator</Generator>')_p('      <LastGenOutput>%s.Designer.cs</LastGenOutput>',premake.esc(path.getbasename(t.name)))elseif e==\"SubTypeDesigner\"then\n_p('      <SubType>Designer</SubType>')elseif e==\"SubTypeForm\"then\n_p('      <SubType>Form</SubType>')elseif e==\"SubTypeCode\"then\n_p('      <SubType>Code</SubType>')elseif e==\"XamlDesigner\"then\n_p('      <SubType>Designer</SubType>')_p('      <Generator>MSBuild:Compile</Gener"
	"ator>')elseif e==\"PreserveNewest\"then\n_p('      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>')end\nif o then\n_p('      <DependentUpon>%s</DependentUpon>',path.translate(premake.esc(o),\"\\\\\"))end\n_p('    </%s>',n)end\nend},false)end\nfunction e.projectelement(e)local t=premake.action.current()local e=''if t.vstudio.toolsVersion then\ne=string.format(' ToolsVersion=\"%s\"',t.vstudio.toolsVersion)end\nif _ACTION>\"vs2008\"then\n_p('<?xml version=\"1.0\" encoding=\"utf-8\"?>')end\n_p('<Project%s DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">',e)end\nfunction e.projectsettings(t)_p('  <PropertyGroup>')_p(\"    <Configuration Condition=\\\" '$(Configuration)' == '' \\\">%s</Configuration>\",premake.esc(t.solution.configurations[1]))_p(\"    <Platform Condition=\\\" '$(Platform)' == '' \\\">%s</Platform>\",e.arch(t))local e=premake.action.current()if e.vstudio.productVersion then\n_p('    <ProductVersion>%s</ProductVersion>',e.vstudio.productVersion)en"
	"d\nif _ACTION<\"vs2012\"then\n_p('    <SchemaVersion>2.0</SchemaVersion>')end\n_p('    <ProjectGuid>{%s}</ProjectGuid>',t.uuid)_p('    <OutputType>%s</OutputType>',premake.dotnet.getkind(t))_p('    <AppDesignerFolder>Properties</AppDesignerFolder>')_p('    <RootNamespace>%s</RootNamespace>',t.buildtarget.basename)_p('    <AssemblyName>%s</AssemblyName>',t.buildtarget.basename)local e=t.framework or e.vstudio.targetFramework\nif e then\n_p('    <TargetFrameworkVersion>v%s</TargetFrameworkVersion>',e)end\nif _ACTION=='vs2010'then\n_p('    <TargetFrameworkProfile></TargetFrameworkProfile>')end\nif _ACTION>=\"vs2010\"then\n_p('    <FileAlignment>512</FileAlignment>')end\n_p('  </PropertyGroup>')end\nfunction e.propertygroup(t)_p(\"  <PropertyGroup Condition=\\\" '$(Configuration)|$(Platform)' == '%s|%s' \\\">\",premake.esc(t.name),e.arch(t))if _ACTION>\"vs2008\"then\n_p('    <PlatformTarget>%s</PlatformTarget>',e.arch(t))end\nend\nfunction e.generate(n)io.eol=\"\\r\\n\"e.projectelement(n)if _ACTION>\"vs2010\"then"
	"\n_p('  <Import Project=\"$(MSBuildExtensionsPath)\\\\$(MSBuildToolsVersion)\\\\Microsoft.Common.props\" Condition=\"Exists(\\'$(MSBuildExtensionsPath)\\\\$(MSBuildToolsVersion)\\\\Microsoft.Common.props\\')\" />')end\ne.projectsettings(n)for t in premake.eachconfig(n)do\ne.propertygroup(t)if t.flags.Symbols then\n_p('    <DebugSymbols>true</DebugSymbols>')_p('    <DebugType>full</DebugType>')else\n_p('    <DebugType>pdbonly</DebugType>')end\n_p('    <Optimize>%s</Optimize>',iif(t.flags.Optimize or t.flags.OptimizeSize or t.flags.OptimizeSpeed,\"true\",\"false\"))_p('    <OutputPath>%s</OutputPath>',t.buildtarget.directory)_p('    <DefineConstants>%s</DefineConstants>',table.concat(premake.esc(t.defines),\";\"))_p('    <ErrorReport>prompt</ErrorReport>')_p('    <WarningLevel>4</WarningLevel>')if t.flags.Unsafe then\n_p('    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>')end\nif t.flags.FatalWarnings then\n_p('    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>')end\n_p('  </PropertyGroup>')end\n_p('  <ItemGr"
	"oup>')for t,e in ipairs(premake.getlinks(n,\"siblings\",\"object\"))do\n_p('    <ProjectReference Include=\"%s\">',path.translate(path.getrelative(n.location,s.projectfile(e)),\"\\\\\"))_p('      <Project>{%s}</Project>',e.uuid)_p('      <Name>%s</Name>',premake.esc(e.name))_p('    </ProjectReference>')end\nfor t,e in ipairs(premake.getlinks(n,\"system\",\"name\"))do\n_p('    <Reference Include=\"%s\" />',premake.esc(e))end\n_p('  </ItemGroup>')_p('  <ItemGroup>')e.files(n)_p('  </ItemGroup>')local e=iif(_ACTION<\"vs2012\",\"Bin\",\"Tools\")_p('  <Import Project=\"$(MSBuild%sPath)\\\\Microsoft.CSharp.targets\" />',e)_p('  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.')_p('       Other similar extension points exist, see Microsoft.Common.targets.')_p('  <Target Name=\"BeforeBuild\">')_p('  </Target>')_p('  <Target Name=\"AfterBuild\">')_p('  </Target>')_p('  -->')_p('</Project>')end",

	/* actions/vstudio/vs2005_csproj_user.lua */
	"local e=premake.vstudio.cs2005\nfunction e.generate_user(e)io.eol=\"\\r\\n\"_p('<Project xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">')_p('  <PropertyGroup>')local e=table.translate(e.libdirs,function(t)return path.getabsolute(e.location..\"/\"..t)end)_p('    <ReferencePath>%s</ReferencePath>',path.translate(table.concat(e,\";\"),\"\\\\\"))_p('  </PropertyGroup>')_p('</Project>')end",

	/* actions/vstudio/vs2010_vcxproj.lua */
	"premake.vstudio.vc2010={}local e=premake.vstudio.vc2010\nlocal 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\",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"
	"roup(t,\"None\")e.filefiltergroup(t,\"ClInclude\")e.filefiltergroup(t,\"ClCompile\")e.filefiltergroup(t,\"ResourceCompile\")_p('</Project>')end",

	/* actions/vstudio/vs2012.lua */
	"premake.vstudio.vc2012={}local e=premake.vstudio.vc2012\nlocal r=premake.vstudio\nnewaction{trigger=\"vs2012\",shortname=\"Visual Studio 2012\",description=\"Generate Microsoft Visual Studio 2012 project files\",os=\"windows\",valid_kinds={\"ConsoleApp\",\"WindowedApp\",\"StaticLib\",\"SharedLib\"},valid_languages={\"C\",\"C++\",\"C#\"},valid_tools={cc={\"msc\"},dotnet={\"msnet\"},},onsolution=function(e)premake.generate(e,\"%%.sln\",r.sln2005.generate)end,onproject=function(e)if premake.isdotnetproject(e)then\npremake.generate(e,\"%%.csproj\",r.cs2005.generate)premake.generate(e,\"%%.csproj.user\",r.cs2005.generate_user)else\npremake.generate(e,\"%%.vcxproj\",premake.vs2010_vcxproj)premake.generate(e,\"%%.vcxproj.user\",premake.vs2010_vcxproj_user)premake.generate(e,\"%%.vcxproj.filters\",r.vc2010.generate_filters)end\nend,oncleansolution=premake.vstudio.cleansolution,oncleanproject=premake.vstudio.cleanproject,oncleantarget=premake.vstudio.cleantarget,vstudio={solutionVersion=\"12\",targetFramework=\"4.5\",t"
	"oolsVersion=\"4.0\",}}",

	/* actions/vstudio/vs2013.lua */
	"premake.vstudio.vc2013={}local e=premake.vstudio.vc2013\nlocal r=premake.vstudio\nnewaction{trigger=\"vs2013\",shortname=\"Visual Studio 2013\",description=\"Generate Microsoft Visual Studio 2013 project files\",os=\"windows\",valid_kinds={\"ConsoleApp\",\"WindowedApp\",\"StaticLib\",\"SharedLib\"},valid_languages={\"C\",\"C++\",\"C#\"},valid_tools={cc={\"msc\"},dotnet={\"msnet\"},},onsolution=function(e)premake.generate(e,\"%%.sln\",r.sln2005.generate)end,onproject=function(e)if premake.isdotnetproject(e)then\npremake.generate(e,\"%%.csproj\",r.cs2005.generate)premake.generate(e,\"%%.csproj.user\",r.cs2005.generate_user)else\npremake.generate(e,\"%%.vcxproj\",premake.vs2010_vcxproj)premake.generate(e,\"%%.vcxproj.user\",premake.vs2010_vcxproj_user)premake.generate(e,\"%%.vcxproj.filters\",r.vc2010.generate_filters)end\nend,oncleansolution=premake.vstudio.cleansolution,oncleanproject=premake.vstudio.cleanproject,oncleantarget=premake.vstudio.cleantarget,vstudio={solutionVersion=\"12\",targetFramework=\"4.5\",t"
	"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,}",

	/* actions/xcode/xcode_common.lua */
	"local e=premake.xcode\nlocal i=premake.tree\nfunction e.getbuildcategory(n)local e={[\".a\"]=\"Frameworks\",[\".c\"]=\"Sources\",[\".cc\"]=\"Sources\",[\".cpp\"]=\"Sources\",[\".cxx\"]=\"Sources\",[\".dylib\"]=\"Frameworks\",[\".framework\"]=\"Frameworks\",[\".m\"]=\"Sources\",[\".mm\"]=\"Sources\",[\".strings\"]=\"Resources\",[\".nib\"]=\"Resources\",[\".xib\"]=\"Resources\",[\".icns\"]=\"Resources\",[\".bmp\"]=\"Resources\",[\".wav\"]=\"Resources\",}return e[path.getextension(n.name)]end\nfunction e.getconfigname(e)local n=e.name\nif#e.project.solution.xcode.platforms>1 then\nn=n..\" \"..premake.action.current().valid_platforms[e.platform]end\nreturn n\nend\nfunction e.getfiletype(n)local e={[\".c\"]=\"sourcecode.c.c\",[\".cc\"]=\"sourcecode.cpp.cpp\",[\".cpp\"]=\"sourcecode.cpp.cpp\",[\".css\"]=\"text.css\",[\".cxx\"]=\"sourcecode.cpp.cpp\",[\".framework\"]=\"wrapper.framework\",[\".gif\"]=\"image.gif\",[\".h\"]=\"sourcecode.c.h\",[\".html\"]=\"text.html\",[\".lua\"]=\"sourcecode.lua\",[\".m\"]=\"sourcecode"
	".c.objc\",[\".mm\"]=\"sourcecode.cpp.objc\",[\".nib\"]=\"wrapper.nib\",[\".pch\"]=\"sourcecode.c.h\",[\".plist\"]=\"text.plist.xml\",[\".strings\"]=\"text.plist.strings\",[\".xib\"]=\"file.xib\",[\".icns\"]=\"image.icns\",[\".bmp\"]=\"image.bmp\",[\".wav\"]=\"audio.wav\",}return e[path.getextension(n.path)]or\"text\"end\nfunction e.getproducttype(n)local e={ConsoleApp=\"com.apple.product-type.tool\",WindowedApp=\"com.apple.product-type.application\",StaticLib=\"com.apple.product-type.library.static\",SharedLib=\"com.apple.product-type.library.dynamic\",}return e[n.cfg.kind]end\nfunction e.gettargettype(e)local n={ConsoleApp='\"compiled.mach-o.executable\"',WindowedApp=\"wrapper.application\",StaticLib=\"archive.ar\",SharedLib='\"compiled.mach-o.dylib\"',}return n[e.cfg.kind]end\nfunction e.getxcodeprojname(e)local e=premake.project.getfilename(e,\"%%.xcodeproj\")return e\nend\nfunction e.isframework(e)return(path.getextension(e)==\".framework\")end\nfunction e.newid()return string.format(\"%04X%04X%04X%04X%04X"
	"%04X\",math.random(0,32767),math.random(0,32767),math.random(0,32767),math.random(0,32767),math.random(0,32767),math.random(0,32767))end\nfunction e.preparesolution(e)e.xcode={}e.xcode.platforms=premake.filterplatforms(e,premake.action.current().valid_platforms,\"Universal\")for n in premake.solution.eachproject(e)do\nlocal i=premake.getconfig(n,n.configurations[1],e.xcode.platforms[1])local e=premake.tree.new(path.getname(i.buildtarget.bundlepath))e.cfg=i\ne.id=premake.xcode.newid(e,\"product\")e.targetid=premake.xcode.newid(e,\"target\")n.xcode={}n.xcode.projectnode=e\nend\nend\nfunction e.printlist(e,n)if#e>0 then\n_p(4,'%s = (',n)for n,e in ipairs(e)do\nlocal e=e:gsub('\"','\\\\\"')_p(5,'\"%s\",',e)end\n_p(4,');')end\nend\nfunction e.Header()_p('// !$*UTF8*$!')_p('{')_p(1,'archiveVersion = 1;')_p(1,'classes = {')_p(1,'};')_p(1,'objectVersion = 45;')_p(1,'objects = {')_p('')end\nfunction e.PBXBuildFile(n)_p('/* Begin PBXBuildFile section */')i.traverse(n,{onnode=function(n)if n.buildid then\n_p(2,'%s /* %s "
	"in %s */ = {isa = PBXBuildFile; fileRef = %s /* %s */; };',n.buildid,n.name,e.getbuildcategory(n),n.id,n.name)end\nend})_p('/* End PBXBuildFile section */')_p('')end\nfunction e.PBXContainerItemProxy(e)if#e.projects.children>0 then\n_p('/* Begin PBXContainerItemProxy section */')for n,e in ipairs(e.projects.children)do\n_p(2,'%s /* PBXContainerItemProxy */ = {',e.productproxyid)_p(3,'isa = PBXContainerItemProxy;')_p(3,'containerPortal = %s /* %s */;',e.id,path.getname(e.path))_p(3,'proxyType = 2;')_p(3,'remoteGlobalIDString = %s;',e.project.xcode.projectnode.id)_p(3,'remoteInfo = \"%s\";',e.project.xcode.projectnode.name)_p(2,'};')_p(2,'%s /* PBXContainerItemProxy */ = {',e.targetproxyid)_p(3,'isa = PBXContainerItemProxy;')_p(3,'containerPortal = %s /* %s */;',e.id,path.getname(e.path))_p(3,'proxyType = 1;')_p(3,'remoteGlobalIDString = %s;',e.project.xcode.projectnode.targetid)_p(3,'remoteInfo = \"%s\";',e.project.xcode.projectnode.name)_p(2,'};')end\n_p('/* End PBXContainerItemProxy section */')_p('')end\nend"
	"\nfunction e.PBXFileReference(t)_p('/* Begin PBXFileReference section */')i.traverse(t,{onleaf=function(n)if not n.path then\nreturn\nend\nif n.kind==\"product\"then\n_p(2,'%s /* %s */ = {isa = PBXFileReference; explicitFileType = %s; includeInIndex = 0; name = \"%s\"; path = \"%s\"; sourceTree = BUILT_PRODUCTS_DIR; };',n.id,n.name,e.gettargettype(n),n.name,path.getname(n.cfg.buildtarget.bundlepath))elseif n.parent.parent==t.projects then\nlocal e=path.getrelative(t.project.location,n.parent.project.location)_p(2,'%s /* %s */ = {isa = PBXFileReference; lastKnownFileType = \"wrapper.pb-project\"; name = \"%s\"; path = \"%s\"; sourceTree = SOURCE_ROOT; };',n.parent.id,n.parent.name,n.parent.name,path.join(e,n.parent.name))else\nlocal t,o\nif e.isframework(n.path)then\nlocal e=n.path\nlocal r,i,n=string.find(e,\"^%$%((.+)%)/\")if n then\ne=string.sub(e,i+1)end\nif string.find(e,'/')then\nif string.find(e,'^%.')then\nerror('relative paths are not currently supported for frameworks')end\nt=e\nelse\nt=\"/System/Libr"
	"ary/Frameworks/\"..e\nend\nif n then\no=n\nif string.find(t,'^/')then\nt=string.sub(t,2)end\nelse\no=\"<absolute>\"end\nelse\no=\"<group>\"if n.parent.isvpath then\nt=n.cfg.name\nelse\nt=i.getlocalpath(n)end\nend\n_p(2,'%s /* %s */ = {isa = PBXFileReference; lastKnownFileType = %s; name = \"%s\"; path = \"%s\"; sourceTree = \"%s\"; };',n.id,n.name,e.getfiletype(n),n.name,t,o)end\nend})_p('/* End PBXFileReference section */')_p('')end\nfunction e.PBXFrameworksBuildPhase(e)_p('/* Begin PBXFrameworksBuildPhase section */')_p(2,'%s /* Frameworks */ = {',e.products.children[1].fxstageid)_p(3,'isa = PBXFrameworksBuildPhase;')_p(3,'buildActionMask = 2147483647;')_p(3,'files = (')i.traverse(e.frameworks,{onleaf=function(e)_p(4,'%s /* %s in Frameworks */,',e.buildid,e.name)end})i.traverse(e.projects,{onleaf=function(e)_p(4,'%s /* %s in Frameworks */,',e.buildid,e.name)end})_p(3,');')_p(3,'runOnlyForDeploymentPostprocessing = 0;')_p(2,'};')_p('/* End PBXFrameworksBuildPhase section */')_p('')end\nfunction e.PBXGroup(n)_"
	"p('/* Begin PBXGroup section */')i.traverse(n,{onnode=function(e)if(e.path and#e.children==0)or e.kind==\"vgroup\"then\nreturn\nend\nif e.parent==n.projects then\n_p(2,'%s /* Products */ = {',e.productgroupid)else\n_p(2,'%s /* %s */ = {',e.id,e.name)end\n_p(3,'isa = PBXGroup;')_p(3,'children = (')for n,e in ipairs(e.children)do\n_p(4,'%s /* %s */,',e.id,e.name)end\n_p(3,');')if e.parent==n.projects then\n_p(3,'name = Products;')else\n_p(3,'name = \"%s\";',e.name)if e.path and not e.isvpath then\nlocal n=e.path\nif e.parent.path then\nn=path.getrelative(e.parent.path,e.path)end\n_p(3,'path = \"%s\";',n)end\nend\n_p(3,'sourceTree = \"<group>\";')_p(2,'};')end},true)_p('/* End PBXGroup section */')_p('')end\nfunction e.PBXNativeTarget(i)_p('/* Begin PBXNativeTarget section */')for t,n in ipairs(i.products.children)do\nlocal t=i.project.name\nlocal function o(e)if#i.project[e]>0 then\nreturn true\nend\nfor i,n in ipairs(i.configs)do\nif#n[e]>0 then\nreturn true\nend\nend\nend\n_p(2,'%s /* %s */ = {',n.targetid,t)_"
	"p(3,'isa = PBXNativeTarget;')_p(3,'buildConfigurationList = %s /* Build configuration list for PBXNativeTarget \"%s\" */;',n.cfgsection,t)_p(3,'buildPhases = (')if o('prebuildcommands')then\n_p(4,'9607AE1010C857E500CD1376 /* Prebuild */,')end\n_p(4,'%s /* Resources */,',n.resstageid)_p(4,'%s /* Sources */,',n.sourcesid)if o('prelinkcommands')then\n_p(4,'9607AE3510C85E7E00CD1376 /* Prelink */,')end\n_p(4,'%s /* Frameworks */,',n.fxstageid)if o('postbuildcommands')then\n_p(4,'9607AE3710C85E8F00CD1376 /* Postbuild */,')end\n_p(3,');')_p(3,'buildRules = (')_p(3,');')_p(3,'dependencies = (')for n,e in ipairs(i.projects.children)do\n_p(4,'%s /* PBXTargetDependency */,',e.targetdependid)end\n_p(3,');')_p(3,'name = \"%s\";',t)local i\nif n.cfg.kind==\"ConsoleApp\"then\ni=\"$(HOME)/bin\"elseif n.cfg.kind==\"WindowedApp\"then\ni=\"$(HOME)/Applications\"end\nif i then\n_p(3,'productInstallPath = \"%s\";',i)end\n_p(3,'productName = \"%s\";',t)_p(3,'productReference = %s /* %s */;',n.id,n.name)_p(3,'productType = \"%s\";',"
	"e.getproducttype(n))_p(2,'};')end\n_p('/* End PBXNativeTarget section */')_p('')end\nfunction e.PBXProject(e)_p('/* Begin PBXProject section */')_p(2,'08FB7793FE84155DC02AAC07 /* Project object */ = {')_p(3,'isa = PBXProject;')_p(3,'buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject \"%s\" */;',e.name)_p(3,'compatibilityVersion = \"Xcode 3.2\";')_p(3,'hasScannedForEncodings = 1;')_p(3,'mainGroup = %s /* %s */;',e.id,e.name)_p(3,'projectDirPath = \"\";')if#e.projects.children>0 then\n_p(3,'projectReferences = (')for n,e in ipairs(e.projects.children)do\n_p(4,'{')_p(5,'ProductGroup = %s /* Products */;',e.productgroupid)_p(5,'ProjectRef = %s /* %s */;',e.id,path.getname(e.path))_p(4,'},')end\n_p(3,');')end\n_p(3,'projectRoot = \"\";')_p(3,'targets = (')for n,e in ipairs(e.products.children)do\n_p(4,'%s /* %s */,',e.targetid,e.name)end\n_p(3,');')_p(2,'};')_p('/* End PBXProject section */')_p('')end\nfunction e.PBXReferenceProxy(n)if#n.projects.children>0 then\n_p('/* Beg"
	"in PBXReferenceProxy section */')i.traverse(n.projects,{onleaf=function(n)_p(2,'%s /* %s */ = {',n.id,n.name)_p(3,'isa = PBXReferenceProxy;')_p(3,'fileType = %s;',e.gettargettype(n))_p(3,'path = \"%s\";',n.path)_p(3,'remoteRef = %s /* PBXContainerItemProxy */;',n.parent.productproxyid)_p(3,'sourceTree = BUILT_PRODUCTS_DIR;')_p(2,'};')end})_p('/* End PBXReferenceProxy section */')_p('')end\nend\nfunction e.PBXResourcesBuildPhase(n)_p('/* Begin PBXResourcesBuildPhase section */')for o,t in ipairs(n.products.children)do\n_p(2,'%s /* Resources */ = {',t.resstageid)_p(3,'isa = PBXResourcesBuildPhase;')_p(3,'buildActionMask = 2147483647;')_p(3,'files = (')i.traverse(n,{onnode=function(n)if e.getbuildcategory(n)==\"Resources\"then\n_p(4,'%s /* %s in Resources */,',n.buildid,n.name)end\nend})_p(3,');')_p(3,'runOnlyForDeploymentPostprocessing = 0;')_p(2,'};')end\n_p('/* End PBXResourcesBuildPhase section */')_p('')end\nfunction e.PBXShellScriptBuildPhase(r)local t=false\nlocal function i(a,s,p)local o=r.project[p]local"
	" n=table.join(o,{})for i,t in ipairs(r.configs)do\nlocal i=t[p]if#i>#o then\ntable.insert(n,'if [ \"${CONFIGURATION}\" = \"'..e.getconfigname(t)..'\" ]; then')for e=#o+1,#i do\ntable.insert(n,i[e])end\ntable.insert(n,'fi')end\nend\nif#n>0 then\nif not t then\n_p('/* Begin PBXShellScriptBuildPhase section */')t=true\nend\n_p(2,'%s /* %s */ = {',a,s)_p(3,'isa = PBXShellScriptBuildPhase;')_p(3,'buildActionMask = 2147483647;')_p(3,'files = (')_p(3,');')_p(3,'inputPaths = (');_p(3,');');_p(3,'name = %s;',s);_p(3,'outputPaths = (');_p(3,');');_p(3,'runOnlyForDeploymentPostprocessing = 0;');_p(3,'shellPath = /bin/sh;');_p(3,'shellScript = \"%s\";',table.concat(n,\"\\\\n\"):gsub('\"','\\\\\"'))_p(2,'};')end\nend\ni(\"9607AE1010C857E500CD1376\",\"Prebuild\",\"prebuildcommands\")i(\"9607AE3510C85E7E00CD1376\",\"Prelink\",\"prelinkcommands\")i(\"9607AE3710C85E8F00CD1376\",\"Postbuild\",\"postbuildcommands\")if t then\n_p('/* End PBXShellScriptBuildPhase section */')end\nend\nfunction e.PBXSourcesBuildPhase(n)_p('/* Begin"
	" PBXSourcesBuildPhase section */')for o,t in ipairs(n.products.children)do\n_p(2,'%s /* Sources */ = {',t.sourcesid)_p(3,'isa = PBXSourcesBuildPhase;')_p(3,'buildActionMask = 2147483647;')_p(3,'files = (')i.traverse(n,{onleaf=function(n)if e.getbuildcategory(n)==\"Sources\"then\n_p(4,'%s /* %s in Sources */,',n.buildid,n.name)end\nend})_p(3,');')_p(3,'runOnlyForDeploymentPostprocessing = 0;')_p(2,'};')end\n_p('/* End PBXSourcesBuildPhase section */')_p('')end\nfunction e.PBXVariantGroup(e)_p('/* Begin PBXVariantGroup section */')i.traverse(e,{onbranch=function(e)if e.kind==\"vgroup\"then\n_p(2,'%s /* %s */ = {',e.id,e.name)_p(3,'isa = PBXVariantGroup;')_p(3,'children = (')for n,e in ipairs(e.children)do\n_p(4,'%s /* %s */,',e.id,e.name)end\n_p(3,');')_p(3,'name = %s;',e.name)_p(3,'sourceTree = \"<group>\";')_p(2,'};')end\nend})_p('/* End PBXVariantGroup section */')_p('')end\nfunction e.PBXTargetDependency(e)if#e.projects.children>0 then\n_p('/* Begin PBXTargetDependency section */')i.traverse(e.projects,{onle"
	"af=function(e)_p(2,'%s /* PBXTargetDependency */ = {',e.parent.targetdependid)_p(3,'isa = PBXTargetDependency;')_p(3,'name = \"%s\";',e.name)_p(3,'targetProxy = %s /* PBXContainerItemProxy */;',e.parent.targetproxyid)_p(2,'};')end})_p('/* End PBXTargetDependency section */')_p('')end\nend\nfunction e.XCBuildConfiguration_Target(i,t,n)local t=e.getconfigname(n)_p(2,'%s /* %s */ = {',n.xcode.targetid,t)_p(3,'isa = XCBuildConfiguration;')_p(3,'buildSettings = {')_p(4,'ALWAYS_SEARCH_USER_PATHS = NO;')if not n.flags.Symbols then\n_p(4,'DEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";')end\nif n.kind~=\"StaticLib\"and n.buildtarget.prefix~=\"\"then\n_p(4,'EXECUTABLE_PREFIX = %s;',n.buildtarget.prefix)end\nif n.targetextension then\nlocal e=n.targetextension\ne=iif(e:startswith(\".\"),e:sub(2),e)_p(4,'EXECUTABLE_EXTENSION = %s;',e)end\nlocal e=path.getdirectory(n.buildtarget.bundlepath)if e~=\".\"then\n_p(4,'CONFIGURATION_BUILD_DIR = %s;',e)end\n_p(4,'GCC_DYNAMIC_NO_PIC = NO;')_p(4,'GCC_MODEL_TUNING = G5;')if i.infopl"
	"ist then\n_p(4,'INFOPLIST_FILE = \"%s\";',i.infoplist.cfg.name)end\ninstallpaths={ConsoleApp='/usr/local/bin',WindowedApp='\"$(HOME)/Applications\"',SharedLib='/usr/local/lib',StaticLib='/usr/local/lib',}_p(4,'INSTALL_PATH = %s;',installpaths[n.kind])_p(4,'PRODUCT_NAME = \"%s\";',n.buildtarget.basename)_p(3,'};')_p(3,'name = \"%s\";',t)_p(2,'};')end\nfunction e.XCBuildConfiguration_Project(i,n)local o=e.getconfigname(n)_p(2,'%s /* %s */ = {',n.xcode.projectid,o)_p(3,'isa = XCBuildConfiguration;')_p(3,'buildSettings = {')local i={Native=\"$(NATIVE_ARCH_ACTUAL)\",x32=\"i386\",x64=\"x86_64\",Universal32=\"$(ARCHS_STANDARD_32_BIT)\",Universal64=\"$(ARCHS_STANDARD_64_BIT)\",Universal=\"$(ARCHS_STANDARD_32_64_BIT)\",}_p(4,'ARCHS = \"%s\";',i[n.platform])local t=path.getdirectory(n.buildtarget.bundlepath)if t~=\".\"then\n_p(4,'CONFIGURATION_BUILD_DIR = \"$(SYMROOT)\";');end\n_p(4,'CONFIGURATION_TEMP_DIR = \"$(OBJROOT)\";')if n.flags.Symbols then\n_p(4,'COPY_PHASE_STRIP = NO;')end\n_p(4,'GCC_C_LANGUAGE_STANDARD = gnu9"
	"9;')if n.flags.NoExceptions then\n_p(4,'GCC_ENABLE_CPP_EXCEPTIONS = NO;')end\nif n.flags.NoRTTI then\n_p(4,'GCC_ENABLE_CPP_RTTI = NO;')end\nif _ACTION~=\"xcode4\"and n.flags.Symbols and not n.flags.NoEditAndContinue then\n_p(4,'GCC_ENABLE_FIX_AND_CONTINUE = YES;')end\nif n.flags.NoExceptions then\n_p(4,'GCC_ENABLE_OBJC_EXCEPTIONS = NO;')end\nif n.flags.Optimize or n.flags.OptimizeSize then\n_p(4,'GCC_OPTIMIZATION_LEVEL = s;')elseif n.flags.OptimizeSpeed then\n_p(4,'GCC_OPTIMIZATION_LEVEL = 3;')else\n_p(4,'GCC_OPTIMIZATION_LEVEL = 0;')end\nif n.pchheader and not n.flags.NoPCH then\n_p(4,'GCC_PRECOMPILE_PREFIX_HEADER = YES;')_p(4,'GCC_PREFIX_HEADER = \"%s\";',n.pchheader)end\ne.printlist(n.defines,'GCC_PREPROCESSOR_DEFINITIONS')_p(4,'GCC_SYMBOLS_PRIVATE_EXTERN = NO;')if n.flags.FatalWarnings then\n_p(4,'GCC_TREAT_WARNINGS_AS_ERRORS = YES;')end\n_p(4,'GCC_WARN_ABOUT_RETURN_TYPE = YES;')_p(4,'GCC_WARN_UNUSED_VARIABLE = YES;')e.printlist(n.includedirs,'HEADER_SEARCH_PATHS')e.printlist(n.libdirs,'LIBRARY_SEARCH_PATH"
	"S')_p(4,'OBJROOT = \"%s\";',n.objectsdir)_p(4,'ONLY_ACTIVE_ARCH = %s;',iif(premake.config.isdebugbuild(n),'YES','NO'))local r={[\"-ffast-math\"]=n.flags.FloatFast,[\"-ffloat-store\"]=n.flags.FloatStrict,[\"-fomit-frame-pointer\"]=n.flags.NoFramePointer,}local i={}for n,t in pairs(r)do\nif t then\ntable.insert(i,n)end\nend\ne.printlist(table.join(i,n.buildoptions),'OTHER_CFLAGS')i={}for t,n in ipairs(premake.getlinks(n,\"system\"))do\nif not e.isframework(n)then\ntable.insert(i,\"-l\"..n)end\nend\ni=table.join(i,n.linkoptions)e.printlist(i,'OTHER_LDFLAGS')if n.flags.StaticRuntime then\n_p(4,'STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = static;')end\nif t~=\".\"then\n_p(4,'SYMROOT = \"%s\";',t)end\nif n.flags.ExtraWarnings then\n_p(4,'WARNING_CFLAGS = \"-Wall\";')end\n_p(3,'};')_p(3,'name = \"%s\";',o)_p(2,'};')end\nfunction e.XCBuildConfiguration(n)_p('/* Begin XCBuildConfiguration section */')for t,i in ipairs(n.products.children)do\nfor o,t in ipairs(n.configs)do\ne.XCBuildConfiguration_Target(n,i,t)end\nend\nfor t,i "
	"in ipairs(n.configs)do\ne.XCBuildConfiguration_Project(n,i)end\n_p('/* End XCBuildConfiguration section */')_p('')end\nfunction e.XCBuildConfigurationList(n)local i=n.project.solution\n_p('/* Begin XCConfigurationList section */')for t,i in ipairs(n.products.children)do\n_p(2,'%s /* Build configuration list for PBXNativeTarget \"%s\" */ = {',i.cfgsection,i.name)_p(3,'isa = XCConfigurationList;')_p(3,'buildConfigurations = (')for i,n in ipairs(n.configs)do\n_p(4,'%s /* %s */,',n.xcode.targetid,e.getconfigname(n))end\n_p(3,');')_p(3,'defaultConfigurationIsVisible = 0;')_p(3,'defaultConfigurationName = \"%s\";',e.getconfigname(n.configs[1]))_p(2,'};')end\n_p(2,'1DEB928908733DD80010E9CD /* Build configuration list for PBXProject \"%s\" */ = {',n.name)_p(3,'isa = XCConfigurationList;')_p(3,'buildConfigurations = (')for i,n in ipairs(n.configs)do\n_p(4,'%s /* %s */,',n.xcode.projectid,e.getconfigname(n))end\n_p(3,');')_p(3,'defaultConfigurationIsVisible = 0;')_p(3,'defaultConfigurationName = \"%s\";',e.getconfigname"
	"(n.configs[1]))_p(2,'};')_p('/* End XCConfigurationList section */')_p('')end\nfunction e.Footer()_p(1,'};')_p('\\trootObject = 08FB7793FE84155DC02AAC07 /* Project object */;')_p('}')end",

	/* actions/xcode/xcode_project.lua */
	"local e=premake.xcode\nlocal o=premake.tree\nfunction e.buildprjtree(r)local n=premake.project.buildsourcetree(r)n.configs={}for t,i in ipairs(r.solution.configurations)do\nfor t,o in ipairs(r.solution.xcode.platforms)do\nlocal o=premake.getconfig(r,i,o)o.xcode={}o.xcode.targetid=e.newid(r.xcode.projectnode,i)o.xcode.projectid=e.newid(n,i)table.insert(n.configs,o)end\nend\no.traverse(n,{onbranch=function(e)if path.getextension(e.name)==\".lproj\"then\nlocal i=path.getbasename(e.name)for n,r in ipairs(e.children)do\nlocal n=e.parent.children[r.name]if not n then\nn=o.insert(e.parent,o.new(r.name))n.kind=\"vgroup\"end\nr.name=path.getbasename(i)o.insert(n,r)end\no.remove(e)end\nend})n.frameworks=o.new(\"Frameworks\")for r in premake.eachconfig(r)do\nfor r,i in ipairs(premake.getlinks(r,\"system\",\"fullpath\"))do\nlocal r=path.getname(i)if e.isframework(r)and not n.frameworks.children[r]then\nnode=o.insert(n.frameworks,o.new(r))node.path=i\nend\nend\nend\nif#n.frameworks.children>0 then\no.insert(n,n.frameworks)"
	"end\nn.products=o.insert(n,o.new(\"Products\"))n.projects=o.new(\"Projects\")for t,i in ipairs(premake.getdependencies(r,\"sibling\",\"object\"))do\nlocal t=e.getxcodeprojname(i)local n=o.insert(n.projects,o.new(path.getname(t)))n.path=t\nn.project=i\nn.productgroupid=e.newid(n,\"prodgrp\")n.productproxyid=e.newid(n,\"prodprox\")n.targetproxyid=e.newid(n,\"targprox\")n.targetdependid=e.newid(n,\"targdep\")local e=premake.getconfig(i,r.configurations[1])node=o.insert(n,o.new(e.linktarget.name))node.path=e.linktarget.fullpath\nnode.cfg=e\nend\nif#n.projects.children>0 then\no.insert(n,n.projects)end\no.traverse(n,{onnode=function(o)o.id=e.newid(o)if e.getbuildcategory(o)then\no.buildid=e.newid(o,\"build\")end\nif string.endswith(o.name,\"Info.plist\")then\nn.infoplist=o\nend\nend},true)node=o.insert(n.products,r.xcode.projectnode)node.kind=\"product\"node.path=node.cfg.buildtarget.fullpath\nnode.cfgsection=e.newid(node,\"cfg\")node.resstageid=e.newid(node,\"rez\")node.sourcesid=e.newid(node,\"src\")node.fxstagei"
	"d=e.newid(node,\"fxs\")return n\nend\nfunction premake.xcode.project(n)local n=e.buildprjtree(n)e.Header(n)e.PBXBuildFile(n)e.PBXContainerItemProxy(n)e.PBXFileReference(n)e.PBXFrameworksBuildPhase(n)e.PBXGroup(n)e.PBXNativeTarget(n)e.PBXProject(n)e.PBXReferenceProxy(n)e.PBXResourcesBuildPhase(n)e.PBXShellScriptBuildPhase(n)e.PBXSourcesBuildPhase(n)e.PBXVariantGroup(n)e.PBXTargetDependency(n)e.XCBuildConfiguration(n)e.XCBuildConfigurationList(n)e.Footer(n)end",

	/* actions/xcode/xcode4_workspace.lua */
	"premake.xcode4={}local e=premake.xcode4\nfunction e.workspace_head()_p('<?xml version=\"1.0\" encoding=\"UTF-8\"?>')_p('<Workspace')_p(1,'version = \"1.0\">')end\nfunction e.workspace_tail()_p('</Workspace>')end\nfunction e.workspace_file_ref(o)local e=path.getrelative(o.solution.location,o.location)if e=='.'then e=''else e=e..'/'end\n_p(1,'<FileRef')_p(2,'location = \"group:%s\">',e..o.name..'.xcodeproj')_p(1,'</FileRef>')end\nfunction e.workspace_generate(o)premake.xcode.preparesolution(o)e.workspace_head()for o in premake.solution.eachproject(o)do\ne.workspace_file_ref(o)end\ne.workspace_tail()end",

	/* actions/clean/_clean.lua */
	"premake.clean={}function premake.clean.directory(n,e)local e=premake.project.getfilename(n,e)os.rmdir(e)end\nfunction premake.clean.file(e,n)local e=premake.project.getfilename(e,n)os.remove(e)end\nnewaction{trigger=\"clean\",description=\"Remove all binaries and generated files\",onsolution=function(n)for e in premake.action.each()do\nif e.oncleansolution then\ne.oncleansolution(n)end\nend\nend,onproject=function(e)for n in premake.action.each()do\nif n.oncleanproject then\nn.oncleanproject(e)end\nend\nif(e.objectsdir)then\npremake.clean.directory(e,e.objectsdir)end\nlocal n=e.solution.platforms or{}if not table.contains(n,\"Native\")then\nn=table.join(n,{\"Native\"})end\nfor a,n in ipairs(n)do\nfor n in premake.eachconfig(e,n)do\npremake.clean.directory(e,n.objectsdir)premake.clean.file(e,premake.gettarget(n,\"build\",\"posix\",\"windows\",\"windows\").fullpath)premake.clean.file(e,premake.gettarget(n,\"build\",\"posix\",\"posix\",\"linux\").fullpath)premake.clean.file(e,premake.gettarget(n,\"build\",\"posix"
	"\",\"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",

	0
};