mirror of
https://github.com/gnustep/libs-gdl2.git
synced 2025-04-22 12:55:44 +00:00
* EOAccess/EOAdaptor.m ([EOAdaptor adaptorWithName:]): Use
NSSearchPathForDirectoriesInDomains() instead of GNUstep specific environment variable. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@18518 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
face640c03
commit
71dbd691e5
2 changed files with 14 additions and 39 deletions
|
@ -1,3 +1,9 @@
|
|||
2003-02-01 David Ayers <d.ayers@inode.at>
|
||||
|
||||
* EOAccess/EOAdaptor.m ([EOAdaptor adaptorWithName:]): Use
|
||||
NSSearchPathForDirectoriesInDomains() instead of GNUstep
|
||||
specific environment variable.
|
||||
|
||||
2003-01-31 David Ayers <d.ayers@inode.at>
|
||||
|
||||
* EOAccess/EOAccessFault.m: Add #includes for non *-gnu-*.
|
||||
|
|
|
@ -136,12 +136,9 @@ NSString *EOGeneralAdaptorException = @"EOGeneralAdaptorException";
|
|||
//OK
|
||||
NSBundle *bundle = [NSBundle mainBundle];
|
||||
NSString *adaptorBundlePath;
|
||||
NSMutableArray *paths;
|
||||
NSArray *paths;
|
||||
Class adaptorClass;
|
||||
NSString *adaptorClassName;
|
||||
NSProcessInfo *pInfo;
|
||||
NSDictionary *env;
|
||||
NSMutableString *user, *local, *system;
|
||||
int i, count;
|
||||
|
||||
/* Check error */
|
||||
|
@ -163,45 +160,17 @@ NSString *EOGeneralAdaptorException = @"EOGeneralAdaptorException";
|
|||
/* Look in standard paths */
|
||||
if (!adaptorBundlePath)
|
||||
{
|
||||
SEL sel = @selector(stringByAppendingPathComponent:);
|
||||
/*
|
||||
The path of where to search for the adaptor files
|
||||
is based upon environment variables.
|
||||
GDL_ADAPTORS_PATH
|
||||
GNUSTEP_USER_ROOT
|
||||
GNUSTEP_LOCAL_ROOT
|
||||
GNUSTEP_SYSTEM_ROOT
|
||||
The path of where to search for the adaptor files.
|
||||
*/
|
||||
pInfo = [NSProcessInfo processInfo];
|
||||
env = [pInfo environment];
|
||||
paths = [NSMutableArray array];
|
||||
|
||||
user = AUTORELEASE([[env objectForKey: @"GNUSTEP_USER_ROOT"]
|
||||
mutableCopy]);
|
||||
[user appendString: @"/Libraries/Frameworks"];
|
||||
paths
|
||||
= NSSearchPathForDirectoriesInDomains(NSAllLibrariesDirectory,
|
||||
NSAllDomainsMask, NO);
|
||||
|
||||
if (user)
|
||||
[paths addObject: user];
|
||||
|
||||
local = AUTORELEASE([[env objectForKey: @"GNUSTEP_LOCAL_ROOT"]
|
||||
mutableCopy]);
|
||||
[local appendString: @"/Libraries/Frameworks"];
|
||||
|
||||
if (local)
|
||||
[paths addObject: local];
|
||||
|
||||
local = AUTORELEASE([[env objectForKey: @"GNUSTEP_LOCAL_ROOT"]
|
||||
mutableCopy]);
|
||||
[local appendString: @"/Library/Frameworks"];
|
||||
|
||||
if (local)
|
||||
[paths addObject: local];
|
||||
|
||||
system = AUTORELEASE([[env objectForKey: @"GNUSTEP_SYSTEM_ROOT"]
|
||||
mutableCopy]);
|
||||
[system appendString: @"/Libraries/Frameworks"];
|
||||
|
||||
if (system)
|
||||
[paths addObject: system];
|
||||
paths = [paths resultsOfPerformingSelector: sel
|
||||
withObject: @"Frameworks"];
|
||||
|
||||
/* Loop through the paths and check each one */
|
||||
for(i = 0, count = [paths count]; i < count; i++)
|
||||
|
|
Loading…
Reference in a new issue