From 56c0f7f6f12e7f4640d5b3b904fb89d665f7f5fb Mon Sep 17 00:00:00 2001 From: Malte Tancred Date: Fri, 8 Jun 2012 13:21:47 +0200 Subject: [PATCH 1/2] Create support sources folder if necessary. Make sure the the xCodeSupport/Sources folder is always present. The objj tool will fail if it's missing. The Sources folder could be missing if it's not checked into a repos for example. --- Tools/XcodeCapp/TNXCodeCapp.m | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Tools/XcodeCapp/TNXCodeCapp.m b/Tools/XcodeCapp/TNXCodeCapp.m index ffe2d1cab..2ecee5fdc 100644 --- a/Tools/XcodeCapp/TNXCodeCapp.m +++ b/Tools/XcodeCapp/TNXCodeCapp.m @@ -460,14 +460,23 @@ NSString * const XCCListeningStartNotification = @"XCCListeningStartNotification [PBXContent writeToFile:XCodeSupportPBXPath atomically:YES encoding:NSUTF8StringEncoding error:nil]; DLog(@"PBX file adapted to the project"); - DLog(@"Creating source folder %@", [XCodeSupportProjectSources path]); - [fm createDirectoryAtPath:[XCodeSupportProjectSources path] withIntermediateDirectories:YES attributes:nil error:nil]; + [self createXcodeSupportProjectSourcesDirIfNecessary]; return NO; } + [self createXcodeSupportProjectSourcesDirIfNecessary]; return YES; } +/*! + Create the xCodeSupport/Sources folder if necessary. + */ +- (void)createXcodeSupportProjectSourcesDirIfNecessary { + if ([fm fileExistsAtPath:[XCodeSupportProjectSources path]]) return; + DLog(@"Creating source folder %@", [XCodeSupportProjectSources path]); + [fm createDirectoryAtPath:[XCodeSupportProjectSources path] withIntermediateDirectories:YES attributes:nil error:nil]; +} + /*! Initialize the creation of the .xCodeSupport project. This Operation is threaded From 52fff2056b5d6cd2908c8e646548c0fa02a5adda Mon Sep 17 00:00:00 2001 From: Malte Tancred Date: Tue, 12 Jun 2012 17:44:17 +0200 Subject: [PATCH 2/2] Fixed code standard issues. --- Tools/XcodeCapp/TNXCodeCapp.m | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Tools/XcodeCapp/TNXCodeCapp.m b/Tools/XcodeCapp/TNXCodeCapp.m index 2ecee5fdc..5558f9e22 100644 --- a/Tools/XcodeCapp/TNXCodeCapp.m +++ b/Tools/XcodeCapp/TNXCodeCapp.m @@ -469,10 +469,13 @@ NSString * const XCCListeningStartNotification = @"XCCListeningStartNotification } /*! - Create the xCodeSupport/Sources folder if necessary. + Create the .xCodeSupport/Sources folder if necessary. */ -- (void)createXcodeSupportProjectSourcesDirIfNecessary { - if ([fm fileExistsAtPath:[XCodeSupportProjectSources path]]) return; +- (void)createXcodeSupportProjectSourcesDirIfNecessary +{ + if ([fm fileExistsAtPath:[XCodeSupportProjectSources path]]) + return; + DLog(@"Creating source folder %@", [XCodeSupportProjectSources path]); [fm createDirectoryAtPath:[XCodeSupportProjectSources path] withIntermediateDirectories:YES attributes:nil error:nil]; }