Skip to content

Commit

Permalink
Update Sparkle 2.x to support arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
p0deje committed Jan 25, 2021
1 parent 224b729 commit e0ffd03
Show file tree
Hide file tree
Showing 150 changed files with 1,232 additions and 787 deletions.
3 changes: 1 addition & 2 deletions Maccy.xcodeproj/project.pbxproj
Expand Up @@ -473,7 +473,6 @@
};
DAEE38421E3DBEB100DD2966 = {
CreatedOnToolsVersion = 8.2.1;
DevelopmentTeam = MN3X4648SC;
LastSwiftMigration = 1020;
ProvisioningStyle = Automatic;
};
Expand Down Expand Up @@ -903,7 +902,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Maccy/Maccy.entitlements;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = MN3X4648SC;
Expand Down
Expand Up @@ -6,8 +6,15 @@
// Copyright © 2016 Sparkle Project. All rights reserved.
//

#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import Foundation;
#else
#import <Foundation/Foundation.h>
#import <Sparkle/SUExport.h>
#endif
#import "SUExport.h"

NS_ASSUME_NONNULL_BEGIN

Expand Down
Expand Up @@ -6,13 +6,21 @@
// Copyright © 2016 Sparkle Project. All rights reserved.
//

#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import Cocoa;
#else
#import <Cocoa/Cocoa.h>
#import <Sparkle/SUExport.h>
#endif
#import "SUExport.h"

NS_ASSUME_NONNULL_BEGIN

@class SPUUpdater;
@protocol SPUUserDriver, SPUStandardUserDriverProtocol, SPUUpdaterDelegate, SPUStandardUserDriverDelegate;
@class SPUStandardUserDriver;
@protocol SPUUserDriver, SPUUpdaterDelegate, SPUStandardUserDriverDelegate;

/*!
A controller class that instantiates a SPUUpdater and allows binding UI to it.
Expand Down Expand Up @@ -60,7 +68,7 @@ SU_EXPORT @interface SPUStandardUpdaterController : NSObject
This is nil before being loaded from the nib.
You may access this property after your application has finished launching, or after your window controller has finished loading.
*/
@property (nonatomic, readonly, nullable) id <SPUStandardUserDriverProtocol> userDriver;
@property (nonatomic, readonly, nullable) SPUStandardUserDriver *userDriver;

/*!
Use initWithUpdaterDelegate:userDriverDelegate: instead.
Expand All @@ -87,7 +95,7 @@ SU_EXPORT @interface SPUStandardUpdaterController : NSObject
/*!
Validates if the menu item for checkForUpdates: can be invoked or not
This validates the menu item by checking -[SPUStandardUserDriver canCheckForUpdates]
This validates the menu item by checking -SPUUpdater.canCheckForUpdates
*/
- (BOOL)validateMenuItem:(NSMenuItem *)item;

Expand Down
Expand Up @@ -6,10 +6,16 @@
// Copyright © 2016 Sparkle Project. All rights reserved.
//

#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import Cocoa;
#else
#import <Cocoa/Cocoa.h>
#import <Sparkle/SPUUserDriver.h>
#import <Sparkle/SPUStandardUserDriverProtocol.h>
#import <Sparkle/SUExport.h>
#endif
#import "SPUUserDriver.h"
#import "SUExport.h"

NS_ASSUME_NONNULL_BEGIN

Expand All @@ -18,7 +24,7 @@ NS_ASSUME_NONNULL_BEGIN
/*!
Sparkle's standard built-in user driver for updater interactions
*/
SU_EXPORT @interface SPUStandardUserDriver : NSObject <SPUUserDriver, SPUStandardUserDriverProtocol>
SU_EXPORT @interface SPUStandardUserDriver : NSObject <SPUUserDriver>

/*!
Initializes a Sparkle's standard user driver for user update interactions
Expand Down
Expand Up @@ -6,8 +6,15 @@
// Copyright © 2016 Sparkle Project. All rights reserved.
//

#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import Foundation;
#else
#import <Foundation/Foundation.h>
#import <Sparkle/SUExport.h>
#endif
#import "SUExport.h"

@protocol SUVersionDisplay;

Expand Down
Expand Up @@ -9,7 +9,14 @@
#ifndef SPUStatusCompletionResults_h
#define SPUStatusCompletionResults_h

#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import Foundation;
#else
#import <Foundation/Foundation.h>
#endif

typedef NS_ENUM(NSUInteger, SPUUserInitiatedCheckStatus) {
SPUUserInitiatedCheckDone,
Expand Down
Expand Up @@ -6,8 +6,15 @@
// Copyright © 2016 Sparkle Project. All rights reserved.
//

#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import Foundation;
#else
#import <Foundation/Foundation.h>
#import <Sparkle/SUExport.h>
#endif
#import "SUExport.h"

NS_ASSUME_NONNULL_BEGIN

Expand Down
28 changes: 26 additions & 2 deletions Sparkle/Sparkle.framework/Versions/A/Headers/SPUUpdater.h
Expand Up @@ -6,9 +6,16 @@
// Copyright 2006 Andy Matuschak. All rights reserved.
//

#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import Foundation;
#else
#import <Foundation/Foundation.h>
#import <Sparkle/SUExport.h>
#import <Sparkle/SPUUserDriver.h>
#endif
#import "SUExport.h"
#import "SPUUserDriver.h"

NS_ASSUME_NONNULL_BEGIN

Expand Down Expand Up @@ -96,6 +103,17 @@ SU_EXPORT @interface SPUUpdater : NSObject
*/
- (void)checkForUpdateInformation;

/*!
A property indicating whether or not updates can be checked.
This property is useful for determining whether update checks can be made programatically or by the user.
An update check cannot be made when an on-going update check is in progress.
Note this property does not reflect whether or not an update itself is in progress. For example,
an update check can be done to check if there's an already started update that can be resumed.
*/
@property (nonatomic, readonly) BOOL canCheckForUpdates;

/*!
A property indicating whether or not to check for updates automatically.
Expand Down Expand Up @@ -200,6 +218,12 @@ SU_EXPORT @interface SPUUpdater : NSObject
*/
- (void)resetUpdateCycle;


/*!
The system profile information that is sent when checking for updates
*/
@property (nonatomic, readonly, copy) NSArray<NSDictionary<NSString *, NSString *> *> *systemProfileArray;

@end

NS_ASSUME_NONNULL_END
Expand Up @@ -6,8 +6,15 @@
// Copyright © 2016 Sparkle Project. All rights reserved.
//

#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import Foundation;
#else
#import <Foundation/Foundation.h>
#import <Sparkle/SUExport.h>
#endif
#import "SUExport.h"

@protocol SUVersionComparison;
@class SPUUpdater, SUAppcast, SUAppcastItem;
Expand All @@ -30,6 +37,22 @@ SU_EXPORT extern NSString *const SUUpdaterAppcastItemNotificationKey;
// Key for the SUAppcast object in the SUUpdaterDidFinishLoadingAppCastNotification userInfo
SU_EXPORT extern NSString *const SUUpdaterAppcastNotificationKey;

// -----------------------------------------------------------------------------
// System Profile Keys
// -----------------------------------------------------------------------------

SU_EXPORT extern NSString *const SUSystemProfilerApplicationNameKey;
SU_EXPORT extern NSString *const SUSystemProfilerApplicationVersionKey;
SU_EXPORT extern NSString *const SUSystemProfilerCPU64bitKey;
SU_EXPORT extern NSString *const SUSystemProfilerCPUCountKey;
SU_EXPORT extern NSString *const SUSystemProfilerCPUFrequencyKey;
SU_EXPORT extern NSString *const SUSystemProfilerCPUTypeKey;
SU_EXPORT extern NSString *const SUSystemProfilerCPUSubtypeKey;
SU_EXPORT extern NSString *const SUSystemProfilerHardwareModelKey;
SU_EXPORT extern NSString *const SUSystemProfilerMemoryKey;
SU_EXPORT extern NSString *const SUSystemProfilerOperatingSystemVersionKey;
SU_EXPORT extern NSString *const SUSystemProfilerPreferredLanguageKey;

// -----------------------------------------------------------------------------
// SPUUpdater Delegate:
// -----------------------------------------------------------------------------
Expand Down Expand Up @@ -92,6 +115,21 @@ typedef NS_ENUM(NSInteger, SPUUpdateCheck)
- (NSArray *)feedParametersForUpdater:(SPUUpdater *)updater sendingSystemProfile:(BOOL)sendingProfile;
#endif

/*!
Returns a list of system profile keys to be appended to the appcast URL's query string.
If this is unimplemented then all keys will be included.
\param updater The updater instance.
\return An array of system profile keys to include in the appcast URL's query string. Elements must be one of the SUSystemProfiler*Key constants
*/
#if __has_feature(objc_generics)
- (NSArray<NSString *> *)allowedSystemProfileKeysForUpdater:(SPUUpdater *)updater;
#else
- (NSArray *)allowedSystemProfileKeysForUpdater:(SPUUpdater *)updater;
#endif

/*!
Returns a custom appcast URL.
Expand Down
Expand Up @@ -6,8 +6,15 @@
// Copyright © 2016 Sparkle Project. All rights reserved.
//

#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import Foundation;
#else
#import <Foundation/Foundation.h>
#import <Sparkle/SUExport.h>
#endif
#import "SUExport.h"

NS_ASSUME_NONNULL_BEGIN

Expand Down

0 comments on commit e0ffd03

Please sign in to comment.