mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-04 09:53:41 +00:00
Fixed: ignored compiled nib file of xcodecapp when having xcodecapp folder in a XcodeCapp project
This commit is contained in:
@@ -16,7 +16,9 @@ static NSDictionary* XCCCappuccinoProjectDefaultSettings;
|
||||
static NSString * const XCCSlashReplacement = @"::";
|
||||
|
||||
static NSPredicate * XCCDirectoriesToIgnorePredicate = nil;
|
||||
static NSPredicate * XCCXcodeCappNibToIgnorePredicate = nil;
|
||||
static NSString * const XCCDirectoriesToIgnorePattern = @"^(?:Build|F(?:rameworks|oundation)|AppKit|Objective-J|(?:Browser|CommonJS)\\.environment|XcodeSupport|.+\\.xcodeproj)$";
|
||||
static NSString * const XCCXcodeCappNibToIgnorePattern = @"^/Applications/XcodeCapp.app/.*$";
|
||||
|
||||
static NSArray *XCCCappuccinoProjectDefaultIgnoredPaths = nil;
|
||||
|
||||
@@ -51,6 +53,7 @@ NSString * const XCCCappuccinoProjectLastEventIDKey = @"XCCCappuccinoPro
|
||||
NSNumber *appCompatibilityVersion = [[NSBundle mainBundle] objectForInfoDictionaryKey:XCCCompatibilityVersionKey];
|
||||
|
||||
XCCDirectoriesToIgnorePredicate = [NSPredicate predicateWithFormat:@"SELF matches %@", XCCDirectoriesToIgnorePattern];
|
||||
XCCXcodeCappNibToIgnorePredicate = [NSPredicate predicateWithFormat:@"SELF matches %@", XCCXcodeCappNibToIgnorePattern];
|
||||
|
||||
XCCCappuccinoProjectDefaultSettings = @{XCCCompatibilityVersionKey: appCompatibilityVersion,
|
||||
XCCCappuccinoProcessCappLintKey: @NO,
|
||||
@@ -129,7 +132,11 @@ NSString * const XCCCappuccinoProjectLastEventIDKey = @"XCCCappuccinoPro
|
||||
+ (BOOL)pathMatchesIgnoredPaths:(NSString*)aPath cappuccinoProjectIgnoredPathPredicates:(NSMutableArray*)cappuccinoProjectIgnoredPathPredicates
|
||||
{
|
||||
BOOL ignore = NO;
|
||||
|
||||
|
||||
// This is a bit tricky, is to avoid to fetch nib of a compiled XcodeCapp
|
||||
if ([XCCXcodeCappNibToIgnorePredicate evaluateWithObject:aPath])
|
||||
return YES;
|
||||
|
||||
for (NSDictionary *ignoreInfo in cappuccinoProjectIgnoredPathPredicates)
|
||||
{
|
||||
BOOL matches = [ignoreInfo[@"predicate"] evaluateWithObject:aPath];
|
||||
|
||||
@@ -36,7 +36,7 @@ NSString * const XCCNeedSourceToProjectPathMappingNotification = @"XCCNeedSource
|
||||
#pragma mark - Utilities
|
||||
|
||||
- (NSArray *)_findSourceFilesAtProjectPath:(NSString *)aProjectPath
|
||||
{
|
||||
{
|
||||
NSError *error = NULL;
|
||||
NSString *projectPath = [self.cappuccinoProject.projectPath stringByAppendingPathComponent:aProjectPath];
|
||||
NSFileManager *fm = [NSFileManager defaultManager];
|
||||
@@ -105,9 +105,8 @@ NSString * const XCCNeedSourceToProjectPathMappingNotification = @"XCCNeedSource
|
||||
}
|
||||
|
||||
NSLog(@"%@: found directory. checking for source files: %@", self.cappuccinoProject.name, filename);
|
||||
|
||||
if (![XCCCappuccinoProject pathMatchesIgnoredPaths:realPath cappuccinoProjectIgnoredPathPredicates:self.cappuccinoProject.ignoredPathPredicates])
|
||||
[sourcePaths addObjectsFromArray:[self _findSourceFilesAtProjectPath:projectRelativePath]];
|
||||
|
||||
[sourcePaths addObjectsFromArray:[self _findSourceFilesAtProjectPath:projectRelativePath]];
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user