This is the mail archive of the
mailing list for the Cygwin project.
Re: [PATCH] Setup postinstall logging - take X
Igor Pechtchanski wrote:
Sorry for the '?' in the subject - I think I lost track...
On 15 Mar 2003, Robert Collins wrote:
Don't worry. What would be good would be to make it start minimized.
Ok, I've figured out how to hide the console altogether (see attached
patch, though the CREATE_NO_WINDOW is probably overkill). Could someone
familiar with the Windows CreateProcess mechanism make sure this is ok?
Also, this needs testing on Win95 again. Brian?
On another note, now that the window is not shown at all, setup simply
seems to hang while long-running postinstall scripts (e.g., post-texmf.sh,
with run-time of ~2 minutes!) are executed. Perhaps we should a) run
postinstall scripts from a separate thread, so that setup at least reacts
to Windows events, such as REPAINT, and b) have another dialog saying
"Running postinstall scripts", perhaps even with a progress bar (even if
the bar only reflects progress by scripts executed rather than time -- I'm
not sure if it's even possible to correctly reflect temporal progress).
That would be nice. A trivial step to take is to minimize, not hide, the
window. Then the user will see flicky things happening in their tool
bar, which may reduce the panic.
The new one conflicts both with the above and with the cleanup patch I
posted today... Unless some of them are committed, it's going to get
hairy fast, eh, Rob? ;-)
Nay. You'll want to merge in the HEAD script.cc changes though.
If to_log, redirect output to temporary file.
(openOutputLog): New helper function.
This should return void and throw an exception on failure...
use a class and set a status member.
Ok. I've created an OutputLog class that encapsulates this behavior.
I've put the Close() into the destructor. Hopefully this is what you
Yep, looking good.
The define BUFLEN should be a static const member of the class.
Umm, which class? It's only used in static functions. I left it as a
#define for now.
Err just realised. log.h and log.cc are deprecated. Thats why they have
the foo_bar naming style and no classes. It's probably best as an
operator for OutputLog (given that it's a layer on top of the log
infrastructure) - i.e.
LogSingleton::GetInstance()(LOG_PLAIN) << file_out;
And removing the logfile then becomes part of OutputLog::~OutputLog. Hey
this is starting to be too easy :}.
Thanks, but I think this needs testing on Win95 again (for the
Can you make the window minimized, not hidden? Otherwise we should put
the requisite UI changes in place first.