This is the mail archive of the cygwin-apps mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: setup

On Aug 10 09:02, Warren Young wrote:
> > On Aug  7 15:05, Warren Young wrote:
> >> 
> >> Youâd have to couple this either with a MoveFileEx(â,
> >> MOVEFILE_DELAY_UNTIL_REBOOT) call or a background task that replaces
> >> /bin/setup.exe with %LOCALAPPDATA%/Temp/setup-v$next.exe.
> > 
> > Why?
> I was assuming a world where setup.exe lives in /bin and you can call
> it from Bash.  (In such a world, I hope it gets renamed to something
> less generic, like cygpkg.)  I was further assuming that
> setup-*.tar.xz would be packaged the same as any other Cygwin package,
> unpacking directly into /bin.

That was the idea.

> Thus, the MoveFileEx() call would be the one setup.exe normally
> offers, where it sees youâre trying to replace an in-use executable.
> I was offering the background task alternative as a way around that.
> However, the rest of your reply gives me a different idea.
> > The idea is that setup is called, performs a CopyFile of itself and
> > then exec's its copy.
> If you mean that it always copies itself to some kind of temp space
> and execs it from there, that feels kind of wasteful, since youâre
> trading my design that copies only when required for one that copies
> every time.

Setup is not called multiple times per second.  Copy and restart take
not much time, and the restart part is done already anyway as soon as
setup elevates itself.  Why not simply elevate (or just start if already
elevated) the copy called .setup-${arch}.exe?  Note the leading dot.
This copy never has the problem to be overwritten by unpacking, and the
rest of setup does not need any changes.


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: pgpLMyOLWU9Zf.pgp
Description: PGP signature

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]