mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-22 04:30:47 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e9334fec2b |
No files matched your search
Vendored
+15
@@ -86,6 +86,21 @@ static const NSTimeInterval SUAutomaticUpdatePromptImpatienceTimer = 60 * 60 * 2
|
||||
|
||||
[updaterDelegate updater:self.updater willInstallUpdateOnQuit:self.updateItem immediateInstallationInvocation:invocation];
|
||||
}
|
||||
//For Swift
|
||||
else if ([updaterDelegate respondsToSelector:@selector(updater: willInstallUpdateOnQuit:immediateInstallationBlock:)])
|
||||
{
|
||||
BOOL relaunch = YES;
|
||||
BOOL showUI = NO;
|
||||
NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:[[self class] instanceMethodSignatureForSelector:@selector(installWithToolAndRelaunch:displayingUserInterface:)]];
|
||||
[invocation setSelector:@selector(installWithToolAndRelaunch:displayingUserInterface:)];
|
||||
[invocation setArgument:&relaunch atIndex:2];
|
||||
[invocation setArgument:&showUI atIndex:3];
|
||||
[invocation setTarget:self];
|
||||
|
||||
[updaterDelegate updater:self.updater willInstallUpdateOnQuit:self.updateItem immediateInstallationBlock:^{
|
||||
[invocation invoke];
|
||||
}];
|
||||
}
|
||||
|
||||
// If this is marked as a critical update, we'll prompt the user to install it right away.
|
||||
if ([self.updateItem isCriticalUpdate])
|
||||
|
||||
Vendored
+9
@@ -345,6 +345,15 @@ SU_EXPORT extern NSString *const SUUpdaterAppcastNotificationKey;
|
||||
*/
|
||||
- (void)updater:(SUUpdater *)updater willInstallUpdateOnQuit:(SUAppcastItem *)item immediateInstallationInvocation:(NSInvocation *)invocation;
|
||||
|
||||
/*!
|
||||
Called when an update is scheduled to be silentyl installed on quit. Swift compatible.
|
||||
|
||||
\param updater the SUUpdater instance.
|
||||
\param item The appcast item corresponding to the udpate that is proposed to be installed.
|
||||
\param restartBlock Can be used to trigger an immediate silent install and relaunch.
|
||||
*/
|
||||
- (void)updater:(SUUpdater *)updater willInstallUpdateOnQuit:(SUAppcastItem *)item immediateInstallationBlock:(void (^)()) restartBlock;
|
||||
|
||||
/*!
|
||||
Calls after an update that was scheduled to be silently installed on quit has been canceled.
|
||||
|
||||
|
||||
Reference in new issue
Block a user