Skip to content

Commit

Permalink
Create support sources folder if necessary.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tancred committed Jun 8, 2012
1 parent 7ccd6f8 commit 56c0f7f
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Tools/XcodeCapp/TNXCodeCapp.m
Expand Up @@ -460,14 +460,23 @@ - (BOOL)prepareXCodeSupportProject
[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
Expand Down

0 comments on commit 56c0f7f

Please sign in to comment.