Skip to content

Commit

Permalink
Merge upstream 2.x into HEAD, preparing to remerge with latest change…
Browse files Browse the repository at this point in the history
…s on my branch.

* commit '362f50a8a19cfb1a18202c5912ce4ce6f94d0190': (60 commits)
  Exit with an error if generate_appcast cannot sign an update (sparkle-project#2322)
  Update SUVersionDisplay to allow including build versions and update information (sparkle-project#2321)
  Update Package management files for version 2.3.2
  Update CHANGELOG for 2.3.2
  Remove unnecessary min macro checks (sparkle-project#2318)
  Add support for plain text release notes view (sparkle-project#2315)
  Don't construct appcast item if enclosure URL is invalid (sparkle-project#2317)
  Finnish localization grammar fixes (sparkle-project#2311)
  Reduce code size and make codebase more consistent (sparkle-project#2305)
  Add delegate method to hide showing version history option (sparkle-project#2303)
  Update Package management files for version 2.3.1
  Update CHANGELOG for 2.3.1
  Add deprecations/warnings for incorrect feed & update checking usage (sparkle-project#2295)
  Log the URL that failed to download correctly (sparkle-project#2296)
  Remove duplicate Sparkle localization strings in Updater app (sparkle-project#2288)
  Ask permission for automatically downloading and installing new updates (sparkle-project#2285)
  Upgrade CI to default to using Xcode 14.1 (sparkle-project#2287)
  Enable deployment post processing for Release configurations (sparkle-project#2286)
  Fix update permission alert title text overlapping with question text (sparkle-project#2284)
  Update Czech translation (sparkle-project#2275)
  ...
  • Loading branch information
danielpunkass committed Feb 27, 2023
2 parents 0eb5512 + 362f50a commit 4bf361d
Show file tree
Hide file tree
Showing 292 changed files with 12,187 additions and 4,097 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ jobs:
build:
strategy:
matrix:
xcode: ['xcode12.5.1', 'xcode13.3.1']
xcode: ['xcode14.1', 'xcode13.4.1']
include:
- xcode: 'xcode13.3.1'
xcode-path: '/Applications/Xcode_13.3.1.app/Contents/Developer'
upload-dist: true
- xcode: 'xcode13.4.1'
xcode-path: '/Applications/Xcode_13.4.1.app/Contents/Developer'
upload-dist: false
run-analyzer: true
macos: 'macos-12'
- xcode: 'xcode12.5.1'
xcode-path: '/Applications/Xcode_12.5.1.app/Contents/Developer'
upload-dist: false
- xcode: 'xcode14.1'
xcode-path: '/Applications/Xcode_14.1.app/Contents/Developer'
upload-dist: true
run-analyzer: false
macos: 'macos-11'
macos: 'macos-12'

name: Build and Test Sparkle
runs-on: ${{ matrix.macos }}
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/create-draft-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: "Create Draft Release"

env:
BUILDDIR: "build"
DEVELOPER_DIR: "/Applications/Xcode_13.3.1.app/Contents/Developer"
DEVELOPER_DIR: "/Applications/Xcode_14.1.app/Contents/Developer"

on:
workflow_dispatch:
Expand Down Expand Up @@ -33,7 +33,7 @@ jobs:

steps:
- name: "Checkout sources"
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
token: ${{ secrets.BOT_PERSONAL_ACCESS_TOKEN }}
submodules: true
Expand Down Expand Up @@ -90,6 +90,7 @@ jobs:
with:
draft: true
prerelease: ${{ env.PRERELEASE_VERSION }}
target_commitish: ${{ github.ref_name }}
name: "${{ github.event.inputs.marketingVersion }}${{ github.event.inputs.prereleaseSuffix }}"
tag_name: "${{ github.event.inputs.marketingVersion }}${{ github.event.inputs.prereleaseSuffix }}"
fail_on_unmatched_files: true
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "Vendor/ed25519"]
path = Vendor/ed25519
url = https://github.com/danielpunkass/ed25519
2 changes: 1 addition & 1 deletion Autoupdate/AgentConnection.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ NS_ASSUME_NONNULL_BEGIN

@protocol SPUInstallerAgentProtocol;

@interface AgentConnection : NSObject
SPU_OBJC_DIRECT_MEMBERS @interface AgentConnection : NSObject

- (instancetype)initWithHostBundleIdentifier:(NSString *)bundleIdentifier delegate:(id<AgentConnectionDelegate>)delegate;

Expand Down
52 changes: 27 additions & 25 deletions Autoupdate/AgentConnection.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,16 @@

@interface AgentConnection () <NSXPCListenerDelegate, SUInstallerAgentInitiationProtocol>

@property (nonatomic) NSXPCListener *xpcListener;
@property (nonatomic, nullable) NSXPCConnection *activeConnection;
@property (nonatomic, nullable) id<SPUInstallerAgentProtocol> agent;
@property (nonatomic, weak) id<AgentConnectionDelegate> delegate;
@property (nonatomic) BOOL connected;

@end

@implementation AgentConnection
{
NSXPCListener *_xpcListener;
NSXPCConnection *_activeConnection;
__weak id<AgentConnectionDelegate> _delegate;
}

@synthesize xpcListener = _xpcListener;
@synthesize activeConnection = _activeConnection;
@synthesize agent = _agent;
@synthesize delegate = _delegate;
@synthesize connected = _connected;
@synthesize invalidationError = _invalidationError;

Expand All @@ -48,23 +44,23 @@ - (instancetype)initWithHostBundleIdentifier:(NSString *)bundleIdentifier delega

- (void)startListener
{
[self.xpcListener resume];
[_xpcListener resume];
}

- (void)invalidate
{
self.delegate = nil;
_delegate = nil;

[self.activeConnection invalidate];
self.activeConnection = nil;
[_activeConnection invalidate];
_activeConnection = nil;

[self.xpcListener invalidate];
self.xpcListener = nil;
[_xpcListener invalidate];
_xpcListener = nil;
}

- (BOOL)listener:(NSXPCListener *)__unused listener shouldAcceptNewConnection:(NSXPCConnection *)newConnection
{
if (self.activeConnection != nil) {
if (_activeConnection != nil) {
[newConnection invalidate];
return NO;
}
Expand All @@ -74,35 +70,41 @@ - (BOOL)listener:(NSXPCListener *)__unused listener shouldAcceptNewConnection:(N

newConnection.remoteObjectInterface = [NSXPCInterface interfaceWithProtocol:@protocol(SPUInstallerAgentProtocol)];

self.activeConnection = newConnection;
_activeConnection = newConnection;

__weak AgentConnection *weakSelf = self;
__weak __typeof__(self) weakSelf = self;
newConnection.interruptionHandler = ^{
dispatch_async(dispatch_get_main_queue(), ^{
[weakSelf.activeConnection invalidate];
__typeof__(self) strongSelf = weakSelf;
if (strongSelf != nil) {
[strongSelf->_activeConnection invalidate];
}
});
};

newConnection.invalidationHandler = ^{
dispatch_async(dispatch_get_main_queue(), ^{
[weakSelf.delegate agentConnectionDidInvalidate];
__typeof__(self) strongSelf = weakSelf;
if (strongSelf != nil) {
[strongSelf->_delegate agentConnectionDidInvalidate];
}
});
};

[newConnection resume];

self.agent = newConnection.remoteObjectProxy;
_agent = newConnection.remoteObjectProxy;

return YES;
}

- (void)connectionDidInitiateWithReply:(void (^)(void))acknowledgement
{
dispatch_async(dispatch_get_main_queue(), ^{
self.connected = YES;
self->_connected = YES;

[self.delegate agentConnectionDidInitiate];
self.delegate = nil;
[self->_delegate agentConnectionDidInitiate];
self->_delegate = nil;
});

acknowledgement();
Expand All @@ -111,7 +113,7 @@ - (void)connectionDidInitiateWithReply:(void (^)(void))acknowledgement
- (void)connectionWillInvalidateWithError:(NSError *)error
{
dispatch_async(dispatch_get_main_queue(), ^{
self.invalidationError = error;
self->_invalidationError = error;
});
}

Expand Down
2 changes: 1 addition & 1 deletion Autoupdate/AppInstaller.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

NS_ASSUME_NONNULL_BEGIN

@interface AppInstaller : NSObject
SPU_OBJC_DIRECT_MEMBERS @interface AppInstaller : NSObject

- (instancetype)initWithHostBundleIdentifier:(NSString *)hostBundleIdentifier homeDirectory:(NSString *)homeDirectory userName:(NSString *)userName;

Expand Down
Loading

0 comments on commit 4bf361d

Please sign in to comment.