mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-25 04:47:55 +00:00
Fixes 253187
Added a delegate method called pathToRelaunchForUpdater: which can be used for plugins to provide the path which should be used when relaunching the client after installing an update.
This commit is contained in:
1 parent
d1c0978ee5
commit
e249e3cfb6
2 files changed
+7
-1
No files matched your search
@@ -265,7 +265,10 @@
|
||||
return;
|
||||
}
|
||||
|
||||
[NSTask launchedTaskWithLaunchPath:relaunchPath arguments:[NSArray arrayWithObjects:[host bundlePath], [NSString stringWithFormat:@"%d", [[NSProcessInfo processInfo] processIdentifier]], nil]];
|
||||
NSString *pathToRelaunch = [host bundlePath];
|
||||
if ([[updater delegate] respondsToSelector:@selector(pathToRelaunchForUpdater:)])
|
||||
pathToRelaunch = [[updater delegate] pathToRelaunchForUpdater:updater];
|
||||
[NSTask launchedTaskWithLaunchPath:relaunchPath arguments:[NSArray arrayWithObjects:pathToRelaunch, [NSString stringWithFormat:@"%d", [[NSProcessInfo processInfo] processIdentifier]], nil]];
|
||||
|
||||
[NSApp terminate:self];
|
||||
}
|
||||
|
||||
@@ -89,6 +89,9 @@
|
||||
// If you don't implement this method or return nil, the standard version comparator will be used.
|
||||
- (id <SUVersionComparison>)versionComparatorForUpdater:(SUUpdater *)updater;
|
||||
|
||||
// Returns the path which is used to relaunch the client after the update is installed. By default, the path of the host bundle.
|
||||
- (NSString *)pathToRelaunchForUpdater:(SUUpdater *)updater;
|
||||
|
||||
@end
|
||||
|
||||
// Define some minimum intervals to avoid DOS-like checking attacks. These are in seconds.
|
||||
|
||||
Reference in new issue
Block a user