mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-24 04:38:16 +00:00
Add ability to override update installation process.
This commit is contained in:
1 parent
3c7b0805e1
commit
8a4578fe4d
2 files changed
+11
No files matched your search
@@ -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"];
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user