Visual Studio solutions now use the same project ordering in all sections; avoids unnecessary changes if the solution is later changed within Visual Studio

This commit is contained in:
Jason Perkins 2013-01-08 13:19:56 -05:00
parent a69b7501e7
commit 89d413d9d5
3 changed files with 51 additions and 47 deletions

View File

@ -114,18 +114,23 @@
_p(1,'EndGlobalSection')
_p(1,'GlobalSection(ProjectConfigurationPlatforms) = postSolution')
for prj in solution.eachproject_ng(sln) do
for cfg in solution.eachconfig(sln) do
local prjcfg = project.getconfig(prj, cfg.buildcfg, cfg.platform)
if prjcfg then
local prjplatform = vstudio.projectPlatform(prjcfg)
local architecture = vstudio.archFromConfig(prjcfg, true)
local tr = solution.grouptree(sln)
tree.traverse(tr, {
onleaf = function(n)
local prj = n.project
_p(2,'{%s}.%s.ActiveCfg = %s|%s', prj.uuid, slncfg[cfg], prjplatform, architecture)
_p(2,'{%s}.%s.Build.0 = %s|%s', prj.uuid, slncfg[cfg], prjplatform, architecture)
for cfg in solution.eachconfig(sln) do
local prjcfg = project.getconfig(prj, cfg.buildcfg, cfg.platform)
if prjcfg then
local prjplatform = vstudio.projectPlatform(prjcfg)
local architecture = vstudio.archFromConfig(prjcfg, true)
_p(2,'{%s}.%s.ActiveCfg = %s|%s', prj.uuid, slncfg[cfg], prjplatform, architecture)
_p(2,'{%s}.%s.Build.0 = %s|%s', prj.uuid, slncfg[cfg], prjplatform, architecture)
end
end
end
end
})
_p(1,'EndGlobalSection')
end

View File

@ -400,7 +400,6 @@
node.project = prj
end
tree.sort(tr)
return tr
end