mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-24 04:38:16 +00:00
Run mdimport on bundles after installing them
This commit is contained in:
1 parent
8dfd93e1c3
commit
072a73b375
1 file changed
+9
@@ -60,10 +60,19 @@ NSString *SUInstallerDelegateKey = @"SUInstallerDelegate";
|
||||
}
|
||||
}
|
||||
|
||||
+ (void)_mdimportBundle:(NSBundle *)bundle
|
||||
{
|
||||
NSTask *mdimport = [[[NSTask alloc] init] autorelease];
|
||||
[mdimport setLaunchPath:@"/usr/bin/mdimport"];
|
||||
[mdimport setArguments:[NSArray arrayWithObject:[bundle bundlePath]]];
|
||||
[mdimport launch];
|
||||
}
|
||||
|
||||
+ (void)_finishInstallationWithResult:(BOOL)result hostBundle:(NSBundle *)hostBundle error:(NSError *)error delegate:delegate
|
||||
{
|
||||
if (result == YES)
|
||||
{
|
||||
[self _mdimportBundle:hostBundle];
|
||||
if ([delegate respondsToSelector:@selector(installerFinishedForHostBundle:)])
|
||||
[delegate installerFinishedForHostBundle:hostBundle];
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user