VS 2013 projects/solutions

This commit is contained in:
Alex Fabijanic
2013-11-05 23:11:28 -06:00
parent 7f2bea8ae5
commit 4297d78621
461 changed files with 86833 additions and 146 deletions

View File

@@ -345,6 +345,11 @@ protected:
solutionStream << "Microsoft Visual Studio Solution File, Format Version 12.00\r\n# Visual Studio 2012\r\n";
generateSolution80(solutionStream, solutionPath, solutionGUID, projectConfig, templateProps, platform, tool);
}
else if (tool == "vs120")
{
solutionStream << "Microsoft Visual Studio Solution File, Format Version 12.00\r\n# Visual Studio 2013\r\n";
generateSolution80(solutionStream, solutionPath, solutionGUID, projectConfig, templateProps, platform, tool);
}
}
void generateSolution71(std::ostream& solutionStream, const Poco::Path& solutionPath, const std::string& solutionGUID, const Poco::Util::AbstractConfiguration& projectConfig, const Poco::Util::AbstractConfiguration& templateProps, const std::string& platform, const std::string& tool)
@@ -558,6 +563,21 @@ protected:
pPropertyGroupElem->appendChild(pPlatformToolsetElem);
}
}
void fix2013Project(Poco::AutoPtr<Poco::XML::Document> pProjectDoc, const std::set<std::string>& configSet, const std::string& platform, const Poco::Util::AbstractConfiguration& projectProps, const Poco::Util::AbstractConfiguration& templateProps)
{
fix2010Project(pProjectDoc, configSet, platform, projectProps, templateProps);
Poco::AutoPtr<Poco::XML::NodeList> pConfigurationTypeList = pProjectDoc->getElementsByTagName("ConfigurationType");
for (unsigned long i = 0; i < pConfigurationTypeList->length(); i++)
{
Poco::XML::Element* pConfigurationTypeElem = static_cast<Poco::XML::Element*>(pConfigurationTypeList->item(i));
Poco::XML::Node* pPropertyGroupElem = pConfigurationTypeElem->parentNode();
Poco::AutoPtr<Poco::XML::Element> pPlatformToolsetElem = pProjectDoc->createElement("PlatformToolset");
Poco::AutoPtr<Poco::XML::Text> pText = pProjectDoc->createTextNode("v120");
pPlatformToolsetElem->appendChild(pText);
pPropertyGroupElem->appendChild(pPlatformToolsetElem);
}
}
void writeProject(Poco::AutoPtr<Poco::XML::Document> pProjectDoc, const std::string& path)
{
@@ -750,6 +770,16 @@ protected:
writeProject(pProjectDoc, vcxprojPath.toString());
}
}
if (config().getBool("progen.postprocess." + postprocess + ".fix2013ProjectFile", false))
{
if (projectFile.exists())
{
logger().information("Fixing Visual Studio 2012 project file: " + vcxprojPath.toString());
Poco::AutoPtr<Poco::XML::Document> pProjectDoc = domParser.parse(vcxprojPath.toString());
fix2013Project(pProjectDoc, configSet, pTemplateProps->getString("project.platform", platform), *pProps, *pTemplateProps);
writeProject(pProjectDoc, vcxprojPath.toString());
}
}
if (config().getBool("progen.postprocess." + postprocess + ".deleteOriginalFile", false))
{
Poco::File projectFile(vcprojPath.toString());