• R/O
  • SSH

premake-stable: Commit

A friendly fork of Premake4 used to generate project files for WinDirStat. These patches applied for use in WinDirStat are not necessarily part of the upstream premake-stable. The WDS-build branch is the one used for the accumulated changes from all other branches. Code-signed binaries available.


Commit MetaInfo

Révisionea346b887055bd343370a4b918ccfd3238176286 (tree)
l'heure2022-01-27 07:39:18
AuteurOliver Schneider <oliver@assa...>
CommiterOliver Schneider

Message de Log

Decomposing some logic, so I can hook into the per-file options

Change Summary

Modification

diff -r 841802f189ba -r ea346b887055 README.rst
--- a/README.rst Sun Jan 23 22:42:29 2022 +0100
+++ b/README.rst Wed Jan 26 23:39:18 2022 +0100
@@ -13,12 +13,12 @@
1313 ---------
1414
1515 I provide code-signed binaries in the `download area
16-<https://sourceforge.net/projects/premake4-wds/files/>`_ for the
16+<https://sourceforge.net/projects/windirstat/files/premake-stable/>`_ for the
1717 benefit of those who don't want to build the binary themselves.
1818
1919 To get the latest code-signed build of ``premake4.exe`` simply
2020 download from `this link
21-<https://sourceforge.net/projects/premake4-wds/files/>`_.
21+<https://sourceforge.net/projects/windirstat/files/premake-stable/>`_.
2222
2323 The ``.asc`` files corresponding to the ``.exe`` files which are named
2424 something like ``premake4.rev-$rev-$commit.exe`` are the detached PGP
diff -r 841802f189ba -r ea346b887055 premake4.lua
--- a/premake4.lua Sun Jan 23 22:42:29 2022 +0100
+++ b/premake4.lua Wed Jan 26 23:39:18 2022 +0100
@@ -1,10 +1,15 @@
11 --[[
2- This premake4.lua _requires_ windirstat/premake-stable to work properly.
3- If you don't want to use the code-signed build that can be found in the
4- download section of that project, you can build from the WDS-branch at:
2+ This premake4.lua _requires_ windirstat/premake-stable to work properly.
3+ If you don't want to use the code-signed build that can be found in the
4+ ./common/ subfolder, you can build from the WDS-branch over at:
55
6- https://sourceforge.net/projects/premake4-wds/
7---]]
6+ https://sourceforge.net/projects/windirstat/
7+
8+ Prebuilt, signed binaries are available from:
9+ https://github.com/windirstat/premake-stable
10+ https://sourceforge.net/projects/windirstat/files/premake-stable/
11+ https://osdn.net/projects/windirstat/storage/historical/premake-stable/
12+ ]]
813 local action = _ACTION or ""
914 if _OPTIONS["publish"] then
1015 print "INFO: Creating 'Publish' build solution."
@@ -204,7 +209,7 @@
204209 premake.project.getbasename = function(prjname, pattern)
205210 -- The below is used to insert the .vs(8|9|10|11|12|14|15|16|17) into the file names for projects and solutions
206211 if _ACTION then
207- name_map = {vs2002 = "vs7", vs2003 = "vs7_1", vs2005 = "vs8", vs2008 = "vs9", vs2010 = "vs10", vs2012 = "vs11", vs2013 = "vs12", vs2015 = "vs14", vs2017 = "vs15", vs2019 = "vs16", vs2022 = "vs17"}
212+ name_map = {vs2005 = "vs8", vs2008 = "vs9", vs2010 = "vs10", vs2012 = "vs11", vs2013 = "vs12", vs2015 = "vs14", vs2017 = "vs15", vs2019 = "vs16", vs2022 = "vs17"}
208213 if name_map[_ACTION] then
209214 pattern = pattern:gsub("%%%%", "%%%%." .. name_map[_ACTION])
210215 else
diff -r 841802f189ba -r ea346b887055 release.cmd
--- a/release.cmd Sun Jan 23 22:42:29 2022 +0100
+++ b/release.cmd Wed Jan 26 23:39:18 2022 +0100
@@ -30,12 +30,8 @@
3030 set SLNCFGNAME=%~7
3131 set SLNCFGPLTF=%~8
3232 vcbuild /rebuild /time "%SLNFILE%" "%SLNCFGNAME%|%SLNCFGPLTF%"
33-echo Would now call:
34-echo ollisign.cmd -2 "%BASEPATH%%BINDIR%\%BASENAME%.exe" "https://sourceforge.net/projects/windirstat/" "premake4"
35-::call ollisign.cmd -2 "%BASEPATH%%BINDIR%\%BASENAME%.exe" "https://sourceforge.net/projects/windirstat/" "premake4"
33+call ollisign.cmd -2 "%BASEPATH%%BINDIR%\%BASENAME%.exe" "https://windirstat.net" "premake4"
3634 set NEWNAME=%BASEPATH%%BASENAME%.rev-%HG_TIP_REVNO%-%HG_TIP_ID%.exe
37-echo Next copying and PGP-signing
38-pause
3935 copy /y "%BASEPATH%%BINDIR%\%BASENAME%.exe" "%NEWNAME%"
4036 sigcheck -a "%NEWNAME%"
4137 gpg --batch --yes -u 0xC779D8290E88590F -bao "%NEWNAME%.asc" "%NEWNAME%"
diff -r 841802f189ba -r ea346b887055 src/actions/vstudio/vs200x_vcproj.lua
--- a/src/actions/vstudio/vs200x_vcproj.lua Sun Jan 23 22:42:29 2022 +0100
+++ b/src/actions/vstudio/vs200x_vcproj.lua Wed Jan 26 23:39:18 2022 +0100
@@ -102,6 +102,7 @@
102102 _p(3,'>')
103103 end
104104
105+ vc200x.individualSourceFileOptions = nil
105106
106107 function vc200x.individualSourceFile(prj, depth, fname, node)
107108 -- handle file configuration stuff. This needs to be cleaned up and simplified.
@@ -114,7 +115,7 @@
114115 local isSourceCode = path.iscppfile(fname)
115116 local needsCompileAs = (path.iscfile(fname) ~= premake.project.iscproject(prj))
116117
117- if usePCH or (isSourceCode and needsCompileAs) then
118+ if usePCH or (isSourceCode and needsCompileAs) or (type(vc200x.individualSourceFileOptions) == 'function') then
118119 _p(depth, '<FileConfiguration')
119120 _p(depth, '\tName="%s"', cfginfo.name)
120121 _p(depth, '\t>')
@@ -138,6 +139,9 @@
138139 _p(depth, '\t\tUsePrecompiledHeader="1"')
139140 end
140141 end
142+ if (type(vc200x.individualSourceFileOptions) == 'function') then
143+ vc200x.individualSourceFileOptions(prj, depth, fname, node)
144+ end
141145
142146 _p(depth, '\t/>')
143147 _p(depth, '</FileConfiguration>')
diff -r 841802f189ba -r ea346b887055 src/actions/vstudio/vs2010_vcxproj.lua
--- a/src/actions/vstudio/vs2010_vcxproj.lua Sun Jan 23 22:42:29 2022 +0100
+++ b/src/actions/vstudio/vs2010_vcxproj.lua Wed Jan 26 23:39:18 2022 +0100
@@ -526,6 +526,8 @@
526526 end
527527 end
528528
529+ vc2010.individualSourceFileOptions = nil
530+
529531 function vc2010.individualSourceFile(prj, config_mappings, file)
530532 local configs = prj.solution.vstudio_configs
531533 local translatedpath = path.translate(file.name, "\\")
@@ -539,6 +541,9 @@
539541 if path.iscfile(file.name) ~= premake.project.iscproject(prj) then
540542 _p(3,'<CompileAs>%s</CompileAs>', iif(path.iscfile(file.name), 'CompileAsC', 'CompileAsCpp'))
541543 end
544+ if (type(vc2010.individualSourceFileOptions) == 'function') then
545+ vc2010.individualSourceFileOptions(prj, config_mappings, file)
546+ end
542547 _p(2,'</ClCompile>')
543548 end
544549
diff -r 841802f189ba -r ea346b887055 src/host/scripts.c
--- a/src/host/scripts.c Sun Jan 23 22:42:29 2022 +0100
+++ b/src/host/scripts.c Wed Jan 26 23:39:18 2022 +0100
@@ -185,22 +185,22 @@
185185 " \"0\"')_p(3,'ProjectView = \"ProjectFiles\"')_p(3,'ProjectTrust = \"0\"')_p(2,'/>')_p(1,'</CSHARP>')_p('</VisualStudioProject>')end",
186186
187187 /* actions/vstudio/vs200x_vcproj.lua */
188- "premake.vstudio.vc200x={}local o=premake.vstudio.vc200x\nlocal s=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"
189- "\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.individualSourceFile(n,e,t,l)for o,i in ipairs(n.solution.vstudio_configs)do\nif i.isreal then\nlocal o=premake.getconfig(n,i.src_buildcfg,i.src_platform)local l=(not n.flags.NoPCH and n.pchsource==l.cfg.name)local a=path.iscppfile(t)local n=(path.iscfile(t)~=premake.project.iscproject(n))if l or(a and n)then\n_p(e,'<FileConfiguration')_p(e,'\\tName=\"%s\"',i.name)_p(e,'\\t>')_p(e,'\\t<Tool')_p(e,'\\t\\tName=\"%s\"',iif(o.system==\"Xbox360\",\"VCCLX360CompilerTool\",\"VCCLCompilerTool\"))if n then\n_p(e,'\\t\\tCompileAs=\"%s\"',iif(path.iscfile(t),1,2))end\nif l then\nif o.system==\"PS3\"then\nlocal o=tabl"
190- "e.join(premake.snc.getcflags(o),premake.snc.getcxxflags(o),o.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\nend\nfunction o.Files(n)local e=premake.project.buildsourcetree(n)s.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(t,e)local i=t.cfg.name\n_p(e,'<File')_p(e,'\\tRelativePath=\"%s\"',path.translate(i,\"\\\\\"))_p(e,'\\t>')e=e+1\no.individualSourceFile(n,e,i,t)e=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\n"
191- "function 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=\"%"
192- "s\"',iif(_ACTION<\"vs2005\",\"FALSE\",0))elseif e.flags.SEH and _ACTION>\"vs2003\"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,'F"
193- "loatingPointModel=\"1\"')end\nend\nif _ACTION<\"vs2005\"and not e.flags.NoRTTI 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,'DebugInformatio"
194- "nFormat=\"%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"
195- ".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=\"%s\"',iif(e.flags.Unicode,\"wmainCRTStartup\",\"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={"
196- "}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."
197- "concat(premake.esc(e.defines),\";\"))end\n_p(4,'ProgramDataBaseFileName=\"$(OutDir)\\\\%s.pdb\"',path.getbasename(e.buildtarget.name))_p(4,'DebugInformationFormat=\"0\"')_p(4,'CompileAs=\"0\"')_p(3,'/>')end\nfunction 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"
198- "_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"
199- ")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"
200- ".buildstepsblock(\"VCPostBuildEventTool\",e.postbuildcommands)end,}local function t(o,e)if o==\"vs2002\"then\nreturn{\"VCCLCompilerTool\",\"VCCustomBuildTool\",\"VCLinkerTool\",\"VCMIDLTool\",\"VCPostBuildEventTool\",\"VCPreBuildEventTool\",\"VCPreLinkEventTool\",\"VCResourceCompilerTool\",\"VCWebServiceProxyGeneratorTool\",\"VCWebDeploymentTool\"}end\nif o==\"vs2003\"then\nreturn{\"VCCLCompilerTool\",\"VCCustomBuildTool\",\"VCLinkerTool\",\"VCMIDLTool\",\"VCPostBuildEventTool\",\"VCPreBuildEventTool\",\"VCPreLinkEventTool\",\"VCResourceCompilerTool\",\"VCWebServiceProxyGeneratorTool\",\"VCXMLDataGeneratorTool\",\"VCWebDeploymentTool\",\"VCManagedWrapperGeneratorTool\",\"VCAuxiliaryManagedWrapperGeneratorTool\"}end\nif e==\"Xbox360\"then\nreturn{\"VCPreBuildEventTool\",\"VCCustomBuildTool\",\"VCXMLDataGeneratorTool\",\"VCWebServiceProxyGeneratorTool\",\"VCMIDLTool\",\"VCCLCompilerTool\",\"VCManagedResourceCompilerTool\",\"VCResourceCompilerTool\",\"VCPreLinkEventTool\",\"VCLinkerTool\",\"VCALinkTool\",\"VCX360"
201- "ImageTool\",\"VCBscMakeTool\",\"VCX360DeploymentTool\",\"VCPostBuildEventTool\",\"DebuggerTool\",}end\nif e==\"PS3\"then\nreturn{\"VCPreBuildEventTool\",\"VCCustomBuildTool\",\"VCXMLDataGeneratorTool\",\"VCWebServiceProxyGeneratorTool\",\"VCMIDLTool\",\"VCCLCompilerTool_PS3\",\"VCManagedResourceCompilerTool\",\"VCResourceCompilerTool\",\"VCPreLinkEventTool\",\"VCLinkerTool_PS3\",\"VCALinkTool\",\"VCManifestTool\",\"VCXDCMakeTool\",\"VCBscMakeTool\",\"VCFxCopTool\",\"VCAppVerifierTool\",\"VCWebDeploymentTool\",\"VCPostBuildEventTool\"}else\nreturn{\"VCPreBuildEventTool\",\"VCCustomBuildTool\",\"VCXMLDataGeneratorTool\",\"VCWebServiceProxyGeneratorTool\",\"VCMIDLTool\",\"VCCLCompilerTool\",\"VCManagedResourceCompilerTool\",\"VCResourceCompilerTool\",\"VCPreLinkEventTool\",\"VCLinkerTool\",\"VCALinkTool\",\"VCManifestTool\",\"VCXDCMakeTool\",\"VCBscMakeTool\",\"VCFxCopTool\",\"VCAppVerifierTool\",\"VCWebDeploymentTool\",\"VCPostBuildEventTool\"}end\nend\nfunction o.generate(n)o.header('VisualStudioProject')_p(1,'"
202- "Name=\"%s\"',premake.esc(n.name))_p(1,'ProjectGUID=\"{%s}\"',n.uuid)if _ACTION>\"vs2003\"then\n_p(1,'RootNamespace=\"%s\"',n.name)end\n_p(1,'Keyword=\"%s\"',iif(n.flags.Managed,\"ManagedCProj\",\"Win32Proj\"))_p(1,'>')o.Platforms(n)if _ACTION>\"vs2003\"then\n_p(1,'<ToolFiles>')_p(1,'</ToolFiles>')end\n_p(1,'<Configurations>')for e,i in ipairs(n.solution.vstudio_configs)do\nif i.isreal then\nlocal e=premake.getconfig(n,i.src_buildcfg,i.src_platform)o.Configuration(i.name,e)for i,n in ipairs(t(_ACTION,i.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"
203- "\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(n)_p(1,'</Files>')_p(1,'<Globals>')_p(1,'</Globals>')_p('</VisualStudioProject>')end",
188+ "premake.vstudio.vc200x={}local e=premake.vstudio.vc200x\nlocal r=premake.tree\nlocal function n(e)if(_ACTION<\"vs2005\")then\nreturn iif(e,\"TRUE\",\"FALSE\")else\nreturn iif(e,\"true\",\"false\")end\nend\nfunction e.optimization(o)local e=0\nfor n,o in ipairs(o.flags)do\nif(o==\"Optimize\")then\ne=3\nelseif(o==\"OptimizeSize\")then\ne=1\nelseif(o==\"OptimizeSpeed\")then\ne=2\nend\nend\nreturn e\nend\nfunction e.header(e)io.eol=\"\\r\\n\"_p('<?xml version=\"1.0\" encoding=\"Windows-1252\"?>')_p('<%s',e)_p(1,'ProjectType=\"Visual C++\"')if _ACTION==\"vs2002\"then\n_p(1,'Version=\"7.00\"')elseif _ACTION==\"vs2003\"then\n_p(1,'Version=\"7.10\"')elseif _ACTION==\"vs2005\"then\n_p(1,'Version=\"8.00\"')elseif _ACTION==\"vs2008\"then\n_p(1,'Version=\"9.00\"')end\nend\nfunction e.Configuration(n,o)_p(2,'<Configuration')_p(3,'Name=\"%s\"',premake.esc(n))_p(3,'OutputDirectory=\"%s\"',premake.esc(o.buildtarget.directory))_p(3,'IntermediateDirectory=\"%s\"',premake.esc(o.objectsdir))local n\nif(o.kind==\"SharedLib\")then"
189+ "\nn=2\nelseif(o.kind==\"StaticLib\")then\nn=4\nelse\nn=1\nend\n_p(3,'ConfigurationType=\"%s\"',n)if(o.flags.MFC)then\n_p(3,'UseOfMFC=\"%d\"',iif(o.flags.StaticRuntime,1,2))end\nif(o.flags.ATL or o.flags.StaticATL)then\n_p(3,'UseOfATL=\"%d\"',iif(o.flags.StaticATL,1,2))end\n_p(3,'CharacterSet=\"%s\"',iif(o.flags.Unicode,1,2))if o.flags.Managed then\n_p(3,'ManagedExtensions=\"1\"')end\n_p(3,'>')end\ne.individualSourceFileOptions=nil\nfunction e.individualSourceFile(i,o,l,a)for n,t in ipairs(i.solution.vstudio_configs)do\nif t.isreal then\nlocal n=premake.getconfig(i,t.src_buildcfg,t.src_platform)local a=(not i.flags.NoPCH and i.pchsource==a.cfg.name)local s=path.iscppfile(l)local i=(path.iscfile(l)~=premake.project.iscproject(i))if a or(s and i)or(type(e.individualSourceFileOptions)=='function')then\n_p(o,'<FileConfiguration')_p(o,'\\tName=\"%s\"',t.name)_p(o,'\\t>')_p(o,'\\t<Tool')_p(o,'\\t\\tName=\"%s\"',iif(n.system==\"Xbox360\",\"VCCLX360CompilerTool\",\"VCCLCompilerTool\"))if i then\n_p(o,'\\t\\tCompileAs="
190+ "\"%s\"',iif(path.iscfile(l),1,2))end\nif a then\nif n.system==\"PS3\"then\nlocal e=table.join(premake.snc.getcflags(n),premake.snc.getcxxflags(n),n.buildoptions)e=table.concat(e,\" \");e=e..' --create_pch=\"$(IntDir)/$(TargetName).pch\"'_p(o,'\\t\\tAdditionalOptions=\"%s\"',premake.esc(e))else\n_p(o,'\\t\\tUsePrecompiledHeader=\"1\"')end\nend\n_p(o,'\\t/>')_p(o,'</FileConfiguration>')end\nend\nend\nend\nfunction e.Files(n)local o=premake.project.buildsourcetree(n)r.traverse(o,{onbranchenter=function(o,e)_p(e,'<Filter')_p(e,'\\tName=\"%s\"',o.name)_p(e,'\\tFilter=\"\"')_p(e,'\\t>')end,onbranchexit=function(o,e)_p(e,'</Filter>')end,onleaf=function(t,o)local i=t.cfg.name\n_p(o,'<File')_p(o,'\\tRelativePath=\"%s\"',path.translate(i,\"\\\\\"))_p(o,'\\t>')o=o+1\ne.individualSourceFile(n,o,i,t)o=o-1\n_p(o,'</File>')end,},false,2)end\nfunction e.Platforms(e)local o={}_p(1,'<Platforms>')for n,e in ipairs(e.solution.vstudio_configs)do\nif e.isreal and not table.contains(o,e.platform)then\ntable.insert(o,e.platform)_p(2,"
191+ "'<Platform')_p(3,'Name=\"%s\"',e.platform)_p(2,'/>')end\nend\n_p(1,'</Platforms>')end\nfunction e.Symbols(o)if(not o.flags.Symbols)then\nreturn 0\nelse\nif o.flags.NoEditAndContinue or\ne.optimization(o)~=0 or\no.flags.Managed or\no.platform==\"x64\"then\nreturn 3\nelse\nreturn 4\nend\nend\nend\nfunction e.VCCLCompilerTool(o)_p(3,'<Tool')_p(4,'Name=\"%s\"',iif(o.platform~=\"Xbox360\",\"VCCLCompilerTool\",\"VCCLX360CompilerTool\"))if#o.buildoptions>0 then\n_p(4,'AdditionalOptions=\"%s\"',table.concat(premake.esc(o.buildoptions),\" \"))end\n_p(4,'Optimization=\"%s\"',e.optimization(o))if o.flags.NoFramePointer then\n_p(4,'OmitFramePointers=\"%s\"',n(true))end\nif#o.includedirs>0 then\n_p(4,'AdditionalIncludeDirectories=\"%s\"',premake.esc(path.translate(table.concat(o.includedirs,\";\"),'\\\\')))end\nif#o.defines>0 then\n_p(4,'PreprocessorDefinitions=\"%s\"',premake.esc(table.concat(o.defines,\";\")))end\nif premake.config.isdebugbuild(o)and not o.flags.NoMinimalRebuild and not o.flags.Managed then\n_p(4,'Minima"
192+ "lRebuild=\"%s\"',n(true))end\nif o.flags.NoExceptions then\n_p(4,'ExceptionHandling=\"%s\"',iif(_ACTION<\"vs2005\",\"FALSE\",0))elseif o.flags.SEH and _ACTION>\"vs2003\"then\n_p(4,'ExceptionHandling=\"2\"')end\nif e.optimization(o)==0 and not o.flags.Managed then\n_p(4,'BasicRuntimeChecks=\"3\"')end\nif e.optimization(o)~=0 then\n_p(4,'StringPooling=\"%s\"',n(true))end\nlocal i\nif premake.config.isdebugbuild(o)then\ni=iif(o.flags.StaticRuntime,1,3)else\ni=iif(o.flags.StaticRuntime,0,2)end\n_p(4,'RuntimeLibrary=\"%s\"',i)_p(4,'EnableFunctionLevelLinking=\"%s\"',n(true))if _ACTION>\"vs2003\"and o.platform~=\"Xbox360\"and o.platform~=\"x64\"then\nif o.flags.EnableSSE then\n_p(4,'EnableEnhancedInstructionSet=\"1\"')elseif o.flags.EnableSSE2 then\n_p(4,'EnableEnhancedInstructionSet=\"2\"')end\nend\nif _ACTION<\"vs2005\"then\nif o.flags.FloatFast then\n_p(4,'ImproveFloatingPointConsistency=\"%s\"',n(false))elseif o.flags.FloatStrict then\n_p(4,'ImproveFloatingPointConsistency=\"%s\"',n(true))end\nelse\nif o.flags.F"
193+ "loatFast then\n_p(4,'FloatingPointModel=\"2\"')elseif o.flags.FloatStrict then\n_p(4,'FloatingPointModel=\"1\"')end\nend\nif _ACTION<\"vs2005\"and not o.flags.NoRTTI then\n_p(4,'RuntimeTypeInfo=\"%s\"',n(true))elseif _ACTION>\"vs2003\"and o.flags.NoRTTI and not o.flags.Managed then\n_p(4,'RuntimeTypeInfo=\"%s\"',n(false))end\nif o.flags.NativeWChar then\n_p(4,'TreatWChar_tAsBuiltInType=\"%s\"',n(true))elseif o.flags.NoNativeWChar then\n_p(4,'TreatWChar_tAsBuiltInType=\"%s\"',n(false))end\nif not o.flags.NoPCH and o.pchheader then\n_p(4,'UsePrecompiledHeader=\"%s\"',iif(_ACTION<\"vs2005\",3,2))_p(4,'PrecompiledHeaderThrough=\"%s\"',o.pchheader)else\n_p(4,'UsePrecompiledHeader=\"%s\"',iif(_ACTION>\"vs2003\"or o.flags.NoPCH,0,2))end\n_p(4,'WarningLevel=\"%s\"',iif(o.flags.ExtraWarnings,4,3))if o.flags.FatalWarnings then\n_p(4,'WarnAsError=\"%s\"',n(true))end\nif _ACTION<\"vs2008\"and not o.flags.Managed then\n_p(4,'Detect64BitPortabilityProblems=\"%s\"',n(not o.flags.No64BitChecks))end\n_p(4,'ProgramDataBaseFileN"
194+ "ame=\"$(OutDir)\\\\%s.pdb\"',path.getbasename(o.buildtarget.name))_p(4,'DebugInformationFormat=\"%s\"',e.Symbols(o))if o.language==\"C\"then\n_p(4,'CompileAs=\"1\"')end\n_p(3,'/>')end\nfunction e.VCLinkerTool(o)_p(3,'<Tool')if o.kind~=\"StaticLib\"then\n_p(4,'Name=\"%s\"',iif(o.platform~=\"Xbox360\",\"VCLinkerTool\",\"VCX360LinkerTool\"))if o.flags.NoImportLib then\n_p(4,'IgnoreImportLibrary=\"%s\"',n(true))end\nif#o.linkoptions>0 then\n_p(4,'AdditionalOptions=\"%s\"',table.concat(premake.esc(o.linkoptions),\" \"))end\nif#o.links>0 then\n_p(4,'AdditionalDependencies=\"%s\"',table.concat(premake.getlinks(o,\"all\",\"fullpath\"),\" \"))end\n_p(4,'OutputFile=\"$(OutDir)\\\\%s\"',o.buildtarget.name)_p(4,'LinkIncremental=\"%s\"',iif(premake.config.isincrementallink(o),2,1))_p(4,'AdditionalLibraryDirectories=\"%s\"',table.concat(premake.esc(path.translate(o.libdirs,'\\\\')),\";\"))local i=premake.findfile(o,\".def\")if i then\n_p(4,'ModuleDefinitionFile=\"%s\"',i)end\nif o.flags.NoManifest then\n_p(4,'GenerateManife"
195+ "st=\"%s\"',n(false))end\n_p(4,'GenerateDebugInformation=\"%s\"',n(e.Symbols(o)~=0))if e.Symbols(o)~=0 then\n_p(4,'ProgramDataBaseFileName=\"$(OutDir)\\\\%s.pdb\"',path.getbasename(o.buildtarget.name))end\n_p(4,'SubSystem=\"%s\"',iif(o.kind==\"ConsoleApp\",1,2))if e.optimization(o)~=0 then\n_p(4,'OptimizeReferences=\"2\"')_p(4,'EnableCOMDATFolding=\"2\"')end\nif(o.kind==\"ConsoleApp\"or o.kind==\"WindowedApp\")and not o.flags.WinMain then\n_p(4,'EntryPointSymbol=\"%s\"',iif(o.flags.Unicode,\"wmainCRTStartup\",\"mainCRTStartup\"))end\nif o.kind==\"SharedLib\"then\nlocal e=o.linktarget.fullpath\n_p(4,'ImportLibrary=\"%s\"',iif(o.flags.NoImportLib,o.objectsdir..\"\\\\\"..path.getname(e),e))end\n_p(4,'TargetMachine=\"%d\"',iif(o.platform==\"x64\",17,1))else\n_p(4,'Name=\"VCLibrarianTool\"')if#o.links>0 then\n_p(4,'AdditionalDependencies=\"%s\"',table.concat(premake.getlinks(o,\"all\",\"fullpath\"),\" \"))end\n_p(4,'OutputFile=\"$(OutDir)\\\\%s\"',o.buildtarget.name)if#o.libdirs>0 then\n_p(4,'AdditionalLibraryDirect"
196+ "ories=\"%s\"',premake.esc(path.translate(table.concat(o.libdirs,\";\"))))end\nlocal e={}if o.platform==\"x32\"then\ntable.insert(e,\"/MACHINE:X86\")elseif o.platform==\"x64\"then\ntable.insert(e,\"/MACHINE:X64\")end\ne=table.join(e,o.linkoptions)if#e>0 then\n_p(4,'AdditionalOptions=\"%s\"',table.concat(premake.esc(e),\" \"))end\nend\n_p(3,'/>')end\nfunction e.VCCLCompilerTool_PS3(e)_p(3,'<Tool')_p(4,'Name=\"VCCLCompilerTool\"')local o=table.join(premake.snc.getcflags(e),premake.snc.getcxxflags(e),e.buildoptions)if not e.flags.NoPCH and e.pchheader then\n_p(4,'UsePrecompiledHeader=\"%s\"',iif(_ACTION<\"vs2005\",3,2))_p(4,'PrecompiledHeaderThrough=\"%s\"',path.getname(e.pchheader))table.insert(o,'--use_pch=\"$(IntDir)/$(TargetName).pch\"')else\n_p(4,'UsePrecompiledHeader=\"%s\"',iif(_ACTION>\"vs2003\"or e.flags.NoPCH,0,2))end\n_p(4,'AdditionalOptions=\"%s\"',premake.esc(table.concat(o,\" \")))if#e.includedirs>0 then\n_p(4,'AdditionalIncludeDirectories=\"%s\"',premake.esc(path.translate(table.concat(e.includedirs"
197+ ",\";\"),'\\\\')))end\nif#e.defines>0 then\n_p(4,'PreprocessorDefinitions=\"%s\"',table.concat(premake.esc(e.defines),\";\"))end\n_p(4,'ProgramDataBaseFileName=\"$(OutDir)\\\\%s.pdb\"',path.getbasename(e.buildtarget.name))_p(4,'DebugInformationFormat=\"0\"')_p(4,'CompileAs=\"0\"')_p(3,'/>')end\nfunction e.VCLinkerTool_PS3(e)_p(3,'<Tool')if e.kind~=\"StaticLib\"then\n_p(4,'Name=\"VCLinkerTool\"')local o=table.join(premake.snc.getldflags(e),e.linkoptions)if#o>0 then\n_p(4,'AdditionalOptions=\"%s\"',premake.esc(table.concat(o,\" \")))end\nif#e.links>0 then\n_p(4,'AdditionalDependencies=\"%s\"',table.concat(premake.getlinks(e,\"all\",\"fullpath\"),\" \"))end\n_p(4,'OutputFile=\"$(OutDir)\\\\%s\"',e.buildtarget.name)_p(4,'LinkIncremental=\"0\"')_p(4,'AdditionalLibraryDirectories=\"%s\"',table.concat(premake.esc(path.translate(e.libdirs,'\\\\')),\";\"))_p(4,'GenerateManifest=\"%s\"',n(false))_p(4,'ProgramDatabaseFile=\"\"')_p(4,'RandomizedBaseAddress=\"1\"')_p(4,'DataExecutionPrevention=\"0\"')else\n_p(4,'Name=\"VCLi"
198+ "brarianTool\"')local o=table.join(premake.snc.getldflags(e),e.linkoptions)if#o>0 then\n_p(4,'AdditionalOptions=\"%s\"',premake.esc(table.concat(o,\" \")))end\nif#e.links>0 then\n_p(4,'AdditionalDependencies=\"%s\"',table.concat(premake.getlinks(e,\"all\",\"fullpath\"),\" \"))end\n_p(4,'OutputFile=\"$(OutDir)\\\\%s\"',e.buildtarget.name)if#e.libdirs>0 then\n_p(4,'AdditionalLibraryDirectories=\"%s\"',premake.esc(path.translate(table.concat(e.libdirs,\";\"))))end\nend\n_p(3,'/>')end\nfunction e.VCResourceCompilerTool(e)_p(3,'<Tool')_p(4,'Name=\"VCResourceCompilerTool\"')if#e.resoptions>0 then\n_p(4,'AdditionalOptions=\"%s\"',table.concat(premake.esc(e.resoptions),\" \"))end\nif#e.defines>0 or#e.resdefines>0 then\n_p(4,'PreprocessorDefinitions=\"%s\"',table.concat(premake.esc(table.join(e.defines,e.resdefines)),\";\"))end\nif#e.includedirs>0 or#e.resincludedirs>0 then\nlocal e=table.join(e.includedirs,e.resincludedirs)_p(4,'AdditionalIncludeDirectories=\"%s\"',premake.esc(path.translate(table.concat(e,\";\"),'"
199+ "\\\\')))end\n_p(3,'/>')end\nfunction e.VCManifestTool(o)local e={}for n,o in ipairs(o.files)do\nif path.getextension(o)==\".manifest\"then\ntable.insert(e,o)end\nend\n_p(3,'<Tool')_p(4,'Name=\"VCManifestTool\"')if#e>0 then\n_p(4,'AdditionalManifestFiles=\"%s\"',premake.esc(table.concat(e,\";\")))end\n_p(3,'/>')end\nfunction e.VCMIDLTool(e)_p(3,'<Tool')_p(4,'Name=\"VCMIDLTool\"')if e.platform==\"x64\"then\n_p(4,'TargetEnvironment=\"3\"')end\n_p(3,'/>')end\nfunction e.buildstepsblock(n,o)_p(3,'<Tool')_p(4,'Name=\"%s\"',n)if#o>0 then\n_p(4,'CommandLine=\"%s\"',premake.esc(table.implode(o,\"\",\"\",\"\\r\\n\")))end\n_p(3,'/>')end\ne.toolmap={VCCLCompilerTool=e.VCCLCompilerTool,VCCLCompilerTool_PS3=e.VCCLCompilerTool_PS3,VCLinkerTool=e.VCLinkerTool,VCLinkerTool_PS3=e.VCLinkerTool_PS3,VCManifestTool=e.VCManifestTool,VCMIDLTool=e.VCMIDLTool,VCResourceCompilerTool=e.VCResourceCompilerTool,VCPreBuildEventTool=function(o)e.buildstepsblock(\"VCPreBuildEventTool\",o.prebuildcommands)end,VCPreLinkEventTool=function(o)e.bui"
200+ "ldstepsblock(\"VCPreLinkEventTool\",o.prelinkcommands)end,VCPostBuildEventTool=function(o)e.buildstepsblock(\"VCPostBuildEventTool\",o.postbuildcommands)end,}local function t(o,e)if o==\"vs2002\"then\nreturn{\"VCCLCompilerTool\",\"VCCustomBuildTool\",\"VCLinkerTool\",\"VCMIDLTool\",\"VCPostBuildEventTool\",\"VCPreBuildEventTool\",\"VCPreLinkEventTool\",\"VCResourceCompilerTool\",\"VCWebServiceProxyGeneratorTool\",\"VCWebDeploymentTool\"}end\nif o==\"vs2003\"then\nreturn{\"VCCLCompilerTool\",\"VCCustomBuildTool\",\"VCLinkerTool\",\"VCMIDLTool\",\"VCPostBuildEventTool\",\"VCPreBuildEventTool\",\"VCPreLinkEventTool\",\"VCResourceCompilerTool\",\"VCWebServiceProxyGeneratorTool\",\"VCXMLDataGeneratorTool\",\"VCWebDeploymentTool\",\"VCManagedWrapperGeneratorTool\",\"VCAuxiliaryManagedWrapperGeneratorTool\"}end\nif e==\"Xbox360\"then\nreturn{\"VCPreBuildEventTool\",\"VCCustomBuildTool\",\"VCXMLDataGeneratorTool\",\"VCWebServiceProxyGeneratorTool\",\"VCMIDLTool\",\"VCCLCompilerTool\",\"VCManagedResourceCompilerTool\","
201+ "\"VCResourceCompilerTool\",\"VCPreLinkEventTool\",\"VCLinkerTool\",\"VCALinkTool\",\"VCX360ImageTool\",\"VCBscMakeTool\",\"VCX360DeploymentTool\",\"VCPostBuildEventTool\",\"DebuggerTool\",}end\nif e==\"PS3\"then\nreturn{\"VCPreBuildEventTool\",\"VCCustomBuildTool\",\"VCXMLDataGeneratorTool\",\"VCWebServiceProxyGeneratorTool\",\"VCMIDLTool\",\"VCCLCompilerTool_PS3\",\"VCManagedResourceCompilerTool\",\"VCResourceCompilerTool\",\"VCPreLinkEventTool\",\"VCLinkerTool_PS3\",\"VCALinkTool\",\"VCManifestTool\",\"VCXDCMakeTool\",\"VCBscMakeTool\",\"VCFxCopTool\",\"VCAppVerifierTool\",\"VCWebDeploymentTool\",\"VCPostBuildEventTool\"}else\nreturn{\"VCPreBuildEventTool\",\"VCCustomBuildTool\",\"VCXMLDataGeneratorTool\",\"VCWebServiceProxyGeneratorTool\",\"VCMIDLTool\",\"VCCLCompilerTool\",\"VCManagedResourceCompilerTool\",\"VCResourceCompilerTool\",\"VCPreLinkEventTool\",\"VCLinkerTool\",\"VCALinkTool\",\"VCManifestTool\",\"VCXDCMakeTool\",\"VCBscMakeTool\",\"VCFxCopTool\",\"VCAppVerifierTool\",\"VCWebDeploymentTool\",\"V"
202+ "CPostBuildEventTool\"}end\nend\nfunction e.generate(n)e.header('VisualStudioProject')_p(1,'Name=\"%s\"',premake.esc(n.name))_p(1,'ProjectGUID=\"{%s}\"',n.uuid)if _ACTION>\"vs2003\"then\n_p(1,'RootNamespace=\"%s\"',n.name)end\n_p(1,'Keyword=\"%s\"',iif(n.flags.Managed,\"ManagedCProj\",\"Win32Proj\"))_p(1,'>')e.Platforms(n)if _ACTION>\"vs2003\"then\n_p(1,'<ToolFiles>')_p(1,'</ToolFiles>')end\n_p(1,'<Configurations>')for o,i in ipairs(n.solution.vstudio_configs)do\nif i.isreal then\nlocal o=premake.getconfig(n,i.src_buildcfg,i.src_platform)e.Configuration(i.name,o)for i,n in ipairs(t(_ACTION,i.src_platform))do\nif e.toolmap[n]then\ne.toolmap[n](o)elseif n==\"VCX360DeploymentTool\"then\n_p(3,'<Tool')_p(4,'Name=\"VCX360DeploymentTool\"')_p(4,'DeploymentType=\"0\"')if#o.deploymentoptions>0 then\n_p(4,'AdditionalOptions=\"%s\"',table.concat(premake.esc(o.deploymentoptions),\" \"))end\n_p(3,'/>')elseif n==\"VCX360ImageTool\"then\n_p(3,'<Tool')_p(4,'Name=\"VCX360ImageTool\"')if#o.imageoptions>0 then\n_p(4,'AdditionalOp"
203+ "tions=\"%s\"',table.concat(premake.esc(o.imageoptions),\" \"))end\nif o.imagepath~=nil then\n_p(4,'OutputFileName=\"%s\"',premake.esc(path.translate(o.imagepath)))end\n_p(3,'/>')elseif n==\"DebuggerTool\"then\n_p(3,'<DebuggerTool')_p(3,'/>')else\n_p(3,'<Tool')_p(4,'Name=\"%s\"',n)_p(3,'/>')end\nend\n_p(2,'</Configuration>')end\nend\n_p(1,'</Configurations>')_p(1,'<References>')_p(1,'</References>')_p(1,'<Files>')e.Files(n)_p(1,'</Files>')_p(1,'<Globals>')_p(1,'</Globals>')_p('</VisualStudioProject>')end",
204204
205205 /* actions/vstudio/vs200x_vcproj_user.lua */
206206 "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",
@@ -226,24 +226,24 @@
226226 "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",
227227
228228 /* actions/vstudio/vs2010_vcxproj.lua */
229- "premake.vstudio.vc2010={}local e=premake.vstudio.vc2010\nlocal p=premake.vstudio\nlocal function l(e)_p(1,'<ItemGroup Label=\"ProjectConfigurations\">')for n,e in ipairs(e.solution.vstudio_configs)do\n_p(2,'<ProjectConfiguration Include=\"%s\">',premake.esc(e.name))_p(3,'<Configuration>%s</Configuration>',e.buildcfg)_p(3,'<Platform>%s</Platform>',e.platform)_p(2,'</ProjectConfiguration>')end\n_p(1,'</ItemGroup>')end\nlocal function s(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)'"
229+ "premake.vstudio.vc2010={}local e=premake.vstudio.vc2010\nlocal l=premake.vstudio\nlocal function p(e)_p(1,'<ItemGroup Label=\"ProjectConfigurations\">')for n,e in ipairs(e.solution.vstudio_configs)do\n_p(2,'<ProjectConfiguration Include=\"%s\">',premake.esc(e.name))_p(3,'<Configuration>%s</Configuration>',e.buildcfg)_p(3,'<Platform>%s</Platform>',e.platform)_p(2,'</ProjectConfiguration>')end\n_p(1,'</ItemGroup>')end\nlocal function r(e)_p(1,'<PropertyGroup Label=\"Globals\">')_p(2,'<ProjectGuid>{%s}</ProjectGuid>',e.uuid)_p(2,'<RootNamespace>%s</RootNamespace>',e.name)if e.flags and e.flags.Managed then\n_p(2,'<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>')_p(2,'<Keyword>ManagedCProj</Keyword>')else\n_p(2,'<Keyword>Win32Proj</Keyword>')end\n_p(1,'</PropertyGroup>')end\nfunction e.config_type(e)local n={SharedLib=\"DynamicLibrary\",StaticLib=\"StaticLibrary\",ConsoleApp=\"Application\",WindowedApp=\"Application\"}return n[e.kind]end\nlocal function i()return\"Condition=\\\"'$(Configuration)|$(Platform)'"
230230 "=='%s'\\\"\"end\nlocal function o(n)local e=\"Disabled\"for i,n in ipairs(n.flags)do\nif(n==\"Optimize\")then\ne=\"Full\"elseif(n==\"OptimizeSize\")then\ne=\"MinSpace\"elseif(n==\"OptimizeSpeed\")then\ne=\"MaxSpeed\"end\nend\nreturn e\nend\nfunction e.configurationPropertyGroup(n,t)_p(1,'<PropertyGroup '..i()..' Label=\"Configuration\">',premake.esc(t.name))_p(2,'<ConfigurationType>%s</ConfigurationType>',e.config_type(n))_p(2,'<UseDebugLibraries>%s</UseDebugLibraries>',iif(o(n)==\"Disabled\",\"true\",\"false\"))_p(2,'<CharacterSet>%s</CharacterSet>',iif(n.flags.Unicode,\"Unicode\",\"MultiByte\"))local e={vs2012=\"v110\",vs2013=\"v120\",vs2015=\"v140\",vs2017=\"v141\",vs2019=\"v142\",vs2022=\"v143\"}local e=e[_ACTION]if e then\n_p(2,'<PlatformToolset>%s</PlatformToolset>',e)end\nif n.flags.MFC then\n_p(2,'<UseOfMfc>%s</UseOfMfc>',iif(n.flags.StaticRuntime,\"Static\",\"Dynamic\"))end\nif n.flags.ATL or n.flags.StaticATL then\n_p(2,'<UseOfAtl>%s</UseOfAtl>',iif(n.flags.StaticATL,\"Static\",\"Dynamic\"))end\nif n"
231- ".flags.Managed then\n_p(2,'<CLRSupport>true</CLRSupport>')end\n_p(1,'</PropertyGroup>')end\nlocal function r(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)))"
232- "_p(2,'<TargetExt>%s</TargetExt>',premake.esc(path.getextension(n.name)))if e.kind==\"SharedLib\"then\nlocal e=(e.flags.NoImportLib~=nil)_p(2,'<IgnoreImportLibrary>%s</IgnoreImportLibrary>',tostring(e))end\nif e.kind~=\"StaticLib\"then\n_p(2,'<LinkIncremental>%s</LinkIncremental>',tostring(premake.config.isincrementallink(e)))end\nif e.flags.NoManifest then\n_p(2,'<GenerateManifest>false</GenerateManifest>')end\n_p(1,'</PropertyGroup>')end\nend\nlocal function d(i)local n\nlocal e=i.flags\nif premake.config.isdebugbuild(i)then\nn=iif(e.StaticRuntime and not e.Managed,\"MultiThreadedDebug\",\"MultiThreadedDebugDLL\")else\nn=iif(e.StaticRuntime and not e.Managed,\"MultiThreaded\",\"MultiThreadedDLL\")end\nreturn n\nend\nlocal function f(e)if not e.flags.NoPCH and e.pchheader then\n_p(3,'<PrecompiledHeader>Use</PrecompiledHeader>')_p(3,'<PrecompiledHeaderFile>%s</PrecompiledHeaderFile>',e.pchheader)else\n_p(3,'<PrecompiledHeader></PrecompiledHeader>')end\nend\nlocal function t(n,e)if#e.defines>0 then\n_p(n,'<Prepr"
233- "ocessorDefinitions>%s;%%(PreprocessorDefinitions)</PreprocessorDefinitions>',premake.esc(table.concat(e.defines,\";\")))else\n_p(n,'<PreprocessorDefinitions></PreprocessorDefinitions>')end\nend\nlocal function P(n,e)if#e.includedirs>0 then\n_p(n,'<AdditionalIncludeDirectories>%s;%%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>',premake.esc(path.translate(table.concat(e.includedirs,\";\"),'\\\\')))end\nend\nlocal function 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 h(e)_p(2,'<ResourceCompile>')t(3,e)n(3,e)_p(2,'</ResourceCompile>')end\nlocal function u(e)if e.flags.NoExceptions then\n_p(2,'<ExceptionHandling>false</ExceptionHandling>')elseif e.flags.SEH then\n_p(2,'<ExceptionHandling>Async</ExceptionHandling>')end\nend\nlocal function c(e)if e.flags.NoRTT"
231+ ".flags.Managed then\n_p(2,'<CLRSupport>true</CLRSupport>')end\n_p(1,'</PropertyGroup>')end\nlocal function s(n)for t,e in ipairs(n.solution.vstudio_configs)do\nlocal n=premake.getconfig(n,e.src_buildcfg,e.src_platform)_p(1,'<ImportGroup '..i()..' Label=\"PropertySheets\">',premake.esc(e.name))_p(2,'<Import Project=\"$(UserRootDir)\\\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists(\\'$(UserRootDir)\\\\Microsoft.Cpp.$(Platform).user.props\\')\" Label=\"LocalAppDataPlatform\" />')_p(1,'</ImportGroup>')end\nend\nfunction e.outputProperties(e)for n,t in ipairs(e.solution.vstudio_configs)do\nlocal e=premake.getconfig(e,t.src_buildcfg,t.src_platform)local n=e.buildtarget\n_p(1,'<PropertyGroup '..i()..'>',premake.esc(t.name))_p(2,'<OutDir>%s\\\\</OutDir>',premake.esc(n.directory))if e.platform==\"Xbox360\"then\n_p(2,'<OutputFile>$(OutDir)%s</OutputFile>',premake.esc(n.name))end\n_p(2,'<IntDir>%s\\\\</IntDir>',premake.esc(e.objectsdir))_p(2,'<TargetName>%s</TargetName>',premake.esc(path.getbasename(n.name)))"
232+ "_p(2,'<TargetExt>%s</TargetExt>',premake.esc(path.getextension(n.name)))if e.kind==\"SharedLib\"then\nlocal e=(e.flags.NoImportLib~=nil)_p(2,'<IgnoreImportLibrary>%s</IgnoreImportLibrary>',tostring(e))end\nif e.kind~=\"StaticLib\"then\n_p(2,'<LinkIncremental>%s</LinkIncremental>',tostring(premake.config.isincrementallink(e)))end\nif e.flags.NoManifest then\n_p(2,'<GenerateManifest>false</GenerateManifest>')end\n_p(1,'</PropertyGroup>')end\nend\nlocal function d(i)local n\nlocal e=i.flags\nif premake.config.isdebugbuild(i)then\nn=iif(e.StaticRuntime and not e.Managed,\"MultiThreadedDebug\",\"MultiThreadedDebugDLL\")else\nn=iif(e.StaticRuntime and not e.Managed,\"MultiThreaded\",\"MultiThreadedDLL\")end\nreturn n\nend\nlocal function C(e)if not e.flags.NoPCH and e.pchheader then\n_p(3,'<PrecompiledHeader>Use</PrecompiledHeader>')_p(3,'<PrecompiledHeaderFile>%s</PrecompiledHeaderFile>',e.pchheader)else\n_p(3,'<PrecompiledHeader></PrecompiledHeader>')end\nend\nlocal function t(n,e)if#e.defines>0 then\n_p(n,'<Prepr"
233+ "ocessorDefinitions>%s;%%(PreprocessorDefinitions)</PreprocessorDefinitions>',premake.esc(table.concat(e.defines,\";\")))else\n_p(n,'<PreprocessorDefinitions></PreprocessorDefinitions>')end\nend\nlocal function P(n,e)if#e.includedirs>0 then\n_p(n,'<AdditionalIncludeDirectories>%s;%%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>',premake.esc(path.translate(table.concat(e.includedirs,\";\"),'\\\\')))end\nend\nlocal function a(n,e)if#e.includedirs>0 or#e.resincludedirs>0 then\nlocal e=table.join(e.includedirs,e.resincludedirs)_p(n,'<AdditionalIncludeDirectories>%s;%%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>',premake.esc(path.translate(table.concat(e,\";\"),'\\\\')))end\nend\nlocal function f(e)_p(2,'<ResourceCompile>')t(3,e)a(3,e)_p(2,'</ResourceCompile>')end\nlocal function u(e)if e.flags.NoExceptions then\n_p(2,'<ExceptionHandling>false</ExceptionHandling>')elseif e.flags.SEH then\n_p(2,'<ExceptionHandling>Async</ExceptionHandling>')end\nend\nlocal function c(e)if e.flags.NoRTT"
234234 "I and not e.flags.Managed then\n_p(3,'<RuntimeTypeInfo>false</RuntimeTypeInfo>')end\nend\nlocal function m(e)if e.flags.NativeWChar then\n_p(3,'<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>')elseif e.flags.NoNativeWChar then\n_p(3,'<TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>')end\nend\nlocal function g(e)if e.flags.EnableSSE then\n_p(3,'<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>')elseif e.flags.EnableSSE2 then\n_p(3,'<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>')end\nend\nlocal function b(e)if e.flags.FloatFast then\n_p(3,'<FloatingPointModel>Fast</FloatingPointModel>')elseif e.flags.FloatStrict and not e.flags.Managed then\n_p(3,'<FloatingPointModel>Strict</FloatingPointModel>')end\nend\nlocal function a(e)local n=''if e.flags.Symbols then\nif e.platform==\"x64\"or e.flags.Managed\nor premake.config.isoptimizedbuild(e.flags)or e.flags.NoEditAndContinue\nthen\nn=\"ProgramDatabase\"else\nn=\"EditAnd"
235- "Continue\"end\nend\n_p(3,'<DebugInformationFormat>%s</DebugInformationFormat>',n)end\nlocal function n(e)if premake.config.isdebugbuild(e)and not e.flags.NoMinimalRebuild then\n_p(3,'<MinimalRebuild>true</MinimalRebuild>')else\n_p(3,'<MinimalRebuild>false</MinimalRebuild>')end\nend\nlocal function _(e)if e.language==\"C\"then\n_p(3,'<CompileAs>CompileAsC</CompileAs>')end\nend\nlocal function C(e)_p(2,'<ClCompile>')if#e.buildoptions>0 then\n_p(3,'<AdditionalOptions>%s %%(AdditionalOptions)</AdditionalOptions>',table.concat(premake.esc(e.buildoptions),\" \"))end\n_p(3,'<Optimization>%s</Optimization>',o(e))P(3,e)t(3,e)n(e)if not premake.config.isoptimizedbuild(e.flags)then\nif not e.flags.Managed then\n_p(3,'<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>')end\nif e.flags.ExtraWarnings then\n_p(3,'<SmallerTypeCheck>true</SmallerTypeCheck>')end\nelse\n_p(3,'<StringPooling>true</StringPooling>')end\n_p(3,'<RuntimeLibrary>%s</RuntimeLibrary>',d(e))_p(3,'<FunctionLevelLinking>true</FunctionLevelLinking>')f"
235+ "Continue\"end\nend\n_p(3,'<DebugInformationFormat>%s</DebugInformationFormat>',n)end\nlocal function n(e)if premake.config.isdebugbuild(e)and not e.flags.NoMinimalRebuild then\n_p(3,'<MinimalRebuild>true</MinimalRebuild>')else\n_p(3,'<MinimalRebuild>false</MinimalRebuild>')end\nend\nlocal function _(e)if e.language==\"C\"then\n_p(3,'<CompileAs>CompileAsC</CompileAs>')end\nend\nlocal function h(e)_p(2,'<ClCompile>')if#e.buildoptions>0 then\n_p(3,'<AdditionalOptions>%s %%(AdditionalOptions)</AdditionalOptions>',table.concat(premake.esc(e.buildoptions),\" \"))end\n_p(3,'<Optimization>%s</Optimization>',o(e))P(3,e)t(3,e)n(e)if not premake.config.isoptimizedbuild(e.flags)then\nif not e.flags.Managed then\n_p(3,'<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>')end\nif e.flags.ExtraWarnings then\n_p(3,'<SmallerTypeCheck>true</SmallerTypeCheck>')end\nelse\n_p(3,'<StringPooling>true</StringPooling>')end\n_p(3,'<RuntimeLibrary>%s</RuntimeLibrary>',d(e))_p(3,'<FunctionLevelLinking>true</FunctionLevelLinking>')C"
236236 "(e)if e.flags.ExtraWarnings then\n_p(3,'<WarningLevel>Level4</WarningLevel>')else\n_p(3,'<WarningLevel>Level3</WarningLevel>')end\nif e.flags.FatalWarnings then\n_p(3,'<TreatWarningAsError>true</TreatWarningAsError>')end\nu(e)c(e)m(e)g(e)b(e)a(e)if e.flags.Symbols then\n_p(3,'<ProgramDataBaseFileName>$(OutDir)%s.pdb</ProgramDataBaseFileName>',path.getbasename(e.buildtarget.name))end\nif e.flags.NoFramePointer then\n_p(3,'<OmitFramePointers>true</OmitFramePointers>')end\n_(e)_p(2,'</ClCompile>')end\nlocal function c(e)if#e.postbuildcommands>0 then\n_p(2,'<PostBuildEvent>')_p(3,'<Command>%s</Command>',premake.esc(table.implode(e.postbuildcommands,\"\",\"\",\"\\r\\n\")))_p(2,'</PostBuildEvent>')end\nif#e.prebuildcommands>0 then\n_p(2,'<PreBuildEvent>')_p(3,'<Command>%s</Command>',premake.esc(table.implode(e.prebuildcommands,\"\",\"\",\"\\r\\n\")))_p(2,'</PreBuildEvent>')end\nif#e.prelinkcommands>0 then\n_p(2,'<PreLinkEvent>')_p(3,'<Command>%s</Command>',premake.esc(table.implode(e.prelinkcommands,\"\",\"\",\"\\r"
237237 "\\n\")))_p(2,'</PreLinkEvent>')end\nend\nlocal function o(n,e)if#e.linkoptions>0 then\n_p(n,'<AdditionalOptions>%s %%(AdditionalOptions)</AdditionalOptions>',table.concat(premake.esc(e.linkoptions),\" \"))end\nend\nlocal function t(i,e)local n={x32='MachineX86',x64='MachineX64'}if n[e.platform]then\n_p(i,'<TargetMachine>%s</TargetMachine>',n[e.platform])end\nend\nlocal function a(e)if e.kind=='StaticLib'and e.platform~=\"Xbox360\"then\n_p(1,'<Lib>')_p(2,'<OutputFile>$(OutDir)%s</OutputFile>',e.buildtarget.name)o(2,e)t(2,e)_p(1,'</Lib>')end\nend\nlocal function d(e)if e.kind==\"SharedLib\"then\nlocal n=e.linktarget.fullpath\n_p(3,'<ImportLibrary>%s</ImportLibrary>',iif(e.flags.NoImportLib,e.objectsdir..\"\\\\\"..path.getname(n),n))end\nend\nfunction e.link(n)_p(2,'<Link>')_p(3,'<SubSystem>%s</SubSystem>',iif(n.kind==\"ConsoleApp\",\"Console\",\"Windows\"))_p(3,'<GenerateDebugInformation>%s</GenerateDebugInformation>',tostring(n.flags.Symbols~=nil))if premake.config.isoptimizedbuild(n.flags)then\n_p(3,'<EnableCO"
238238 "MDATFolding>true</EnableCOMDATFolding>')_p(3,'<OptimizeReferences>true</OptimizeReferences>')end\nif n.kind~='StaticLib'then\ne.additionalDependencies(n)_p(3,'<OutputFile>$(OutDir)%s</OutputFile>',n.buildtarget.name)if#n.libdirs>0 then\n_p(3,'<AdditionalLibraryDirectories>%s;%%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>',premake.esc(path.translate(table.concat(n.libdirs,';'),'\\\\')))end\nif e.config_type(n)=='Application'and not n.flags.WinMain and not n.flags.Managed then\n_p(3,'<EntryPointSymbol>%s</EntryPointSymbol>',iif(n.flags.Unicode,\"wmainCRTStartup\",\"mainCRTStartup\"))end\nd(n)local e=premake.findfile(n,\".def\")if e then\n_p(3,'<ModuleDefinitionFile>%s</ModuleDefinitionFile>',e)end\nt(3,n)o(3,n)end\n_p(2,'</Link>')end\nfunction e.additionalDependencies(e)local e=premake.getlinks(e,\"system\",\"fullpath\")if#e>0 then\n_p(3,'<AdditionalDependencies>%s;%%(AdditionalDependencies)</AdditionalDependencies>',table.concat(e,\";\"))end\nend\nlocal function d(n)for o,t in ipairs(n.solution"
239- ".vstudio_configs)do\nlocal n=premake.getconfig(n,t.src_buildcfg,t.src_platform)_p(1,'<ItemDefinitionGroup '..i()..'>',premake.esc(t.name))C(n)h(n)a(n)e.link(n)c(n)_p(1,'</ItemDefinitionGroup>')end\nend\nfunction e.getfilegroup(i,t)local e=i.vc2010sortedfiles\nif not e then\ne={ClCompile={},ClInclude={},None={},ResourceCompile={},}for n in premake.project.eachfile(i)do\nif path.iscppfile(n.name)then\ntable.insert(e.ClCompile,n)elseif path.iscppheader(n.name)then\ntable.insert(e.ClInclude,n)elseif path.isresourcefile(n.name)then\ntable.insert(e.ResourceCompile,n)else\ntable.insert(e.None,n)end\nend\ni.vc2010sortedfiles=e\nend\nreturn e[t]end\nfunction e.files(n)e.simplefilesgroup(n,\"ClInclude\")e.compilerfilesgroup(n)e.simplefilesgroup(n,\"None\")e.simplefilesgroup(n,\"ResourceCompile\")end\nfunction e.simplefilesgroup(i,n)local e=e.getfilegroup(i,n)if#e>0 then\n_p(1,'<ItemGroup>')for i,e in ipairs(e)do\n_p(2,'<%s Include=\"%s\" />',n,path.translate(e.name,\"\\\\\"))end\n_p(1,'</ItemGroup>')end\nend\nfunction e"
240- ".individualSourceFile(a,t,n)local e=a.solution.vstudio_configs\nlocal o=path.translate(n.name,\"\\\\\")_p(2,'<ClCompile Include=\"%s\">',o)for n,e in ipairs(e)do\nif t[e]and o==t[e]then\n_p(3,'<PrecompiledHeader '..i()..'>Create</PrecompiledHeader>',premake.esc(e.name))t[e]=nil\nend\nend\nif path.iscfile(n.name)~=premake.project.iscproject(a)then\n_p(3,'<CompileAs>%s</CompileAs>',iif(path.iscfile(n.name),'CompileAsC','CompileAsCpp'))end\n_p(2,'</ClCompile>')end\nfunction e.compilerfilesgroup(n)local i=n.solution.vstudio_configs\nlocal o=e.getfilegroup(n,\"ClCompile\")if#o>0 then\nlocal t={}for e,i in ipairs(i)do\nlocal e=premake.getconfig(n,i.src_buildcfg,i.src_platform)if e.pchheader and e.pchsource and not e.flags.NoPCH then\nt[i]=path.translate(e.pchsource,\"\\\\\")end\nend\n_p(1,'<ItemGroup>')for o,i in ipairs(o)do\ne.individualSourceFile(n,t,i)end\n_p(1,'</ItemGroup>')end\nend\nfunction e.header(n)io.eol=\"\\r\\n\"_p('<?xml version=\"1.0\" encoding=\"utf-8\"?>')local e=\"\"if n then\ne=' DefaultTargets=\""
241- "'..n..'\"'end\n_p('<Project%s ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">',e)end\nfunction premake.vs2010_vcxproj(n)io.indent=\" \"e.header(\"Build\")l(n)s(n)_p(1,'<Import Project=\"$(VCTargetsPath)\\\\Microsoft.Cpp.Default.props\" />')for t,i in ipairs(n.solution.vstudio_configs)do\nlocal n=premake.getconfig(n,i.src_buildcfg,i.src_platform)e.configurationPropertyGroup(n,i)end\n_p(1,'<Import Project=\"$(VCTargetsPath)\\\\Microsoft.Cpp.props\" />')_p(1,'<ImportGroup Label=\"ExtensionSettings\">')_p(1,'</ImportGroup>')r(n)_p(1,'<PropertyGroup Label=\"UserMacros\" />')e.outputProperties(n)d(n)e.files(n)e.projectReferences(n)_p(1,'<Import Project=\"$(VCTargetsPath)\\\\Microsoft.Cpp.targets\" />')_p(1,'<ImportGroup Label=\"ExtensionTargets\">')_p(1,'</ImportGroup>')_p('</Project>')end\nfunction e.projectReferences(n)local e=premake.getdependencies(n)if#e>0 then\n_p(1,'<ItemGroup>')for i,e in ipairs(e)do\nlocal n=path.getrelative(n.location,p.projectfile(e))_p(2,'<ProjectRefe"
242- "rence Include=\"%s\">',path.translate(n,\"\\\\\"))_p(3,'<Project>{%s}</Project>',e.uuid)_p(2,'</ProjectReference>')end\n_p(1,'</ItemGroup>')end\nend\nfunction e.debugdir(e)if e.debugdir then\n_p(' <LocalDebuggerWorkingDirectory>%s</LocalDebuggerWorkingDirectory>',path.translate(e.debugdir,'\\\\'))_p(' <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>')end\nif e.debugargs then\n_p(' <LocalDebuggerCommandArguments>%s</LocalDebuggerCommandArguments>',table.concat(e.debugargs,\" \"))end\nend\nfunction e.debugenvs(e)if e.debugenvs and#e.debugenvs>0 then\n_p(2,'<LocalDebuggerEnvironment>%s%s</LocalDebuggerEnvironment>',table.concat(e.debugenvs,\"\\n\"),iif(e.flags.DebugEnvsInherit,'\\n$(LocalDebuggerEnvironment)',''))if e.flags.DebugEnvsDontMerge then\n_p(2,'<LocalDebuggerMergeEnvironment>false</LocalDebuggerMergeEnvironment>')end\nend\nend\nfunction premake.vs2010_vcxproj_user(t)io.indent=\" \"e.header()for o,n in ipairs(t.solution.vstudio_configs)do\nlocal t=premake.getconfig(t,n.src_buildcfg,n.src_p"
243- "latform)_p(' <PropertyGroup '..i()..'>',premake.esc(n.name))e.debugdir(t)e.debugenvs(t)_p(' </PropertyGroup>')end\n_p('</Project>')end",
239+ ".vstudio_configs)do\nlocal n=premake.getconfig(n,t.src_buildcfg,t.src_platform)_p(1,'<ItemDefinitionGroup '..i()..'>',premake.esc(t.name))h(n)f(n)a(n)e.link(n)c(n)_p(1,'</ItemDefinitionGroup>')end\nend\nfunction e.getfilegroup(i,t)local e=i.vc2010sortedfiles\nif not e then\ne={ClCompile={},ClInclude={},None={},ResourceCompile={},}for n in premake.project.eachfile(i)do\nif path.iscppfile(n.name)then\ntable.insert(e.ClCompile,n)elseif path.iscppheader(n.name)then\ntable.insert(e.ClInclude,n)elseif path.isresourcefile(n.name)then\ntable.insert(e.ResourceCompile,n)else\ntable.insert(e.None,n)end\nend\ni.vc2010sortedfiles=e\nend\nreturn e[t]end\nfunction e.files(n)e.simplefilesgroup(n,\"ClInclude\")e.compilerfilesgroup(n)e.simplefilesgroup(n,\"None\")e.simplefilesgroup(n,\"ResourceCompile\")end\nfunction e.simplefilesgroup(i,n)local e=e.getfilegroup(i,n)if#e>0 then\n_p(1,'<ItemGroup>')for i,e in ipairs(e)do\n_p(2,'<%s Include=\"%s\" />',n,path.translate(e.name,\"\\\\\"))end\n_p(1,'</ItemGroup>')end\nend\nfunction e"
240+ ".individualSourceFileOptions(o,t,n)local e=o.solution.vstudio_configs\nlocal a=path.translate(n.name,\"\\\\\")for n,e in ipairs(e)do\nif t[e]and a==t[e]then\n_p(3,'<PrecompiledHeader '..i()..'>Create</PrecompiledHeader>',premake.esc(e.name))t[e]=nil\nend\nend\nif path.iscfile(n.name)~=premake.project.iscproject(o)then\n_p(3,'<CompileAs>%s</CompileAs>',iif(path.iscfile(n.name),'CompileAsC','CompileAsCpp'))end\nend\nfunction e.individualSourceFile(o,t,n)local i=path.translate(n.name,\"\\\\\")_p(2,'<ClCompile Include=\"%s\">',i)e.individualSourceFileOptions(o,t,n)_p(2,'</ClCompile>')end\nfunction e.compilerfilesgroup(n)local i=n.solution.vstudio_configs\nlocal o=e.getfilegroup(n,\"ClCompile\")if#o>0 then\nlocal t={}for e,i in ipairs(i)do\nlocal e=premake.getconfig(n,i.src_buildcfg,i.src_platform)if e.pchheader and e.pchsource and not e.flags.NoPCH then\nt[i]=path.translate(e.pchsource,\"\\\\\")end\nend\n_p(1,'<ItemGroup>')for o,i in ipairs(o)do\ne.individualSourceFile(n,t,i)end\n_p(1,'</ItemGroup>')end\nend\nfunc"
241+ "tion e.header(n)io.eol=\"\\r\\n\"_p('<?xml version=\"1.0\" encoding=\"utf-8\"?>')local e=\"\"if n then\ne=' DefaultTargets=\"'..n..'\"'end\n_p('<Project%s ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">',e)end\nfunction premake.vs2010_vcxproj(n)io.indent=\" \"e.header(\"Build\")p(n)r(n)_p(1,'<Import Project=\"$(VCTargetsPath)\\\\Microsoft.Cpp.Default.props\" />')for t,i in ipairs(n.solution.vstudio_configs)do\nlocal n=premake.getconfig(n,i.src_buildcfg,i.src_platform)e.configurationPropertyGroup(n,i)end\n_p(1,'<Import Project=\"$(VCTargetsPath)\\\\Microsoft.Cpp.props\" />')_p(1,'<ImportGroup Label=\"ExtensionSettings\">')_p(1,'</ImportGroup>')s(n)_p(1,'<PropertyGroup Label=\"UserMacros\" />')e.outputProperties(n)d(n)e.files(n)e.projectReferences(n)_p(1,'<Import Project=\"$(VCTargetsPath)\\\\Microsoft.Cpp.targets\" />')_p(1,'<ImportGroup Label=\"ExtensionTargets\">')_p(1,'</ImportGroup>')_p('</Project>')end\nfunction e.projectReferences(n)local e=premake.getdependencies(n)if"
242+ "#e>0 then\n_p(1,'<ItemGroup>')for i,e in ipairs(e)do\nlocal n=path.getrelative(n.location,l.projectfile(e))_p(2,'<ProjectReference Include=\"%s\">',path.translate(n,\"\\\\\"))_p(3,'<Project>{%s}</Project>',e.uuid)_p(2,'</ProjectReference>')end\n_p(1,'</ItemGroup>')end\nend\nfunction e.debugdir(e)if e.debugdir then\n_p(' <LocalDebuggerWorkingDirectory>%s</LocalDebuggerWorkingDirectory>',path.translate(e.debugdir,'\\\\'))_p(' <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>')end\nif e.debugargs then\n_p(' <LocalDebuggerCommandArguments>%s</LocalDebuggerCommandArguments>',table.concat(e.debugargs,\" \"))end\nend\nfunction e.debugenvs(e)if e.debugenvs and#e.debugenvs>0 then\n_p(2,'<LocalDebuggerEnvironment>%s%s</LocalDebuggerEnvironment>',table.concat(e.debugenvs,\"\\n\"),iif(e.flags.DebugEnvsInherit,'\\n$(LocalDebuggerEnvironment)',''))if e.flags.DebugEnvsDontMerge then\n_p(2,'<LocalDebuggerMergeEnvironment>false</LocalDebuggerMergeEnvironment>')end\nend\nend\nfunction premake.vs2010_vcxproj_user(t)"
243+ "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",
244244
245245 /* actions/vstudio/vs2010_vcxproj_filters.lua */
246- "local e=premake.vstudio.vc2010\nlocal i=premake.project\nfunction e.filteridgroup(e)local l={}local t=false\nfor e in i.eachfile(e)do\nlocal i=string.explode(e.vpath,\"/\",true)local e=\"\"for n=1,#i-1 do\nif not t then\nt=true\n_p(1,'<ItemGroup>')end\ne=e..i[n]if not l[e]then\nl[e]=true\n_p(2,'<Filter Include=\"%s\">',e)_p(3,'<UniqueIdentifier>{%s}</UniqueIdentifier>',os.uuid())_p(2,'</Filter>')end\ne=e..\"\\\\\"end\nend\nif t then\n_p(1,'</ItemGroup>')end\nend\nfunction e.filefiltergroup(l,t)local e=e.getfilegroup(l,t)if#e>0 then\n_p(1,'<ItemGroup>')for l,e in ipairs(e)do\nlocal l\nif e.name~=e.vpath then\nl=path.getdirectory(e.vpath)else\nl=path.getdirectory(e.name)end\nif l~=\".\"then\n_p(2,'<%s Include=\"%s\">',t,path.translate(e.name,\"\\\\\"))_p(3,'<Filter>%s</Filter>',path.translate(l,\"\\\\\"))_p(2,'</%s>',t)else\n_p(2,'<%s Include=\"%s\" />',t,path.translate(e.name,\"\\\\\"))end\nend\n_p(1,'</ItemGroup>')end\nend\nfunction e.generate_filters(t)io.indent=\" \"e.header()e.filteridgroup(t)e.filefilterg"
246+ "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"
247247 "roup(t,\"None\")e.filefiltergroup(t,\"ClInclude\")e.filefiltergroup(t,\"ClCompile\")e.filefiltergroup(t,\"ResourceCompile\")_p('</Project>')end",
248248
249249 /* actions/vstudio/vs2012.lua */
@@ -295,8 +295,8 @@
295295 "(n.configs[1]))_p(2,'};')_p('/* End XCConfigurationList section */')_p('')end\nfunction e.Footer()_p(1,'};')_p('\\trootObject = 08FB7793FE84155DC02AAC07 /* Project object */;')_p('}')end",
296296
297297 /* actions/xcode/xcode_project.lua */
298- "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)"
299- "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"
298+ "local e=premake.xcode\nlocal r=premake.tree\nfunction e.buildprjtree(o)local n=premake.project.buildsourcetree(o)n.configs={}for t,i in ipairs(o.solution.configurations)do\nfor t,r in ipairs(o.solution.xcode.platforms)do\nlocal r=premake.getconfig(o,i,r)r.xcode={}r.xcode.targetid=e.newid(o.xcode.projectnode,i)r.xcode.projectid=e.newid(n,i)table.insert(n.configs,r)end\nend\nr.traverse(n,{onbranch=function(e)if path.getextension(e.name)==\".lproj\"then\nlocal i=path.getbasename(e.name)for n,o in ipairs(e.children)do\nlocal n=e.parent.children[o.name]if not n then\nn=r.insert(e.parent,r.new(o.name))n.kind=\"vgroup\"end\no.name=path.getbasename(i)r.insert(n,o)end\nr.remove(e)end\nend})n.frameworks=r.new(\"Frameworks\")for o in premake.eachconfig(o)do\nfor o,i in ipairs(premake.getlinks(o,\"system\",\"fullpath\"))do\nlocal o=path.getname(i)if e.isframework(o)and not n.frameworks.children[o]then\nnode=r.insert(n.frameworks,r.new(o))node.path=i\nend\nend\nend\nif#n.frameworks.children>0 then\nr.insert(n,n.frameworks)"
299+ "end\nn.products=r.insert(n,r.new(\"Products\"))n.projects=r.new(\"Projects\")for t,i in ipairs(premake.getdependencies(o,\"sibling\",\"object\"))do\nlocal t=e.getxcodeprojname(i)local n=r.insert(n.projects,r.new(path.getname(t)))n.path=t\nn.project=i\nn.productgroupid=e.newid(n,\"prodgrp\")n.productproxyid=e.newid(n,\"prodprox\")n.targetproxyid=e.newid(n,\"targprox\")n.targetdependid=e.newid(n,\"targdep\")local e=premake.getconfig(i,o.configurations[1])node=r.insert(n,r.new(e.linktarget.name))node.path=e.linktarget.fullpath\nnode.cfg=e\nend\nif#n.projects.children>0 then\nr.insert(n,n.projects)end\nr.traverse(n,{onnode=function(r)r.id=e.newid(r)if e.getbuildcategory(r)then\nr.buildid=e.newid(r,\"build\")end\nif string.endswith(r.name,\"Info.plist\")then\nn.infoplist=r\nend\nend},true)node=r.insert(n.products,o.xcode.projectnode)node.kind=\"product\"node.path=node.cfg.buildtarget.fullpath\nnode.cfgsection=e.newid(node,\"cfg\")node.resstageid=e.newid(node,\"rez\")node.sourcesid=e.newid(node,\"src\")node.fxstagei"
300300 "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",
301301
302302 /* actions/xcode/xcode4_workspace.lua */
@@ -307,8 +307,8 @@
307307 "\",\"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}",
308308
309309 /* _premake_main.lua */
310- "local t=\"premake4.lua\"local i=\"Type 'premake4 --help' for help\"local a=\"premake4 (Premake Build Script Generator) %s\"_WORKING_DIR=os.getcwd()local function o(r)if not r then return true end\nr=premake.checkvalue(r,premake.fields.platforms.allowed)for n in premake.solution.each()do\nlocal e=n.platforms or{}if#e==0 then\ntable.insert(e,\"Native\")end\nif not table.contains(e,\"Native\")then\nreturn false,n.name..\" does not target native platform\\nNative platform settings are required for the --platform feature.\"end\nif not table.contains(e,r)then\ntable.insert(e,r)end\nn.platforms=e\nend\nreturn true\nend\nfunction _premake_main(e)if(e)then\nlocal r=dofile(e..\"/_manifest.lua\")for n,r in ipairs(r)do\ndofile(e..\"/\"..r)end\nend\n_PREMAKE_COMMAND=path.getabsolute(_PREMAKE_COMMAND)premake.action.set(_ACTION)math.randomseed(os.time())local e=_OPTIONS[\"file\"]or t\nif(os.isfile(e))then\ndofile(e)end\nif(_OPTIONS[\"version\"])then\nprintf(a,_PREMAKE_VERSION)return 1\nend\nif(_OPTIONS[\"help\"])then\npremak"
311- "e.showhelp()return 1\nend\nif(not _ACTION)then\nprint(i)return 1\nend\nif(not os.isfile(e))then\nerror(\"No Premake script (\"..t..\") found!\",2)end\naction=premake.action.current()if(not action)then\nerror(\"Error: no such action '\".._ACTION..\"'\",0)end\nok,err=premake.option.validate(_OPTIONS)if(not ok)then error(\"Error: \"..err,0)end\nok,err=premake.checktools()if(not ok)then error(\"Error: \"..err,0)end\nok,err=o(_OPTIONS[\"platform\"])if(not ok)then error(\"Error: \"..err,0)end\nprint(\"Building configurations...\")premake.bake.buildconfigs()ok,err=premake.checkprojects()if(not ok)then error(\"Error: \"..err,0)end\nprintf(\"Running action '%s'...\",action.trigger)premake.action.call(action.trigger)print(\"Done.\")return 0\nend",
310+ "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"
311+ "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",
312312
313313 0
314314 };
Afficher sur ancien navigateur de dépôt.