Puchisoft Dispatcher - How it Works
Then, or whenever you release a new version, upload generated update data to your Update Mirror URLs (any webservers that allow downloading of files will work - even many free webhosts).
When the Updater is run, it will connect to the first mirror that it can, and download a tiny file (~2 bytes), which contains an integer representing the newest version.
What happens when a new version is found depends on what Mode you chose for the updater to use:
Usually best choice: Best Compression, Lowest Bandwidth
Only 7zip-compressed binary differences between versions are downloaded (Changed files are patched, new files/folders are included, removed files/folders are deleted)
Zero Overhead - Unlike stand-alone patches, the patching engine is only included in the Updater, so it is not necessary to re-downloaded on every patch (Patches can be as small as 200 bytes)
File Recovery - If a user deleted/altered a file that was to be patched, it will recover, by being downloaded whole - optionally 7zipped (this feature can be disabled)
To generate direct patches, all released old versions from which you want to create a direct patch to the newest version must be retained
Patch Chaining - You can choose to stop creating direct patches from certain old versions, which will then be updated with a combination of previously created patches and new patches (The benefit is that you don't need to keep the content of those old versions around)
If no direct patch to the new version exists, the Updater will look up how to get to the newest version. This may be a chain of patches, file syncing (see below), or a combination of both.
All new/altered files are downloaded whole (optionally 7zip compressed)
No need to retain old versions
When a new version is found, all files that exist in the newest version are inspected locally, and replaced if outdated/nonexistent
The Updater will then go through the list, and check that all files on this list exist with the same MD5 checksum. If this is not the case for a file, the Updater will download the file (extracting it - if compressed).
To ensure that your software is never left in a half-updated or otherwise unusable state, none of your software's files are ever altered until all required update data (patches or otherwise) has been successfully downloaded, and all files to be updated have been confirmed to be writable (not in use).
If the Updater is unable to update any part of your software, your entire software will be left exactly as it was before the update process began.
