Permalink
Browse files

Add a opener app so we have something to define public.movie UTI for …

…new file types.

Refs #163.


git-svn-id: https://svn.perian.org/trunk@1126 621663c8-3916-0410-8f58-edc14a8543d5
  • Loading branch information...
astrange
astrange committed Aug 25, 2009
1 parent 297fb5a commit 1da05f542435994a631fdcbed15bfe7198a56c71
@@ -28,6 +28,7 @@
#define PERIAN_NO_BUNDLE_ID_FORMAT @"org.perian.No.Bundle.ID.%@"
#define ComponentInfoDictionaryKey @"Components"
#define AppsToRegisterDictionaryKey @"ApplicationsToRegister"
#define BundleVersionKey @"CFBundleVersion"
#define BundleIdentifierKey @"CFBundleIdentifier"
@@ -651,6 +651,23 @@ - (BOOL)installArchive:(NSString *)archivePath forPiece:(NSString *)component ty
return ret;
}
- (void)lsRegisterApps
{
NSString *resourcePath = [[self bundle] resourcePath];
NSDictionary *infoDict = [self myInfoDict];
NSDictionary *apps = [infoDict objectForKey:AppsToRegisterDictionaryKey];
NSEnumerator *appEnum = [apps objectEnumerator];
NSString *app = nil;
while ((app = [appEnum nextObject]))
{
NSURL *url = [NSURL fileURLWithPath:[resourcePath stringByAppendingPathComponent:app]];
LSRegisterURL((CFURLRef)url, true);
}
}
- (void)install:(id)sender
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
@@ -695,6 +712,9 @@ - (void)install:(id)sender
AuthorizationFree(auth, 0);
auth = nil;
}
[self lsRegisterApps];
[self performSelectorOnMainThread:@selector(installComplete:) withObject:nil waitUntilDone:NO];
[pool release];
}
Oops, something went wrong.

0 comments on commit 1da05f5

Please sign in to comment.