Setup patch: List command line options on stdout

Reini Urban rurban@x-ray.at
Thu Nov 18 16:48:00 GMT 2004


Christopher Faylor schrieb:
> On Thu, Nov 18, 2004 at 10:32:29AM +0100, Reini Urban wrote:
>>Christopher Faylor schrieb:
>>>On Wed, Nov 17, 2004 at 08:53:41PM +0100, Reini Urban wrote:
>>>>Christopher Faylor schrieb:
>>>>>Applications linked with -mwindows (i.e., GUI apps) can't print to
>>>>>stdout.  How does this actually work, in that case?  Is this expecting
>>>>>to display something on the console?
>>>>
>>>>I added a patch to switch to the console subsystem and hide this concole 
>>>>if it was a fresh new console. Otherwise, if called from a console or if 
>>>>called with -h leave the console.
>>>>
>>>>Patch see http://sourceware.org/bugzilla/show_bug.cgi?id=556
>>>
>>>I really don't understand why we should stand on our heads to make
>>>setup.exe a console subsystem program (you don't need to both specify
>>>-mwindows and -Wl,--subsystem=console, btw) 
>>
>>Unfortunately we need -mwindows.
> 
> No.  We don't.  What do you think -mwindows implies?
> 
>  From the gcc spec file:
> *link:
>  %{mwindows:--subsystem windows}   %{mconsole:--subsystem console}
> 
> A program can only be subsystm windows or console.  It can't be both.
> It is a bug in ld and in gcc that you are able to supply both.

Thanks. I tried without -mwindows and the linker failed.
But -mconsole is the solution.

>>>...  when you can just open up a dialog box to display the options,
>>>like every other windows program in the world.
>>
>>Like our beloved debug log messages in about 200 messageboxes?  This is
>>imho the wrong way.
> 
> Implying that someone made an incredibly stupid point when there was
> no hint of any intent in that regard is a particularly odious "usenet"
> discussion technique.
> 
> I did not say that all log messages should show up in message boxes.  I
> said that you should use dialog boxes to display option help and that
> is it.

A user calling "setup -h" from the cmdline would be very surprised 
having a dialogbox popping up with a description of the options, and not 
simply printing the options to the console. And being unable to pipe 
some diagnostics on -q.

Same for the stderr output which is currently captured in memory and 
then printed to a ./setup.log.

And the incredible stupid ~200 msgbox feature which I described, is 
currently in effect if you run setup within gdb or insight. This makes 
effective debugging next to impossible.
Without patching it away msg.c or without using stderr printing with my 
patch.

You may suggest using a single dialog to capture stderr, and scroll that 
down. I find that rather un-cygwin and un-windows.
-- 
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/



More information about the Cygwin-apps mailing list