tmpl = [self templateWithName:[self name]];
if (tmpl == nil) {
- [self warnWithFormat:@"found no template named '%@' for component.",
- [self name]];
+ [self warnWithFormat:
+ @"found no template named '%@' for component (fw=%@)",
+ [self name], [self frameworkName]];
}
return tmpl;
}
productName = @"SoCore";
#endif
- if ((product = [self->products objectForKey:productName])) {
+ if ((product = [self->products objectForKey:productName]) != nil) {
[self debugWithFormat:@"product '%@' already registered.", productName];
[product reloadIfPossible];
return;
fm = [NSFileManager defaultManager];
pi = [NSProcessInfo processInfo];
-#if COCOA_Foundation_LIBRARY
+#if COCOA_Foundation_LIBRARY && !COMPILE_FOR_GNUSTEP
/*
TODO: (like COMPILE_FOR_GNUSTEP)
This should actually check whether we are compiling in the
pathes = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory,
NSAllDomainsMask,
YES);
+ relPath = @"";
#else
pathes = [[pi environment] objectForKey:@"GNUSTEP_PATHPREFIX_LIST"];
if (pathes == nil)
pathes = [[pi environment] objectForKey:@"GNUSTEP_PATHLIST"];
pathes = [[pathes stringValue] componentsSeparatedByString:@":"];
+ relPath = @"Library/";
#endif
[self debugWithFormat:@"scanning for products ..."];
-#if !COCOA_Foundation_LIBRARY
- relPath = @"Library/";
-#else
- relPath = @"";
-#endif
- relPath = [NSString stringWithFormat:@"%@SoProducts-%i.%i/", relPath,
+ relPath = [relPath stringByAppendingFormat:@"SoProducts-%i.%i/",
SOPE_MAJOR_VERSION, SOPE_MINOR_VERSION];
+
for (i = 0; i < [pathes count]; i++) {
NSString *lPath;
BOOL isDir;
lPath = [[pathes objectAtIndex:i] stringByAppendingPathComponent:relPath];
+ [self debugWithFormat:@" scan: %@", lPath];
if (![fm fileExistsAtPath:lPath isDirectory:&isDir])
continue;
for (soClass = _soClass; soClass; soClass = [soClass soSuperClass]) {
SoClassSecurityInfo *sinfo;
IMP m;
+
+ // [self logWithFormat:@"CHECK CLASS: %@", soClass];
if ((sinfo = [soClass soClassSecurityInfo]) == nil) continue;
if ((m = [sinfo methodForSelector:_sel])) {