Compare commits

...
2 Commits
3 changed files with 11 additions and 4 deletions

No files matched your search

+1
View File
@@ -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;
+7 -3
View File
@@ -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]],
+3 -1
View File
@@ -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.