Closed yhahn closed 12 years ago
after fa02e52 the node window is minimized and logs go to the user directory, so this feels more like gravy.
holding off on looking at this until after release because I need to figure out how to capture stdout and stderr, which, when the process not longer has a console has no where to go...
started looking into this again as part of a research push at moving from a .bat to a .exe. From an .exe we can call CreateProcess
to launch a subprocess. We can pass a creation flag of CREATE_NO_WINDOW
to hide the console, so this seems much easier than compiling a nodew.exe version with a different subsystem. I'm now working on catching and directing the stdout to a logfile from the process handle - looking tricky but doable.
New, win-exe branch has a C++ wrapper that starts node.exe as a subprocess and redirects its stdout/stderr to the log. This avoids the need to compile a nodew.exe version. Only when javascript support for launching a UI is needed will a nodew.exe be needed.
Closing.
Dane's looking at this, original from (https://github.com/mapbox/tilemill/issues/1122#issuecomment-3489022). Looks like there may be some lessons to learn from the Python codebase which exposes a
pythonw.exe
executable which runs without spawning a console in Windows.