Commit Graph

190 Commits

Author SHA1 Message Date
Zorg 270582b2e7 Pass bookmark data for the downloaded update (#2359)
Also let Xcode 14.3 update the nibs.
2023-04-12 22:23:50 -07:00
Zorg be7f6952c2 Reduce code size and make codebase more consistent (#2305) 2022-12-27 12:03:03 -08:00
Bing Zheung ef9398ab32 Add zh_HK (Chinese, Hong Kong) localization (#2273) 2022-10-08 11:28:53 -07:00
Zorg 1c560652e7 Remove ed25519 git submodule (#2244)
Also allow release scripts to work without git repository and bump the Sparkle versions.
2022-08-27 10:46:29 -07:00
Zorg f5d4ad52ca Allow user to re-try installing/relaunching application (#2234)
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.
2022-08-21 08:54:03 -07:00
Eitot 180f8975cf Replace deprecated code with newer APIs (#2112)
* 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
2022-04-24 16:51:48 -07:00
Eitot c33a416b53 Update localisations (#2113)
* 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.
2022-04-24 00:36:29 -07:00
Zorg fa9bfc1fc4 Fix unsteady progress when installing updates (#2072)
Also add -showInstallingUpdateWithApplicationTerminated: to SPUUserDriver which replaces -showInstallingUpdate and -showSendingTerminationSignal
2022-01-22 12:07:45 -08:00
Zorg b05c058219 Silence deprecations and use modern NSSecureCoding APIs (#2058) 2022-01-09 19:25:28 -08:00
Zorg 51ee14c3d3 Add UI tests for delta updates and automatic updates (#2054) 2022-01-08 18:05:07 -08:00
Zorg 45956ae5b0 Support relative links for fullReleaseNotesLink and enforce http(s) (#2003) 2021-11-06 01:56:50 -07:00
Zorg 80abad4477 Move XPC Services inside Sparkle framework (#1965)
Also bump FRAMEWORK_VERSION from A to B to work around system cache issues.
2021-10-17 23:35:09 -07:00
Mayur Pawashe cce5edd78d Remove installer interaction delegate API / refactor finishing update cycle (#1925) 2021-09-02 23:12:26 -07:00
Zorg ccd8886bfd Adopt sparkle:version and sparkle:shortVersionString elements
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).
2021-06-26 21:01:39 -07:00
Zorg d794a2d803 Merge branch '2.x' into selective-critical 2021-06-18 00:21:53 -07:00
Zorg 29e7ad4495 Merge branch '2.x' into selective-critical 2021-06-12 22:33:21 -07:00
Zorg 50ba774bbe Fix -Wcompletion-handler warnings 2021-06-11 22:25:14 -07:00
Zorg 89ecb88f2b Define DEBUG=0 for release builds 2021-06-06 19:35:15 -07:00
Zorg cbd1503c06 Add configuration option to not build UI bits 2021-06-06 19:09:19 -07:00
Zorg 88f678ebe6 Remove SPUUserUpdateStageInformational 2021-05-31 11:24:32 -07:00
Zorg ee5e98d3dd Rename SPUUpdateState back to SPUUserUpdateState 2021-05-31 11:13:05 -07:00
Zorg b7f9b76dd9 Rename SPUUserUpdateState -> SPUUpdateState 2021-05-31 00:00:38 -07:00
Mayur Pawashe bbdebfdbee Merge pull request #1858 from sparkle-project/warnings
Fix all Interface Builder and compiler warnings and require macOS 10.11 (El Capitan)
2021-05-30 09:46:10 -07:00
Zorg 87ecba77d3 Set LSMinimumSystemVersion for the test app 2021-05-27 21:50:30 -07:00
Zorg d193f2e28b Pass majorUpdate information to user driver
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.
2021-05-09 22:42:42 -07:00
Zorg 411360deb2 Allow check for updates menu item to be invoked outside of settings
Previously check for updates was only in responder chain of the settings window controller. Now it's in responder chain of the entire application.
2021-04-25 15:48:20 -07:00
Mayur Pawashe 7247803fea Merge pull request #1831 from sparkle-project/deprecate-dismiss-check
Deprecate -dismissUserInitiatedUpdateCheck user driver method
2021-04-18 18:29:39 -07:00
Zorg ba11897345 Deprecate -dismissUserInitiatedUpdateCheck user driver method
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.
2021-04-17 22:21:22 -07:00
Zorg cc4c02f467 Add showUpdateInFocus implementation to Test App user driver 2021-04-17 16:36:28 -07:00
Zorg f58cc9e9b5 Merge branch '2.x' into show-update-focus 2021-04-17 16:25:36 -07:00
Zorg 188a893174 Rename new state back to not downloaded 2021-04-16 19:07:48 -07:00
Zorg ab9ffdb901 Rename SPUUserUpdateStateNotDownloaded to SPUUserUpdateStateNew
Update documentation too.

Fix test app trying to make installable update skippable.
2021-04-16 16:40:33 -07:00
Zorg e64253be0b Merge showUpdateFount: methods into single one
Handling the different variations with different completion blocks is a pain when ultimately clients want to display a mostly unified user interface.
2021-04-16 16:34:01 -07:00
Zorg 3593157e3d Merge branch '2.x' into show-update-focus 2021-04-16 12:04:05 -07:00
Zorg 2f783e01f0 Show the present update in focus when checkForUpdates is invoked
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).
2021-04-15 22:56:41 -07:00
Zorg ed89783a0e Merge branch '2.x' into user-driver-relaunch 2021-04-13 00:05:39 -07:00
Mayur Pawashe cb17e08b92 Merge pull request #1823 from sparkle-project/entitlements
Entitlement scripts/configuration updates
2021-04-12 19:20:46 -07:00
Zorg 2d9bf07b18 Add new user driver methods to cancel update checks / downloads
Remove SPUUserDriverCoreComponent dependency from sparkle-cli and the Test App too, which really wasn't helping at all.
2021-04-11 23:15:02 -07:00
Zorg e7bc17b192 Use $(PRODUCT_BUNDLE_IDENTIFIER) for defaults exception for test app 2021-04-11 20:19:33 -07:00
Zorg 07e96961bf Sign altered app in release too for the test app 2021-04-11 20:04:53 -07:00
Zorg 372d711d20 Remove ATS allow-exception scripts for debug / test app 2021-04-11 19:43:12 -07:00
Zorg 5408ab10c1 Remove lesser used XPC Services for Test App
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.
2021-04-11 19:28:46 -07:00
Zorg e909c0d988 Show alert that non-relaunched application was installed
This only applies when the updater outlives the application it is updating and the application is not relaunched (i.e, an external/remote updater).
2021-04-11 14:01:03 -07:00
Zorg 579e7bd98b Add Persian localizations 2021-03-06 23:56:24 -08:00
Zorg c5def52133 Update user driver methods for passing error to updates not found 2021-02-06 23:31:29 -08:00
Kornel e880f34f7c Merge branch '2.x' into cancheckforupdates 2021-01-19 11:41:12 +00:00
Zorg 6308b262a0 Preserve showCanCheckForUpdates: method on user driver 2021-01-17 17:17:49 -08:00
Zorg 2066cd7232 Migrate canCheckForUpdates property from user driver -> updater 2021-01-17 17:01:48 -08:00
Zorg fc18529767 Add test link in test app
https://github.com/sparkle-project/Sparkle/commit/1b209e6726a4244e131a2ab0d3c1d0098c619794
2021-01-16 20:35:27 -08:00
Zorg 7951b81b69 Eliminate assumption that user driver calls are invoked in any thread
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.
2020-12-31 11:00:59 -08:00