Skip to content

Commit 3cca9ff

Browse files
authored
Merge pull request #1605 from ychin/sparkle-2.8.0
Sparkle 2.8.0
2 parents a4fe500 + 1cb7b93 commit 3cca9ff

File tree

128 files changed

+376
-2813
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+376
-2813
lines changed
592 Bytes
Binary file not shown.

src/MacVim/Sparkle_2.framework/Versions/B/Headers/SPUStandardUpdaterController.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ NS_ASSUME_NONNULL_BEGIN
3737
It also allows hooking up the updater's and user driver's delegates.
3838
3939
If you need more control over what bundle you want to update, or you want to provide a custom user interface (via `SPUUserDriver`), please use `SPUUpdater` directly instead.
40+
41+
This class must be used on the main thread.
4042
*/
4143
SU_EXPORT @interface SPUStandardUpdaterController : NSObject
4244
{

src/MacVim/Sparkle_2.framework/Versions/B/Headers/SPUUpdater.h

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ NS_ASSUME_NONNULL_BEGIN
4242
- `feedURL`
4343
4444
Please view the documentation on each of these properties for more detail if you are to configure them dynamically.
45+
46+
This class must be used on the main thread.
4547
*/
4648
SU_EXPORT @interface SPUUpdater : NSObject
4749

@@ -96,11 +98,13 @@ SU_EXPORT @interface SPUUpdater : NSObject
9698
9799
If an update hasn't started, the user may be shown that a new check for updates is occurring.
98100
If an update has already been downloaded or begun installing from a previous session, the user may be presented to install that update.
99-
If the user is already being presented with an update, that update will be shown to the user in active focus.
101+
If the user is already being presented with an update or update permission prompt, that notice may be shown to the user in active focus
102+
(as long as the user driver is the standard `SPUStandardUserDriver` or if it implements `-[SPUUserDriver showUpdateInFocus]`).
100103
101104
This will find updates that the user has previously opted into skipping.
102-
103105
See `canCheckForUpdates` property which can determine when this method may be invoked.
106+
107+
This must be called on the main thread.
104108
*/
105109
- (void)checkForUpdates;
106110

@@ -126,6 +130,8 @@ SU_EXPORT @interface SPUUpdater : NSObject
126130
This will not find updates that the user has opted into skipping.
127131
128132
This method does not do anything if there is a `sessionInProgress`.
133+
134+
This must be called on the main thread.
129135
*/
130136
- (void)checkForUpdatesInBackground;
131137

@@ -144,13 +150,18 @@ SU_EXPORT @interface SPUUpdater : NSObject
144150
Updates that have been skipped by the user will not be found.
145151
146152
This method does not do anything if there is a `sessionInProgress`.
153+
154+
This must be called on the main thread.
147155
*/
148156
- (void)checkForUpdateInformation;
149157

150158
/**
151159
A property indicating whether or not updates can be checked by the user.
152160
153-
An update check can be made by the user when an update session isn't in progress, or when an update or its progress is being shown to the user.
161+
An update check can be made by the user when an update session isn't in progress.
162+
An update check can also be made when an update or its progress is being shown to the user
163+
(as long as the user driver is the standard `SPUStandardUserDriver` or if it implements `-[SPUUserDriver showUpdateInFocus]`).
164+
154165
A user cannot check for updates when data (such as the feed or an update) is still being downloaded automatically in the background.
155166
156167
This property is suitable to use for menu item validation for seeing if `-checkForUpdates` can be invoked.
@@ -194,7 +205,9 @@ SU_EXPORT @interface SPUUpdater : NSObject
194205
to your app's command line arguments instead of setting this property.
195206
196207
The update schedule cycle will be reset in a short delay after the property's new value is set.
197-
This is to allow reverting this property without kicking off a schedule change immediately
208+
This is to allow reverting this property without kicking off a schedule change immediately.
209+
210+
This property is KVO compliant. This property must be called on the main thread.
198211
*/
199212
@property (nonatomic) BOOL automaticallyChecksForUpdates;
200213

@@ -209,7 +222,9 @@ SU_EXPORT @interface SPUUpdater : NSObject
209222
Do not always set it on launch unless you want to ignore the user's preference.
210223
211224
The update schedule cycle will be reset in a short delay after the property's new value is set.
212-
This is to allow reverting this property without kicking off a schedule change immediately
225+
This is to allow reverting this property without kicking off a schedule change immediately.
226+
227+
This property is KVO compliant. This property must be called on the main thread.
213228
*/
214229
@property (nonatomic) NSTimeInterval updateCheckInterval;
215230

@@ -231,6 +246,8 @@ SU_EXPORT @interface SPUUpdater : NSObject
231246
Hence developers shouldn't maintain an additional user default for this property.
232247
Only set this property if the user wants to change the default via a user settings option.
233248
Do not always set it on launch unless you want to ignore the user's preference.
249+
250+
This property is KVO compliant. This property must be called on the main thread.
234251
*/
235252
@property (nonatomic) BOOL automaticallyDownloadsUpdates;
236253

@@ -322,6 +339,8 @@ SU_EXPORT @interface SPUUpdater : NSObject
322339
A property indicating whether or not the user's system profile information is sent when checking for updates.
323340
324341
Setting this property will persist in the host bundle's user defaults.
342+
343+
This property is KVO compliant. This property must be called on the main thread.
325344
*/
326345
@property (nonatomic) BOOL sendsSystemProfile;
327346

@@ -331,6 +350,8 @@ SU_EXPORT @interface SPUUpdater : NSObject
331350
For testing purposes, the last update check is stored in the `SULastCheckTime` key in the host bundle's user defaults.
332351
For example, `defaults delete my-bundle-id SULastCheckTime` can be invoked to clear the last update check time and test
333352
if update checks are automatically scheduled.
353+
354+
This property must be called on the main thread.
334355
*/
335356
@property (nonatomic, readonly, copy, nullable) NSDate *lastUpdateCheckDate;
336357

@@ -342,6 +363,8 @@ SU_EXPORT @interface SPUUpdater : NSObject
342363
If the `updateCheckInterval` or `automaticallyChecksForUpdates` properties are changed, this method is automatically invoked after a short delay using `-resetUpdateCycleAfterShortDelay`. In these cases, manually resetting the update cycle is not necessary.
343364
344365
See also `-resetUpdateCycleAfterShortDelay` which gives the user a short delay before triggering a cycle reset.
366+
367+
This must be called on the main thread.
345368
*/
346369
- (void)resetUpdateCycle;
347370

@@ -355,6 +378,8 @@ SU_EXPORT @interface SPUUpdater : NSObject
355378
no cycle reset will be done.
356379
357380
If the `updateCheckInterval` or `automaticallyChecksForUpdates` properties are changed, this method is automatically invoked. In these cases, manually resetting the update cycle is not necessary.
381+
382+
This must be called on the main thread.
358383
*/
359384
- (void)resetUpdateCycleAfterShortDelay;
360385

src/MacVim/Sparkle_2.framework/Versions/B/Headers/SPUUpdaterSettings.h

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,30 @@
2121
NS_ASSUME_NONNULL_BEGIN
2222

2323
/**
24-
This class can be used for reading certain updater settings.
24+
This class can be used for reading and updating updater settings.
2525
2626
It retrieves the settings by first looking into the host's user defaults.
2727
If the setting is not found in there, then the host's Info.plist file is looked at.
28+
29+
For updating updater settings, changes are made in the host's user defaults.
2830
*/
2931
SU_EXPORT @interface SPUUpdaterSettings : NSObject
3032

3133
- (instancetype)initWithHostBundle:(NSBundle *)hostBundle;
3234

3335
/**
3436
* Indicates whether or not automatic update checks are enabled.
37+
*
38+
* This property is KVO compliant. This property must be called on the main thread.
3539
*/
36-
@property (readonly, nonatomic) BOOL automaticallyChecksForUpdates;
40+
@property (nonatomic) BOOL automaticallyChecksForUpdates;
3741

3842
/**
3943
* The regular update check interval.
44+
*
45+
* This property is KVO compliant. This property must be called on the main thread.
4046
*/
41-
@property (readonly, nonatomic) NSTimeInterval updateCheckInterval;
47+
@property (nonatomic) NSTimeInterval updateCheckInterval;
4248

4349
/**
4450
* Indicates whether or not automatically downloading updates is allowed to be turned on by the user.
@@ -56,13 +62,17 @@ SU_EXPORT @interface SPUUpdaterSettings : NSObject
5662
*
5763
* Note this does not indicate whether or not automatic downloading of updates is allowable.
5864
* See `-allowsAutomaticUpdates` property for that.
65+
*
66+
* This property is KVO compliant. This property must be called on the main thread.
5967
*/
60-
@property (readonly, nonatomic) BOOL automaticallyDownloadsUpdates;
68+
@property (nonatomic) BOOL automaticallyDownloadsUpdates;
6169

6270
/**
6371
* Indicates whether or not anonymous system profile information is sent when checking for updates.
72+
*
73+
* This property is KVO compliant. This property must be called on the main thread.
6474
*/
65-
@property (readonly, nonatomic) BOOL sendsSystemProfile;
75+
@property (nonatomic) BOOL sendsSystemProfile;
6676

6777
@end
6878

src/MacVim/Sparkle_2.framework/Versions/B/Headers/SPUUserDriver.h

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -256,14 +256,6 @@ SU_EXPORT @protocol SPUUserDriver <NSObject>
256256
*/
257257
- (void)showUpdateInstalledAndRelaunched:(BOOL)relaunched acknowledgement:(void (^)(void))acknowledgement;
258258

259-
/**
260-
* Show the user the current presented update or its progress in utmost focus
261-
*
262-
* The user wishes to check for updates while the user is being shown update progress.
263-
* Bring whatever is on screen to frontmost focus (permission request, update information, downloading or extraction status, choice to install update, etc).
264-
*/
265-
- (void)showUpdateInFocus;
266-
267259
/**
268260
* Dismiss the current update installation
269261
*
@@ -273,12 +265,22 @@ SU_EXPORT @protocol SPUUserDriver <NSObject>
273265
*/
274266
- (void)dismissUpdateInstallation;
275267

268+
@optional
269+
270+
/**
271+
* Show the user the current presented update or its progress in utmost focus
272+
*
273+
* The user wishes to check for updates while the user is being shown update progress.
274+
* Bring whatever is on screen to frontmost focus (permission request, update information, downloading or extraction status, choice to install update, etc).
275+
* Implementing this method is optional.
276+
*/
277+
- (void)showUpdateInFocus;
278+
276279
/*
277280
* Below are deprecated methods that have been replaced by better alternatives.
278281
* The deprecated methods will be used if the alternatives have not been implemented yet.
279282
* In the future support for using these deprecated methods may be removed however.
280283
*/
281-
@optional
282284

283285
// Clients should move to non-deprecated methods
284286
// Deprecated methods are only (temporarily) kept around for compatibility reasons

src/MacVim/Sparkle_2.framework/Versions/B/Headers/SUAppcastItem.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,7 @@ SU_EXPORT @interface SUAppcastItem : NSObject<NSSecureCoding>
235235
236236
This may be:
237237
- @c application - indicates this is a regular application update.
238-
- @c package - indicates this is a guided package installer update.
239-
- @c interactive-package - indicates this is an interactive package installer update (deprecated; use "package" instead)
238+
- @c package - indicates this is a package installer update.
240239
241240
This is extracted from the @c sparkle:installationType attribute in the @c <enclosure> element.
242241

src/MacVim/Sparkle_2.framework/Versions/B/Headers/SUErrors.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ typedef NS_ENUM(OSStatus, SUError) {
6767
SUInstallationAuthorizeLaterError = 4008,
6868
SUNotValidUpdateError = 4009,
6969
SUAgentInvalidationError = 4010,
70-
SUInstallationRootInteractiveError = 4011,
70+
//SUInstallationRootInteractiveError = 4011,
7171
SUInstallationWriteNoPermissionError = 4012,
7272

7373
// API misuse errors.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
//
2+
// Sparkle.private.modulemap
3+
// Sparkle
4+
//
5+
// Created on 4/30/25.
6+
// Copyright © 2025 Sparkle Project. All rights reserved.
7+
//
8+
9+
framework module Sparkle_Private {
10+
// Nothing exported here
11+
}
12+
13+
explicit module Sparkle_Private.SPUStandardUserDriver {
14+
header "SPUStandardUserDriver+Private.h"
15+
export *
16+
}
17+
18+
explicit module Sparkle_Private.SPUGentleUserDriverReminders {
19+
header "SPUGentleUserDriverReminders.h"
20+
export *
21+
}
22+
23+
explicit module Sparkle_Private.SPUUserAgent {
24+
header "SPUUserAgent+Private.h"
25+
export *
26+
}
27+
28+
explicit module Sparkle_Private.SUAppcastItem {
29+
header "SUAppcastItem+Private.h"
30+
header "SPUAppcastItemStateResolver.h"
31+
export *
32+
}
33+
34+
explicit module Sparkle_Private.SUInstallerLauncher {
35+
header "SUInstallerLauncher+Private.h"
36+
header "SPUInstallationType.h"
37+
export *
38+
}

src/MacVim/Sparkle_2.framework/Versions/B/PrivateHeaders/SPUInstallationType.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#define SPUInstallationTypeGuidedPackage @"package" // the preferred installation type for package installations
1414
#define SPUInstallationTypeInteractivePackage @"interactive-package" // the deprecated installation type; use guided package instead
1515

16-
#define SPUInstallationTypesArray (@[SPUInstallationTypeApplication, SPUInstallationTypeGuidedPackage, SPUInstallationTypeInteractivePackage])
16+
#define SPUInstallationTypesArray (@[SPUInstallationTypeApplication, SPUInstallationTypeGuidedPackage])
1717
#define SPUValidInstallationType(x) ((x != nil) && [SPUInstallationTypesArray containsObject:(NSString * _Nonnull)x])
1818

1919
#endif /* SPUInstallationType_h */
Binary file not shown.

0 commit comments

Comments
 (0)