From 1cf26c036daf438ea50f0d7aa4984f8d67fa792b Mon Sep 17 00:00:00 2001 From: Alexis Campailla Date: Wed, 10 Feb 2016 16:34:56 +0100 Subject: win: prevent node from running on Windows Vista or earlier MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ref: https://github.com/nodejs/node/issues/3804 PR-URL: https://github.com/nodejs/node/pull/5167 Reviewed-By: rvagg - Rod Vagg Reviewed-By: joaocgreis - João Reis --- src/node_main.cc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/node_main.cc') diff --git a/src/node_main.cc b/src/node_main.cc index 58e747e52c4..dce72aff22f 100644 --- a/src/node_main.cc +++ b/src/node_main.cc @@ -1,7 +1,15 @@ #include "node.h" #ifdef _WIN32 +#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."); + exit(1); + } + // Convert argv to to UTF8 char** argv = new char*[argc]; for (int i = 0; i < argc; i++) { -- cgit v1.2.3