* src/NSBundle: ([+initialize]) modified to take account of the

environment variables GNUSTEP_TARGET_DIR, GNUSTEP_TARGET_CPU,
        GNUSTEP_TARGET_OS, and LIBRARY_COMBO to override the defaults.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2918 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 1998-08-12 14:41:20 +00:00
parent f94edcf0af
commit 72f05b6a88
2 changed files with 29 additions and 0 deletions

View file

@ -1,3 +1,9 @@
Wed Aug 12 14:55:00 1998 Richard Frith-Macdonald <richard@brainstorm.co.uk>
* src/NSBundle: ([+initialize]) modified to take account of the
environment variables GNUSTEP_TARGET_DIR, GNUSTEP_TARGET_CPU,
GNUSTEP_TARGET_OS, and LIBRARY_COMBO to override the defaults.
Fri Aug 4 10:55:00 1998 Richard Frith-Macdonald <richard@brainstorm.co.uk>
* src/GNUmakefile: Removed NSAllocateObject.m and

View file

@ -215,9 +215,32 @@ _bundle_load_callback(Class theClass, Category *theCategory)
{
if (self == [NSBundle class])
{
NSDictionary *env;
/* Need to make this recursive since both mainBundle and initWithPath:
want to lock the thread */
load_lock = [NSRecursiveLock new];
env = [[NSProcessInfo processInfo] environment];
if (env)
{
NSString *str;
str = [env objectForKey: @"GNUSTEP_TARGET_DIR"];
if (str)
gnustep_target_dir = [str retain];
str = [env objectForKey: @"GNUSTEP_TARGET_CPU"];
if (str)
gnustep_target_cpu = [str retain];
str = [env objectForKey: @"GNUSTEP_TARGET_OS"];
if (str)
gnustep_target_os = [str retain];
str = [env objectForKey: @"LIBRARY_COMBO"];
if (str)
library_combo = [str retain];
}
}
}