From: Eli Z. <el...@gn...> - 2012-02-03 07:47:35
|
> Date: Thu, 02 Feb 2012 22:35:28 +0100 (CET) > From: Werner LEMBERG <wl...@gn...> > > Secondly, if you want to make a Windows GUI application write to a > console if started from a console but do nothing if started as a GUI > (similar to Unix applications), there is the nice trick of having two > binaries, `foo.com' and `foo.exe'. You say `foo' on the command line, > and Windows executes `foo.com', a command-line program. This in turn > spawns `foo.exe', a GUI program, and communicates with it using stdout > and friends which are redirected to pipes. You can do the same with a .bat or .cmd file and a .exe file. The batch file would invoke an auxiliary program, say fooc.exe, to do what your foo.com was supposed to do, with foo.exe being a GUI program. Emacs on Windows does something like that, although it doesn't have the batch file to glue both programs into a single command. |