]> err.no Git - sope/commitdiff
fixed a SoProduct lookup issue on MacOSX
authorhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Sat, 25 Jun 2005 22:46:09 +0000 (22:46 +0000)
committerhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Sat, 25 Jun 2005 22:46:09 +0000 (22:46 +0000)
git-svn-id: http://svn.opengroupware.org/SOPE/trunk@863 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

sope-appserver/NGObjWeb/ChangeLog
sope-appserver/NGObjWeb/SoObjects/GNUmakefile.preamble
sope-appserver/NGObjWeb/SoObjects/SoComponent.m
sope-appserver/NGObjWeb/SoObjects/SoProductRegistry.m
sope-appserver/NGObjWeb/SoObjects/SoSecurityManager.m
sope-appserver/NGObjWeb/Version

index f10128f395670c2105812f4fae34166871e7aa68..b4586d9e9329610c6e351c0d1b73b0660bdfce90 100644 (file)
@@ -1,3 +1,8 @@
+2005-06-24  Helge Hess  <helge.hess@opengroupware.org>
+
+       * SoObjects/SoProductRegistry.m: fixed product lookup on MacOSX with
+         GNUstep environment (v4.5.166)
+
 2005-06-23  Stephane Corthesy  <stephane@sente.ch>
 
        * v4.5.165
index 959125a8774fd0b6aa3f7b8525dc13992d6089d4..62ccfccc0151c7d1ef38a68e619ddb77332d3579 100644 (file)
@@ -2,4 +2,4 @@
 
 ADDITIONAL_INCLUDE_DIRS += -I../WebDAV/
 
-ADDITIONAL_CPPFLAGS += -DCOMPILING_NGOBJWEB=1
+ADDITIONAL_CPPFLAGS += -DCOMPILING_NGOBJWEB=1 -DCOMPILE_FOR_GNUSTEP=1
index ce3b1f4dfe0fb0bbd040b026c2cacaaa6e3cb753..63281510cec216aa82b801f3ba8e669f101f0367 100644 (file)
   
   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;
 }
index c45acca82453d7d9699dfd5d32e5346427ee512e..e272548f81dd87fda4d391c8ba4d600f8951c740 100644 (file)
@@ -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;
index 70dafe8f8baeecdc701a7239a8563763f523d042..14e62d96dd6a7b960c0b68c68f5071234871d9b9 100644 (file)
@@ -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])) {
index c345cf7b9dc0d73e853aa90d32050ac33cbf9507..f1dd79df97d289f9da1c775b1134a3482267cafb 100644 (file)
@@ -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