* Headers/Foundation/NSBundle.h (builtInPlugInsPath): New method.

* Source/NSBundle (builtInPlugInsPath): Imeplement (based on patch
#3483).


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@20341 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2004-11-11 18:51:37 +00:00
parent fb3563bc50
commit 1e96b65ae7
3 changed files with 28 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2004-11-11 Adam Fedor <fedor@gnu.org>
* Headers/Foundation/NSBundle.h (builtInPlugInsPath): New method.
* Source/NSBundle (builtInPlugInsPath): Imeplement (based on patch
#3483).
2004-11-10 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSThread.m: Retain the notification center we use.

View file

@ -261,6 +261,9 @@ GS_EXPORT NSString* const NSLoadedClasses;
/** Returns the absolute path to the resources directory of the bundle. */
- (NSString*) resourcePath;
/** Returns the full path to the plug-in subdirectory of the bundle. */
- (NSString *)builtInPlugInsPath;
/** Returns the bundle identifier, as defined by the CFBundleIdentifier
key in the infoDictionary */
- (NSString *)bundleIdentifier;

View file

@ -1624,6 +1624,25 @@ _bundle_load_callback(Class theClass, struct objc_category *theCategory)
return _infoDict;
}
- (NSString *)builtInPlugInsPath
{
NSString *version = _frameworkVersion;
if (!version)
version = @"Current";
if (_bundleType == NSBUNDLE_FRAMEWORK)
{
return [_path stringByAppendingPathComponent:
[NSString stringWithFormat:@"Versions/%@/PlugIns",
version]];
}
else
{
return [_path stringByAppendingPathComponent: @"PlugIns"];
}
}
- (NSString *)bundleIdentifier
{
return [[self infoDictionary] objectForKey:@"CFBundleIdentifier"];