mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
2.0 KiB
2.0 KiB
| Squirrel.Windows / 2. Advanced Usage |
|---|
2.5 More Updating
This section goes into greater detail of the update process (see 1.5 Updating for basic concepts).
How can you replace DLLs while they're loaded? Impossible!
You can't. So, how can you do it? The basic trick that ClickOnce uses is, you have a folder of EXEs and DLLs, and an Application Shortcut. When ClickOnce goes to update its stuff, it builds a completely new folder of binaries, then the last thing it does is rewrite the app shortcut to point to the new folder.
Detailed Updating Process
The following steps are performed by the UpdateManager each time MyApp is executed:
- Check for Updates - the
RELEASESfile at the distribution location is downloaded and compared to localRELEASESfile to check for any updates. - Download & Verify Update Packages - if there is a new release, the
UpdateManagerdetermines whether to download the deltas or the latest full package to update to the current version. The packages are compared against their SHA1 in theRELEASESfile for verification. - Build Full Package from Deltas - if delta packages were downloaded, a new full package is created from the previous full package and the downloaded delta file.
- Install New Version - the current version of MyApp is extracted from the full package and placed in a new
%LocalAppData%\MyAppinstall directory based on the version number (e.g.,app-1.0.1). - Update Shortcuts - desktop and Windows Start Menu shortcuts are updated to point to the new MyApp version (via the
--processStartcommand line parameter passed toUpdate.exe). - Previous Version Clean-up - on the next startup of MyApp, the previous packages and installed app directory of all but the previous install are also deleted.
See Also
- 2.1 Integrating: Debugging - tips on debugging your Squirrel application.
| Next: 3 Contributing |
|---|