Added NSBundle executableURL and builtInPlugInsURL

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@36959 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
lubosd 2013-08-10 13:31:46 +00:00
parent 43acfe40ac
commit a544d2a680
3 changed files with 22 additions and 1 deletions

View file

@ -1,6 +1,7 @@
2013-08-10 Lubos Dolezel <lubos@dolezel.info>
* Source/NSBundle.m: add -[NSBundle bundleURL]
* Source/NSBundle.m: add NSBundle bundleURL, builtInPlugInsURL,
executableURL
2013-07-26 Richard Frith-Macdonald <rfm@gnu.org>

View file

@ -348,6 +348,11 @@ GS_EXPORT NSString* const NSLoadedClasses;
/** Returns the full path to the plug-in subdirectory of the bundle. */
- (NSString *) builtInPlugInsPath;
#if OS_API_VERSION(MAC_OS_X_VERSION_10_2,GS_API_LATEST)
/** Returns the full path to the plug-in subdirectory of the bundle. */
- (NSURL *) builtInPlugInsURL;
#endif
/** Returns the bundle identifier, as defined by the CFBundleIdentifier
key in the infoDictionary */
- (NSString *) bundleIdentifier;
@ -444,6 +449,11 @@ GS_EXPORT NSString* const NSLoadedClasses;
/** Returns the path to the executable code in the bundle */
- (NSString *) executablePath;
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6,GS_API_LATEST)
- (NSURL *) executableURL;
#endif
#endif
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST)

View file

@ -2737,6 +2737,11 @@ IF_NO_GC(
return object;
}
- (NSURL *) executableURL
{
return [NSURL fileURLWithPath: [self executablePath]];
}
- (NSString *) resourcePath
{
NSString *version = _frameworkVersion;
@ -2811,6 +2816,11 @@ IF_NO_GC(
}
}
- (NSURL *) builtInPlugInsURL
{
return [NSURL fileURLWithPath: [self builtInPlugInsPath]];
}
- (NSString*) bundleIdentifier
{
return [[self infoDictionary] objectForKey: @"CFBundleIdentifier"];