Add ability to override update installation process.

This commit is contained in:
Vera Tkachenko authored and Dmytro Tretiakov committed 2014-07-30 16:14:34 +03:00
1 parent 3c7b0805e1
commit 8a4578fe4d
2 files changed
+11

No files matched your search

+8
View File
@@ -375,6 +375,14 @@ NSArray *SUGetAllDevMateURLHosts(void)
if ([[updater delegate] respondsToSelector:@selector(updater:willInstallUpdate:)])
[[updater delegate] updater:updater willInstallUpdate:updateItem];
if ([[updater delegate] respondsToSelector:@selector(updater:overrideInstallUpdate:downloadPath:)])
{
if ([[updater delegate] updater:updater overrideInstallUpdate:updateItem downloadPath:tempDir])
{
return;
}
}
// Copy the relauncher into a temporary directory so we can get to it after the new version's installed.
NSString *relaunchPathToCopy = [SPARKLE_BUNDLE pathForResource:@"finish_installation" ofType:@"app"];
+3
View File
@@ -110,6 +110,9 @@
// Sent immediately before installing the specified update.
- (void)updater:(SUUpdater *)updater willInstallUpdate:(SUAppcastItem *)update;
// Override to handle update manually
- (BOOL)updater:(SUUpdater *)updater overrideInstallUpdate:(SUAppcastItem *)update downloadPath:(NSString *)downloadPath;
// Return YES to delay the relaunch until you do some processing; invoke the given NSInvocation to continue.
// This is not called if the user didn't relaunch on the previous update, in that case it will immediately
// restart.