From 27368cc8453f423955f5baa826611ea8a3b09feb Mon Sep 17 00:00:00 2001 From: Peter Kohaut Date: Wed, 8 Mar 2017 22:30:53 +0100 Subject: CREATE_PROJECT: Add support for Visual Studio 2017 --- devtools/create_project/create_project.cpp | 7 +- devtools/create_project/msbuild.cpp | 7 +- devtools/create_project/msvc15/create_project.sln | 28 +++ .../create_project/msvc15/create_project.vcxproj | 227 +++++++++++++++++++++ .../msvc15/create_project.vcxproj.filters | 82 ++++++++ 5 files changed, 346 insertions(+), 5 deletions(-) create mode 100644 devtools/create_project/msvc15/create_project.sln create mode 100644 devtools/create_project/msvc15/create_project.vcxproj create mode 100644 devtools/create_project/msvc15/create_project.vcxproj.filters (limited to 'devtools/create_project') diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp index 2baaf91a71..d0cc7da4b2 100644 --- a/devtools/create_project/create_project.cpp +++ b/devtools/create_project/create_project.cpp @@ -192,7 +192,7 @@ int main(int argc, char *argv[]) { msvcVersion = atoi(argv[++i]); - if (msvcVersion != 9 && msvcVersion != 10 && msvcVersion != 11 && msvcVersion != 12 && msvcVersion != 14) { + if (msvcVersion != 9 && msvcVersion != 10 && msvcVersion != 11 && msvcVersion != 12 && msvcVersion != 14 && msvcVersion != 15) { std::cerr << "ERROR: Unsupported version: \"" << msvcVersion << "\" passed to \"--msvc-version\"!\n"; return -1; } @@ -579,7 +579,7 @@ int main(int argc, char *argv[]) { globalWarnings.push_back("6385"); globalWarnings.push_back("6386"); - if (msvcVersion == 14) { + if (msvcVersion == 14 || msvcVersion == 15) { globalWarnings.push_back("4267"); globalWarnings.push_back("4577"); } @@ -701,7 +701,8 @@ void displayHelp(const char *exe) { " 11 stands for \"Visual Studio 2012\"\n" " 12 stands for \"Visual Studio 2013\"\n" " 14 stands for \"Visual Studio 2015\"\n" - " The default is \"9\", thus \"Visual Studio 2008\"\n" + " 15 stands for \"Visual Studio 2017\"\n" + " The default is \"12\", thus \"Visual Studio 2013\"\n" " --build-events Run custom build events as part of the build\n" " (default: false)\n" " --installer Create NSIS installer after the build (implies --build-events)\n" diff --git a/devtools/create_project/msbuild.cpp b/devtools/create_project/msbuild.cpp index 3accce4e05..2389bb6cfb 100644 --- a/devtools/create_project/msbuild.cpp +++ b/devtools/create_project/msbuild.cpp @@ -58,11 +58,14 @@ int MSBuildProvider::getVisualStudioVersion() { if (_version == 14) return 14; + if (_version == 15) + return 15; + error("Unsupported version passed to getVisualStudioVersion"); } int MSBuildProvider::getSolutionVersion() { - return (_version < 14) ? _version + 1 : _version; + return (_version == 15) ? 14 : _version + 1; } namespace { @@ -123,7 +126,7 @@ void MSBuildProvider::createProjectFile(const std::string &name, const std::stri // Shared configuration project << "\t\n"; - std::string version = "v" + toString(_version) + "0"; + std::string version = _version == 15 ? "v141" : "v" + toString(_version) + "0"; std::string llvm = "LLVM-vs" + toString(getVisualStudioVersion()); outputConfigurationType(setup, project, name, "Release|Win32", version); diff --git a/devtools/create_project/msvc15/create_project.sln b/devtools/create_project/msvc15/create_project.sln new file mode 100644 index 0000000000..73f0b3569e --- /dev/null +++ b/devtools/create_project/msvc15/create_project.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.22609.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "create_project", "create_project.vcxproj", "{CF177559-077D-4A08-AABE-BE0FD35F6C63}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {CF177559-077D-4A08-AABE-BE0FD35F6C63}.Debug|Win32.ActiveCfg = Debug|Win32 + {CF177559-077D-4A08-AABE-BE0FD35F6C63}.Debug|Win32.Build.0 = Debug|Win32 + {CF177559-077D-4A08-AABE-BE0FD35F6C63}.Debug|x64.ActiveCfg = Debug|x64 + {CF177559-077D-4A08-AABE-BE0FD35F6C63}.Debug|x64.Build.0 = Debug|x64 + {CF177559-077D-4A08-AABE-BE0FD35F6C63}.Release|Win32.ActiveCfg = Release|Win32 + {CF177559-077D-4A08-AABE-BE0FD35F6C63}.Release|Win32.Build.0 = Release|Win32 + {CF177559-077D-4A08-AABE-BE0FD35F6C63}.Release|x64.ActiveCfg = Release|x64 + {CF177559-077D-4A08-AABE-BE0FD35F6C63}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/devtools/create_project/msvc15/create_project.vcxproj b/devtools/create_project/msvc15/create_project.vcxproj new file mode 100644 index 0000000000..1a2f31fe66 --- /dev/null +++ b/devtools/create_project/msvc15/create_project.vcxproj @@ -0,0 +1,227 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {CF177559-077D-4A08-AABE-BE0FD35F6C63} + create_project + + + + Application + MultiByte + true + v141 + + + Application + MultiByte + true + v141 + + + Application + MultiByte + v141 + + + Application + MultiByte + v141 + + + + + + + + + + + + + + + + + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + + + + Disabled + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + EditAndContinue + false + 4003;4512;4127;4100 + Sync + + + Rpcrt4.lib;%(AdditionalDependencies) + true + MachineX86 + false + + + @echo off +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc15\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc14\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc12\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc11\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc10\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc9\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc8\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\codeblocks\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\iphone\" + + + + + Disabled + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + false + 4003;4512;4127 + + + Rpcrt4.lib;%(AdditionalDependencies) + true + false + + + @echo off +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc15\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc14\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc12\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc11\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc10\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc9\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\codeblocks\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\iphone\" + + + + + MaxSpeed + true + MultiThreadedDLL + true + Level3 + ProgramDatabase + 4003;4512;4127 + true + + + Rpcrt4.lib;%(AdditionalDependencies) + true + true + true + MachineX86 + + + @echo off +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc15\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc14\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc12\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc11\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc10\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc9\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\codeblocks\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\iphone\" + + + + + + + + + MaxSpeed + true + MultiThreadedDLL + true + Level3 + ProgramDatabase + 4003;4512;4127 + true + + + Rpcrt4.lib;%(AdditionalDependencies) + true + true + true + + + @echo off +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc15\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc14\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc12\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc11\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc10\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc9\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc8\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\codeblocks\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\iphone\" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/devtools/create_project/msvc15/create_project.vcxproj.filters b/devtools/create_project/msvc15/create_project.vcxproj.filters new file mode 100644 index 0000000000..b6da1e9df6 --- /dev/null +++ b/devtools/create_project/msvc15/create_project.vcxproj.filters @@ -0,0 +1,82 @@ + + + + + {2e3580c8-ec3a-4c81-8351-b668c668db2a} + + + {31aaf58c-d3cb-4ed6-8eca-163b4a9b31a6} + + + {f980f6fb-41b6-4161-b035-58b200c85cad} + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + scripts + + + scripts + + + scripts + + + scripts + + + + + scripts + + + \ No newline at end of file -- cgit v1.2.3