Skip to content

Commit

Permalink
win: block running on EOL Windows versions
Browse files Browse the repository at this point in the history
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.

PR-URL: #31954
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
  • Loading branch information
joaocgreis committed Mar 5, 2020
1 parent 67d45fb commit cb8898c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
7 changes: 4 additions & 3 deletions BUILDING.md
Expand Up @@ -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 <sup>[1](#fn1)</sup>, EL 7 <sup>[2](#fn2)</sup> |
| GNU/Linux | s390x | kernel >= 3.10.0, glibc >= 2.17 | Tier 2 | e.g. EL 7 <sup>[2](#fn2)</sup> |
| Windows | x64, x86 (WoW64) | >= Windows 7/2008 R2/2012 R2 | Tier 1 | <sup>[4](#fn4),[5](#fn5)</sup> |
| Windows | x86 (native) | >= Windows 7/2008 R2/2012 R2 | Tier 1 (running) / Experimental (compiling) <sup>[6](#fn6)</sup> | |
| Windows | x64, x86 (WoW64) | >= Windows 8.1/2012 R2 | Tier 1 | <sup>[4](#fn4),[5](#fn5)</sup> |
| Windows | x86 (native) | >= Windows 8.1/2012 R2 | Tier 1 (running) / Experimental (compiling) <sup>[6](#fn6)</sup> | |
| 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 | |
Expand Down Expand Up @@ -174,7 +175,7 @@ Binaries at <https://nodejs.org/download/release/> are produced on:
| linux-s390x | RHEL 7 with devtoolset-6 / GCC 6 <sup>[7](#fn7)</sup> |
| linux-x64 | CentOS 7 with devtoolset-6 / GCC 6 <sup>[7](#fn7)</sup> |
| 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 |

<em id="fn7">7</em>: The Enterprise Linux devtoolset-6 allows us to compile
binaries with GCC 6 but linked to the glibc and libstdc++ versions of the host
Expand Down
9 changes: 6 additions & 3 deletions src/node_main.cc
Expand Up @@ -28,9 +28,12 @@
#include <WinError.h>

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);
}

Expand Down
4 changes: 2 additions & 2 deletions tools/msvs/msi/product.wxs
Expand Up @@ -23,8 +23,8 @@
Compressed="yes"
InstallScope="perMachine"/>

<Condition Message="This application is only supported on Windows 7, Windows Server 2008 R2, or higher.">
<![CDATA[Installed OR (VersionNT >= 601)]]>
<Condition Message="This application is only supported on Windows 8.1, Windows Server 2012 R2, or higher.">
<![CDATA[Installed OR (VersionNT >= 603) OR (VersionNT >= 602 AND MsiNTProductType <> 1)]]>
</Condition>

<Media Id="1" Cabinet="media1.cab" EmbedCab="yes"/>
Expand Down

0 comments on commit cb8898c

Please sign in to comment.