From fa9717d8dec39eef030a0444c36f470ef47730b4 Mon Sep 17 00:00:00 2001 From: helge Date: Sat, 25 Jun 2005 22:46:09 +0000 Subject: [PATCH] fixed a SoProduct lookup issue on MacOSX git-svn-id: http://svn.opengroupware.org/SOPE/trunk@863 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- sope-appserver/NGObjWeb/ChangeLog | 5 +++++ .../NGObjWeb/SoObjects/GNUmakefile.preamble | 2 +- sope-appserver/NGObjWeb/SoObjects/SoComponent.m | 5 +++-- .../NGObjWeb/SoObjects/SoProductRegistry.m | 15 +++++++-------- .../NGObjWeb/SoObjects/SoSecurityManager.m | 2 ++ sope-appserver/NGObjWeb/Version | 2 +- 6 files changed, 19 insertions(+), 12 deletions(-) diff --git a/sope-appserver/NGObjWeb/ChangeLog b/sope-appserver/NGObjWeb/ChangeLog index f10128f3..b4586d9e 100644 --- a/sope-appserver/NGObjWeb/ChangeLog +++ b/sope-appserver/NGObjWeb/ChangeLog @@ -1,3 +1,8 @@ +2005-06-24 Helge Hess + + * SoObjects/SoProductRegistry.m: fixed product lookup on MacOSX with + GNUstep environment (v4.5.166) + 2005-06-23 Stephane Corthesy * v4.5.165 diff --git a/sope-appserver/NGObjWeb/SoObjects/GNUmakefile.preamble b/sope-appserver/NGObjWeb/SoObjects/GNUmakefile.preamble index 959125a8..62ccfccc 100644 --- a/sope-appserver/NGObjWeb/SoObjects/GNUmakefile.preamble +++ b/sope-appserver/NGObjWeb/SoObjects/GNUmakefile.preamble @@ -2,4 +2,4 @@ ADDITIONAL_INCLUDE_DIRS += -I../WebDAV/ -ADDITIONAL_CPPFLAGS += -DCOMPILING_NGOBJWEB=1 +ADDITIONAL_CPPFLAGS += -DCOMPILING_NGOBJWEB=1 -DCOMPILE_FOR_GNUSTEP=1 diff --git a/sope-appserver/NGObjWeb/SoObjects/SoComponent.m b/sope-appserver/NGObjWeb/SoObjects/SoComponent.m index ce3b1f4d..63281510 100644 --- a/sope-appserver/NGObjWeb/SoObjects/SoComponent.m +++ b/sope-appserver/NGObjWeb/SoObjects/SoComponent.m @@ -119,8 +119,9 @@ 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; } diff --git a/sope-appserver/NGObjWeb/SoObjects/SoProductRegistry.m b/sope-appserver/NGObjWeb/SoObjects/SoProductRegistry.m index c45acca8..e272548f 100644 --- a/sope-appserver/NGObjWeb/SoObjects/SoProductRegistry.m +++ b/sope-appserver/NGObjWeb/SoObjects/SoProductRegistry.m @@ -105,7 +105,7 @@ static int debugOn = 0; 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; @@ -231,7 +231,7 @@ static int debugOn = 0; 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 @@ -240,28 +240,27 @@ static int debugOn = 0; 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; diff --git a/sope-appserver/NGObjWeb/SoObjects/SoSecurityManager.m b/sope-appserver/NGObjWeb/SoObjects/SoSecurityManager.m index 70dafe8f..14e62d96 100644 --- a/sope-appserver/NGObjWeb/SoObjects/SoSecurityManager.m +++ b/sope-appserver/NGObjWeb/SoObjects/SoSecurityManager.m @@ -124,6 +124,8 @@ static int debugOn = -1; 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])) { diff --git a/sope-appserver/NGObjWeb/Version b/sope-appserver/NGObjWeb/Version index c345cf7b..f1dd79df 100644 --- a/sope-appserver/NGObjWeb/Version +++ b/sope-appserver/NGObjWeb/Version @@ -1,6 +1,6 @@ # version file -SUBMINOR_VERSION:=165 +SUBMINOR_VERSION:=166 # v4.5.122 requires libNGExtensions v4.5.153 # v4.5.91 requires libNGExtensions v4.5.134 -- 2.39.5