mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-18 09:48:12 +00:00
Monotone-Parent: d8ee782e0279aa96226ceac45acca9d744f3f234
Monotone-Revision: 089ae441ff03d28570373f845e09e2601d6611ee Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-02-14T17:31:23 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
1 parent
716230fce7
commit
b4307939db
35 files changed
+3368
-113
No files matched your search
@@ -80,28 +80,12 @@
|
||||
}
|
||||
|
||||
- (void)_addGNUstepSearchPathesToArray:(NSMutableArray *)ma {
|
||||
NSDictionary *env;
|
||||
id tmp;
|
||||
|
||||
env = [[NSProcessInfo processInfo] environment];
|
||||
if ((tmp = [env objectForKey:@"GNUSTEP_PATHPREFIX_LIST"]) == nil)
|
||||
tmp = [env objectForKey:@"GNUSTEP_PATHLIST"];
|
||||
|
||||
tmp = [tmp componentsSeparatedByString:@":"];
|
||||
if ([tmp count] > 0) {
|
||||
NSEnumerator *e;
|
||||
|
||||
e = [tmp objectEnumerator];
|
||||
while ((tmp = [e nextObject])) {
|
||||
tmp = [tmp stringByAppendingPathComponent:@"Library"];
|
||||
tmp = [tmp stringByAppendingPathComponent:self->productDirectoryName];
|
||||
if (![ma containsObject:tmp])
|
||||
[ma addObject:tmp];
|
||||
}
|
||||
}
|
||||
else {
|
||||
NSLog(@"%s: empty library search path !", __PRETTY_FUNCTION__);
|
||||
}
|
||||
NSEnumerator *libraryPaths;
|
||||
NSString *directory;
|
||||
|
||||
libraryPaths = [NSStandardLibraryPaths() objectEnumerator];
|
||||
while ((directory = [libraryPaths nextObject]))
|
||||
[ma addObject: [directory stringByAppendingPathComponent:self->productDirectoryName]];
|
||||
}
|
||||
|
||||
- (void)_addFHSPathesToArray:(NSMutableArray *)ma {
|
||||
@@ -114,18 +98,13 @@
|
||||
|
||||
- (NSArray *)productSearchPathes {
|
||||
NSMutableArray *ma;
|
||||
BOOL hasGNUstepEnv;
|
||||
|
||||
if (self->searchPathes != nil)
|
||||
return self->searchPathes;
|
||||
|
||||
hasGNUstepEnv = [[[[NSProcessInfo processInfo] environment]
|
||||
objectForKey:@"GNUSTEP_USER_ROOT"] length] > 0 ? YES : NO;
|
||||
|
||||
ma = [NSMutableArray arrayWithCapacity:6];
|
||||
|
||||
if (hasGNUstepEnv)
|
||||
[self _addGNUstepSearchPathesToArray:ma];
|
||||
[self _addGNUstepSearchPathesToArray:ma];
|
||||
#if COCOA_Foundation_LIBRARY
|
||||
else
|
||||
[self _addCocoaSearchPathesToArray:ma];
|
||||
|
||||
Reference in new issue
Block a user