Move a lot of the installation work to be done during the first phase of installation (when possible), before the target app needs to be terminated. For the common case where the old and new bundles are on the same volume, the final phase of installation requiring a restart is now just an atomic swap.
Also move the termination listener to the agent app which resolves some launch/CI failures we've been seeing.
If the app termination request is delayed or canceled, the user can check for updates again with the standard user driver and try installing/relaunching again, which will trigger the installer to send another quit event to the running application.
Before the install/relaunch window would close but the check for updates option would still be present but not functional.
Wait for appcast item registration before finishing automatic update driver.
This fixes a potential race issue where sometimes the automatic update driver on completion would sometimes not trigger to prompt an update alert immediately for critical updates. Note in this case, the update would still be installed on app termination and would still be scheduled to alert the user on the regular update check interval, so this issue is not severe.
Set $USER and $HOME variables when running guided pkg installers
This allows pre/post install scripts to reference the user's environment correctly. The standard pkg installer GUI preserves these two variables.
With these changes, it should not be possible for neither an old or new bundle to be at the destination.
We also perform temporary directory cleanup after final installation stage is and relaunching an app is performed because we can save some time (150 ms+ in one of my cases).
With these changes, modern pkg's should no longer need to be archived.
Only guided package installations are supported for flat packages. Specifying an interactive package installation type will result in a rejection. If the file URL has a ".pkg" suffix it is by default assumed to be a guided pkg installation now, which relieves the burden of needing to previously specify sparkle:installationType in the app cast item enclosure, in this case (for 2.x). Moreover, this relieves the burden of developers needing to archive their pkg for Sparkle.
* origin/master: (39 commits)
%s is deliberate in this format string
Unused
Make generate_appcast available as a shared scheme
Shush Xcode
Link straight to docs from the readme
ignore .html files when scanning for archives
Missing strings translation.
Updated swift
Warn against abusing installUpdatesIfAvailable
when generating the appcast, if an .html file exists of the same name as the archive, then it will be linked in as the releaseNotesLink
Revert "Fix pt_BR translations"
Revert "Fix pt_BR translations (#1039)"
Fix Japanse localization
Add more info to auth tool run failure
Fix pt_BR translations (#1039)
Fix pt_BR translations
Disable the keyboard shortcut for the install button for scheduled updates to avoid accidental installs.
added `sparkle:shortVersionString` to the enclosure, #1032
Changelog
percent encode the filename used in the delta url
...
SPARKLE_NORMALIZE_INSTALLED_APPLICATION_NAME=1 now works properly again. In the progress agent, we don't use the path sent from the installer unless the normalized setting is enabled.
This allows us to remove SPUUserDriverUIComponent and remove a bunch of logic in the user driver regarding termination. The user drivers generally don't need to know about the application bundle anymore, and strictly now only show UI events.
This has another advantage of the agent being able to quit multiple instances of an application even if the application to update is sandboxed.
We enforce the logic that an application can only be relaunched if it was running initially.
If we download a package type installation or a delta update, we should validate the update before trying to unarchive it.
We can't do this with ordinary updates because we handle changing of DSA keys for that particular case.
We first create a directory with respect to the app's bundle ID being updated, sparkle's bundle ID, and a directory inside for a specific purpose. Then we remove all old directories inside there, and create a new unique temporary directory.
This is to avoid conflicts with eg: multiple updaters running against each other around the same time, or files for one function interfering with files from another purpose, while still having a way to clean up old files.