Make XCC generating .m files with @property for outlets

This is step 1 to have XCC working with Xcode 4.4.
This commit is contained in:
Antoine Mercadal committed 2012-08-08 14:59:29 -07:00
1 parent 9fb73e26dc
commit 41a6621ac2
4 files changed
+20 -10

No files matched your search

+3 -2
View File
@@ -392,6 +392,7 @@ NSString * const XCCListeningStartNotification = @"XCCListeningStartNotification
if ([self isObjJFile:fullPath])
{
NSString *shadowPath = [[self shadowURLForSourceURL:[NSURL URLWithString:[fullPath stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]] path];
[fm removeItemAtPath:shadowPath error:nil];
DLog(@"Removing shadow file: %@", shadowPath);
}
@@ -557,7 +558,7 @@ NSString * const XCCListeningStartNotification = @"XCCListeningStartNotification
range:NSMakeRange(0, [flattenedPath length])];
DLog(@"Flattened path: %@", flattenedPath);
NSString *basename = [NSString stringWithFormat:@"%@.h", [[flattenedPath stringByDeletingPathExtension] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
NSString *basename = [NSString stringWithFormat:@"%@.m", [[flattenedPath stringByDeletingPathExtension] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
return [NSURL URLWithString:basename relativeToURL:XCodeSupportProjectSources];
}
@@ -576,7 +577,7 @@ NSString * const XCCListeningStartNotification = @"XCCListeningStartNotification
options:0
range:NSMakeRange(0, [unshadowedPath length])];
[unshadowedPath replaceOccurrencesOfString:@".h"
[unshadowedPath replaceOccurrencesOfString:@".m"
withString:@".j"
options:0
range:NSMakeRange(0, [unshadowedPath length])];
@@ -45,7 +45,7 @@
/* Begin PBXFileReference section */
022BCEA61468632000B72910 /* project.pbxproj.sample */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = project.pbxproj.sample; sourceTree = "<group>"; };
024A041113699D6800DCBE4D /* parser.j */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.objj; path = parser.j; sourceTree = "<group>"; };
024A041113699D6800DCBE4D /* parser.j */ = {isa = PBXFileReference; explicitFileType = sourcecode.javascript; fileEncoding = 4; path = parser.j; sourceTree = "<group>"; };
026F3B6113866B0B00EE5B83 /* xcodecapp-icon-inactive.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "xcodecapp-icon-inactive.png"; sourceTree = "<group>"; };
026F3B6413866E7D00EE5B83 /* xcodecapp-icon-active.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "xcodecapp-icon-active.png"; sourceTree = "<group>"; };
027D9989136969DD00D3DB13 /* XcodeCapp.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XcodeCapp.pch; sourceTree = "<group>"; };
@@ -209,7 +209,7 @@
29B97313FDCFA39411CA2CEA /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0420;
LastUpgradeCheck = 0440;
};
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "XcodeCapp" */;
compatibilityVersion = "Xcode 3.2";
@@ -286,6 +286,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@@ -307,6 +308,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
COMBINE_HIDPI_IMAGES = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@@ -336,7 +338,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.5;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx10.6;
SDKROOT = macosx;
};
name = Debug;
};
@@ -352,7 +354,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.5;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx10.6;
SDKROOT = macosx;
};
name = Release;
};
@@ -14,6 +14,11 @@
<key>orderHint</key>
<integer>1</integer>
</dict>
<key>XcodeCapp.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
+6 -4
View File
@@ -86,7 +86,7 @@ function main(args)
types[anIndex] = NSCompatibleClassName(aType, YES);
});
outlets.push(" " + types.join(" ") + " " + ivar_getName(anIvar) + ";");
outlets.push("@property (assign) " + types.join(" ") + " " + ivar_getName(anIvar) + ";");
}
});
@@ -107,11 +107,13 @@ function main(args)
ObjectiveCSource +=
"\n@interface " + class_getName(aClass) +
(superClassName === "Nil" ? "" : (" : " + NSCompatibleClassName(superClassName))) +
"\n{\n" +
"\n\n" +
outlets.join("\n") +
"\n}\n" +
"\n" +
actions.join("\n") +
"\n@end";
"\n@end\n\n"+
"\n@implementation " + class_getName(aClass) +
"\n@end\n";
});
if (ObjectiveCSource.length)