Feature 2820644: Add Xbox360 deployment and image options
This commit is contained in:
parent
f8cd380d11
commit
b9e6c4315b
@ -9,6 +9,7 @@
|
||||
- Feature 2832906: Global variable (_SCRIPT) for current script path
|
||||
- Feature 2905303: Enable better folder matching in file lists
|
||||
- Feature 2919629: Add help target for makefiles
|
||||
- Feature 2820644: Add Xbox360 deployment and image options
|
||||
- Bug 2909463: Fix Xcode handling of Obj-C++ .mm files
|
||||
- Bug 2903430: Using relative instead of absolute paths with $() macro
|
||||
- Bug 2910691: Duplicate build options
|
||||
|
@ -12,16 +12,16 @@
|
||||
|
||||
function premake.vs200x_vcproj_platforms(prj)
|
||||
local used = { }
|
||||
_p('\t<Platforms>')
|
||||
_p(1,'<Platforms>')
|
||||
for _, cfg in ipairs(prj.solution.vstudio_configs) do
|
||||
if cfg.isreal and not table.contains(used, cfg.platform) then
|
||||
table.insert(used, cfg.platform)
|
||||
_p('\t\t<Platform')
|
||||
_p('\t\t\tName="%s"', cfg.platform)
|
||||
_p('\t\t/>')
|
||||
_p(2,'<Platform')
|
||||
_p(3,'Name="%s"', cfg.platform)
|
||||
_p(2,'/>')
|
||||
end
|
||||
end
|
||||
_p('\t</Platforms>')
|
||||
_p(1,'</Platforms>')
|
||||
end
|
||||
|
||||
|
||||
@ -51,93 +51,93 @@
|
||||
--
|
||||
|
||||
function premake.vs200x_vcproj_VCCLCompilerTool(cfg)
|
||||
_p('\t\t\t<Tool')
|
||||
_p('\t\t\t\tName="%s"', iif(cfg.platform ~= "Xbox360", "VCCLCompilerTool", "VCCLX360CompilerTool"))
|
||||
_p(3,'<Tool')
|
||||
_p(4,'Name="%s"', iif(cfg.platform ~= "Xbox360", "VCCLCompilerTool", "VCCLX360CompilerTool"))
|
||||
|
||||
if #cfg.buildoptions > 0 then
|
||||
_p('\t\t\t\tAdditionalOptions="%s"', table.concat(premake.esc(cfg.buildoptions), " "))
|
||||
_p(4,'AdditionalOptions="%s"', table.concat(premake.esc(cfg.buildoptions), " "))
|
||||
end
|
||||
|
||||
_p('\t\t\t\tOptimization="%s"', _VS.optimization(cfg))
|
||||
_p(4,'Optimization="%s"', _VS.optimization(cfg))
|
||||
|
||||
if cfg.flags.NoFramePointer then
|
||||
_p('\t\t\t\tOmitFramePointers="%s"', _VS.bool(true))
|
||||
_p(4,'OmitFramePointers="%s"', _VS.bool(true))
|
||||
end
|
||||
|
||||
if #cfg.includedirs > 0 then
|
||||
_p('\t\t\t\tAdditionalIncludeDirectories="%s"', premake.esc(path.translate(table.concat(cfg.includedirs, ";"), '\\')))
|
||||
_p(4,'AdditionalIncludeDirectories="%s"', premake.esc(path.translate(table.concat(cfg.includedirs, ";"), '\\')))
|
||||
end
|
||||
|
||||
if #cfg.defines > 0 then
|
||||
_p('\t\t\t\tPreprocessorDefinitions="%s"', premake.esc(table.concat(cfg.defines, ";")))
|
||||
_p(4,'PreprocessorDefinitions="%s"', premake.esc(table.concat(cfg.defines, ";")))
|
||||
end
|
||||
|
||||
if cfg.flags.Symbols and not cfg.flags.Managed then
|
||||
_p('\t\t\t\tMinimalRebuild="%s"', _VS.bool(true))
|
||||
_p(4,'MinimalRebuild="%s"', _VS.bool(true))
|
||||
end
|
||||
|
||||
if cfg.flags.NoExceptions then
|
||||
_p('\t\t\t\tExceptionHandling="%s"', iif(_ACTION < "vs2005", "FALSE", 0))
|
||||
_p(4,'ExceptionHandling="%s"', iif(_ACTION < "vs2005", "FALSE", 0))
|
||||
elseif cfg.flags.SEH and _ACTION > "vs2003" then
|
||||
_p('\t\t\t\tExceptionHandling="2"')
|
||||
_p(4,'ExceptionHandling="2"')
|
||||
end
|
||||
|
||||
if _VS.optimization(cfg) == 0 and not cfg.flags.Managed then
|
||||
_p('\t\t\t\tBasicRuntimeChecks="3"')
|
||||
_p(4,'BasicRuntimeChecks="3"')
|
||||
end
|
||||
if _VS.optimization(cfg) ~= 0 then
|
||||
_p('\t\t\t\tStringPooling="%s"', _VS.bool(true))
|
||||
_p(4,'StringPooling="%s"', _VS.bool(true))
|
||||
end
|
||||
|
||||
_p('\t\t\t\tRuntimeLibrary="%s"', _VS.runtime(cfg))
|
||||
_p('\t\t\t\tEnableFunctionLevelLinking="%s"', _VS.bool(true))
|
||||
_p(4,'RuntimeLibrary="%s"', _VS.runtime(cfg))
|
||||
_p(4,'EnableFunctionLevelLinking="%s"', _VS.bool(true))
|
||||
|
||||
if _ACTION < "vs2005" then
|
||||
if cfg.flags.FloatFast then
|
||||
_p('\t\t\t\tImproveFloatingPointConsistency="%s"', _VS.bool(false))
|
||||
_p(4,'ImproveFloatingPointConsistency="%s"', _VS.bool(false))
|
||||
elseif cfg.flags.FloatStrict then
|
||||
_p('\t\t\t\tImproveFloatingPointConsistency="%s"', _VS.bool(true))
|
||||
_p(4,'ImproveFloatingPointConsistency="%s"', _VS.bool(true))
|
||||
end
|
||||
else
|
||||
if cfg.flags.FloatFast then
|
||||
_p('\t\t\t\tFloatingPointModel="2"')
|
||||
_p(4,'FloatingPointModel="2"')
|
||||
elseif cfg.flags.FloatStrict then
|
||||
_p('\t\t\t\tFloatingPointModel="1"')
|
||||
_p(4,'FloatingPointModel="1"')
|
||||
end
|
||||
end
|
||||
|
||||
if _ACTION < "vs2005" and not cfg.flags.NoRTTI then
|
||||
_p('\t\t\t\tRuntimeTypeInfo="%s"', _VS.bool(true))
|
||||
_p(4,'RuntimeTypeInfo="%s"', _VS.bool(true))
|
||||
elseif _ACTION > "vs2003" and cfg.flags.NoRTTI then
|
||||
_p('\t\t\t\tRuntimeTypeInfo="%s"', _VS.bool(false))
|
||||
_p(4,'RuntimeTypeInfo="%s"', _VS.bool(false))
|
||||
end
|
||||
|
||||
if cfg.flags.NativeWChar then
|
||||
_p('\t\t\t\tTreatWChar_tAsBuiltInType="%s"', _VS.bool(true))
|
||||
_p(4,'TreatWChar_tAsBuiltInType="%s"', _VS.bool(true))
|
||||
elseif cfg.flags.NoNativeWChar then
|
||||
_p('\t\t\t\tTreatWChar_tAsBuiltInType="%s"', _VS.bool(false))
|
||||
_p(4,'TreatWChar_tAsBuiltInType="%s"', _VS.bool(false))
|
||||
end
|
||||
|
||||
if not cfg.flags.NoPCH and cfg.pchheader then
|
||||
_p('\t\t\t\tUsePrecompiledHeader="%s"', iif(_ACTION < "vs2005", 3, 2))
|
||||
_p('\t\t\t\tPrecompiledHeaderThrough="%s"', cfg.pchheader)
|
||||
_p(4,'UsePrecompiledHeader="%s"', iif(_ACTION < "vs2005", 3, 2))
|
||||
_p(4,'PrecompiledHeaderThrough="%s"', cfg.pchheader)
|
||||
else
|
||||
_p('\t\t\t\tUsePrecompiledHeader="%s"', iif(_ACTION > "vs2003" or cfg.flags.NoPCH, 0, 2))
|
||||
_p(4,'UsePrecompiledHeader="%s"', iif(_ACTION > "vs2003" or cfg.flags.NoPCH, 0, 2))
|
||||
end
|
||||
|
||||
_p('\t\t\t\tWarningLevel="%s"', iif(cfg.flags.ExtraWarnings, 4, 3))
|
||||
_p(4,'WarningLevel="%s"', iif(cfg.flags.ExtraWarnings, 4, 3))
|
||||
|
||||
if cfg.flags.FatalWarnings then
|
||||
_p('\t\t\t\tWarnAsError="%s"', _VS.bool(true))
|
||||
_p(4,'WarnAsError="%s"', _VS.bool(true))
|
||||
end
|
||||
|
||||
if _ACTION < "vs2008" and not cfg.flags.Managed then
|
||||
_p('\t\t\t\tDetect64BitPortabilityProblems="%s"', _VS.bool(not cfg.flags.No64BitChecks))
|
||||
_p(4,'Detect64BitPortabilityProblems="%s"', _VS.bool(not cfg.flags.No64BitChecks))
|
||||
end
|
||||
|
||||
_p('\t\t\t\tProgramDataBaseFileName="$(OutDir)\\$(ProjectName).pdb"')
|
||||
_p('\t\t\t\tDebugInformationFormat="%s"', premake.vs200x_vcproj_symbols(cfg))
|
||||
_p('\t\t\t/>')
|
||||
_p(4,'ProgramDataBaseFileName="$(OutDir)\\$(ProjectName).pdb"')
|
||||
_p(4,'DebugInformationFormat="%s"', premake.vs200x_vcproj_symbols(cfg))
|
||||
_p(3,'/>')
|
||||
end
|
||||
|
||||
|
||||
@ -147,74 +147,74 @@
|
||||
--
|
||||
|
||||
function premake.vs200x_vcproj_VCLinkerTool(cfg)
|
||||
_p('\t\t\t<Tool')
|
||||
_p(3,'<Tool')
|
||||
if cfg.kind ~= "StaticLib" then
|
||||
_p('\t\t\t\tName="%s"', iif(cfg.platform ~= "Xbox360", "VCLinkerTool", "VCX360LinkerTool"))
|
||||
_p(4,'Name="%s"', iif(cfg.platform ~= "Xbox360", "VCLinkerTool", "VCX360LinkerTool"))
|
||||
|
||||
if cfg.flags.NoImportLib then
|
||||
_p('\t\t\t\tIgnoreImportLibrary="%s"', _VS.bool(true))
|
||||
_p(4,'IgnoreImportLibrary="%s"', _VS.bool(true))
|
||||
end
|
||||
|
||||
if #cfg.linkoptions > 0 then
|
||||
_p('\t\t\t\tAdditionalOptions="%s"', table.concat(premake.esc(cfg.linkoptions), " "))
|
||||
_p(4,'AdditionalOptions="%s"', table.concat(premake.esc(cfg.linkoptions), " "))
|
||||
end
|
||||
|
||||
if #cfg.links > 0 then
|
||||
_p('\t\t\t\tAdditionalDependencies="%s"', table.concat(premake.getlinks(cfg, "all", "fullpath"), " "))
|
||||
_p(4,'AdditionalDependencies="%s"', table.concat(premake.getlinks(cfg, "all", "fullpath"), " "))
|
||||
end
|
||||
|
||||
_p('\t\t\t\tOutputFile="$(OutDir)\\%s"', cfg.buildtarget.name)
|
||||
_p('\t\t\t\tLinkIncremental="%s"', iif(_VS.optimization(cfg) == 0, 2, 1))
|
||||
_p('\t\t\t\tAdditionalLibraryDirectories="%s"', table.concat(premake.esc(path.translate(cfg.libdirs, '\\')) , ";"))
|
||||
_p(4,'OutputFile="$(OutDir)\\%s"', cfg.buildtarget.name)
|
||||
_p(4,'LinkIncremental="%s"', iif(_VS.optimization(cfg) == 0, 2, 1))
|
||||
_p(4,'AdditionalLibraryDirectories="%s"', table.concat(premake.esc(path.translate(cfg.libdirs, '\\')) , ";"))
|
||||
|
||||
local deffile = premake.findfile(cfg, ".def")
|
||||
if deffile then
|
||||
_p('\t\t\t\tModuleDefinitionFile="%s"', deffile)
|
||||
_p(4,'ModuleDefinitionFile="%s"', deffile)
|
||||
end
|
||||
|
||||
if cfg.flags.NoManifest then
|
||||
_p('\t\t\t\tGenerateManifest="%s"', _VS.bool(false))
|
||||
_p(4,'GenerateManifest="%s"', _VS.bool(false))
|
||||
end
|
||||
|
||||
_p('\t\t\t\tGenerateDebugInformation="%s"', _VS.bool(premake.vs200x_vcproj_symbols(cfg) ~= 0))
|
||||
_p(4,'GenerateDebugInformation="%s"', _VS.bool(premake.vs200x_vcproj_symbols(cfg) ~= 0))
|
||||
|
||||
if premake.vs200x_vcproj_symbols(cfg) ~= 0 then
|
||||
_p('\t\t\t\tProgramDatabaseFile="$(OutDir)\\$(ProjectName).pdb"')
|
||||
_p(4,'ProgramDatabaseFile="$(OutDir)\\$(ProjectName).pdb"')
|
||||
end
|
||||
|
||||
_p('\t\t\t\tSubSystem="%s"', iif(cfg.kind == "ConsoleApp", 1, 2))
|
||||
_p(4,'SubSystem="%s"', iif(cfg.kind == "ConsoleApp", 1, 2))
|
||||
|
||||
if _VS.optimization(cfg) ~= 0 then
|
||||
_p('\t\t\t\tOptimizeReferences="2"')
|
||||
_p('\t\t\t\tEnableCOMDATFolding="2"')
|
||||
_p(4,'OptimizeReferences="2"')
|
||||
_p(4,'EnableCOMDATFolding="2"')
|
||||
end
|
||||
|
||||
if (cfg.kind == "ConsoleApp" or cfg.kind == "WindowedApp") and not cfg.flags.WinMain then
|
||||
_p('\t\t\t\tEntryPointSymbol="mainCRTStartup"')
|
||||
_p(4,'EntryPointSymbol="mainCRTStartup"')
|
||||
end
|
||||
|
||||
if cfg.kind == "SharedLib" then
|
||||
local implibname = cfg.linktarget.fullpath
|
||||
_p('\t\t\t\tImportLibrary="%s"', iif(cfg.flags.NoImportLib, cfg.objectsdir .. "\\" .. path.getname(implibname), implibname))
|
||||
_p(4,'ImportLibrary="%s"', iif(cfg.flags.NoImportLib, cfg.objectsdir .. "\\" .. path.getname(implibname), implibname))
|
||||
end
|
||||
|
||||
_p('\t\t\t\tTargetMachine="%d"', iif(cfg.platform == "x64", 17, 1))
|
||||
_p(4,'TargetMachine="%d"', iif(cfg.platform == "x64", 17, 1))
|
||||
|
||||
else
|
||||
_p('\t\t\t\tName="VCLibrarianTool"')
|
||||
_p(4,'Name="VCLibrarianTool"')
|
||||
|
||||
if #cfg.links > 0 then
|
||||
_p('\t\t\t\tAdditionalDependencies="%s"', table.concat(premake.getlinks(cfg, "all", "fullpath"), " "))
|
||||
_p(4,'AdditionalDependencies="%s"', table.concat(premake.getlinks(cfg, "all", "fullpath"), " "))
|
||||
end
|
||||
|
||||
_p('\t\t\t\tOutputFile="$(OutDir)\\%s"', cfg.buildtarget.name)
|
||||
_p(4,'OutputFile="$(OutDir)\\%s"', cfg.buildtarget.name)
|
||||
|
||||
if #cfg.libdirs > 0 then
|
||||
_p('\t\t\t\tAdditionalLibraryDirectories="%s"', premake.esc(path.translate(table.concat(cfg.libdirs , ";"))))
|
||||
_p(4,'AdditionalLibraryDirectories="%s"', premake.esc(path.translate(table.concat(cfg.libdirs , ";"))))
|
||||
end
|
||||
end
|
||||
|
||||
_p('\t\t\t/>')
|
||||
_p(3,'/>')
|
||||
end
|
||||
|
||||
|
||||
@ -223,69 +223,69 @@
|
||||
--
|
||||
|
||||
function premake.vs200x_vcproj_VCCLCompilerTool_GCC(cfg)
|
||||
_p('\t\t\t<Tool')
|
||||
_p('\t\t\t\tName="VCCLCompilerTool"')
|
||||
_p(3,'<Tool')
|
||||
_p(4,'Name="VCCLCompilerTool"')
|
||||
|
||||
local buildoptions = table.join(premake.gcc.getcflags(cfg), premake.gcc.getcxxflags(cfg), cfg.buildoptions)
|
||||
if #buildoptions > 0 then
|
||||
_p('\t\t\t\tAdditionalOptions="%s"', premake.esc(table.concat(buildoptions, " ")))
|
||||
_p(4,'AdditionalOptions="%s"', premake.esc(table.concat(buildoptions, " ")))
|
||||
end
|
||||
|
||||
if #cfg.includedirs > 0 then
|
||||
_p('\t\t\t\tAdditionalIncludeDirectories="%s"', premake.esc(path.translate(table.concat(cfg.includedirs, ";"), '\\')))
|
||||
_p(4,'AdditionalIncludeDirectories="%s"', premake.esc(path.translate(table.concat(cfg.includedirs, ";"), '\\')))
|
||||
end
|
||||
|
||||
if #cfg.defines > 0 then
|
||||
_p('\t\t\t\tPreprocessorDefinitions="%s"', table.concat(premake.esc(cfg.defines), ";"))
|
||||
_p(4,'PreprocessorDefinitions="%s"', table.concat(premake.esc(cfg.defines), ";"))
|
||||
end
|
||||
|
||||
_p('\t\t\t\tProgramDataBaseFileName="$(OutDir)\\$(ProjectName).pdb"')
|
||||
_p('\t\t\t\tDebugInformationFormat="0"')
|
||||
_p('\t\t\t\tCompileAs="0"')
|
||||
_p('\t\t\t/>')
|
||||
_p(4,'ProgramDataBaseFileName="$(OutDir)\\$(ProjectName).pdb"')
|
||||
_p(4,'DebugInformationFormat="0"')
|
||||
_p(4,'CompileAs="0"')
|
||||
_p(3,'/>')
|
||||
end
|
||||
|
||||
function premake.vs200x_vcproj_VCLinkerTool_GCC(cfg)
|
||||
_p('\t\t\t<Tool')
|
||||
_p(3,'<Tool')
|
||||
if cfg.kind ~= "StaticLib" then
|
||||
_p('\t\t\t\tName="VCLinkerTool"')
|
||||
_p(4,'Name="VCLinkerTool"')
|
||||
|
||||
local buildoptions = table.join(premake.gcc.getldflags(cfg), cfg.linkoptions)
|
||||
if #buildoptions > 0 then
|
||||
_p('\t\t\t\tAdditionalOptions="%s"', premake.esc(table.concat(buildoptions, " ")))
|
||||
_p(4,'AdditionalOptions="%s"', premake.esc(table.concat(buildoptions, " ")))
|
||||
end
|
||||
|
||||
if #cfg.links > 0 then
|
||||
_p('\t\t\t\tAdditionalDependencies="%s"', table.concat(premake.getlinks(cfg, "all", "fullpath"), " "))
|
||||
_p(4,'AdditionalDependencies="%s"', table.concat(premake.getlinks(cfg, "all", "fullpath"), " "))
|
||||
end
|
||||
|
||||
_p('\t\t\t\tOutputFile="$(OutDir)\\%s"', cfg.buildtarget.name)
|
||||
_p('\t\t\t\tLinkIncremental="0"')
|
||||
_p('\t\t\t\tAdditionalLibraryDirectories="%s"', table.concat(premake.esc(path.translate(cfg.libdirs, '\\')) , ";"))
|
||||
_p('\t\t\t\tGenerateManifest="%s"', _VS.bool(false))
|
||||
_p('\t\t\t\tProgramDatabaseFile=""')
|
||||
_p('\t\t\t\tRandomizedBaseAddress="1"')
|
||||
_p('\t\t\t\tDataExecutionPrevention="0"')
|
||||
_p(4,'OutputFile="$(OutDir)\\%s"', cfg.buildtarget.name)
|
||||
_p(4,'LinkIncremental="0"')
|
||||
_p(4,'AdditionalLibraryDirectories="%s"', table.concat(premake.esc(path.translate(cfg.libdirs, '\\')) , ";"))
|
||||
_p(4,'GenerateManifest="%s"', _VS.bool(false))
|
||||
_p(4,'ProgramDatabaseFile=""')
|
||||
_p(4,'RandomizedBaseAddress="1"')
|
||||
_p(4,'DataExecutionPrevention="0"')
|
||||
else
|
||||
_p('\t\t\t\tName="VCLibrarianTool"')
|
||||
_p(4,'Name="VCLibrarianTool"')
|
||||
|
||||
local buildoptions = table.join(premake.gcc.getldflags(cfg), cfg.linkoptions)
|
||||
if #buildoptions > 0 then
|
||||
_p('\t\t\t\tAdditionalOptions="%s"', premake.esc(table.concat(buildoptions, " ")))
|
||||
_p(4,'AdditionalOptions="%s"', premake.esc(table.concat(buildoptions, " ")))
|
||||
end
|
||||
|
||||
if #cfg.links > 0 then
|
||||
_p('\t\t\t\tAdditionalDependencies="%s"', table.concat(premake.getlinks(cfg, "all", "fullpath"), " "))
|
||||
_p(4,'AdditionalDependencies="%s"', table.concat(premake.getlinks(cfg, "all", "fullpath"), " "))
|
||||
end
|
||||
|
||||
_p('\t\t\t\tOutputFile="$(OutDir)\\%s"', cfg.buildtarget.name)
|
||||
_p(4,'OutputFile="$(OutDir)\\%s"', cfg.buildtarget.name)
|
||||
|
||||
if #cfg.libdirs > 0 then
|
||||
_p('\t\t\t\tAdditionalLibraryDirectories="%s"', premake.esc(path.translate(table.concat(cfg.libdirs , ";"))))
|
||||
_p(4,'AdditionalLibraryDirectories="%s"', premake.esc(path.translate(table.concat(cfg.libdirs , ";"))))
|
||||
end
|
||||
end
|
||||
|
||||
_p('\t\t\t/>')
|
||||
_p(3,'/>')
|
||||
end
|
||||
|
||||
|
||||
@ -295,23 +295,23 @@
|
||||
--
|
||||
|
||||
function premake.vs200x_vcproj_VCResourceCompilerTool(cfg)
|
||||
_p('\t\t\t<Tool')
|
||||
_p('\t\t\t\tName="VCResourceCompilerTool"')
|
||||
_p(3,'<Tool')
|
||||
_p(4,'Name="VCResourceCompilerTool"')
|
||||
|
||||
if #cfg.resoptions > 0 then
|
||||
_p('\t\t\t\tAdditionalOptions="%s"', table.concat(premake.esc(cfg.resoptions), " "))
|
||||
_p(4,'AdditionalOptions="%s"', table.concat(premake.esc(cfg.resoptions), " "))
|
||||
end
|
||||
|
||||
if #cfg.defines > 0 or #cfg.resdefines > 0 then
|
||||
_p('\t\t\t\tPreprocessorDefinitions="%s"', table.concat(premake.esc(table.join(cfg.defines, cfg.resdefines)), ";"))
|
||||
_p(4,'PreprocessorDefinitions="%s"', table.concat(premake.esc(table.join(cfg.defines, cfg.resdefines)), ";"))
|
||||
end
|
||||
|
||||
if #cfg.includedirs > 0 or #cfg.resincludedirs > 0 then
|
||||
local dirs = table.join(cfg.includedirs, cfg.resincludedirs)
|
||||
_p('\t\t\t\tAdditionalIncludeDirectories="%s"', premake.esc(path.translate(table.concat(dirs, ";"), '\\')))
|
||||
_p(4,'AdditionalIncludeDirectories="%s"', premake.esc(path.translate(table.concat(dirs, ";"), '\\')))
|
||||
end
|
||||
|
||||
_p('\t\t\t/>')
|
||||
_p(3,'/>')
|
||||
end
|
||||
|
||||
|
||||
@ -329,12 +329,12 @@
|
||||
end
|
||||
end
|
||||
|
||||
_p('\t\t\t<Tool')
|
||||
_p('\t\t\t\tName="VCManifestTool"')
|
||||
_p(3,'<Tool')
|
||||
_p(4,'Name="VCManifestTool"')
|
||||
if #manifests > 0 then
|
||||
_p('\t\t\t\tAdditionalManifestFiles="%s"', premake.esc(table.concat(manifests, ";")))
|
||||
_p(4,'AdditionalManifestFiles="%s"', premake.esc(table.concat(manifests, ";")))
|
||||
end
|
||||
_p('\t\t\t/>')
|
||||
_p(3,'/>')
|
||||
end
|
||||
|
||||
|
||||
@ -344,12 +344,12 @@
|
||||
--
|
||||
|
||||
function premake.vs200x_vcproj_VCMIDLTool(cfg)
|
||||
_p('\t\t\t<Tool')
|
||||
_p('\t\t\t\tName="VCMIDLTool"')
|
||||
_p(3,'<Tool')
|
||||
_p(4,'Name="VCMIDLTool"')
|
||||
if cfg.platform == "x64" then
|
||||
_p('\t\t\t\tTargetEnvironment="3"')
|
||||
_p(4,'TargetEnvironment="3"')
|
||||
end
|
||||
_p('\t\t\t/>')
|
||||
_p(3,'/>')
|
||||
end
|
||||
|
||||
|
||||
@ -359,12 +359,12 @@
|
||||
--
|
||||
|
||||
function premake.vs200x_vcproj_buildstepsblock(name, steps)
|
||||
_p('\t\t\t<Tool')
|
||||
_p('\t\t\t\tName="%s"', name)
|
||||
_p(3,'<Tool')
|
||||
_p(4,'Name="%s"', name)
|
||||
if #steps > 0 then
|
||||
_p('\t\t\t\tCommandLine="%s"', premake.esc(table.implode(steps, "", "", "\r\n")))
|
||||
_p(4,'CommandLine="%s"', premake.esc(table.implode(steps, "", "", "\r\n")))
|
||||
end
|
||||
_p('\t\t\t/>')
|
||||
_p(3,'/>')
|
||||
end
|
||||
|
||||
|
||||
@ -499,48 +499,48 @@
|
||||
|
||||
-- Write opening project block
|
||||
_p('<VisualStudioProject')
|
||||
_p('\tProjectType="Visual C++"')
|
||||
_p(1,'ProjectType="Visual C++"')
|
||||
if _ACTION == "vs2002" then
|
||||
_p('\tVersion="7.00"')
|
||||
_p(1,'Version="7.00"')
|
||||
elseif _ACTION == "vs2003" then
|
||||
_p('\tVersion="7.10"')
|
||||
_p(1,'Version="7.10"')
|
||||
elseif _ACTION == "vs2005" then
|
||||
_p('\tVersion="8.00"')
|
||||
_p(1,'Version="8.00"')
|
||||
elseif _ACTION == "vs2008" then
|
||||
_p('\tVersion="9.00"')
|
||||
_p(1,'Version="9.00"')
|
||||
end
|
||||
_p('\tName="%s"', premake.esc(prj.name))
|
||||
_p('\tProjectGUID="{%s}"', prj.uuid)
|
||||
_p(1,'Name="%s"', premake.esc(prj.name))
|
||||
_p(1,'ProjectGUID="{%s}"', prj.uuid)
|
||||
if _ACTION > "vs2003" then
|
||||
_p('\tRootNamespace="%s"', prj.name)
|
||||
_p(1,'RootNamespace="%s"', prj.name)
|
||||
end
|
||||
_p('\tKeyword="%s"', iif(prj.flags.Managed, "ManagedCProj", "Win32Proj"))
|
||||
_p('\t>')
|
||||
_p(1,'Keyword="%s"', iif(prj.flags.Managed, "ManagedCProj", "Win32Proj"))
|
||||
_p(1,'>')
|
||||
|
||||
-- list the target platforms
|
||||
premake.vs200x_vcproj_platforms(prj)
|
||||
|
||||
if _ACTION > "vs2003" then
|
||||
_p('\t<ToolFiles>')
|
||||
_p('\t</ToolFiles>')
|
||||
_p(1,'<ToolFiles>')
|
||||
_p(1,'</ToolFiles>')
|
||||
end
|
||||
|
||||
_p('\t<Configurations>')
|
||||
_p(1,'<Configurations>')
|
||||
for _, cfginfo in ipairs(prj.solution.vstudio_configs) do
|
||||
if cfginfo.isreal then
|
||||
local cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)
|
||||
|
||||
-- Start a configuration
|
||||
_p('\t\t<Configuration')
|
||||
_p('\t\t\tName="%s"', premake.esc(cfginfo.name))
|
||||
_p('\t\t\tOutputDirectory="%s"', premake.esc(cfg.buildtarget.directory))
|
||||
_p('\t\t\tIntermediateDirectory="%s"', premake.esc(cfg.objectsdir))
|
||||
_p('\t\t\tConfigurationType="%s"', _VS.cfgtype(cfg))
|
||||
_p('\t\t\tCharacterSet="%s"', iif(cfg.flags.Unicode, 1, 2))
|
||||
_p(2,'<Configuration')
|
||||
_p(3,'Name="%s"', premake.esc(cfginfo.name))
|
||||
_p(3,'OutputDirectory="%s"', premake.esc(cfg.buildtarget.directory))
|
||||
_p(3,'IntermediateDirectory="%s"', premake.esc(cfg.objectsdir))
|
||||
_p(3,'ConfigurationType="%s"', _VS.cfgtype(cfg))
|
||||
_p(3,'CharacterSet="%s"', iif(cfg.flags.Unicode, 1, 2))
|
||||
if cfg.flags.Managed then
|
||||
_p('\t\t\tManagedExtensions="1"')
|
||||
_p(3,'ManagedExtensions="1"')
|
||||
end
|
||||
_p('\t\t\t>')
|
||||
_p(3,'>')
|
||||
|
||||
for _, block in ipairs(getsections(_ACTION, cfginfo.src_platform)) do
|
||||
|
||||
@ -558,38 +558,50 @@
|
||||
|
||||
-- Xbox 360 custom sections --
|
||||
elseif block == "VCX360DeploymentTool" then
|
||||
_p('\t\t\t<Tool')
|
||||
_p('\t\t\t\tName="VCX360DeploymentTool"')
|
||||
_p('\t\t\t\tDeploymentType="0"')
|
||||
_p('\t\t\t/>')
|
||||
_p(3,'<Tool')
|
||||
_p(4,'Name="VCX360DeploymentTool"')
|
||||
_p(4,'DeploymentType="0"')
|
||||
if #cfg.deployoptions > 0 then
|
||||
_p(4,'AdditionalOptions="%s"', table.concat(premake.esc(cfg.deployoptions), " "))
|
||||
end
|
||||
_p(3,'/>')
|
||||
|
||||
elseif block == "VCX360ImageTool" then
|
||||
_p(3,'<Tool')
|
||||
_p(4,'Name="VCX360ImageTool"')
|
||||
if #cfg.imageoptions > 0 then
|
||||
_p(4,'AdditionalOptions="%s"', table.concat(premake.esc(cfg.imageoptions), " "))
|
||||
end
|
||||
_p(3,'/>')
|
||||
|
||||
elseif block == "DebuggerTool" then
|
||||
_p('\t\t\t<DebuggerTool')
|
||||
_p('\t\t\t/>')
|
||||
_p(3,'<DebuggerTool')
|
||||
_p(3,'/>')
|
||||
|
||||
-- End Xbox 360 custom sections --
|
||||
|
||||
else
|
||||
_p('\t\t\t<Tool')
|
||||
_p('\t\t\t\tName="%s"', block)
|
||||
_p('\t\t\t/>')
|
||||
_p(3,'<Tool')
|
||||
_p(4,'Name="%s"', block)
|
||||
_p(3,'/>')
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
_p('\t\t</Configuration>')
|
||||
_p(2,'</Configuration>')
|
||||
end
|
||||
end
|
||||
_p('\t</Configurations>')
|
||||
_p(1,'</Configurations>')
|
||||
|
||||
_p('\t<References>')
|
||||
_p('\t</References>')
|
||||
_p(1,'<References>')
|
||||
_p(1,'</References>')
|
||||
|
||||
_p('\t<Files>')
|
||||
_p(1,'<Files>')
|
||||
premake.walksources(prj, _VS.files)
|
||||
_p('\t</Files>')
|
||||
_p(1,'</Files>')
|
||||
|
||||
_p('\t<Globals>')
|
||||
_p('\t</Globals>')
|
||||
_p(1,'<Globals>')
|
||||
_p(1,'</Globals>')
|
||||
_p('</VisualStudioProject>')
|
||||
end
|
||||
|
||||
|
@ -48,6 +48,12 @@
|
||||
scope = "config",
|
||||
},
|
||||
|
||||
deployoptions =
|
||||
{
|
||||
kind = "list",
|
||||
scope = "config",
|
||||
},
|
||||
|
||||
excludes =
|
||||
{
|
||||
kind = "filelist",
|
||||
@ -93,6 +99,12 @@
|
||||
}
|
||||
},
|
||||
|
||||
imageoptions =
|
||||
{
|
||||
kind = "list",
|
||||
scope = "config",
|
||||
},
|
||||
|
||||
implibdir =
|
||||
{
|
||||
kind = "path",
|
||||
|
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user