mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
* 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:
parent
fb3563bc50
commit
1e96b65ae7
3 changed files with 28 additions and 0 deletions
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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"];
|
||||
|
|
Loading…
Reference in a new issue