vslavik / winsparkle

App update framework for Windows, inspired by Sparkle for macOS
http://winsparkle.org
Other
1.31k stars 267 forks source link

Does winsparkle wait for shutdown callback to finish prior starting upgrade? #184

Closed dhilst closed 6 years ago

dhilst commented 6 years ago

Does winsparkle wait for shutdown callback to finish prior starting upgrade?

vslavik commented 6 years ago

No, when the documentation tells you it is called "immediately AFTER" launching the installer, and the the callback's job is to terminate the process, it doesn't wait until it returns (which it never does).

dhilst commented 6 years ago

Thanks for the reply. Is there any other channel where I can talk to the developers? Like a mail list? I have some questions about how it works...

I'm facing a problem where the installer try to overwrite a file that is still in use by the process because it isn't had time to shutdown yet.

Today I'm brutally shutting down the application which is far from ideal. Do you have a idea I n how to address this?

vslavik commented 6 years ago

Do you have a idea I n how to address this?

Use a better installer (like Inno Setup). Or contribute improved code.

Ideally, a helper process would launch the installer. For that to happen, it must either be something embedded in WinSparkle.dll and extracted at runtime (in a way that won't trigger antiviruses), or launched with rundll. The latter can't be done in-situ (or has to itself terminate quickly), because the update may want to update WinSparkle.dll too. As you can see, it can get a bit tricky real fast, but if you're motivated to address it, sounds like something that would be great to have — and I'm happy to help with getting such PR into mergeable state.