Xbox360 fixes for VS2010

This commit is contained in:
Jason Perkins 2012-02-10 14:53:43 -05:00
parent 8e8bf9e6d1
commit 7c2736369f
6 changed files with 45 additions and 10 deletions

View File

@ -67,9 +67,6 @@
--
function sln2005.projectdependencies_ng(prj)
-- VS2010 C# gets dependencies right from the projects; doesn't need rules here
if _ACTION > "vs2008" and prj.language == "C#" then return end
local deps = project.getdependencies(prj)
if #deps > 0 then
_p(1,'ProjectSection(ProjectDependencies) = postProject')
@ -183,9 +180,6 @@
--
function sln2005.projectdependencies(prj)
-- VS2010 C# gets dependencies right from the projects; doesn't need rules here
if _ACTION > "vs2008" and prj.language == "C#" then return end
local deps = premake.getdependencies(prj)
if #deps > 0 then
_p('\tProjectSection(ProjectDependencies) = postProject')

View File

@ -169,6 +169,10 @@
local outdir = path.translate(target.directory)
_x(2,'<OutDir>%s\\</OutDir>', outdir)
if cfg.system == premake.XBOX360 then
_x(2,'<OutputFile>$(OutDir)%s</OutputFile>', target.name)
end
local objdir = path.translate(config.getuniqueobjdir(cfg))
_x(2,'<IntDir>%s\\</IntDir>', objdir)

View File

@ -47,7 +47,7 @@
extension = ".lib"
end
elseif cfg.system == premake.WINDOWS then
elseif cfg.system == premake.WINDOWS or cfg.system == premake.XBOX360 then
if kind == premake.CONSOLEAPP or kind == premake.WINDOWEDAPP then
extension = ".exe"
elseif kind == premake.SHAREDLIB then

View File

@ -59,12 +59,17 @@
--
-- Visual Studio 2010 C# projects lists dependencies in the project, rather
-- than the solution. Make sure nothing gets written in that case.
-- Most C# references should go into the project rather than the solution,
-- but until I know the conditions, put everything here to be safe.
--
function suite.nothingOutput_onVs2010()
_ACTION = "vs2010"
prepare("C#")
test.isemptycapture()
test.capture [[
ProjectSection(ProjectDependencies) = postProject
{AE61726D-187C-E440-BD07-2556188A6565} = {AE61726D-187C-E440-BD07-2556188A6565}
EndProjectSection
]]
end

View File

@ -45,6 +45,26 @@
end
--
-- Xbox360 adds an extra <OutputFile> element to the block.
--
function suite.structureIsCorrect_onXbox360()
system "Xbox360"
prepare()
test.capture [[
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'">
<LinkIncremental>true</LinkIncremental>
<OutDir>.\</OutDir>
<OutputFile>$(OutDir)MyProject.exe</OutputFile>
<IntDir>obj\Debug\</IntDir>
<TargetName>MyProject</TargetName>
<TargetExt>.exe</TargetExt>
</PropertyGroup>
]]
end
--
-- Static libraries should omit the link incremental element entirely.
--

View File

@ -219,6 +219,18 @@
end
--
-- Name should use ".exe" for Xbox360 executables.
--
function suite.nameUsesExe_onWindowsConsoleApp()
kind "ConsoleApp"
system "Xbox360"
i = prepare()
test.isequal("MyProject.exe", i.name)
end
--
-- Name should use a prefix if set.
--