mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 08:41:03 +00:00
* 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:
parent
707f83a94b
commit
f1377a1375
2 changed files with 29 additions and 0 deletions
|
@ -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];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue