Merged in mendsley/premake-dev/xbox360-imagexex (pull request #116)
Add support for custom title configuration files in xbox360 builds
This commit is contained in:
parent
fb8a77b902
commit
35b652557a
@ -140,6 +140,13 @@
|
||||
kind = "list:keyed:array:string",
|
||||
}
|
||||
|
||||
api.register {
|
||||
name = "configFile",
|
||||
scope = "config",
|
||||
kind = "string",
|
||||
tokens = true,
|
||||
}
|
||||
|
||||
api.register {
|
||||
name = "configurations",
|
||||
scope = "project",
|
||||
@ -724,6 +731,7 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
--
|
||||
-- Handlers for deprecated fields and values.
|
||||
|
@ -1109,8 +1109,12 @@
|
||||
function m.imageXex(cfg)
|
||||
if cfg.system == premake.XBOX360 then
|
||||
_p(2,'<ImageXex>')
|
||||
_p(3,'<ConfigurationFile>')
|
||||
_p(3,'</ConfigurationFile>')
|
||||
if cfg.configFile then
|
||||
_p(3,'<ConfigurationFile>%s</ConfigurationFile>', cfg.configFile)
|
||||
else
|
||||
_p(3,'<ConfigurationFile>')
|
||||
_p(3,'</ConfigurationFile>')
|
||||
end
|
||||
_p(3,'<AdditionalSections>')
|
||||
_p(3,'</AdditionalSections>')
|
||||
_p(2,'</ImageXex>')
|
||||
|
@ -105,6 +105,7 @@ return {
|
||||
"actions/vstudio/vc2010/test_files.lua",
|
||||
"actions/vstudio/vc2010/test_filter_ids.lua",
|
||||
"actions/vstudio/vc2010/test_filters.lua",
|
||||
"actions/vstudio/vc2010/test_imagexex_settings.lua",
|
||||
"actions/vstudio/vc2010/test_item_def_group.lua",
|
||||
"actions/vstudio/vc2010/test_link.lua",
|
||||
"actions/vstudio/vc2010/test_manifest.lua",
|
||||
|
56
tests/actions/vstudio/vc2010/test_imagexex_settings.lua
Normal file
56
tests/actions/vstudio/vc2010/test_imagexex_settings.lua
Normal file
@ -0,0 +1,56 @@
|
||||
--
|
||||
-- tests/actions/vstudio/vc2010/test_compile_settings.lua
|
||||
-- Validate Xbox 360 XEX image settings in Visual Studio 2010 C/C++ projects.
|
||||
-- Copyright (c) 2011-2013 Jason Perkins and the Premake project
|
||||
--
|
||||
|
||||
local suite = test.declare("vstudio_vs2010_imagexex_settings")
|
||||
local vc2010 = premake.vstudio.vc2010
|
||||
local project = premake.project
|
||||
|
||||
|
||||
--
|
||||
-- Setup
|
||||
--
|
||||
|
||||
local sln, prj
|
||||
|
||||
function suite.setup()
|
||||
sln, prj = test.createsolution()
|
||||
platforms "xbox360"
|
||||
end
|
||||
|
||||
local function prepare(platform)
|
||||
local cfg = test.getconfig(prj, "Debug", "xbox360")
|
||||
vc2010.imageXex(cfg)
|
||||
end
|
||||
|
||||
--
|
||||
-- Test default ImageXex settings
|
||||
--
|
||||
function suite.defaultSettings()
|
||||
prepare()
|
||||
test.capture [[
|
||||
<ImageXex>
|
||||
<ConfigurationFile>
|
||||
</ConfigurationFile>
|
||||
<AdditionalSections>
|
||||
</AdditionalSections>
|
||||
</ImageXex>
|
||||
]]
|
||||
end
|
||||
|
||||
--
|
||||
-- Ensure configuration file is output in ImageXex block
|
||||
--
|
||||
function suite.defaultSettings()
|
||||
configFile "testconfig.xml"
|
||||
prepare()
|
||||
test.capture [[
|
||||
<ImageXex>
|
||||
<ConfigurationFile>testconfig.xml</ConfigurationFile>
|
||||
<AdditionalSections>
|
||||
</AdditionalSections>
|
||||
</ImageXex>
|
||||
]]
|
||||
end
|
Loading…
Reference in New Issue
Block a user