diff --git a/Sparkle/SUInstaller.m b/Sparkle/SUInstaller.m index 7b75194d..47f796b6 100644 --- a/Sparkle/SUInstaller.m +++ b/Sparkle/SUInstaller.m @@ -162,10 +162,24 @@ static NSString *sUpdateFolder = nil; } } ++ (void)registerWithLaunchServices:(NSString *)installationPath +{ + NSURL* installationURL = [NSURL fileURLWithPath:(NSString*)installationPath]; + if (installationURL != nil) + { + OSStatus registerStatus = LSRegisterURL((__bridge CFURLRef)installationURL,true); + if (registerStatus != noErr) + { + SULog(@"Error: LSRegisterURL returned %d", registerStatus); + } + } +} + + (void)finishInstallationToPath:(NSString *)installationPath withResult:(BOOL)result host:(SUHost *)host error:(NSError *)error delegate:(id)delegate { if (result) { + [self registerWithLaunchServices:installationPath]; [self mdimportInstallationPath:installationPath]; if ([delegate respondsToSelector:@selector(installerFinishedForHost:)]) { dispatch_async(dispatch_get_main_queue(), ^{