diff --git a/src/_premake_init.lua b/src/_premake_init.lua
index 679edebd..75fb6a5d 100644
--- a/src/_premake_init.lua
+++ b/src/_premake_init.lua
@@ -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.
diff --git a/src/actions/vstudio/vs2010_vcxproj.lua b/src/actions/vstudio/vs2010_vcxproj.lua
index c8b4255e..6fa59577 100644
--- a/src/actions/vstudio/vs2010_vcxproj.lua
+++ b/src/actions/vstudio/vs2010_vcxproj.lua
@@ -1109,8 +1109,12 @@
function m.imageXex(cfg)
if cfg.system == premake.XBOX360 then
_p(2,'')
- _p(3,'')
- _p(3,'')
+ if cfg.configFile then
+ _p(3,'%s', cfg.configFile)
+ else
+ _p(3,'')
+ _p(3,'')
+ end
_p(3,'')
_p(3,'')
_p(2,'')
diff --git a/tests/_manifest.lua b/tests/_manifest.lua
index e7054ca6..3af12513 100644
--- a/tests/_manifest.lua
+++ b/tests/_manifest.lua
@@ -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",
diff --git a/tests/actions/vstudio/vc2010/test_imagexex_settings.lua b/tests/actions/vstudio/vc2010/test_imagexex_settings.lua
new file mode 100644
index 00000000..d41fbe0b
--- /dev/null
+++ b/tests/actions/vstudio/vc2010/test_imagexex_settings.lua
@@ -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 [[
+
+
+
+
+
+
+ ]]
+ end
+
+--
+-- Ensure configuration file is output in ImageXex block
+--
+ function suite.defaultSettings()
+ configFile "testconfig.xml"
+ prepare()
+ test.capture [[
+
+ testconfig.xml
+
+
+
+ ]]
+ end