Fixed mpcdec framework settings to get it to compile in debug configuration on case-sensitive FS. (Modified case from MPCDec to mpcdec, as I already did for release configuration).

CQTexperiment
matthewleon 2008-02-12 10:30:32 +00:00
parent ca76dbab7d
commit a5c8447b8d
5 changed files with 756 additions and 749 deletions

View File

@ -283,7 +283,7 @@
HEADER_SEARCH_PATHS = Files/include/;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "@loader_path/../Frameworks";
PRODUCT_NAME = MPCDec;
PRODUCT_NAME = mpcdec;
WRAPPER_EXTENSION = framework;
ZERO_LINK = YES;
};

File diff suppressed because it is too large Load Diff

View File

@ -16,6 +16,7 @@
}
+(SpotlightPlaylistEntry *)playlistEntryWithMetadataItem:(NSMetadataItem *)metadataItem;
+ (NSArray *)allmdKeys;
@property(copy) NSNumber *length;
@end

View File

@ -20,7 +20,7 @@ static NSArray * extramdKeys;
// allmdKeys is a combined array of both mdKeys and entryKeys
static NSArray * allmdKeys;
// And the dictionary that matches them
// tags matches mdKeys and entryKeys for automated extraction
static NSDictionary * tags;
@implementation SpotlightPlaylistEntry
@ -51,6 +51,12 @@ static NSDictionary * tags;
tags = [NSDictionary dictionaryWithObjects:entryKeys forKeys:mdKeys];
}
// Use this to access the array of all the keys we want.
+ (NSArray *)allmdKeys
{
return allmdKeys;
}
+ (SpotlightPlaylistEntry *)playlistEntryWithMetadataItem:(NSMetadataItem *)metadataItem
{
// use the matching tag sets to generate a playlist entry
@ -65,6 +71,7 @@ static NSDictionary * tags;
[entry setURL: [NSURL fileURLWithPath: [songAttributes objectForKey:@"kMDItemPath"]]];
// Authors is an array, but we only care about the first item in it
[entry setArtist: [[songAttributes objectForKey:@"kMDItemAuthors"] objectAtIndex:0]];
return entry;
}

View File

@ -22,13 +22,14 @@ static NSPredicate * musicOnlyPredicate = nil;
@"kMDItemContentTypeTree==\'public.audio\'"] retain];
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
// Set the home directory as the default search directory
NSString * homeDir = @"~";
homeDir = [homeDir stringByExpandingTildeInPath];
homeDir = [[NSURL fileURLWithPath:homeDir isDirectory:YES] absoluteString];
NSDictionary *searchDefault =
[NSDictionary dictionaryWithObject:homeDir
forKey:@"spotlightSearchPath"];
[defaults registerDefaults:searchDefault];
}
@ -46,11 +47,14 @@ static NSPredicate * musicOnlyPredicate = nil;
{
unsigned options = (NSCaseInsensitivePredicateOption|
NSDiacriticInsensitivePredicateOption);
// Set scope to contents of pathControl
[self.query setSearchScopes:[NSArray arrayWithObjects:pathControl.URL, nil]];
NSString *processedKey = [NSString stringWithFormat: @"*%@*", self.searchString];
NSPredicate *searchPredicate = [NSComparisonPredicate
predicateWithLeftExpression:[NSExpression expressionForKeyPath:@"*"]
predicateWithLeftExpression:[NSExpression expressionForKeyPath:@"kMDItemAuthors"]
rightExpression:[NSExpression expressionForConstantValue:processedKey]
modifier:NSDirectPredicateModifier
type:NSLikePredicateOperatorType