Skip to content

Commit cb8898c

Browse files
committed
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. PR-URL: #31954 Reviewed-By: Rod Vagg <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: David Carlier <[email protected]> Reviewed-By: Franziska Hinkelmann <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
1 parent 67d45fb commit cb8898c

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

BUILDING.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,9 @@ platforms. This is true regardless of entries in the table below.
106106
| GNU/Linux | armv6 | kernel >= 4.14, glibc >= 2.24 | Experimental | Downgraded as of Node.js 12 |
107107
| 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> |
108108
| GNU/Linux | s390x | kernel >= 3.10.0, glibc >= 2.17 | Tier 2 | e.g. EL 7 <sup>[2](#fn2)</sup> |
109-
| Windows | x64, x86 (WoW64) | >= Windows 7/2008 R2/2012 R2 | Tier 1 | <sup>[4](#fn4),[5](#fn5)</sup> |
110-
| Windows | x86 (native) | >= Windows 7/2008 R2/2012 R2 | Tier 1 (running) / Experimental (compiling) <sup>[6](#fn6)</sup> | |
109+
| Windows | x64, x86 (WoW64) | >= Windows 8.1/2012 R2 | Tier 1 | <sup>[4](#fn4),[5](#fn5)</sup> |
110+
| Windows | x86 (native) | >= Windows 8.1/2012 R2 | Tier 1 (running) / Experimental (compiling) <sup>[6](#fn6)</sup> | |
111+
| Windows | x64, x86 | Windows Server 2012 (not R2) | Experimental | |
111112
| Windows | arm64 | >= Windows 10 | Experimental | |
112113
| macOS | x64 | >= 10.11 | Tier 1 | |
113114
| SmartOS | x64 | >= 18 | Tier 2 | |
@@ -174,7 +175,7 @@ Binaries at <https://nodejs.org/download/release/> are produced on:
174175
| linux-s390x | RHEL 7 with devtoolset-6 / GCC 6 <sup>[7](#fn7)</sup> |
175176
| linux-x64 | CentOS 7 with devtoolset-6 / GCC 6 <sup>[7](#fn7)</sup> |
176177
| sunos-x64 | SmartOS 18 with GCC 7 |
177-
| win-x64 and win-x86 | Windows 2012 R2 (x64) with Visual Studio 2017 |
178+
| win-x64 and win-x86 | Windows 2012 R2 (x64) with Visual Studio 2019 |
178179

179180
<em id="fn7">7</em>: The Enterprise Linux devtoolset-6 allows us to compile
180181
binaries with GCC 6 but linked to the glibc and libstdc++ versions of the host

src/node_main.cc

+6-3
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,12 @@
2828
#include <WinError.h>
2929

3030
int wmain(int argc, wchar_t* wargv[]) {
31-
if (!IsWindows7OrGreater()) {
32-
fprintf(stderr, "This application is only supported on Windows 7, "
33-
"Windows Server 2008 R2, or higher.");
31+
// Windows Server 2012 (not R2) is supported until 10/10/2023, so we allow it
32+
// to run in the experimental support tier.
33+
if (!IsWindows8Point1OrGreater() &&
34+
!(IsWindowsServer() && IsWindows8OrGreater())) {
35+
fprintf(stderr, "This application is only supported on Windows 8.1, "
36+
"Windows Server 2012 R2, or higher.");
3437
exit(ERROR_EXE_MACHINE_TYPE_MISMATCH);
3538
}
3639

tools/msvs/msi/product.wxs

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
Compressed="yes"
2424
InstallScope="perMachine"/>
2525

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

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

0 commit comments

Comments
 (0)