Add static container types to Info.plist generator stub
parent
9085cf18df
commit
f9ace87319
|
@ -361,11 +361,27 @@ static PluginController *sharedPluginController = nil;
|
|||
|
||||
[stringList addObject:plistHeader];
|
||||
|
||||
// These aren't handled by decoders, but as containers
|
||||
NSArray * staticTypes = @[
|
||||
@[@"M3U Playlist File", @"m3u.icns", @"m3u", @"m3u8"],
|
||||
@[@"PLS Playlist File", @"pls.icns", @"pls"],
|
||||
@[@"RAR Archive of SPC Files", @"vg.icns", @"rsn"],
|
||||
@[@"7Z Archive of VGM Files", @"vg.icns", @"vgm7z"]
|
||||
];
|
||||
|
||||
NSMutableArray * assocTypes = [[NSMutableArray alloc] init];
|
||||
|
||||
[assocTypes addObjectsFromArray:staticTypes];
|
||||
|
||||
for (NSString * decoderString in decodersRegistered) {
|
||||
Class decoder = NSClassFromString(decoderString);
|
||||
if (decoder && [decoder respondsToSelector:@selector(fileTypeAssociations)]) {
|
||||
NSArray * types = [decoder fileTypeAssociations];
|
||||
for (NSArray * type in types) {
|
||||
[assocTypes addObjectsFromArray:types];
|
||||
}
|
||||
}
|
||||
|
||||
for (NSArray * type in assocTypes) {
|
||||
[stringList addObject:@"\t\t<dict>\n\
|
||||
\t\t\t<key>CFBundleTypeExtensions</key>\n\
|
||||
\t\t\t<array>\n\
|
||||
|
@ -390,8 +406,6 @@ static PluginController *sharedPluginController = nil;
|
|||
\t\t\t<false/>\n\
|
||||
\t\t</dict>\n"];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[stringList addObject:plistFooter];
|
||||
|
||||
|
|
Loading…
Reference in New Issue