Search
lxdream.org :: lxdream/src/cocoaui/paths_osx.m :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/cocoaui/paths_osx.m
changeset 1024:c67f2d61ab97
prev1021:848db285a184
next1038:f220d18c0615
author nkeynes
date Sat Jun 13 00:50:48 2009 +0000 (13 years ago)
permissions -rw-r--r--
last change Build drivers with library dependencies as shared objects (ie plugins)
file annotate diff log raw
1.1 --- a/src/cocoaui/paths_osx.m Wed Jun 03 11:37:10 2009 +0000
1.2 +++ b/src/cocoaui/paths_osx.m Sat Jun 13 00:50:48 2009 +0000
1.3 @@ -25,6 +25,7 @@
1.4 #include <AppKit/AppKit.h>
1.5
1.6 static char *bundle_resource_path = NULL;
1.7 +static char *bundle_plugin_path = NULL;
1.8
1.9 static char *get_bundle_resource_path()
1.10 {
1.11 @@ -47,3 +48,13 @@
1.12 return get_bundle_resource_path();
1.13 }
1.14
1.15 +const char *get_plugin_path()
1.16 +{
1.17 + if( bundle_plugin_path == NULL ) {
1.18 + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
1.19 + NSString *pluginPath = [[NSBundle mainBundle] builtInPlugInsPath];
1.20 + bundle_plugin_path = strdup([pluginPath UTF8String]);
1.21 + [pool release];
1.22 + }
1.23 + return bundle_plugin_path;
1.24 +}
.