Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

win: block running on EOL Windows versions #31954

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions BUILDING.md
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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