diff --git a/Tools/pc2xc/main.m b/Tools/pc2xc/main.m index 3e1e798..5e9c6b3 100644 --- a/Tools/pc2xc/main.m +++ b/Tools/pc2xc/main.m @@ -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]; @@ -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]; @@ -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]);