mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
Path-finding updates.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@9497 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
285d35f3e9
commit
9db551023e
6 changed files with 76 additions and 187 deletions
|
@ -226,45 +226,15 @@ GSStandardPathPrefixes(void)
|
|||
NSArray *
|
||||
NSStandardApplicationPaths(void)
|
||||
{
|
||||
NSArray *prefixArray = GSStandardPathPrefixes();
|
||||
unsigned numPrefixes = [prefixArray count];
|
||||
|
||||
if (numPrefixes > 0)
|
||||
{
|
||||
NSString *paths[numPrefixes];
|
||||
unsigned count;
|
||||
|
||||
[prefixArray getObjects: paths];
|
||||
for (count = 0; count < numPrefixes; count++)
|
||||
{
|
||||
paths[count]
|
||||
= [paths[count] stringByAppendingPathComponent: @"Apps"];
|
||||
}
|
||||
return [NSArray arrayWithObjects: paths count: count];
|
||||
}
|
||||
return prefixArray; /* An empty array */
|
||||
return NSSearchPathForDirectoriesInDomains(NSAllApplicationsDirectory,
|
||||
NSAllDomainsMask, YES);
|
||||
}
|
||||
|
||||
NSArray *
|
||||
NSStandardLibraryPaths(void)
|
||||
{
|
||||
NSArray *prefixArray = GSStandardPathPrefixes();
|
||||
unsigned numPrefixes = [prefixArray count];
|
||||
|
||||
if (numPrefixes > 0)
|
||||
{
|
||||
NSString *paths[numPrefixes];
|
||||
unsigned count;
|
||||
|
||||
[prefixArray getObjects: paths];
|
||||
for (count = 0; count < numPrefixes; count++)
|
||||
{
|
||||
paths[count]
|
||||
= [paths[count] stringByAppendingPathComponent: @"Library"];
|
||||
}
|
||||
return [NSArray arrayWithObjects: paths count: count];
|
||||
}
|
||||
return prefixArray; /* An empty array */
|
||||
return NSSearchPathForDirectoriesInDomains(NSAllLibrariesDirectory,
|
||||
NSAllDomainsMask, YES);
|
||||
}
|
||||
|
||||
NSString *
|
||||
|
@ -324,6 +294,7 @@ NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory directoryKey,
|
|||
NSString *gnustep_system_root;
|
||||
NSString *adminDir = @"Administrator";
|
||||
NSString *appsDir = @"Apps";
|
||||
NSString *demosDir = @"Demos";
|
||||
NSString *devDir = @"Developer";
|
||||
NSString *libraryDir = @"Library";
|
||||
NSString *libsDir = @"Libraries";
|
||||
|
@ -355,10 +326,14 @@ NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory directoryKey,
|
|||
[paths addObject:
|
||||
[gnustep_system_root stringByAppendingPathComponent: appsDir]];
|
||||
}
|
||||
/*
|
||||
if (directoryKey == NSDemoApplicationDirectory
|
||||
|| directoryKey == NSAllApplicationsDirectory);
|
||||
*/
|
||||
{
|
||||
if (domainMask & NSSystemDomainMask)
|
||||
[paths addObject: [NSString pathWithComponents:
|
||||
[NSArray arrayWithObjects: gnustep_system_root,
|
||||
devDir, demosDir, nil]]];
|
||||
}
|
||||
if (directoryKey == NSDeveloperApplicationDirectory
|
||||
|| directoryKey == NSAllApplicationsDirectory)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue