diff --git a/Tools/pcpg/PLCPG.h b/Tools/pcpg/PLCPG.h index e0def33..57957ca 100644 --- a/Tools/pcpg/PLCPG.h +++ b/Tools/pcpg/PLCPG.h @@ -3,7 +3,7 @@ Copyright (C) 2011 Free Software Foundation - Author: Gregory John Casamento,,, + Author: Gregory John Casamento Created: 2011-08-16 14:15:42 -0400 by heron diff --git a/Tools/pcpg/PLCPG.m b/Tools/pcpg/PLCPG.m index 10ae97c..b0fec88 100644 --- a/Tools/pcpg/PLCPG.m +++ b/Tools/pcpg/PLCPG.m @@ -3,7 +3,7 @@ Copyright (C) 2011 Free Software Foundation - Author: Gregory John Casamento,,, + Author: Gregory John Casamento Created: 2011-08-16 14:15:42 -0400 by heron @@ -134,7 +134,13 @@ - (void) collectClassDetails - (void) createHeaderForClassNamed: (NSString *)className { - NSString *classFileFormat = @"#import \n\n// Local includes\n#import \"PBXCoder.h\"\n%@\n\n@interface %@ : NSObject\n{\n%@}\n\n// Methods....\n%@\n@end"; + NSString *classFileFormat = + @"#import \n\n" + @"// Local includes\n" + @"#import \"PBXCoder.h\"\n" + @"%@\n\n@interface %@ : NSObject\n" + @"{\n%@}\n\n// Methods....\n%@\n" + @"@end"; NSDictionary *classInfo = [classes objectForKey: className]; NSEnumerator *en = [classInfo keyEnumerator]; NSString *ivarString = @""; @@ -145,7 +151,14 @@ - (void) createHeaderForClassNamed: (NSString *)className while((ivarName = [en nextObject]) != nil) { NSString *type = [classInfo objectForKey: ivarName]; - ivarString = [ivarString stringByAppendingString: [NSString stringWithFormat: @" %@ *%@;\n",type, ivarName]]; + + // Map certain types... + if ([type isEqualToString: @"GSCInlineString"]) + { + type = @"NSString"; + } + + ivarString = [ivarString stringByAppendingString: [NSString stringWithFormat: @"\t%@ *_%@;\n",type, ivarName]]; if(![type isEqualToString: @"NSString"] && ![type isEqualToString: @"NSMutableArray"] && ![type isEqualToString: @"NSArray"] && @@ -180,17 +193,25 @@ - (void) createSourceForClassNamed: (NSString *)className while((ivarName = [en nextObject]) != nil) { NSString *type = [classInfo objectForKey: ivarName]; - methodString = [methodString stringByAppendingString: [NSString stringWithFormat: @"- (%@ *) %@ // getter\n{\n return %@;\n}\n\n", + + // Map certain types... + if ([type isEqualToString: @"GSCInlineString"]) + { + type = @"NSString"; + } + + methodString = [methodString stringByAppendingString: [NSString stringWithFormat: @"- (%@ *) %@ // getter\n{\n\treturn _%@;\n}\n\n", type,ivarName,ivarName]]; NSString *name = [ivarName stringByUpperCasingFirstCharacter]; methodString = [methodString stringByAppendingString: [NSString stringWithFormat: - @"- (void) set%@: (%@ *)object; // setter\n{\n ASSIGN(%@,object);\n}\n\n", + @"- (void) set%@: (%@ *)object; // setter\n{\n\tASSIGN(_%@, object);\n}\n\n", name,type,ivarName]]; } NSString *classFileName = [className stringByAppendingString: @".m"]; NSString *classFile = [NSString stringWithFormat: classFileFormat, className, className, methodString]; NSError *error = nil; + [classFile writeToFile: classFileName atomically: NO encoding: NSASCIIStringEncoding error: &error]; } diff --git a/XCode/GNUmakefile b/XCode/GNUmakefile index ae38515..9d60193 100644 --- a/XCode/GNUmakefile +++ b/XCode/GNUmakefile @@ -48,6 +48,7 @@ PBXCopyFilesBuildPhase.h \ PBXFileReference.h \ PBXFrameworksBuildPhase.h \ PBXFrameworkTarget.h \ +PBXFileSystemSynchronizedRootGroup.h \ PBXGroup.h \ PBXHeadersBuildPhase.h \ PBXNativeTarget.h \ @@ -94,6 +95,7 @@ PBXContainerItemProxy.m \ PBXContainer.m \ PBXCopyFilesBuildPhase.m \ PBXFileReference.m \ +PBXFileSystemSynchronizedRootGroup.m \ PBXFrameworksBuildPhase.m \ PBXFrameworkTarget.m \ PBXGroup.m \ diff --git a/XCode/PBXProject.h b/XCode/PBXProject.h index b06f8f5..a3283a7 100644 --- a/XCode/PBXProject.h +++ b/XCode/PBXProject.h @@ -54,9 +54,17 @@ NSString *_filename; NSMutableArray *_arrangedTargets; + BOOL _minimizedProjectReferenceProxies; + NSString *_preferredProjectObjectVersion; } // Methods.... +- (BOOL) minimizedProjectReferenceProxies; // getter +- (void) setMinimizedProjectReferenceProxies: (BOOL)flag; // setter + +- (NSString *) preferredProjectObjectVersion; // getter +- (void) setPreferredProjectObjectVersion: (NSString *)object; // setter + - (NSString *) developmentRegion; // getter - (void) setDevelopmentRegion: (NSString *)object; // setter diff --git a/XCode/PBXProject.m b/XCode/PBXProject.m index 91d1b24..3be66e4 100644 --- a/XCode/PBXProject.m +++ b/XCode/PBXProject.m @@ -166,13 +166,33 @@ - (instancetype) init return self; } -// Methods.... +// Methods... +- (BOOL) minimizedProjectReferenceProxies // getter +{ + return _minimizedProjectReferenceProxies; +} + +- (void) setMinimizedProjectReferenceProxies: (BOOL)flag // setter +{ + _minimizedProjectReferenceProxies = flag; +} + +- (NSString *) preferredProjectObjectVersion // getter +{ + return _preferredProjectObjectVersion; +} + +- (void) setPreferredProjectObjectVersion: (NSString *)object // setter +{ + ASSIGN(_preferredProjectObjectVersion, object); +} + - (NSString *) developmentRegion // getter { return _developmentRegion; } -- (void) setDevelopmentRegion: (NSString *)object; // setter +- (void) setDevelopmentRegion: (NSString *)object // setter { ASSIGN(_developmentRegion,object); } @@ -182,7 +202,7 @@ - (NSMutableArray *) knownRegions // getter return _knownRegions; } -- (void) setKnownRegions: (NSMutableArray *)object; // setter +- (void) setKnownRegions: (NSMutableArray *)object // setter { ASSIGN(_knownRegions,object); } @@ -192,7 +212,7 @@ - (NSString *) compatibilityVersion // getter return _compatibilityVersion; } -- (void) setCompatibilityVersion: (NSString *)object; // setter +- (void) setCompatibilityVersion: (NSString *)object // setter { ASSIGN(_compatibilityVersion,object); } @@ -202,7 +222,7 @@ - (NSMutableArray *) projectReferences // getter return _projectReferences; } -- (void) setProjectReferences: (NSMutableArray *)object; // setter +- (void) setProjectReferences: (NSMutableArray *)object // setter { ASSIGN(_projectReferences,object); } @@ -212,7 +232,7 @@ - (NSMutableArray *) targets // getter return _targets; } -- (void) setTargets: (NSMutableArray *)object; // setter +- (void) setTargets: (NSMutableArray *)object // setter { ASSIGN(_targets,object); } @@ -222,7 +242,7 @@ - (NSString *) projectDirPath // getter return _projectDirPath; } -- (void) setProjectDirPath: (NSString *)object; // setter +- (void) setProjectDirPath: (NSString *)object // setter { ASSIGN(_projectDirPath,object); } @@ -232,7 +252,7 @@ - (NSString *) projectRoot // getter return _projectRoot; } -- (void) setProjectRoot: (NSString *)object; // setter +- (void) setProjectRoot: (NSString *)object // setter { ASSIGN(_projectRoot,object); } @@ -242,7 +262,7 @@ - (XCConfigurationList *) buildConfigurationList // getter return _buildConfigurationList; } -- (void) setBuildConfigurationList: (XCConfigurationList *)object; // setter +- (void) setBuildConfigurationList: (XCConfigurationList *)object // setter { ASSIGN(_buildConfigurationList,object); } @@ -252,7 +272,7 @@ - (PBXGroup *) mainGroup // getter return _mainGroup; } -- (void) setMainGroup: (PBXGroup *)object; // setter +- (void) setMainGroup: (PBXGroup *)object // setter { ASSIGN(_mainGroup,object); } @@ -262,7 +282,7 @@ - (NSString *) hasScannedForEncodings // getter return _hasScannedForEncodings; } -- (void) setHasScannedForEncodings: (NSString *)object; // setter +- (void) setHasScannedForEncodings: (NSString *)object // setter { ASSIGN(_hasScannedForEncodings,object); } @@ -272,7 +292,7 @@ - (PBXGroup *) productRefGroup // getter return _productRefGroup; } -- (void) setProductRefGroup: (PBXGroup *)object; // setter +- (void) setProductRefGroup: (PBXGroup *)object // setter { ASSIGN(_productRefGroup,object); } diff --git a/XCode/PBXTarget.h b/XCode/PBXTarget.h index bab5e3e..a2e5be4 100644 --- a/XCode/PBXTarget.h +++ b/XCode/PBXTarget.h @@ -40,12 +40,20 @@ NSMutableArray *_buildPhases; NSString *_name; NSString *_productType; - + NSMutableArray *_fileSystemSynchronizedGroups; + NSMutableArray *_packageProductDepedencies; + PBXProject *_project; GSXCBuildDatabase *_database; } // Methods.... +- (NSMutableArray *) fileSystemSynchronizedGroups; +- (void) setFileSystemSynchronizedGroups: (NSMutableArray *)object; + +- (NSMutableArray *) packageProductDepedencies; +- (void) setPackageProductDepedencies: (NSMutableArray *)object; + - (NSMutableArray *) dependencies; // getter - (void) setDependencies: (NSMutableArray *)object; // setter diff --git a/XCode/PBXTarget.m b/XCode/PBXTarget.m index ee0e02f..5a919c5 100644 --- a/XCode/PBXTarget.m +++ b/XCode/PBXTarget.m @@ -40,11 +40,33 @@ - (void) dealloc RELEASE(_name); RELEASE(_project); RELEASE(_productType); + RELEASE(_fileSystemSynchronizedGroups); + RELEASE(_packageProductDepedencies); [super dealloc]; } // Methods.... +- (NSMutableArray *) fileSystemSynchronizedGroups +{ + return _fileSystemSynchronizedGroups; +} + +- (void) setFileSystemSynchronizedGroups: (NSMutableArray *)object +{ + ASSIGN(_fileSystemSynchronizedGroups, object); +} + +- (NSMutableArray *) packageProductDepedencies +{ + return _packageProductDepedencies; +} + +- (void) setPackageProductDepedencies: (NSMutableArray *)object +{ + ASSIGN(_packageProductDepedencies, object); +} + - (PBXProject *) project { return _project; diff --git a/XCode/XCBuildConfiguration.m b/XCode/XCBuildConfiguration.m index 0bf9dd6..38668dc 100644 --- a/XCode/XCBuildConfiguration.m +++ b/XCode/XCBuildConfiguration.m @@ -3,19 +3,19 @@ Written by: Gregory John Casamento Date: 2022 - + This file is part of the GNUstep XCode Library This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - + You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, @@ -40,10 +40,10 @@ - (instancetype) initWithName: (NSString *)theName self = [super init]; if (self != nil) { - [self setBuildSettings: settings]; + [self setBuildSettings: settings]; [self setName: theName]; } - return self; + return self; } - (instancetype) initWithName: (NSString *)theName @@ -101,7 +101,7 @@ - (void) apply { id value = [buildSettings objectForKey: key]; if ([value isKindOfClass: [NSString class]]) - { + { setenv([key cString],[value cString],1); } else if([value isKindOfClass: [NSArray class]]) @@ -112,17 +112,17 @@ - (void) apply } else { - NSDebugLog(@"\tWARNING: Can't interpret value %@, for environment variable %@", value, key); + NSDebugLog(@"\tWARNING: Can't interpret value %@, for environment variable %@", value, key); } } - + if ([buildSettings objectForKey: @"TARGET_BUILD_DIR"] == nil) { NSDebugLog(@"\tEnvironment: TARGET_BUILD_DIR = build (built-in)"); setenv("TARGET_BUILD_DIR","build",1); [context setObject: @"build" forKey: @"TARGET_BUILD_DIR"]; } - + if ([buildSettings objectForKey: @"BUILT_PRODUCTS_DIR"] == nil) { NSDebugLog(@"\tEnvironment: BUILT_PRODUCTS_DIR = build (built-in)");