Created
January 16, 2012 14:37
-
-
Save springmeyer/1621154 to your computer and use it in GitHub Desktop.
first stab at a nodew.exe (like pythonw.exe)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/common.gypi b/common.gypi | |
diff --git a/node.gyp b/node.gyp | |
index f9bc8ca..fe2f821 100644 | |
--- a/node.gyp | |
+++ b/node.gyp | |
@@ -196,10 +196,17 @@ | |
], | |
}], | |
], | |
- 'msvs-settings': { | |
+ 'msvs_settings': { | |
'VCLinkerTool': { | |
- 'SubSystem': 1, # /subsystem:console | |
+ 'target_conditions': [ | |
+ ['_type=="executable"', { | |
+ 'SubSystem': 2, # console executable | |
+ }], | |
+ ], | |
}, | |
+ 'VCResourceCompilerTool' : { | |
+ 'PreprocessorDefinitions': ["_WINDOWS"] | |
+ }, | |
}, | |
}, | |
diff --git a/src/node_main.cc b/src/node_main.cc | |
index 3100149..d69de83 100644 | |
--- a/src/node_main.cc | |
+++ b/src/node_main.cc | |
@@ -21,6 +21,14 @@ | |
#include <node.h> | |
-int main(int argc, char *argv[]) { | |
- return node::Start(argc, argv); | |
+#define WIN32_LEAN_AND_MEAN | |
+#include <windows.h> | |
+ | |
+int WINAPI WinMain( | |
+ HINSTANCE hInstance, /* handle to current instance */ | |
+ HINSTANCE hPrevInstance, /* handle to previous instance */ | |
+ LPTSTR lpCmdLine, /* pointer to command line */ | |
+ int nCmdShow /* show state of window */ | |
+){ | |
+ return node::Start(__argc, __argv); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@graphnode - no, not yet, node just exists without doing anything. hoping to get back to it late this week or next.