Last active
December 16, 2015 17:39
-
-
Save kellysutton/5471922 to your computer and use it in GitHub Desktop.
Magic sauce
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSString *pathToRelaunch = [host bundlePath]; | |
if ([[updater delegate] respondsToSelector:@selector(pathToRelaunchForUpdater:)]) | |
pathToRelaunch = [[updater delegate] pathToRelaunchForUpdater:updater]; | |
NSString *relaunchToolPath = [relaunchPath stringByAppendingPathComponent: @"/Contents/MacOS/finish_installation"]; | |
[NSTask launchedTaskWithLaunchPath: relaunchToolPath arguments:[NSArray arrayWithObjects:[host bundlePath], pathToRelaunch, [NSString stringWithFormat:@"%d", [[NSProcessInfo processInfo] processIdentifier]], tempDir, relaunch ? @"1" : @"0", nil]]; | |
[NSApp terminate:self]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment