From 904a0ae39107ce0d6480ff2881507a042231457c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Reis?= Date: Thu, 20 Feb 2020 19:35:14 +0000 Subject: [PATCH] win: block running on EOL Windows versions Windows 7 and Windows Server 2008 R2 EOL was January 14, 2020. Windows 8 EOL was January 12, 2016. Windows 2012 (not R2) is still supported and allowed to run. This clarifies that support is experimental. --- BUILDING.md | 7 ++++--- src/node_main.cc | 9 ++++++--- tools/msvs/msi/product.wxs | 4 ++-- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/BUILDING.md b/BUILDING.md index 4f24ebe06c0602..7a923850e6e178 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -106,8 +106,9 @@ platforms. This is true regardless of entries in the table below. | GNU/Linux | armv6 | kernel >= 4.14, glibc >= 2.24 | Experimental | Downgraded as of Node.js 12 | | GNU/Linux | ppc64le >=power8 | kernel >= 3.10.0, glibc >= 2.17 | Tier 2 | e.g. Ubuntu 16.04 [1](#fn1), EL 7 [2](#fn2) | | GNU/Linux | s390x | kernel >= 3.10.0, glibc >= 2.17 | Tier 2 | e.g. EL 7 [2](#fn2) | -| Windows | x64, x86 (WoW64) | >= Windows 7/2008 R2/2012 R2 | Tier 1 | [4](#fn4),[5](#fn5) | -| Windows | x86 (native) | >= Windows 7/2008 R2/2012 R2 | Tier 1 (running) / Experimental (compiling) [6](#fn6) | | +| Windows | x64, x86 (WoW64) | >= Windows 8.1/2012 R2 | Tier 1 | [4](#fn4),[5](#fn5) | +| Windows | x86 (native) | >= Windows 8.1/2012 R2 | Tier 1 (running) / Experimental (compiling) [6](#fn6) | | +| Windows | x64, x86 | Windows Server 2012 (not R2) | Experimental | | | Windows | arm64 | >= Windows 10 | Experimental | | | macOS | x64 | >= 10.11 | Tier 1 | | | SmartOS | x64 | >= 18 | Tier 2 | | @@ -174,7 +175,7 @@ Binaries at are produced on: | linux-s390x | RHEL 7 with devtoolset-6 / GCC 6 [7](#fn7) | | linux-x64 | CentOS 7 with devtoolset-6 / GCC 6 [7](#fn7) | | sunos-x64 | SmartOS 18 with GCC 7 | -| win-x64 and win-x86 | Windows 2012 R2 (x64) with Visual Studio 2017 | +| win-x64 and win-x86 | Windows 2012 R2 (x64) with Visual Studio 2019 | 7: The Enterprise Linux devtoolset-6 allows us to compile binaries with GCC 6 but linked to the glibc and libstdc++ versions of the host diff --git a/src/node_main.cc b/src/node_main.cc index e92c0df94297e2..00f3f2a4836818 100644 --- a/src/node_main.cc +++ b/src/node_main.cc @@ -28,9 +28,12 @@ #include int wmain(int argc, wchar_t* wargv[]) { - if (!IsWindows7OrGreater()) { - fprintf(stderr, "This application is only supported on Windows 7, " - "Windows Server 2008 R2, or higher."); + // Windows Server 2012 (not R2) is supported until 10/10/2023, so we allow it + // to run in the experimental support tier. + if (!IsWindows8Point1OrGreater() && + !(IsWindowsServer() && IsWindows8OrGreater())) { + fprintf(stderr, "This application is only supported on Windows 8.1, " + "Windows Server 2012 R2, or higher."); exit(ERROR_EXE_MACHINE_TYPE_MISMATCH); } diff --git a/tools/msvs/msi/product.wxs b/tools/msvs/msi/product.wxs index f008ea7f9adff7..8a278637e600a1 100755 --- a/tools/msvs/msi/product.wxs +++ b/tools/msvs/msi/product.wxs @@ -23,8 +23,8 @@ Compressed="yes" InstallScope="perMachine"/> - - = 601)]]> + + = 603) OR (VersionNT >= 602 AND MsiNTProductType <> 1)]]>