mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-23 04:34:27 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b1894ca7c2 | ||
|
|
b66d700677 |
No files matched your search
Vendored
+1
@@ -31,6 +31,7 @@ SU_EXPORT @interface SUAppcastItem : NSObject
|
||||
@property (copy, readonly) NSString *displayVersionString;
|
||||
@property (copy, readonly) NSDictionary *deltaUpdates;
|
||||
@property (strong, readonly) NSURL *infoURL;
|
||||
@property (strong) NSString *localInstallationPath;
|
||||
|
||||
// Initializes with data from a dictionary provided by the RSS class.
|
||||
- (instancetype)initWithDictionary:(NSDictionary *)dict;
|
||||
|
||||
Vendored
+7
-3
@@ -371,6 +371,8 @@
|
||||
NSError *reason = [NSError errorWithDomain:SUSparkleErrorDomain code:SUUnarchivingError userInfo:@{NSLocalizedDescriptionKey: @"Failed to extract update."}];
|
||||
[self unarchiverDidFailWithError:reason];
|
||||
} else {
|
||||
self.updateItem.localInstallationPath = self.downloadPath.stringByDeletingLastPathComponent;
|
||||
|
||||
[unarchiver unarchiveWithCompletionBlock:^(NSError *err){
|
||||
if (err) {
|
||||
[self unarchiverDidFailWithError:err];
|
||||
@@ -493,9 +495,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ([updaterDelegate respondsToSelector:@selector(updater:willInstallUpdate:)]) {
|
||||
[updaterDelegate updater:self.updater willInstallUpdate:self.updateItem];
|
||||
BOOL continueInstall = [updaterDelegate updater:self.updater willInstallUpdate:self.updateItem];
|
||||
if (!continueInstall) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
NSBundle *sparkleBundle = updater.sparkleBundle;
|
||||
@@ -580,7 +584,7 @@
|
||||
pathToRelaunch = delegateRelaunchPath;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[NSTask launchedTaskWithLaunchPath:relaunchToolPath arguments:@[[self.host bundlePath],
|
||||
pathToRelaunch,
|
||||
[NSString stringWithFormat:@"%d", [[NSProcessInfo processInfo] processIdentifier]],
|
||||
|
||||
Vendored
+3
-1
@@ -181,8 +181,10 @@ SU_EXPORT extern NSString *const SUUpdaterAppcastNotificationKey;
|
||||
|
||||
\param updater The SUUpdater instance.
|
||||
\param item The appcast item corresponding to the update that is proposed to be installed.
|
||||
|
||||
\return \c NO to prevent any further action. item.localInstallationPath provides the path to the download and extracted archive and any custom actions can be taken at this point.
|
||||
*/
|
||||
- (void)updater:(SUUpdater *)updater willInstallUpdate:(SUAppcastItem *)item;
|
||||
- (BOOL)updater:(SUUpdater *)updater willInstallUpdate:(SUAppcastItem *)item;
|
||||
|
||||
/*!
|
||||
Returns whether the relaunch should be delayed in order to perform other tasks.
|
||||
|
||||
Reference in new issue
Block a user