Skip to content

Commit

Permalink
Add fix nib model placement in group
Browse files Browse the repository at this point in the history
  • Loading branch information
gcasa committed Sep 21, 2024
1 parent 066a3d2 commit 3f248b6
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Tools/pc2xc/main.m
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@
PBXGroup *group = AUTORELEASE([[PBXGroup alloc] init]);
NSString *type = typeForProjectType(projectType);
NSString *ext = [PBXFileReference extForFileType: type];
NSString *path = [projectName stringByAppendingPathExtension: ext];
NSString *path = (ext == nil || [ext isEqualToString: @""]) ? projectName :
[projectName stringByAppendingPathExtension: ext];
PBXFileReference *productFileRef = AUTORELEASE([[PBXFileReference alloc] initWithPath: path]);
NSMutableArray *children = [NSMutableArray arrayWithObject: productFileRef];

Expand Down Expand Up @@ -120,10 +121,10 @@ void buildPhase(NSArray *items, PBXBuildPhase *phase)
PBXResourcesBuildPhase *resourcePhase = AUTORELEASE([[PBXResourcesBuildPhase alloc] init]);
buildPhase(resources, resourcePhase);

PBXFrameworksBuildPhase *frameworksPhase = AUTORELEASE([[PBXFrameworksBuildPhase alloc] init]);
buildPhase(frameworks, frameworksPhase);
// PBXFrameworksBuildPhase *frameworksPhase = AUTORELEASE([[PBXFrameworksBuildPhase alloc] init]);
// buildPhase(frameworks, frameworksPhase);

NSMutableArray *phases = [NSMutableArray arrayWithObjects: sourcePhase, resourcePhase, frameworksPhase, nil];
NSMutableArray *phases = [NSMutableArray arrayWithObjects: sourcePhase, resourcePhase, nil]; // frameworksPhase, nil];
[target setBuildPhases: phases];
[result addObject: target];

Expand All @@ -146,7 +147,10 @@ void buildPhase(NSArray *items, PBXBuildPhase *phase)
XCBuildConfiguration *buildConfigRelease = AUTORELEASE([[XCBuildConfiguration alloc] initWithName: @"Release"]);
NSMutableArray *configArray = [NSMutableArray arrayWithObjects: buildConfigDebug, buildConfigRelease, nil];
XCConfigurationList *configList = AUTORELEASE([[XCConfigurationList alloc] initWithConfigurations: configArray]);

// Add all files to the main group...
[allFiles addObjectsFromArray: other];
[allFiles addObjectsFromArray: resources];

// Set up groups...
PBXGroup *productRefGroup = productReferenceGroup(projectName, projectType); // AUTORELEASE([[PBXGroup alloc] init]);
Expand Down

0 comments on commit 3f248b6

Please sign in to comment.