From 072a73b3754ae98e9330b9f2319bf95370283121 Mon Sep 17 00:00:00 2001 From: David Smith Date: Tue, 13 May 2008 23:31:58 -0700 Subject: [PATCH] Run mdimport on bundles after installing them --- SUInstaller.m | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/SUInstaller.m b/SUInstaller.m index 612562d1..2955806d 100644 --- a/SUInstaller.m +++ b/SUInstaller.m @@ -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]; }