win: prevent node from running on Windows Vista or earlier
Ref: https://github.com/nodejs/node/issues/3804 PR-URL: https://github.com/nodejs/node/pull/5167 Reviewed-By: rvagg - Rod Vagg <rod@vagg.org> Reviewed-By: joaocgreis - João Reis <reis@janeasystems.com>
This commit is contained in:
parent
55db19074d
commit
1cf26c036d
@ -1,7 +1,15 @@
|
|||||||
#include "node.h"
|
#include "node.h"
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
#include <VersionHelpers.h>
|
||||||
|
|
||||||
int wmain(int argc, wchar_t *wargv[]) {
|
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
|
// Convert argv to to UTF8
|
||||||
char** argv = new char*[argc];
|
char** argv = new char*[argc];
|
||||||
for (int i = 0; i < argc; i++) {
|
for (int i = 0; i < argc; i++) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user