Blind people using setup.exe?
Igor Pechtchanski
pechtcha@cs.nyu.edu
Mon Jun 27 21:50:00 GMT 2005
On Mon, 27 Jun 2005, Brian Dessent wrote:
> Igor Pechtchanski wrote:
>
> > One advantage of using the AllocConsole approach is that when starting
> > setup from a console window, the output would appear on that console.
> > If there is a way to check whether AllocConsole actually creates a new
> > console or reuses the existing one (by, say, trying
> > AttachConsole(ATTACH_PARENT_PROCESS), though that'd only work in
> > WinXP), setup could also add a "Pause..." prompt after displaying the
> > help message in a new console.
>
> I seem to remember a long thread about this in the past, with the
> conclusion being that getting any kind of console output from a binary
> compiled as a 'Windowed' program was too difficult. A 'Windowed'
> application does not start attached to a console, even if it was spawned
> from one, so if you ran "setup --help" from a regular prompt it would
> still result in a new console window popping up. To me that's no better
> than just using MessageBox() to display the same info, or perhaps a
> small readonly EditText control so that the user can copy and paste the
> output without having to know that ^C copies the messagebox contents.
Right. I did manage to get setup access to its parent console's stdout by
compiling setup as a console application instead of a windowed one. Once
setup knows that it doesn't need to print out a message, it calls
FreeConsole().
This works from both a bash console window and an xterm/pty. One
unpleasant side effect of this is that a console window flashes briefly
and disappears when setup is started from a shortcut. Don't know if
living with this is better than not being able to print out help and
version information... If this is acceptable, I'll post a patch.
There may also be a way to hide the console window unless one is already
available -- I'll investigate this further.
> The AttachConsole() function seems to be the way to get around this but
> since it's XP only I don't think that helps the cause much.
FWIW, I couldn't get AttachConsole((DWORD)-1) to work. Probably a cockpit
error, and irrelevant anyway, since it'd only work on XP.
> > Of course, ideally it would be great to have setup interact with pty's...
>
> This might be simple since the pty is just a pipe connected to stdout,
> but I have the impression that the majority of users use the standard
> bash CMD prompt without setting CYGWIN=tty or using rxvt.
You're right -- setup works with ptys without any modifications. It's the
console interaction that's hard.
Igor
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha@cs.nyu.edu
ZZZzz /,`.-'`' -. ;-;;,_ igor@watson.ibm.com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D.
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT
More information about the Cygwin-apps
mailing list