Run mdimport on bundles after installing them

This commit is contained in:
David Smith committed 2008-05-13 23:31:58 -07:00
1 parent 8dfd93e1c3
commit 072a73b375
1 file changed
+9
+9
View File
@@ -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];
}