Updated Sparkle to version 2.6.4

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This commit is contained in:
Christopher Snowhill 2025-02-06 20:58:52 -08:00
parent 88f370ed91
commit e9883f38af
19 changed files with 145 additions and 45 deletions

View file

@ -28,10 +28,10 @@ NS_ASSUME_NONNULL_BEGIN
/**
A controller class that instantiates a `SPUUpdater` and allows binding UI to its updater settings.
This class can be instantiated in a nib or created programatically using `-initWithUpdaterDelegate:userDriverDelegate:` or `-initWithStartingUpdater:updaterDelegate:userDriverDelegate:`.
This class can be instantiated in a nib or created programmatically using `-initWithUpdaterDelegate:userDriverDelegate:` or `-initWithStartingUpdater:updaterDelegate:userDriverDelegate:`.
The controller's updater targets the application's main bundle and uses Sparkle's standard user interface.
Typically, this class is used by sticking it as a custom NSObject subclass in an Interface Builder nib (probably in MainMenu) but it works well programatically too.
Typically, this class is used by sticking it as a custom NSObject subclass in an Interface Builder nib (probably in MainMenu) but it works well programmatically too.
The controller creates an `SPUUpdater` instance using a `SPUStandardUserDriver` and allows hooking up the check for updates action and handling menu item validation.
It also allows hooking up the updater's and user driver's delegates.
@ -71,7 +71,7 @@ SU_EXPORT @interface SPUStandardUpdaterController : NSObject
You cannot call this initializer directly. You must instantiate a `SPUStandardUpdaterController` inside of a nib (typically the MainMenu nib) to use it.
To create a `SPUStandardUpdaterController` programatically, use `-initWithUpdaterDelegate:userDriverDelegate:` or `-initWithStartingUpdater:updaterDelegate:userDriverDelegate:` instead.
To create a `SPUStandardUpdaterController` programmatically, use `-initWithUpdaterDelegate:userDriverDelegate:` or `-initWithStartingUpdater:updaterDelegate:userDriverDelegate:` instead.
*/
- (instancetype)init NS_UNAVAILABLE;

View file

@ -52,7 +52,7 @@ SU_EXPORT @interface SPUUpdater : NSObject
Related: See `SPUStandardUpdaterController` which wraps a `SPUUpdater` instance and is suitable for instantiating inside of nib files.
@param hostBundle The bundle that should be targetted for updating.
@param hostBundle The bundle that should be targeted for updating.
@param applicationBundle The application bundle that should be waited for termination and relaunched (unless overridden). Usually this can be the same as hostBundle. This may differ when updating a plug-in or other non-application bundle.
@param userDriver The user driver that Sparkle uses for user update interaction.
@param delegate The delegate for `SPUUpdater`.
@ -114,7 +114,7 @@ SU_EXPORT @interface SPUUpdater : NSObject
to ask the user's permission to check for updates automatically and `automaticallyChecksForUpdates` is `NO`.
If you want to reset the updater's cycle after an updater setting change, see `resetUpdateCycle` or `resetUpdateCycleAfterShortDelay` instead.
This is meant for programmatically initating a check for updates in the background without the user initiating it.
This is meant for programmatically initiating a check for updates in the background without the user initiating it.
This check will not show UI if no new updates are found.
If a new update is found, the updater's user driver may handle showing it at an appropriate (but not necessarily immediate) time.
@ -307,7 +307,7 @@ SU_EXPORT @interface SPUUpdater : NSObject
Note if Sparkle is being used to update another application, the bundle information retrieved is from the main application performing the updating.
This default implementation can be overrided.
This default implementation can be overridden.
*/
@property (nonatomic, copy) NSString *userAgentString;

View file

@ -288,7 +288,7 @@ SU_EXPORT extern NSString *const SUSystemProfilerPreferredLanguageKey;
- (void)updater:(SPUUpdater *)updater willDownloadUpdate:(SUAppcastItem *)item withRequest:(NSMutableURLRequest *)request;
/**
Called immediately after succesfull download of the specified update.
Called immediately after successful download of the specified update.
@param updater The SUUpdater instance.
@param item The appcast item corresponding to the update that has been downloaded.

View file

@ -46,7 +46,7 @@ SU_EXPORT @protocol SPUUserDriver <NSObject>
- (void)showUpdatePermissionRequest:(SPUUpdatePermissionRequest *)request reply:(void (^)(SUUpdatePermissionResponse *))reply;
/**
* Show the user initating an update check
* Show the user initiating an update check
*
* Respond to the user initiating an update check. Sparkle uses this to show the user a window with an indeterminate progress bar.
*
@ -64,11 +64,11 @@ SU_EXPORT @protocol SPUUserDriver <NSObject>
*
* `SPUUpdateStateNotDownloaded` - Update has not been downloaded yet.
*
* `SPUUpdateStateDownloaded` - Update has already been downloaded but not started installing yet.
* `SPUUpdateStateDownloaded` - Update has already been downloaded in the background automatically (via `SUAutomaticallyUpdate`) but not started installing yet.
*
* `SPUUpdateStateInstalling` - Update has been downloaded and already started installing.
*
* The `userIntiated` property on the @c state indicates if the update was initiated by the user or if it was automatically scheduled in the background.
* The `userInitiated` property on the @c state indicates if the update was initiated by the user or if it was automatically scheduled in the background.
*
* Additionally, these properties on the @c appcastItem are of importance:
*
@ -78,9 +78,10 @@ SU_EXPORT @protocol SPUUserDriver <NSObject>
*
* @c appcastItem.criticalUpdate indicates if the update is a critical update.
*
* A reply of `SPUUserUpdateChoiceInstall` begins or resumes downloading or installing the update.
* A reply of `SPUUserUpdateChoiceInstall` begins or resumes downloading, extracting, or installing the update.
* If the state.stage is `SPUUserUpdateStateInstalling`, this may send a quit event to the application and relaunch it immediately (in this state, this behaves as a fast "install and Relaunch").
* Do not use this reply if @c appcastItem.informationOnlyUpdate is YES.
* If the state.stage is `SPUUpdateStateNotDownloaded` or `SPUUpdateStateDownloaded` the user may be presented an authorization prompt to install the update after `-showDownloadDidStartExtractingUpdate` is called if authorization is required for installation. For example, this may occur if the update on disk is owned by a different user (e.g. root or admin for non-admin users), or if the update is a package install.
* Do not use a reply of `SPUUserUpdateChoiceInstall` if @c appcastItem.informationOnlyUpdate is YES.
*
* A reply of `SPUUserUpdateChoiceDismiss` dismisses the update for the time being. The user may be reminded of the update at a later point.
* If the state.stage is `SPUUserUpdateStateDownloaded`, the downloaded update is kept after dismissing until the next time an update is shown to the user.
@ -183,8 +184,11 @@ SU_EXPORT @protocol SPUUserDriver <NSObject>
*
* Sparkle uses this to show an indeterminate progress bar.
*
* Note that an update can resume at this point after having been downloaded before,
* so this may be called without any of the download callbacks being invoked prior.
* Before this point, `showDownloadDidReceiveDataOfLength:` or `showUpdateFoundWithAppcastItem:state:reply:` may be called.
* An update can potentially resume at this point after having been automatically downloaded in the background (without the user driver) before.
*
* After extraction starts, the user may be shown an authorization prompt to install the update if authorization is required for installation.
* For example, this may occur if the update on disk is owned by a different user (e.g. root or admin for non-admin users), or if the update is a package install.
*/
- (void)showDownloadDidStartExtractingUpdate;

View file

@ -83,7 +83,7 @@ SU_EXPORT @interface SUUpdater : NSObject
/*!
Checks for updates, but does not display any UI unless an update is found.
This is meant for programmatically initating a check for updates. That is,
This is meant for programmatically initiating a check for updates. That is,
it will display no UI unless it actually finds an update, in which case it
proceeds as usual.
@ -160,7 +160,7 @@ SU_EXPORT @interface SUUpdater : NSObject
/*!
The user agent used when checking for and downloading updates.
The default implementation can be overrided.
The default implementation can be overridden.
*/
@property (nonatomic, copy) NSString *userAgentString;

View file

@ -156,7 +156,7 @@ __deprecated_msg("Deprecated in Sparkle 2. See SPUUpdaterDelegate instead")
- (void)updater:(SUUpdater *)updater willDownloadUpdate:(SUAppcastItem *)item withRequest:(NSMutableURLRequest *)request;
/*!
Called immediately after succesfull download of the specified update.
Called immediately after successful download of the specified update.
\param updater The SUUpdater instance.
\param item The appcast item corresponding to the update that has been downloaded.

View file

@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>22G513</string>
<string>22G720</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.6.0</string>
<string>2.6.4</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
@ -25,7 +25,7 @@
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>2036</string>
<string>2039.1</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>

View file

@ -0,0 +1,18 @@
/* Class = "NSWindow"; title = "Software Update"; ObjectID = "5"; */
"5.title" = "Programoppdatering";
/* Class = "NSTextFieldCell"; title = "Release Notes:"; ObjectID = "170"; */
"170.title" = "Om oppdateringen:";
/* Class = "NSButtonCell"; title = "Remind Me Later"; ObjectID = "171"; */
"171.title" = "Utsett";
/* Class = "NSButtonCell"; title = "Skip This Version"; ObjectID = "172"; */
"172.title" = "Hopp over";
/* Class = "NSButtonCell"; title = "Install Update"; ObjectID = "173"; */
"173.title" = "Installer";
/* Class = "NSButtonCell"; title = "Automatically download and install updates in the future"; ObjectID = "175"; */
"175.title" = "Last ned og installer automatisk i framtida";

View file

@ -0,0 +1,24 @@
/* Class = "NSTextFieldCell"; title = "Text Cell"; ObjectID = "43"; */
"43.title" = "Text Cell";
/* Class = "NSTextFieldCell"; title = "Text Cell"; ObjectID = "45"; */
"45.title" = "Text Cell";
/* Class = "NSTextFieldCell"; title = "Anonymous system profile information is used to help us plan future development work. Please contact us if you have any questions about this.\n\nThis is the information that would be sent:"; ObjectID = "183"; */
"183.title" = "Den anonyme systemprofilen hjelper oss med å planleggja framtidig utviklingsarbeid. Ta gjerne kontakt med oss om du har spørsmål om dette.\nFølgjande innhald vil bli sendt:";
/* Class = "NSButtonCell"; title = "Dont Check"; ObjectID = "cCJ-V0-aTi"; */
"cCJ-V0-aTi.title" = "Ikkje sjå etter";
/* Class = "NSTextFieldCell"; title = "Check for updates automatically?"; ObjectID = "gmh-T4-BO0"; */
"gmh-T4-BO0.title" = "Sjå etter etter oppdateringar automatisk?";
/* Class = "NSButtonCell"; title = "Include anonymous system profile"; ObjectID = "gz7-LM-gNf"; */
"gz7-LM-gNf.title" = "Inkluder anonym systemprofil";
/* Class = "NSButtonCell"; title = "Automatically download and install updates"; ObjectID = "AUc-33-qGN"; */
"AUc-33-qGN.title" = "Last ned og installer automatisk";
/* Class = "NSButtonCell"; title = "Check Automatically"; ObjectID = "OhZ-1K-DmA"; */
"OhZ-1K-DmA.title" = "Sjå etter automatisk";

View file

@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>22G513</string>
<string>22G720</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
@ -55,7 +55,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.6.0</string>
<string>2.6.4</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
@ -63,7 +63,7 @@
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>2036</string>
<string>2039.1</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>

View file

@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>22G513</string>
<string>22G720</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>2.6.0</string>
<string>2.6.4</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
@ -25,7 +25,7 @@
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>2036</string>
<string>2039.1</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>

View file

@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>22G513</string>
<string>22G720</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>2.6.0</string>
<string>2.6.4</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
@ -25,7 +25,7 @@
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>2036</string>
<string>2039.1</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>

View file

@ -22,7 +22,7 @@
</data>
<key>Resources/Info.plist</key>
<data>
SvIWhZCFWLsem2mAMQ36EqSk+4g=
8898FLXaAgWaPlgE1aZ3Sj7YpPg=
</data>
<key>Resources/ReleaseNotesColorStyle.css</key>
<data>
@ -527,6 +527,33 @@
<key>optional</key>
<true/>
</dict>
<key>Resources/nn.lproj/SUUpdateAlert.strings</key>
<dict>
<key>hash</key>
<data>
v2c8gYdlWN2U2PbZlUQwmfWIeGk=
</data>
<key>optional</key>
<true/>
</dict>
<key>Resources/nn.lproj/SUUpdatePermissionPrompt.strings</key>
<dict>
<key>hash</key>
<data>
xNizW6Xg8cPtYBhWBmexjNf5j8U=
</data>
<key>optional</key>
<true/>
</dict>
<key>Resources/nn.lproj/Sparkle.strings</key>
<dict>
<key>hash</key>
<data>
8GnPpOmTh7bQRiUCzZDL6pq1KNE=
</data>
<key>optional</key>
<true/>
</dict>
<key>Resources/pl.lproj/SUUpdateAlert.strings</key>
<dict>
<key>hash</key>
@ -912,10 +939,10 @@
<dict>
<key>cdhash</key>
<data>
b85CsOkmfvVbC5IwI64IMeAeQl0=
8SHNI2//iEq3D5kTas9tzb/l8Ok=
</data>
<key>requirement</key>
<string>cdhash H"6fce42b0e9267ef55b0b923023ae0831e01e425d" or cdhash H"d0c87e092b218eb138bb3e496bf3a44c50ad8aef"</string>
<string>cdhash H"f121cd236fff884ab70f99136acf6dcdbfe5f0e9" or cdhash H"82f6861d22cb4b317c616706faea20f034a09868"</string>
</dict>
<key>Headers/SPUDownloadData.h</key>
<dict>
@ -928,7 +955,7 @@
<dict>
<key>hash2</key>
<data>
+3I+CmUwJuOPUMU9MsBJW4BZNzMkjeJjyYVSGAFGKh8=
gf8QsQfI+rsdQIHZdznFSFICnui4Oavnhgn9ybmv6Hs=
</data>
</dict>
<key>Headers/SPUStandardUserDriver.h</key>
@ -963,14 +990,14 @@
<dict>
<key>hash2</key>
<data>
2RfJYG0mMGzLSAP82wi9XHEFSfkoBc22JiIik4SObd0=
gHf2JF29zPpLfNllC9hyoYGyZVO9xJ0wNDCZNd65+hQ=
</data>
</dict>
<key>Headers/SPUUpdaterDelegate.h</key>
<dict>
<key>hash2</key>
<data>
LHjSN/efNGASgXqi8P76eNivCLV2QZxP2/rvDMLcKyU=
A7Rnysd5Q/yqhviRSeLa7hyuJQcqe4eRb+qxnUx7S9g=
</data>
</dict>
<key>Headers/SPUUpdaterSettings.h</key>
@ -984,7 +1011,7 @@
<dict>
<key>hash2</key>
<data>
FZyzRoNn6SIm0ugYRKGMzlmq0C60WknB8YHjZtfmmYw=
6/byufu2xa4bjEdEwfuFxkHUiYnK9gbYEtplebyvTSY=
</data>
</dict>
<key>Headers/SPUUserUpdateState.h</key>
@ -1040,14 +1067,14 @@
<dict>
<key>hash2</key>
<data>
8BXIwn75UYazfTyDZklTch+t6AlsOxNdTI/bNj/qx1I=
lvb1mNWCyofJ0X88zXvMsK5PBXrG6Pr7hUrY0E3jNvY=
</data>
</dict>
<key>Headers/SUUpdaterDelegate.h</key>
<dict>
<key>hash2</key>
<data>
XRFzmZB3ShVUFY8JAvcjptVwxLmD/VL5rwnFoy5rSlc=
oaCMM/1B690QWRbYGB0iJBf5/toBzcQq+moxURBs3jY=
</data>
</dict>
<key>Headers/SUVersionComparisonProtocol.h</key>
@ -1159,7 +1186,7 @@
<dict>
<key>hash2</key>
<data>
zDn9uR+ubftfJrqZZWdjChqvwMiR2yqjhoLeBy1H8XI=
+BB+A7FvWsdNGRdHPjnpR/ph7s+cZH/weSOLH1MDDuA=
</data>
</dict>
<key>Resources/ReleaseNotesColorStyle.css</key>
@ -1671,6 +1698,33 @@
<key>optional</key>
<true/>
</dict>
<key>Resources/nn.lproj/SUUpdateAlert.strings</key>
<dict>
<key>hash2</key>
<data>
giHYMaf7DkBFSModZ1CL3EswwwGHyOmkxRjtDP6bmk8=
</data>
<key>optional</key>
<true/>
</dict>
<key>Resources/nn.lproj/SUUpdatePermissionPrompt.strings</key>
<dict>
<key>hash2</key>
<data>
V7VdecLbSo5sr8pMVUBnsJ04no1tM8XXsU/SHRWphs8=
</data>
<key>optional</key>
<true/>
</dict>
<key>Resources/nn.lproj/Sparkle.strings</key>
<dict>
<key>hash2</key>
<data>
ouNyYGUrFy2VqYdwZnSn1emcGTGoyHGqb8Sb9Cg0cWk=
</data>
<key>optional</key>
<true/>
</dict>
<key>Resources/pl.lproj/SUUpdateAlert.strings</key>
<dict>
<key>hash2</key>
@ -2053,28 +2107,28 @@
<dict>
<key>cdhash</key>
<data>
bj3iy4BvO8wO9iY/F75/eUQYNgU=
FUu8fe4a0BThd4e3aAS1ESFerTA=
</data>
<key>requirement</key>
<string>cdhash H"6e3de2cb806f3bcc0ef6263f17be7f7944183605" or cdhash H"7efba85418d4584fcd306a08fdb6a5d53072a9b0"</string>
<string>cdhash H"154bbc7dee1ad014e17787b76804b511215ead30" or cdhash H"98978bf031c6ea78567452af336111bb74f503e5"</string>
</dict>
<key>XPCServices/Downloader.xpc</key>
<dict>
<key>cdhash</key>
<data>
YRF1/8popPCUpUpng4s2IsXJGg0=
X5fZetRn2Saen2h7dEPry59CnV0=
</data>
<key>requirement</key>
<string>cdhash H"611175ffca68a4f094a54a67838b3622c5c91a0d" or cdhash H"f15d61c5e2b48918021fe0fed2d19ae7adc05944"</string>
<string>cdhash H"5f97d97ad467d9269e9f687b7443ebcb9f429d5d" or cdhash H"d20a89312b4694cb7637a1beb849e39b54453b2b"</string>
</dict>
<key>XPCServices/Installer.xpc</key>
<dict>
<key>cdhash</key>
<data>
MU4EP1svHxwuYOrpRVtDtl4dNdY=
C2FFtOq0VOM5vJmKQYom8Xl9KVk=
</data>
<key>requirement</key>
<string>cdhash H"314e043f5b2f1f1c2e60eae9455b43b65e1d35d6" or cdhash H"b6797bd76ac0d2b5bc71f900aef40cd943370aa3"</string>
<string>cdhash H"0b6145b4eab454e339bc998a418a26f1797d2959" or cdhash H"bfe3d53e82fffda6c87e7dfa656e84ab49371973"</string>
</dict>
</dict>
<key>rules</key>