Commit Graph
672 Commits
Author SHA1 Message Date
Zorg 8125490931 Pre-warm installs before relaunch (#2421)
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.
2023-08-27 22:22:52 -07:00
Zorg e15324773f Remove auxiliary apps and relocate symbols in SPM package (#2356) 2023-04-07 11:23:23 -07:00
Zorg 39495fd562 Remove redundant codesign check (#2341) 2023-03-12 19:44:50 -07:00
Daniel Jalkut 95f8e7e0cf Turn off CLANG_MODULES_AUTOLINK for XPC services, to avoid Xcode inferring that they depend upon Sparkle.framework. This seems to resolve a pesky, recurring issue in which Xcode reports dependency cycles between the XPC services, Sparkle, and/or the host apps that embed Sparkle. (#2332) 2023-03-02 23:31:11 -08:00
Zorg 87697ce10f Update SUVersionDisplay to allow including build versions and update information (#2321) 2023-02-25 08:15:02 -08:00
Zorg ffc203b89a Add support for plain text release notes view (#2315)
This also allows embedded release notes to be plain text using sparkle:format="plain-text" attribute.

Also, Catalyst apps only support plain text release notes (compared to before where release notes weren't supported for Catalyst apps).
2023-02-11 19:34:26 -08:00
Zorg 348c3a9658 Don't construct appcast item if enclosure URL is invalid (#2317) 2023-02-07 20:12:07 -08:00
Zorg be7f6952c2 Reduce code size and make codebase more consistent (#2305) 2022-12-27 12:03:03 -08:00
Zorg f36c34f2f4 Remove duplicate Sparkle localization strings in Updater app (#2288) 2022-12-02 23:01:01 -08:00
Bing Zheung ef9398ab32 Add zh_HK (Chinese, Hong Kong) localization (#2273) 2022-10-08 11:28:53 -07:00
Zorg 03f2452379 Expose -[SPUStandardUserDriver activeUpdateAlert] as private API (#2255) 2022-09-03 07:25:31 -07:00
Zorg 6831a35e28 Update Package.resolved (#2245) 2022-08-27 17:26:35 -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 470296a90e Remove outdated model translation plist (#2195) 2022-07-17 15:57:43 -07:00
Zorg 242ae2c392 Disable implicit dependencies for runnable schemes (#2171)
Also add missing explicit dependencies from targets
2022-07-17 15:52:16 -07:00
Zorg bececc3738 Reset opportune time for showing new updates after preference changes (#2183)
Reset opportune time for showing update notice when updater starts as well.

Also update updater header API documentation and add private protocol for gentle scheduled reminder APIs that the updater uses.
2022-07-01 19:06:27 -07:00
Zorg d7942768b8 Validate permission bits of Sparkle executable for delta updates (#2151) 2022-06-11 11:21:52 -07:00
Zorg 9080bebc88 Fix Xcode 14 warnings (#2149)
* Upgrade project version

* Use +initialize instead of +load for debug warning
2022-06-10 21:30:42 -07:00
Zorg 7ced6efba0 Remove SPUURLRequest class (#2134)
This class was only introduced because older OS versions we no longer support didn't have NSURLRequest implement NSSecureCoding.
2022-06-04 18:22:44 -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
Eitot b0116ef31b Remove obsolete SDK checks (#2111)
Sparkle currently requires at least Xcode 12 (or the macOS 11 SDK), therefore fallbacks for older versions are no longer needed.

* Remove +isOperatingSystemAtLeastVersion: method

* Remove +operatingSystemVersion accessor method

* Remove SUTouchBarForwardDeclarations header
2022-04-23 23:34:20 -07:00
Zorg 640e988a39 Change XPC Service product names to be more human readable (#2096)
They should not be bundle IDs because they may surface up in the UI.

Particularly, the Installer XPC Service may show up in the authorization prompt when authorization is required to install an update.
2022-03-06 21:26:56 -08:00
Zorg 8ea4d705f5 Add option to ignore skipped upgrades (#2081)
Normally when a major upgrade is skipped, subsequent updates for that major release are skipped. This element however allows publishing updates that ignore the user skipping the major version before a specific sub-release.
2022-01-29 23:02:45 -08:00
Zorg ac2ef612bc Don't let skipping a major version to skip subsequent major versions (#2079) 2022-01-29 10:37:09 -08:00
Zorg 91bccdf0ad Verify code signing in generate_appcast (#2077)
In generate_appcast we:

* Validate code signing integrity of new updates
* Add hidden flag to disable checking for nested code during validation
* Warn if new and old apps have differing signing identities when generating deltas
2022-01-23 14:46:52 -08:00
Zorg 51ee14c3d3 Add UI tests for delta updates and automatic updates (#2054) 2022-01-08 18:05:07 -08:00
Zorg 71fc8d7b11 Add additional options to delta tools (#2052) 2022-01-04 00:14:45 -08:00
Zorg 23fc577184 Add new version 3 binary delta archive format (#2051)
This new format introduces:

* A new container format which stores metadata in a way that is more efficient for compression, decompression, and size. Creation time can be 2x faster, apply time can be a few seconds faster, size savings can be 500 KB - couple of MB due to metadata alone.
* An array of supported compression formats including lzma, bzip2, zlib and more. We now default to lzma which is as competitive as bzip2 (which we were using in version 2 format) in applying/creation times, but can save several MB on size.
* Tracking of files from an old app being replicated in different locations in the new app. This can track unchanged files being renamed and can result in significant savings if the files are large.

Version 2 format is still the default. To use version 3, pass --version=3 to BinaryDelta when creating a patch. We will switch the default to version 3 later. generate_appcast support is upcoming.
2022-01-02 11:35:51 -08:00
Zorg fc44085602 Isolate xar usage in its own archive type for delta patches (#2047)
Also remove support for creating and applying version 1 delta files. Version 2 delta files have been supported by Sparkle 1.10 and later.
2021-12-29 22:41:08 -08:00
Zorg 1ef42e9d1c Add apfs dmg unarchiving test (#2028) 2021-11-25 15:53:19 -05:00
Zorg 39cedd4092 Fix unarchiving job being blocked when passed bad input (#2023) 2021-11-24 11:16:31 -05:00
Zorg 3fcc87086c Use user agent of updater bundle instead of the host bundle (#2020) 2021-11-12 21:09:31 -08:00
Zorg 45956ae5b0 Support relative links for fullReleaseNotesLink and enforce http(s) (#2003) 2021-11-06 01:56:50 -07:00
Zorg 873a026627 Add project version inputs to create-draft-release workflow (#1998) 2021-10-30 22:55:27 -07:00
Zorg a81f8f3d2d Add safer handling for applying binary delta files (#1988) 2021-10-29 12:14:23 -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 9229fc57b1 Add API reference homepage, fix formatting, and improve information (#1940) 2021-09-03 17:24:41 -07:00
Mayur Pawashe cce5edd78d Remove installer interaction delegate API / refactor finishing update cycle (#1925) 2021-09-02 23:12:26 -07:00
Mayur Pawashe c6f1cd4e3c Improve API header docs (#1918)
* Don't expose SPUDownloadData initializer publicly

* Make SUAppcast -init unavailable

* Fix documented default user agent string

* Improve header documentation for SUAppcast(Item) and comparators

* Update more API documentation headers

Also allow returning nil in -allowedSystemProfileKeysForUpdater:

* Clarify documentation on -allowedSystemProfileKeysForUpdater:

* Rename willIdleScheduling -> notSchedule for delegate method

* Make minor correctness fix for reading info URL
2021-08-21 11:24:23 -07:00
Mayur Pawashe 306ea26df8 Don't expose sparkleBundle (#1917) 2021-08-21 11:19:14 -07:00
Mayur Pawashe 6b9981f567 Add generation of API docs (#1915) 2021-08-09 18:27:44 -07:00
Mayur Pawashe 34fcb8784b Support appcast selection features in generate_appcast (#1914)
Add generate_appcast options for appcast selection features

We can now supply for new update items:

* Link
* Channel name
* Last major version / minimum autoupdate version
* Phased rollout interval
* Last critical update version
* Originating informational update versions

We can also specify the maximum number of delta items to generate.

Lastly we can specify which versions to create new items for now. This allows applying flags for only specific versions, or for exceptional cases allows adding old versions that do not meet the most recent updates threshold (maxNewVersionsInFeed) -- think for updates for a prior OS or for a prior major version.

We do not override the minimum system version element on already existing items now, if the element already exists. Apps don't strictly need to specify LSMinimumSystemVersion and this allows users specifying it themselves in the feed.

The help page for generate_appcast was expanded with how the archive directory looks like, how release notes work, that old entries are kept in tact, and how extracted archives are cached..

We now write out the number of new updates written and the number of existing items updated, to make the generated result be less confusing.

Bug fixes:

* The scheme now builds for Debug so I can properly debug generate_appcast from within Xcode (distribution builds are still in Release)
* Newly generated items were appended at the end of the appcast and not necessarily inserted in the correct order (on top). As a workaround when we process existing items, we remove them, and re-add them.
* Fixed an off-by-one error for maximum number of delta files we can generate.

Fixes #1903
2021-08-08 09:07:27 -07:00
Mayur Pawashe 4f7ed347ab Adopt Swift Argument parser for Swift tools (#1913)
Also remove the deprecated usage of passing DSA key as an argument, because it can just be provided as an option (-f)
2021-08-01 08:56:18 -07:00
Mayur Pawashe d9d7e310a5 Pull current date out of appcast filtering and add tests for phased group rollouts (#1889) 2021-07-11 16:47:05 -07:00
Zorg c968334192 Allow only one channel in appcast feed items 2021-06-27 15:14:37 -07:00
Zorg bc7e2d4845 Export SUAppcastElementBetaChannel in new exported constants header 2021-06-27 00:40:33 -07:00
Zorg 9bb59b8c00 Add tests for filtering allowed channels and macOS releases 2021-06-27 00:28:09 -07:00
Zorg 5fba1fe046 Add channels support to Sparkle
This allows developers to post updates to specific channels like for beta updates. Updaters only get notifications from channels they're allowed to be on.
2021-06-26 23:18:22 -07:00
Zorg 31f6f512e1 Export SUAppcastItem designated initializer to PrivateHeaders
Clients can use this header if they need to, but they should first talk to us / explore other avenues.
2021-06-20 23:55:40 -07:00