Skip to content

Commit ba77a78

Browse files
authored
Merge pull request #963 from ychin/update-sparkle-1.22
Update Sparkle to 1.22.00
2 parents b4a4a22 + e77679f commit ba77a78

File tree

184 files changed

+5572
-296
lines changed

Some content is hidden

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

184 files changed

+5572
-296
lines changed

src/MacVim/English.lproj/MainMenu.nib/designable.nib

+4-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
//
2+
// SPUDownloadData.h
3+
// Sparkle
4+
//
5+
// Created by Mayur Pawashe on 8/10/16.
6+
// Copyright © 2016 Sparkle Project. All rights reserved.
7+
//
8+
9+
#if __has_feature(modules)
10+
@import Foundation;
11+
#else
12+
#import <Foundation/Foundation.h>
13+
#endif
14+
15+
#import "SUExport.h"
16+
17+
NS_ASSUME_NONNULL_BEGIN
18+
19+
/*!
20+
* A class for containing downloaded data along with some information about it.
21+
*/
22+
SU_EXPORT @interface SPUDownloadData : NSObject <NSSecureCoding>
23+
24+
- (instancetype)initWithData:(NSData *)data textEncodingName:(NSString * _Nullable)textEncodingName MIMEType:(NSString * _Nullable)MIMEType;
25+
26+
/*!
27+
* The raw data that was downloaded.
28+
*/
29+
@property (nonatomic, readonly) NSData *data;
30+
31+
/*!
32+
* The IANA charset encoding name if available. Eg: "utf-8"
33+
*/
34+
@property (nonatomic, readonly, nullable, copy) NSString *textEncodingName;
35+
36+
/*!
37+
* The MIME type if available. Eg: "text/plain"
38+
*/
39+
@property (nonatomic, readonly, nullable, copy) NSString *MIMEType;
40+
41+
@end
42+
43+
NS_ASSUME_NONNULL_END
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
//
2+
// SPUDownloader.h
3+
// Downloader
4+
//
5+
// Created by Mayur Pawashe on 4/1/16.
6+
// Copyright © 2016 Sparkle Project. All rights reserved.
7+
//
8+
9+
#if __has_feature(modules)
10+
@import Foundation;
11+
#else
12+
#import <Foundation/Foundation.h>
13+
#endif
14+
#import "SPUDownloaderProtocol.h"
15+
16+
@protocol SPUDownloaderDelegate;
17+
18+
// This object implements the protocol which we have defined. It provides the actual behavior for the service. It is 'exported' by the service to make it available to the process hosting the service over an NSXPCConnection.
19+
@interface SPUDownloader : NSObject <SPUDownloaderProtocol>
20+
21+
// Due to XPC remote object reasons, this delegate is strongly referenced
22+
// Invoke cleanup when done with this instance
23+
- (instancetype)initWithDelegate:(id <SPUDownloaderDelegate>)delegate;
24+
25+
@end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
//
2+
// SPUDownloaderDelegate.h
3+
// Sparkle
4+
//
5+
// Created by Mayur Pawashe on 4/1/16.
6+
// Copyright © 2016 Sparkle Project. All rights reserved.
7+
//
8+
9+
#if __has_feature(modules)
10+
@import Foundation;
11+
#else
12+
#import <Foundation/Foundation.h>
13+
#endif
14+
15+
NS_ASSUME_NONNULL_BEGIN
16+
17+
@class SPUDownloadData;
18+
19+
@protocol SPUDownloaderDelegate <NSObject>
20+
21+
// This is only invoked for persistent downloads
22+
- (void)downloaderDidSetDestinationName:(NSString *)destinationName temporaryDirectory:(NSString *)temporaryDirectory;
23+
24+
// Under rare cases, this may be called more than once, in which case the current progress should be reset back to 0
25+
// This is only invoked for persistent downloads
26+
- (void)downloaderDidReceiveExpectedContentLength:(int64_t)expectedContentLength;
27+
28+
// This is only invoked for persistent downloads
29+
- (void)downloaderDidReceiveDataOfLength:(uint64_t)length;
30+
31+
// downloadData is nil if this is a persisent download, otherwise it's non-nil if it's a temporary download
32+
- (void)downloaderDidFinishWithTemporaryDownloadData:(SPUDownloadData * _Nullable)downloadData;
33+
34+
- (void)downloaderDidFailWithError:(NSError *)error;
35+
36+
@end
37+
38+
NS_ASSUME_NONNULL_END
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//
2+
// SPUDownloaderDeprecated.h
3+
// Sparkle
4+
//
5+
// Created by Deadpikle on 12/20/17.
6+
// Copyright © 2017 Sparkle Project. All rights reserved.
7+
//
8+
9+
#import "SPUDownloader.h"
10+
11+
@interface SPUDownloaderDeprecated : SPUDownloader <SPUDownloaderProtocol>
12+
13+
@end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
//
2+
// SPUDownloaderProtocol.h
3+
// PersistentDownloader
4+
//
5+
// Created by Mayur Pawashe on 4/1/16.
6+
// Copyright © 2016 Sparkle Project. All rights reserved.
7+
//
8+
9+
#if __has_feature(modules)
10+
@import Foundation;
11+
#else
12+
#import <Foundation/Foundation.h>
13+
#endif
14+
15+
NS_ASSUME_NONNULL_BEGIN
16+
17+
@class SPUURLRequest;
18+
19+
// The protocol that this service will vend as its API. This header file will also need to be visible to the process hosting the service.
20+
@protocol SPUDownloaderProtocol
21+
22+
- (void)startPersistentDownloadWithRequest:(SPUURLRequest *)request bundleIdentifier:(NSString *)bundleIdentifier desiredFilename:(NSString *)desiredFilename;
23+
24+
- (void)startTemporaryDownloadWithRequest:(SPUURLRequest *)request;
25+
26+
- (void)downloadDidFinish;
27+
28+
- (void)cleanup;
29+
30+
- (void)cancel;
31+
32+
@end
33+
34+
NS_ASSUME_NONNULL_END
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
//
2+
// SPUDownloaderSession.h
3+
// Sparkle
4+
//
5+
// Created by Deadpikle on 12/20/17.
6+
// Copyright © 2017 Sparkle Project. All rights reserved.
7+
//
8+
9+
#if __has_feature(modules)
10+
@import Foundation;
11+
#else
12+
#import <Foundation/Foundation.h>
13+
#endif
14+
#import "SPUDownloader.h"
15+
#import "SPUDownloaderProtocol.h"
16+
17+
NS_CLASS_AVAILABLE(NSURLSESSION_AVAILABLE, 7_0)
18+
@interface SPUDownloaderSession : SPUDownloader <SPUDownloaderProtocol>
19+
20+
@end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
//
2+
// SPUURLRequest.h
3+
// Sparkle
4+
//
5+
// Created by Mayur Pawashe on 5/19/16.
6+
// Copyright © 2016 Sparkle Project. All rights reserved.
7+
//
8+
9+
#if __has_feature(modules)
10+
@import Foundation;
11+
#else
12+
#import <Foundation/Foundation.h>
13+
#endif
14+
15+
NS_ASSUME_NONNULL_BEGIN
16+
17+
// A class that wraps NSURLRequest and implements NSSecureCoding
18+
// This class exists because NSURLRequest did not support NSSecureCoding in macOS 10.8
19+
// I have not verified if NSURLRequest in 10.9 implements NSSecureCoding or not
20+
@interface SPUURLRequest : NSObject <NSSecureCoding>
21+
22+
// Creates a new URL request
23+
// Only these properties are currently tracked:
24+
// * URL
25+
// * Cache policy
26+
// * Timeout interval
27+
// * HTTP header fields
28+
// * networkServiceType
29+
+ (instancetype)URLRequestWithRequest:(NSURLRequest *)request;
30+
31+
@property (nonatomic, readonly) NSURLRequest *request;
32+
33+
@end
34+
35+
NS_ASSUME_NONNULL_END

src/MacVim/Sparkle.framework/Versions/A/Headers/SUAppcast.h

+14-5
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,27 @@
99
#ifndef SUAPPCAST_H
1010
#define SUAPPCAST_H
1111

12+
#if __has_feature(modules)
13+
@import Foundation;
14+
#else
1215
#import <Foundation/Foundation.h>
16+
#endif
1317
#import "SUExport.h"
1418

19+
NS_ASSUME_NONNULL_BEGIN
20+
1521
@class SUAppcastItem;
16-
SU_EXPORT @interface SUAppcast : NSObject<NSURLDownloadDelegate>
22+
SU_EXPORT @interface SUAppcast : NSObject
1723

18-
@property (copy) NSString *userAgentString;
19-
@property (copy) NSDictionary *httpHeaders;
24+
@property (copy, nullable) NSString *userAgentString;
25+
@property (copy, nullable) NSDictionary<NSString *, NSString *> *httpHeaders;
2026

21-
- (void)fetchAppcastFromURL:(NSURL *)url completionBlock:(void (^)(NSError *))err;
27+
- (void)fetchAppcastFromURL:(NSURL *)url inBackground:(BOOL)bg completionBlock:(void (^)(NSError *_Nullable))err;
28+
- (SUAppcast *)copyWithoutDeltaUpdates;
2229

23-
@property (readonly, copy) NSArray *items;
30+
@property (readonly, copy, nullable) NSArray *items;
2431
@end
2532

33+
NS_ASSUME_NONNULL_END
34+
2635
#endif

src/MacVim/Sparkle.framework/Versions/A/Headers/SUAppcastItem.h

+11-1
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,39 @@
99
#ifndef SUAPPCASTITEM_H
1010
#define SUAPPCASTITEM_H
1111

12+
#if __has_feature(modules)
13+
@import Foundation;
14+
#else
1215
#import <Foundation/Foundation.h>
16+
#endif
1317
#import "SUExport.h"
18+
@class SUSignatures;
1419

1520
SU_EXPORT @interface SUAppcastItem : NSObject
1621
@property (copy, readonly) NSString *title;
22+
@property (copy, readonly) NSString *dateString;
1723
@property (copy, readonly) NSDate *date;
1824
@property (copy, readonly) NSString *itemDescription;
1925
@property (strong, readonly) NSURL *releaseNotesURL;
20-
@property (copy, readonly) NSString *DSASignature;
26+
@property (strong, readonly) SUSignatures *signatures;
2127
@property (copy, readonly) NSString *minimumSystemVersion;
2228
@property (copy, readonly) NSString *maximumSystemVersion;
2329
@property (strong, readonly) NSURL *fileURL;
30+
@property (nonatomic, readonly) uint64_t contentLength;
2431
@property (copy, readonly) NSString *versionString;
32+
@property (copy, readonly) NSString *osString;
2533
@property (copy, readonly) NSString *displayVersionString;
2634
@property (copy, readonly) NSDictionary *deltaUpdates;
2735
@property (strong, readonly) NSURL *infoURL;
36+
@property (copy, readonly) NSNumber* phasedRolloutInterval;
2837

2938
// Initializes with data from a dictionary provided by the RSS class.
3039
- (instancetype)initWithDictionary:(NSDictionary *)dict;
3140
- (instancetype)initWithDictionary:(NSDictionary *)dict failureReason:(NSString **)error;
3241

3342
@property (getter=isDeltaUpdate, readonly) BOOL deltaUpdate;
3443
@property (getter=isCriticalUpdate, readonly) BOOL criticalUpdate;
44+
@property (getter=isMacOsUpdate, readonly) BOOL macOsUpdate;
3545
@property (getter=isInformationOnlyUpdate, readonly) BOOL informationOnlyUpdate;
3646

3747
// Returns the dictionary provided in initWithDictionary; this might be useful later for extensions.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
//
2+
// SUCodeSigningVerifier.h
3+
// Sparkle
4+
//
5+
// Created by Andy Matuschak on 7/5/12.
6+
//
7+
//
8+
9+
#ifndef SUCODESIGNINGVERIFIER_H
10+
#define SUCODESIGNINGVERIFIER_H
11+
12+
#if __has_feature(modules)
13+
@import Foundation;
14+
#else
15+
#import <Foundation/Foundation.h>
16+
#endif
17+
#import "SUExport.h"
18+
19+
SU_EXPORT @interface SUCodeSigningVerifier : NSObject
20+
+ (BOOL)codeSignatureAtBundleURL:(NSURL *)oldBundlePath matchesSignatureAtBundleURL:(NSURL *)newBundlePath error:(NSError **)error;
21+
+ (BOOL)codeSignatureIsValidAtBundleURL:(NSURL *)bundlePath error:(NSError **)error;
22+
+ (BOOL)bundleAtURLIsCodeSigned:(NSURL *)bundlePath;
23+
+ (NSDictionary *)codeSignatureInfoAtBundleURL:(NSURL *)bundlePath;
24+
@end
25+
26+
#endif

src/MacVim/Sparkle.framework/Versions/A/Headers/SUErrors.h

+13-3
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,32 @@
99
#ifndef SUERRORS_H
1010
#define SUERRORS_H
1111

12+
#if __has_feature(modules)
13+
@import Foundation;
14+
#else
1215
#import <Foundation/Foundation.h>
16+
#endif
1317
#import "SUExport.h"
1418

1519
/**
1620
* Error domain used by Sparkle
1721
*/
1822
SU_EXPORT extern NSString *const SUSparkleErrorDomain;
1923

24+
#pragma clang diagnostic push
25+
#pragma clang diagnostic ignored "-Wc++98-compat"
2026
typedef NS_ENUM(OSStatus, SUError) {
2127
// Appcast phase errors.
2228
SUAppcastParseError = 1000,
2329
SUNoUpdateError = 1001,
2430
SUAppcastError = 1002,
2531
SURunningFromDiskImageError = 1003,
26-
27-
// Downlaod phase errors.
32+
SURunningTranslocated = 1004,
33+
34+
// Download phase errors.
2835
SUTemporaryDirectoryError = 2000,
29-
36+
SUDownloadError = 2001,
37+
3038
// Extraction phase errors.
3139
SUUnarchivingError = 3000,
3240
SUSignatureError = 3001,
@@ -39,9 +47,11 @@ typedef NS_ENUM(OSStatus, SUError) {
3947
SURelaunchError = 4004,
4048
SUInstallationError = 4005,
4149
SUDowngradeError = 4006,
50+
SUInstallationCancelledError = 4007,
4251

4352
// System phase errors
4453
SUSystemPowerOffError = 5000
4554
};
55+
#pragma clang diagnostic pop
4656

4757
#endif

0 commit comments

Comments
 (0)