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.
* Use UniformTypeIdentifiers framework to replace deprecated types
kUTType* constants are deprecated since macOS 12. The UniformTypeIdentifiers framework is available since the macOS 11 SDK.
* Replace renamed constants
* Use API_AVAILABLE macro instead of __OSX_AVAILABLE
* Remove duplicate localization identifiers
Some localizations have multiple identifiers, e.g. Canadian French has "fr-CA", "fr_ca" and "fr_CA" and Norwegian Bokmål has "nb" and "no" (though "no" can include Norwegian Nynorsk, Xcode seems to treat it as Bokmål and therefore a duplicate of "nb"). This commit removes superfluous identifiers and keeps the identifier that Xcode uses by default.
This also removes the no.lproj/ directory which contains either obsolete localized strings or strings that are present in nb.lproj/ too.
Furthermore, this renames the .lproj/ directories for "pt_PT"/"pt_BR" to "pt-PT"/"pt-BR" since the latter identifiers are the default in Xcode.
* Update localizable strings to match the current localizations
Replaces the following characters in the localizable strings:
- ellipses (... → …)
- curly apostrophe (' → ’)
- em dashes (-- → —)
- non-breaking spaces
These were already used in the .strings files.
* Regenerate Sparkle.strings
This applies the changes in the previous commit to the strings files of the base localization.
This also removes the following strings, which are no longer present in the source:
- "%1$@ wants permission to update %2$@."
- "%1$@ wants permission to update."
- "An error occurred while downloading the update feed."
- "An error occurred while installing the update. Please try again later."
- "An error occurred while relaunching %1$@, but the new version will be available next time you run %1$@."
- "Are you sure you want to skip this upgrade?"
- "Don't Skip"
- "Skip Upgrade"
- "The update is improperly signed."
- "You already have the newest version of %@."
- "B", "GB", "KB" and "MB"
* Update localized Sparkle.strings
This applies the changes in the previous commits to the strings files of the localizations.
* Re-import localizations
This updates the .strings files using xcodebuild to:
- remove obsolete localizable strings,
- incorporate (changed) localization comments and
- replace UTF-16 encoded .strings files with UTF-8.
* Update Dutch localization
* Update French localization
This replaces single quotes and spaces with apostrophes and non-breaking spaces.
We should recommend using sparkle:version and sparkle:shortVersionString elements inside the appcast item instead of inside the enclosure for consistency.
Delta updates do not need to specify sparkle:version, and can inherit the top level element. This clears up some confusion and reduces duplication (and reduces error proneness / saves me work when testing delta / info-only features).
This is also consistent with informational updates. Regardless whether you want to make an update informational only or not, the sparkle:version stays in the same top-level place.
This is a backwards compatible change. Very old versions of Sparkle (possibly up to a decade or more ago) have supported specifying sparkle:version as a top level item. Winsparkle supports it as well because it's needed for info-only updates.
This is only changing what we recommend / standardize. The attribute variants are still usable.
External tools relying on Sparkle's feed format may have to adapt to this standardization (they have always needed to support info-only updates with a missing enclosure which apps do leverage anyway).
I updated generate_appcast to prefer the element variants and updated the tool so it understands them (this was a bug).
We unify the user driver method showing the update to take a generic state object now. The current fields of the state object are its current stage, if it's user initiated, and if the update is a major one.
We also remove deprecated code paths that were complex to support and will otherwise generate in compile errors if people adopt the new API.
We don't have a dismiss method for every transition state and we don't want to. This should be up to the UI to determine how to transition from one UI state to another UI state.
When the update is shown to the user, the menu item for checking for updates is no longer disabled. Instead it is enabled, and when invoked, will bring the update to utmost focus back to the user again.
This is consistent with other options (eg Preferences...) that bring up windows. Improved user experience here is that updates are now less "lost".
We (re)define properties on SPUUpdater:
canCheckForUpdates - to mean that the user can check for updates (start a new update check or show the already present update frontmost)
sessionInProgress - to mean if Sparkle's internal driver / scheduler is running (i.e, downloading appcast or update, showing update, starting installation).
Testing WebKit2 is more important than testing sandboxed downloader service.
More people should be adding entitlements to their app for connection services, so we will do that in the test app too.
This reduces friction in creating a SPUUserDriver. This assumption that the calls could be made from any thread is a relic of the past of separating the user driver into a different process from the updater/scheduler, which is no longer sane or supported.
This should speed up things very slightly too.