Changes from Scott Christley. See ChangeLog Feb 27 13:46:10

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2294 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Andrew McCallum 1997-05-03 17:24:31 +00:00
parent 81909a2230
commit 89f78cc23b
7 changed files with 30 additions and 11 deletions

View file

@ -112,6 +112,12 @@ static NSString* platform =
#else
nil;
#endif
static NSString* gnustep_libdir =
#ifdef GNUSTEP_INSTALL_LIBDIR
@GNUSTEP_INSTALL_LIBDIR;
#else
nil;
#endif
/* Declaration from find_exec.c */
extern char *objc_find_executable(const char *name);
@ -470,6 +476,8 @@ _bundle_load_callback(Class theClass, Category *theCategory)
<main bundle>/Resources/<bundlePath>/<language.lproj>
<main bundle>/<bundlePath>
<main bundle>/<bundlePath>/<language.lproj>
<gnustep library installation directory>/<bundlePath>
<gnustep library installation directory>/<bundlePath>/<language.lproj>
*/
- (NSArray *) _bundleResourcePathsWithDirectory: (NSString *)bundlePath
{
@ -479,7 +487,7 @@ _bundle_load_callback(Class theClass, Category *theCategory)
NSMutableArray* array;
NSEnumerator* enumerate;
array = [NSMutableArray arrayWithCapacity: 2];
array = [NSMutableArray arrayWithCapacity: 8];
languages = [NSUserDefaults userLanguages];
primary = [self resourcePath];
@ -493,6 +501,18 @@ _bundle_load_callback(Class theClass, Category *theCategory)
enumerate = [languages objectEnumerator];
while ((language = [enumerate nextObject]))
[array addObject: _bundle_resource_path(primary, bundlePath, language)];
if (gnustep_libdir)
{
primary = [NSString stringWithCString: [gnustep_libdir cString]];
[array addObject: _bundle_resource_path(primary, bundlePath, nil)];
enumerate = [languages objectEnumerator];
while ((language = [enumerate nextObject]))
[array addObject:
_bundle_resource_path(primary, bundlePath, language)];
}
return array;
}