]> err.no Git - sope/commitdiff
fixed bundle resource lookup on MacOSX, changed resource lookup in
authorhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Tue, 1 Mar 2005 20:26:34 +0000 (20:26 +0000)
committerhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Tue, 1 Mar 2005 20:26:34 +0000 (20:26 +0000)
NGBundleManager

git-svn-id: http://svn.opengroupware.org/SOPE/trunk@606 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

sope-appserver/NGObjWeb/ChangeLog
sope-appserver/NGObjWeb/SoObjects/SoProductResourceManager.m
sope-appserver/NGObjWeb/Version
sope-core/NGExtensions/ChangeLog
sope-core/NGExtensions/NGBundleManager.m
sope-core/NGExtensions/Version

index 0262b3e464f41965ae8bfcd219ee2b1aea04e85c..56bb7fa80c5ce1f40492ff9c9a0c370264073083 100644 (file)
@@ -1,3 +1,8 @@
+2005-03-01  Helge Hess  <helge.hess@opengroupware.org>
+
+       * SoObjects/SoProductResourceManager.m: fixed to use the changed lookup
+         in NGBundleManager.m (v4.5.122)
+
 2005-02-25  Marcus Mueller  <znek@mulle-kybernetik.com>
 
        * WOResourceManager.m: Fixed condition in -resourcesPathForFramework:,
index ca1fefe7bde402a8a5feb3fff5931eb1d0ec35fe..3ac49bf9900e09c6bf54fad9f78de8df98947ed0 100644 (file)
@@ -145,11 +145,11 @@ static BOOL debugOn = NO;
   path = [[self->product bundle]
             pathForResource:[_name stringByDeletingPathExtension]
             ofType:[_name pathExtension]
-            inDirectory:@"Resources"
+            inDirectory:nil
             languages:_l];
   if (debugOn && path == nil) {
-    [self debugWithFormat:@"  resource %@/%@ not found.",
-           _name, [_l componentsJoinedByString:@","]];
+    [self debugWithFormat:@"  resource %@/%@ not found in bundle: %@",
+         _name, [_l componentsJoinedByString:@","], [self->product bundle]];
   }
   return path;
 }
@@ -281,6 +281,7 @@ static BOOL debugOn = NO;
     
     resource = [self primaryLookupPathForResourceNamed:_name
                     languages:_languages];
+    if (debugOn) [self debugWithFormat:@"  resource: %@", resource];
     resource = [self fixupResourcePath:resource];
     if (debugOn) [self debugWithFormat:@"  resource to URL: %@", resource];
     
index 8f914dd5c4bc042d62d1989c723505f9b02d547a..0a0b337c1ec1f22a3ab3a241a73bd220e218ebd0 100644 (file)
@@ -2,6 +2,7 @@
 
 SUBMINOR_VERSION:=121
 
+# v4.5.122 requires libNGExtensions v4.5.153
 # v4.5.91  requires libNGExtensions v4.5.134
 # v4.5.84  requires libNGExtensions v4.5.127
 # v4.3.42  requires libNGExtensions v4.3.116
index b7472a9fb6939722a7ef7aa2a21d6639a663ee48..183b935cd1de57dfc77a11e2909ab4267283baf6 100644 (file)
@@ -1,3 +1,10 @@
+2005-03-01  Helge Hess  <helge.hess@opengroupware.org>
+
+       * NGBundleManager.m (-pathForResource:ofType:inDirectory:languages:):
+         changed resource lookup to look in Contents/Resources or Resources
+         depending on the Foundaiton library when no inDirectory: has been
+         given (v4.5.153)
+
 2005-02-23  Helge Hess  <helge.hess@opengroupware.org>
 
        * FdExt.subproj/NSNull+misc.m: added -hasPrefix: / -hasSuffix:, should
index 58990aa00faac61b91b6d147c5b367541a83fde6..ab241681c874dc0948df26fdf56ba14929ab5f99 100644 (file)
@@ -1892,16 +1892,24 @@ static BOOL debugLanguageLookup = NO;
   NSString      *path = nil;
   int i, langCount;
   id (*objAtIdx)(id,SEL,int);
-
+  
   if (debugLanguageLookup) {
-    NSLog(@"LOOKUP: %@ | %@ | %@ | %@",
+    NSLog(@"LOOKUP(%s): %@ | %@ | %@ | %@", __PRETTY_FUNCTION__,
          _name, _ext, _directory, [_languages componentsJoinedByString:@","]);
   }
   
-  path = [_directory isNotNull]
-    ? [[self bundlePath] stringByAppendingPathComponent:_directory]
-    : [self bundlePath];
-
+  path = [self bundlePath];
+  if ([_directory isNotNull]) {
+    // TODO: should we change that?
+    path = [path stringByAppendingPathComponent:_directory];
+  }
+  else {
+#if (NeXT_Foundation_LIBRARY || APPLE_Foundation_LIBRARY)
+    path = [path stringByAppendingPathComponent:@"Contents"];
+#endif
+    path = [path stringByAppendingPathComponent:@"Resources"];
+  }
+  
   if (debugLanguageLookup) NSLog(@"  BASE: %@", path);
   
   fm   = [NSFileManager defaultManager];
index 8a5c4492500a336b3c3bea5c184d61b951d1bac1..e21b17b7f912e0991f6c6a716e909f72576da02b 100644 (file)
@@ -1,6 +1,6 @@
 # version
 
-SUBMINOR_VERSION:=152
+SUBMINOR_VERSION:=153
 
 # v4.3.115 requires libFoundation v1.0.59
 # v4.2.72  requires libEOControl  v4.2.39