diff --git a/Tools/xcodecapp-cocoa/AppController.h b/Tools/xcodecapp-cocoa/AppController.h index 64c5db989..9d604d25a 100644 --- a/Tools/xcodecapp-cocoa/AppController.h +++ b/Tools/xcodecapp-cocoa/AppController.h @@ -35,7 +35,6 @@ IBOutlet NSMenuItem *menuItemOpenXCode; NSFileManager *fm; - NSMutableArray *modifiedSources; NSMutableArray *modifiedXIBs; NSMutableDictionary *pathModificationDates; NSDate *appStartedTimestamp; diff --git a/Tools/xcodecapp-cocoa/AppController.m b/Tools/xcodecapp-cocoa/AppController.m index 9bc39a4e7..7113c88de 100644 --- a/Tools/xcodecapp-cocoa/AppController.m +++ b/Tools/xcodecapp-cocoa/AppController.m @@ -50,7 +50,6 @@ void fsevents_callback(ConstFSEventStreamRef streamRef, void *userData, size_t n [GrowlApplicationBridge setGrowlDelegate:growlDelegateRef]; fm = [NSFileManager defaultManager]; - modifiedSources = [NSMutableArray new]; modifiedXIBs = [NSMutableArray new]; ignoredFilePaths = [NSMutableArray new]; parserPath = [[NSBundle mainBundle] pathForResource:@"parser" ofType:@"j"]; @@ -202,7 +201,7 @@ void fsevents_callback(ConstFSEventStreamRef streamRef, void *userData, size_t n if ([self isXIBFile:fullPath]) { - NSLog(@"nib2cib %@", fullPath); + NSLog(@"running command nib2cib %@", fullPath); //Create the nib2cib task arguments = [NSArray arrayWithObjects: @"-c", @@ -211,10 +210,9 @@ void fsevents_callback(ConstFSEventStreamRef streamRef, void *userData, size_t n } else if ([self isObjJFile:fullPath]) { - [modifiedSources addObject:fullPath]; - - NSString *shadowPath = [[self shadowURLForSourceURL:[NSURL URLWithString:fullPath]] path]; - NSLog(@"objj %@", shadowPath); + NSLog(@"Full path string is: %@", [fullPath stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]); + NSString *shadowPath = [[self shadowURLForSourceURL:[NSURL URLWithString:[fullPath stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]] path]; + NSLog(@"running command objj %@", shadowPath); //Create the objj task arguments = [NSArray arrayWithObjects: @"-c", [NSString stringWithFormat:@"(%@; objj '%@' '%@' '%@';) 2>&1", _profilePath, parserPath, fullPath, shadowPath],@"",nil]; @@ -357,13 +355,13 @@ void fsevents_callback(ConstFSEventStreamRef streamRef, void *userData, size_t n - (NSURL*)shadowURLForSourceURL:(NSURL*)aSourceURL { NSMutableString *flattenedPath = [NSMutableString stringWithString:[aSourceURL path]]; - + NSLog(@"Flattened path is : %@", flattenedPath); [flattenedPath replaceOccurrencesOfString:@"/" withString:@"_" options:NSCaseInsensitiveSearch range:NSMakeRange(0, [[aSourceURL path] length])]; - NSString *basename = [NSString stringWithFormat:@"%@.h", [flattenedPath stringByDeletingPathExtension]]; + NSString *basename = [NSString stringWithFormat:@"%@.h", [[flattenedPath stringByDeletingPathExtension] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; return [NSURL URLWithString:basename relativeToURL:XCodeSupportProjectSources]; }