diff --git a/ProGen/progen.properties b/ProGen/progen.properties index e0bc030a6..f57d0999e 100644 --- a/ProGen/progen.properties +++ b/ProGen/progen.properties @@ -43,5 +43,11 @@ progen.postprocess.upgrade2008to2015.deleteOriginalFile = true progen.postprocess.upgrade2008to2015.deleteFiles = Backup;_UpgradeReport_Files;UpgradeLog.XML;UpgradeLog.htm progen.postprocess.upgrade2008to2015.fix2015ProjectFile = true +progen.postprocess.upgrade2008to2017.tool = ${system.env.VS150COMNTOOLS}\\..\\IDE\\DevEnv.exe +progen.postprocess.upgrade2008to2017.args = %;/Upgrade +progen.postprocess.upgrade2008to2017.deleteOriginalFile = true +progen.postprocess.upgrade2008to2017.deleteFiles = Backup;_UpgradeReport_Files;UpgradeLog.XML;UpgradeLog.htm +progen.postprocess.upgrade2008to2017.fix2017ProjectFile = true + progen.backupProjectFile = false progen.solution.applicationGUID = 8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942 diff --git a/ProGen/src/ProGen.cpp b/ProGen/src/ProGen.cpp index 2cf326b19..ca1870b77 100644 --- a/ProGen/src/ProGen.cpp +++ b/ProGen/src/ProGen.cpp @@ -1,7 +1,7 @@ // // ProGen.cpp // -// $Id: //poco/1.4/ProGen/src/ProGen.cpp#9 $ +// $Id: //poco/1.7/ProGen/src/ProGen.cpp#1 $ // // Visual Studio project file generator. // @@ -332,7 +332,12 @@ protected: } else if (tool == "vs140") { - solutionStream << "Microsoft Visual Studio Solution File, Format Version 14.00\r\n# Visual Studio 2015\r\n"; + solutionStream << "Microsoft Visual Studio Solution File, Format Version 12.00\r\n# Visual Studio 2015\r\n"; + generateSolution80(solutionStream, solutionPath, solutionGUID, projectConfig, templateProps, platform, tool); + } + else if (tool == "vs150") + { + solutionStream << "Microsoft Visual Studio Solution File, Format Version 12.00\r\n# Visual Studio 2017\r\n"; generateSolution80(solutionStream, solutionPath, solutionGUID, projectConfig, templateProps, platform, tool); } } @@ -610,6 +615,18 @@ protected: } } + void fix2017Project(Poco::AutoPtr pProjectDoc, const std::set& configSet, const std::string& platform, const Poco::Util::AbstractConfiguration& projectProps, const Poco::Util::AbstractConfiguration& templateProps) + { + fix2010Project(pProjectDoc, configSet, platform, projectProps, templateProps); + Poco::AutoPtr pConfigurationTypeList = pProjectDoc->getElementsByTagName("ConfigurationType"); + for (unsigned long i = 0; i < pConfigurationTypeList->length(); i++) + { + Poco::XML::Element* pConfigurationTypeElem = static_cast(pConfigurationTypeList->item(i)); + removeElement(pConfigurationTypeElem->parentNode(), "PlatformToolset"); + appendElement(pConfigurationTypeElem->parentNode(), "PlatformToolset", "v141"); + } + } + void appendElement(Poco::XML::Node* pParentNode, const std::string& elemName, const std::string& text) { Poco::AutoPtr pElement = pParentNode->ownerDocument()->createElement(elemName); @@ -852,6 +869,16 @@ protected: writeProject(pProjectDoc, vcxprojPath.toString()); } } + if (config().getBool("progen.postprocess." + postprocess + ".fix2017ProjectFile", false)) + { + if (projectFile.exists()) + { + logger().information("Fixing Visual Studio 2017 project file: " + vcxprojPath.toString()); + Poco::AutoPtr pProjectDoc = domParser.parse(vcxprojPath.toString()); + fix2017Project(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()); diff --git a/ProGen/templates/vs150/Win32/executable/debug_shared.template b/ProGen/templates/vs150/Win32/executable/debug_shared.template new file mode 100644 index 000000000..124db40cd --- /dev/null +++ b/ProGen/templates/vs150/Win32/executable/debug_shared.template @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ProGen/templates/vs150/Win32/executable/debug_static_md.template b/ProGen/templates/vs150/Win32/executable/debug_static_md.template new file mode 100644 index 000000000..cbe2c0b10 --- /dev/null +++ b/ProGen/templates/vs150/Win32/executable/debug_static_md.template @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ProGen/templates/vs150/Win32/executable/debug_static_mt.template b/ProGen/templates/vs150/Win32/executable/debug_static_mt.template new file mode 100644 index 000000000..4c020cce5 --- /dev/null +++ b/ProGen/templates/vs150/Win32/executable/debug_static_mt.template @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ProGen/templates/vs150/Win32/executable/project.properties b/ProGen/templates/vs150/Win32/executable/project.properties new file mode 100644 index 000000000..3b102c6d9 --- /dev/null +++ b/ProGen/templates/vs150/Win32/executable/project.properties @@ -0,0 +1,9 @@ +project.suffix = _vs150.vcproj +project.targetSuffix.debug_shared = d +project.targetSuffix.release_shared = +project.targetSuffix.debug_static_md = d +project.targetSuffix.release_static_md = +project.targetSuffix.debug_static_mt = d +project.targetSuffix.release_static_mt = +project.postprocess = upgrade2008to2017 +project.finalSuffix = _vs150.vcxproj diff --git a/ProGen/templates/vs150/Win32/executable/project.template b/ProGen/templates/vs150/Win32/executable/project.template new file mode 100644 index 000000000..6c9d8b9cb --- /dev/null +++ b/ProGen/templates/vs150/Win32/executable/project.template @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + diff --git a/ProGen/templates/vs150/Win32/executable/release_shared.template b/ProGen/templates/vs150/Win32/executable/release_shared.template new file mode 100644 index 000000000..6a8dccbbd --- /dev/null +++ b/ProGen/templates/vs150/Win32/executable/release_shared.template @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ProGen/templates/vs150/Win32/executable/release_static_md.template b/ProGen/templates/vs150/Win32/executable/release_static_md.template new file mode 100644 index 000000000..d9dd10406 --- /dev/null +++ b/ProGen/templates/vs150/Win32/executable/release_static_md.template @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ProGen/templates/vs150/Win32/executable/release_static_mt.template b/ProGen/templates/vs150/Win32/executable/release_static_mt.template new file mode 100644 index 000000000..5477c2b8c --- /dev/null +++ b/ProGen/templates/vs150/Win32/executable/release_static_mt.template @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ProGen/templates/vs150/Win32/library/debug_shared.template b/ProGen/templates/vs150/Win32/library/debug_shared.template new file mode 100644 index 000000000..141cf34b2 --- /dev/null +++ b/ProGen/templates/vs150/Win32/library/debug_shared.template @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ProGen/templates/vs150/Win32/library/debug_static_md.template b/ProGen/templates/vs150/Win32/library/debug_static_md.template new file mode 100644 index 000000000..4ecfe38ce --- /dev/null +++ b/ProGen/templates/vs150/Win32/library/debug_static_md.template @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + diff --git a/ProGen/templates/vs150/Win32/library/debug_static_mt.template b/ProGen/templates/vs150/Win32/library/debug_static_mt.template new file mode 100644 index 000000000..fa7f3bd3c --- /dev/null +++ b/ProGen/templates/vs150/Win32/library/debug_static_mt.template @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + diff --git a/ProGen/templates/vs150/Win32/library/project.properties b/ProGen/templates/vs150/Win32/library/project.properties new file mode 100644 index 000000000..49399caa9 --- /dev/null +++ b/ProGen/templates/vs150/Win32/library/project.properties @@ -0,0 +1,9 @@ +project.suffix = _vs150.vcproj +project.targetSuffix.debug_shared = d +project.targetSuffix.release_shared = +project.targetSuffix.debug_static_md = mdd +project.targetSuffix.release_static_md = md +project.targetSuffix.debug_static_mt = mtd +project.targetSuffix.release_static_mt = mt +project.postprocess = upgrade2008to2017 +project.finalSuffix = _vs150.vcxproj diff --git a/ProGen/templates/vs150/Win32/library/project.template b/ProGen/templates/vs150/Win32/library/project.template new file mode 100644 index 000000000..6c9d8b9cb --- /dev/null +++ b/ProGen/templates/vs150/Win32/library/project.template @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + diff --git a/ProGen/templates/vs150/Win32/library/release_shared.template b/ProGen/templates/vs150/Win32/library/release_shared.template new file mode 100644 index 000000000..51211d8e5 --- /dev/null +++ b/ProGen/templates/vs150/Win32/library/release_shared.template @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ProGen/templates/vs150/Win32/library/release_static_md.template b/ProGen/templates/vs150/Win32/library/release_static_md.template new file mode 100644 index 000000000..59c197fe0 --- /dev/null +++ b/ProGen/templates/vs150/Win32/library/release_static_md.template @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + diff --git a/ProGen/templates/vs150/Win32/library/release_static_mt.template b/ProGen/templates/vs150/Win32/library/release_static_mt.template new file mode 100644 index 000000000..bc35acb96 --- /dev/null +++ b/ProGen/templates/vs150/Win32/library/release_static_mt.template @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + diff --git a/ProGen/templates/vs150/Win32/plugin/debug_shared.template b/ProGen/templates/vs150/Win32/plugin/debug_shared.template new file mode 100644 index 000000000..7a4ce3fd2 --- /dev/null +++ b/ProGen/templates/vs150/Win32/plugin/debug_shared.template @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ProGen/templates/vs150/Win32/plugin/project.properties b/ProGen/templates/vs150/Win32/plugin/project.properties new file mode 100644 index 000000000..f09e04290 --- /dev/null +++ b/ProGen/templates/vs150/Win32/plugin/project.properties @@ -0,0 +1,5 @@ +project.suffix = _vs150.vcproj +project.targetSuffix.debug_shared = d +project.targetSuffix.release_shared = +project.postprocess = upgrade2008to2017 +project.finalSuffix = _vs150.vcxproj diff --git a/ProGen/templates/vs150/Win32/plugin/project.template b/ProGen/templates/vs150/Win32/plugin/project.template new file mode 100644 index 000000000..6c9d8b9cb --- /dev/null +++ b/ProGen/templates/vs150/Win32/plugin/project.template @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + diff --git a/ProGen/templates/vs150/Win32/plugin/release_shared.template b/ProGen/templates/vs150/Win32/plugin/release_shared.template new file mode 100644 index 000000000..862c9c6af --- /dev/null +++ b/ProGen/templates/vs150/Win32/plugin/release_shared.template @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ProGen/templates/vs150/Win32/testsuite/debug_shared.template b/ProGen/templates/vs150/Win32/testsuite/debug_shared.template new file mode 100644 index 000000000..7defc61d9 --- /dev/null +++ b/ProGen/templates/vs150/Win32/testsuite/debug_shared.template @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ProGen/templates/vs150/Win32/testsuite/debug_static_md.template b/ProGen/templates/vs150/Win32/testsuite/debug_static_md.template new file mode 100644 index 000000000..1093125a2 --- /dev/null +++ b/ProGen/templates/vs150/Win32/testsuite/debug_static_md.template @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ProGen/templates/vs150/Win32/testsuite/debug_static_mt.template b/ProGen/templates/vs150/Win32/testsuite/debug_static_mt.template new file mode 100644 index 000000000..4745902ef --- /dev/null +++ b/ProGen/templates/vs150/Win32/testsuite/debug_static_mt.template @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ProGen/templates/vs150/Win32/testsuite/project.properties b/ProGen/templates/vs150/Win32/testsuite/project.properties new file mode 100644 index 000000000..e300b6441 --- /dev/null +++ b/ProGen/templates/vs150/Win32/testsuite/project.properties @@ -0,0 +1,10 @@ +project.suffix = _vs150.vcproj +project.targetSuffix.debug_shared = d +project.targetSuffix.release_shared = +project.targetSuffix.debug_static_md = d +project.targetSuffix.release_static_md = +project.targetSuffix.debug_static_mt = d +project.targetSuffix.release_static_mt = +project.postprocess = upgrade2008to2017 +project.finalSuffix = _vs150.vcxproj +project.replaceSourceFiles = .\\src\\WinDriver.cpp > .\\src\\Driver.cpp diff --git a/ProGen/templates/vs150/Win32/testsuite/project.template b/ProGen/templates/vs150/Win32/testsuite/project.template new file mode 100644 index 000000000..6c9d8b9cb --- /dev/null +++ b/ProGen/templates/vs150/Win32/testsuite/project.template @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + diff --git a/ProGen/templates/vs150/Win32/testsuite/release_shared.template b/ProGen/templates/vs150/Win32/testsuite/release_shared.template new file mode 100644 index 000000000..443b63aec --- /dev/null +++ b/ProGen/templates/vs150/Win32/testsuite/release_shared.template @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ProGen/templates/vs150/Win32/testsuite/release_static_md.template b/ProGen/templates/vs150/Win32/testsuite/release_static_md.template new file mode 100644 index 000000000..78326c39d --- /dev/null +++ b/ProGen/templates/vs150/Win32/testsuite/release_static_md.template @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ProGen/templates/vs150/Win32/testsuite/release_static_mt.template b/ProGen/templates/vs150/Win32/testsuite/release_static_mt.template new file mode 100644 index 000000000..0f04ee906 --- /dev/null +++ b/ProGen/templates/vs150/Win32/testsuite/release_static_mt.template @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ProGen/templates/vs150/x64/executable/debug_shared.template b/ProGen/templates/vs150/x64/executable/debug_shared.template new file mode 100644 index 000000000..cc3939d71 --- /dev/null +++ b/ProGen/templates/vs150/x64/executable/debug_shared.template @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ProGen/templates/vs150/x64/executable/debug_static_md.template b/ProGen/templates/vs150/x64/executable/debug_static_md.template new file mode 100644 index 000000000..e38a47edc --- /dev/null +++ b/ProGen/templates/vs150/x64/executable/debug_static_md.template @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ProGen/templates/vs150/x64/executable/debug_static_mt.template b/ProGen/templates/vs150/x64/executable/debug_static_mt.template new file mode 100644 index 000000000..95790d638 --- /dev/null +++ b/ProGen/templates/vs150/x64/executable/debug_static_mt.template @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ProGen/templates/vs150/x64/executable/project.properties b/ProGen/templates/vs150/x64/executable/project.properties new file mode 100644 index 000000000..c8630fcae --- /dev/null +++ b/ProGen/templates/vs150/x64/executable/project.properties @@ -0,0 +1,10 @@ +project.suffix = _x64_vs150.vcproj +project.targetSuffix.debug_shared = d +project.targetSuffix.release_shared = +project.targetSuffix.debug_static_md = d +project.targetSuffix.release_static_md = +project.targetSuffix.debug_static_mt = d +project.targetSuffix.release_static_mt = +project.postprocess = upgrade2008to2017 +project.finalSuffix = _x64_vs150.vcxproj +project.targetArchitecture = AMD64 diff --git a/ProGen/templates/vs150/x64/executable/project.template b/ProGen/templates/vs150/x64/executable/project.template new file mode 100644 index 000000000..65e92894c --- /dev/null +++ b/ProGen/templates/vs150/x64/executable/project.template @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + diff --git a/ProGen/templates/vs150/x64/executable/release_shared.template b/ProGen/templates/vs150/x64/executable/release_shared.template new file mode 100644 index 000000000..369c69169 --- /dev/null +++ b/ProGen/templates/vs150/x64/executable/release_shared.template @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ProGen/templates/vs150/x64/executable/release_static_md.template b/ProGen/templates/vs150/x64/executable/release_static_md.template new file mode 100644 index 000000000..5992c40cf --- /dev/null +++ b/ProGen/templates/vs150/x64/executable/release_static_md.template @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ProGen/templates/vs150/x64/executable/release_static_mt.template b/ProGen/templates/vs150/x64/executable/release_static_mt.template new file mode 100644 index 000000000..f04f3a998 --- /dev/null +++ b/ProGen/templates/vs150/x64/executable/release_static_mt.template @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ProGen/templates/vs150/x64/library/debug_shared.template b/ProGen/templates/vs150/x64/library/debug_shared.template new file mode 100644 index 000000000..69308d3cc --- /dev/null +++ b/ProGen/templates/vs150/x64/library/debug_shared.template @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ProGen/templates/vs150/x64/library/debug_static_md.template b/ProGen/templates/vs150/x64/library/debug_static_md.template new file mode 100644 index 000000000..196774eb1 --- /dev/null +++ b/ProGen/templates/vs150/x64/library/debug_static_md.template @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + diff --git a/ProGen/templates/vs150/x64/library/debug_static_mt.template b/ProGen/templates/vs150/x64/library/debug_static_mt.template new file mode 100644 index 000000000..e04f4aeeb --- /dev/null +++ b/ProGen/templates/vs150/x64/library/debug_static_mt.template @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + diff --git a/ProGen/templates/vs150/x64/library/project.properties b/ProGen/templates/vs150/x64/library/project.properties new file mode 100644 index 000000000..9a1223e8b --- /dev/null +++ b/ProGen/templates/vs150/x64/library/project.properties @@ -0,0 +1,10 @@ +project.suffix = _x64_vs150.vcproj +project.targetSuffix.debug_shared = 64d +project.targetSuffix.release_shared = 64 +project.targetSuffix.debug_static_md = mdd +project.targetSuffix.release_static_md = md +project.targetSuffix.debug_static_mt = mtd +project.targetSuffix.release_static_mt = mt +project.postprocess = upgrade2008to2017 +project.finalSuffix = _x64_vs150.vcxproj +project.targetArchitecture = AMD64 diff --git a/ProGen/templates/vs150/x64/library/project.template b/ProGen/templates/vs150/x64/library/project.template new file mode 100644 index 000000000..65e92894c --- /dev/null +++ b/ProGen/templates/vs150/x64/library/project.template @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + diff --git a/ProGen/templates/vs150/x64/library/release_shared.template b/ProGen/templates/vs150/x64/library/release_shared.template new file mode 100644 index 000000000..598a27939 --- /dev/null +++ b/ProGen/templates/vs150/x64/library/release_shared.template @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ProGen/templates/vs150/x64/library/release_static_md.template b/ProGen/templates/vs150/x64/library/release_static_md.template new file mode 100644 index 000000000..dbc15deec --- /dev/null +++ b/ProGen/templates/vs150/x64/library/release_static_md.template @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + diff --git a/ProGen/templates/vs150/x64/library/release_static_mt.template b/ProGen/templates/vs150/x64/library/release_static_mt.template new file mode 100644 index 000000000..acebfc406 --- /dev/null +++ b/ProGen/templates/vs150/x64/library/release_static_mt.template @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + diff --git a/ProGen/templates/vs150/x64/plugin/debug_shared.template b/ProGen/templates/vs150/x64/plugin/debug_shared.template new file mode 100644 index 000000000..3390a15db --- /dev/null +++ b/ProGen/templates/vs150/x64/plugin/debug_shared.template @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ProGen/templates/vs150/x64/plugin/project.properties b/ProGen/templates/vs150/x64/plugin/project.properties new file mode 100644 index 000000000..9de6ac8bb --- /dev/null +++ b/ProGen/templates/vs150/x64/plugin/project.properties @@ -0,0 +1,6 @@ +project.suffix = _x64_vs150.vcproj +project.targetSuffix.debug_shared = d +project.targetSuffix.release_shared = +project.postprocess = upgrade2008to2017 +project.finalSuffix = _x64_vs150.vcxproj +project.targetArchitecture = AMD64 diff --git a/ProGen/templates/vs150/x64/plugin/project.template b/ProGen/templates/vs150/x64/plugin/project.template new file mode 100644 index 000000000..65e92894c --- /dev/null +++ b/ProGen/templates/vs150/x64/plugin/project.template @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + diff --git a/ProGen/templates/vs150/x64/plugin/release_shared.template b/ProGen/templates/vs150/x64/plugin/release_shared.template new file mode 100644 index 000000000..65d659177 --- /dev/null +++ b/ProGen/templates/vs150/x64/plugin/release_shared.template @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ProGen/templates/vs150/x64/testsuite/debug_shared.template b/ProGen/templates/vs150/x64/testsuite/debug_shared.template new file mode 100644 index 000000000..94c39f852 --- /dev/null +++ b/ProGen/templates/vs150/x64/testsuite/debug_shared.template @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ProGen/templates/vs150/x64/testsuite/debug_static_md.template b/ProGen/templates/vs150/x64/testsuite/debug_static_md.template new file mode 100644 index 000000000..49a37233e --- /dev/null +++ b/ProGen/templates/vs150/x64/testsuite/debug_static_md.template @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ProGen/templates/vs150/x64/testsuite/debug_static_mt.template b/ProGen/templates/vs150/x64/testsuite/debug_static_mt.template new file mode 100644 index 000000000..1cfaf5d15 --- /dev/null +++ b/ProGen/templates/vs150/x64/testsuite/debug_static_mt.template @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ProGen/templates/vs150/x64/testsuite/project.properties b/ProGen/templates/vs150/x64/testsuite/project.properties new file mode 100644 index 000000000..6f4a03c02 --- /dev/null +++ b/ProGen/templates/vs150/x64/testsuite/project.properties @@ -0,0 +1,11 @@ +project.suffix = _x64_vs150.vcproj +project.targetSuffix.debug_shared = d +project.targetSuffix.release_shared = +project.targetSuffix.debug_static_md = d +project.targetSuffix.release_static_md = +project.targetSuffix.debug_static_mt = d +project.targetSuffix.release_static_mt = +project.postprocess = upgrade2008to2017 +project.finalSuffix = _x64_vs150.vcxproj +project.targetArchitecture = AMD64 +project.replaceSourceFiles = .\\src\\WinDriver.cpp > .\\src\\Driver.cpp diff --git a/ProGen/templates/vs150/x64/testsuite/project.template b/ProGen/templates/vs150/x64/testsuite/project.template new file mode 100644 index 000000000..65e92894c --- /dev/null +++ b/ProGen/templates/vs150/x64/testsuite/project.template @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + diff --git a/ProGen/templates/vs150/x64/testsuite/release_shared.template b/ProGen/templates/vs150/x64/testsuite/release_shared.template new file mode 100644 index 000000000..4ccc00393 --- /dev/null +++ b/ProGen/templates/vs150/x64/testsuite/release_shared.template @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ProGen/templates/vs150/x64/testsuite/release_static_md.template b/ProGen/templates/vs150/x64/testsuite/release_static_md.template new file mode 100644 index 000000000..5aff313e9 --- /dev/null +++ b/ProGen/templates/vs150/x64/testsuite/release_static_md.template @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ProGen/templates/vs150/x64/testsuite/release_static_mt.template b/ProGen/templates/vs150/x64/testsuite/release_static_mt.template new file mode 100644 index 000000000..82292b690 --- /dev/null +++ b/ProGen/templates/vs150/x64/testsuite/release_static_mt.template @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + diff --git a/build_vs150.cmd b/build_vs150.cmd new file mode 100644 index 000000000..45e0f8bd6 --- /dev/null +++ b/build_vs150.cmd @@ -0,0 +1,2 @@ +@echo off +buildwin 150 build shared both Win32 samples tests devenv diff --git a/buildwin.cmd b/buildwin.cmd index f946cbcbf..d59e963d7 100644 --- a/buildwin.cmd +++ b/buildwin.cmd @@ -7,9 +7,9 @@ rem rem POCO C++ Libraries command-line build script rem for MS Visual Studio 2008 to 2013 rem -rem $Id: //poco/1.4/dist/buildwin.cmd#2 $ +rem $Id$ rem -rem Copyright (c) 2006-2014 by Applied Informatics Software Engineering GmbH +rem Copyright (c) 2006-2017 by Applied Informatics Software Engineering GmbH rem and Contributors. rem rem Original version by Aleksandar Fabijanic. @@ -18,7 +18,7 @@ rem rem Usage: rem ------ rem buildwin VS_VERSION [ACTION] [LINKMODE] [CONFIGURATION] [PLATFORM] [SAMPLES] [TESTS] [TOOL] -rem VS_VERSION: 90|100|110|120|140 +rem VS_VERSION: 90|100|110|120|140|150 rem ACTION: build|rebuild|clean rem LINKMODE: static_mt|static_md|shared|all rem CONFIGURATION: release|debug|both @@ -46,11 +46,14 @@ set LIB=%LIB%;%MYSQL_LIB% set POCO_BASE=%CD% set PATH=%POCO_BASE%\bin64;%POCO_BASE%\bin;%PATH% -rem VS_VERSION {90 | 100 | 110 | 120 | 140} +rem VS_VERSION {90 | 100 | 110 | 120 | 140 | 150} if "%1"=="" goto usage set VS_VERSION=vs%1 -set VS_64_BIT_ENV=VC\bin\x86_amd64\vcvarsx86_amd64.bat - +if %VS_VERSION%==vs150 ( + set VS_VARSALL=..\..\VC\Auxiliary\Build\vcvarsall.bat +) else ( + set VS_VARSALL=..\..\VC\vcvarsall.bat +) rem PLATFORM [Win32|x64|WinCE|WEC2013] set PLATFORM=%5 if "%PLATFORM%"=="" (set PLATFORM=Win32) @@ -62,39 +65,47 @@ if not "%PLATFORM%"=="WEC2013" goto usage))) if not defined VCINSTALLDIR ( if %VS_VERSION%==vs90 ( if %PLATFORM%==x64 ( - call "%VS90COMNTOOLS%..\..\%VS_64_BIT_ENV%" + call "%VS90COMNTOOLS%%VS_VARSALL%" amd64 ) else ( - call "%VS90COMNTOOLS%vsvars32.bat" + call "%VS90COMNTOOLS%%VS_VARSALL%" x86 ) ) else ( if %VS_VERSION%==vs100 ( if %PLATFORM%==x64 ( - call "%VS100COMNTOOLS%..\..\%VS_64_BIT_ENV%" + call "%VS100COMNTOOLS%%VS_VARSALL%" amd64 ) else ( - call "%VS100COMNTOOLS%vsvars32.bat" + call "%VS100COMNTOOLS%%VS_VARSALL%" x86 ) ) else ( if %VS_VERSION%==vs110 ( if %PLATFORM%==x64 ( - call "%VS110COMNTOOLS%..\..\%VS_64_BIT_ENV%" + call "%VS110COMNTOOLS%%VS_VARSALL%" amd64 ) else ( - call "%VS110COMNTOOLS%vsvars32.bat" + call "%VS110COMNTOOLS%%VS_VARSALL%" x86 ) ) else ( if %VS_VERSION%==vs120 ( if %PLATFORM%==x64 ( - call "%VS120COMNTOOLS%..\..\%VS_64_BIT_ENV%" + call "%VS120COMNTOOLS%%VS_VARSALL%" amd64 ) else ( - call "%VS120COMNTOOLS%vsvars32.bat + call "%VS120COMNTOOLS%%VS_VARSALL%" x86 ) ) else ( if %VS_VERSION%==vs140 ( if %PLATFORM%==x64 ( - call "%VS140COMNTOOLS%..\..\%VS_64_BIT_ENV%" + call "%VS140COMNTOOLS%%VS_VARSALL%" amd64 ) else ( - call "%VS140COMNTOOLS%vsvars32.bat + call "%VS140COMNTOOLS%%VS_VARSALL%" x86 ) - ) + ) else ( + if %VS_VERSION%==vs150 ( + if %PLATFORM%==x64 ( + call "%VS150COMNTOOLS%%VS_VARSALL%" amd64 + ) else ( + call "%VS150COMNTOOLS%%VS_VARSALL%" x86 + ) + ) + ) ) ) ) @@ -113,6 +124,7 @@ if %VS_VERSION%==vs100 (set VCPROJ_EXT=vcxproj) if %VS_VERSION%==vs110 (set VCPROJ_EXT=vcxproj) if %VS_VERSION%==vs120 (set VCPROJ_EXT=vcxproj) if %VS_VERSION%==vs140 (set VCPROJ_EXT=vcxproj) +if %VS_VERSION%==vs150 (set VCPROJ_EXT=vcxproj) if "%8"=="" goto use_devenv set BUILD_TOOL=%8 @@ -123,6 +135,7 @@ if "%VS_VERSION%"=="vs100" (set BUILD_TOOL=msbuild) if "%VS_VERSION%"=="vs110" (set BUILD_TOOL=msbuild) if "%VS_VERSION%"=="vs120" (set BUILD_TOOL=msbuild) if "%VS_VERSION%"=="vs140" (set BUILD_TOOL=msbuild) +if "%VS_VERSION%"=="vs150" (set BUILD_TOOL=msbuild) :use_custom if not "%BUILD_TOOL%"=="msbuild" (set USEENV=/useenv) if "%BUILD_TOOL%"=="msbuild" ( @@ -138,6 +151,7 @@ if "%VS_VERSION%"=="vs100" (goto msbuildok) if "%VS_VERSION%"=="vs110" (goto msbuildok) if "%VS_VERSION%"=="vs120" (goto msbuildok) if "%VS_VERSION%"=="vs140" (goto msbuildok) +if "%VS_VERSION%"=="vs150" (goto msbuildok) if "%BUILD_TOOL%"=="msbuild" ( echo "Cannot use msbuild with Visual Studio 2008 or earlier." exit /b 2 @@ -181,6 +195,7 @@ set USEENV= if %VS_VERSION%==vs110 (set EXTRASW=/m /p:VisualStudioVersion=11.0) if %VS_VERSION%==vs120 (set EXTRASW=/m /p:VisualStudioVersion=12.0) if %VS_VERSION%==vs140 (set EXTRASW=/m /p:VisualStudioVersion=14.0) +if %VS_VERSION%==vs150 (set EXTRASW=/m /p:VisualStudioVersion=15.0) ) rem SAMPLES [samples|nosamples] @@ -518,7 +533,7 @@ exit /b 1 echo Usage: echo ------ echo buildwin VS_VERSION [ACTION] [LINKMODE] [CONFIGURATION] [PLATFORM] [SAMPLES] [TESTS] [TOOL] -echo VS_VERSION: "90|100|110|120|140" +echo VS_VERSION: "90|100|110|120|140|150" echo ACTION: "build|rebuild|clean" echo LINKMODE: "static_mt|static_md|shared|all" echo CONFIGURATION: "release|debug|both" diff --git a/buildwin.ps1 b/buildwin.ps1 index 78bca3808..405e70cf9 100644 --- a/buildwin.ps1 +++ b/buildwin.ps1 @@ -4,7 +4,7 @@ # Usage: # ------ # buildwin.ps1 [-poco_base dir] -# [-vs_version 140 | 120 | 110 | 100 | 90] +# [-vs_version 150 | 140 | 120 | 110 | 100 | 90] # [-action build | rebuild | clean] # [-linkmode shared | static_mt | static_md | all] # [-config release | debug | both] @@ -23,7 +23,7 @@ Param [string] $poco_base, [Parameter()] - [ValidateSet(90, 100, 110, 120, 140)] + [ValidateSet(90, 100, 110, 120, 140, 150)] [int] $vs_version, [Parameter()] @@ -78,7 +78,8 @@ function Set-Environment if ($vs_version -eq 0) { - if ($Env:VS140COMNTOOLS -ne '') { $script:vs_version = 140 } + if ($Env:VS150COMNTOOLS -ne '') { $script:vs_version = 150 } + elseif ($Env:VS140COMNTOOLS -ne '') { $script:vs_version = 140 } elseif ($Env:VS120COMNTOOLS -ne '') { $script:vs_version = 120 } elseif ($Env:VS110COMNTOOLS -ne '') { $script:vs_version = 110 } elseif ($Env:VS100COMNTOOLS -ne '') { $script:vs_version = 100 } @@ -117,17 +118,26 @@ function Set-Environment $vsct = "VS$($vs_version)COMNTOOLS" $vsdir = (Get-Item Env:$vsct).Value $Command = '' + $CommandArg = '' if ($platform -eq 'x64') { - $Command = "$($vsdir)..\..\VC\bin\x86_amd64\vcvarsx86_amd64.bat" + $CommandArg = "amd64" } else { - $Command = "$($vsdir)vsvars32.bat" + $CommandArg = "x86" + } + if ($vs_version -ge 150) + { + $Command = "$($vsdir)..\..\VC\Auxiliary\Build\vcvarsall.bat" + } + else + { + $Command = "$($vsdir)..\..\VC\vcvarsall.bat" } - $tempFile = [IO.Path]::GetTempFileName() - cmd /c " `"$Command`" && set > `"$tempFile`" " + Write-Host "Command: $Command $CommandArg" + cmd /c " `"$Command`" $CommandArg && set > `"$tempFile`" " Get-Content $tempFile | Foreach-Object { if($_ -match "^(.*?)=(.*)$") { @@ -145,7 +155,7 @@ function Process-Input Write-Host 'Usage:' Write-Host '------' Write-Host 'buildwin.ps1 [-poco_base dir]' - Write-Host ' [-vs_version 140 | 120 | 110 | 100 | 90]' + Write-Host ' [-vs_version 150 | 140 | 120 | 110 | 100 | 90]' Write-Host ' [-action build | rebuild | clean]' Write-Host ' [-linkmode shared | static_mt | static_md | all]' Write-Host ' [-config release | debug | both]'