diff --git a/SUBasicUpdateDriver.m b/SUBasicUpdateDriver.m index 42263cb6..7ae244d6 100644 --- a/SUBasicUpdateDriver.m +++ b/SUBasicUpdateDriver.m @@ -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]; } diff --git a/SUUpdater.h b/SUUpdater.h index 27aa38af..cdf3d066 100644 --- a/SUUpdater.h +++ b/SUUpdater.h @@ -89,6 +89,9 @@ // If you don't implement this method or return nil, the standard version comparator will be used. - (id )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.