[macruby-changes] [2454] MacRuby/trunk/objc.m
source_changes at macosforge.org
source_changes at macosforge.org
Tue Sep 1 19:58:42 PDT 2009
Revision: 2454
http://trac.macosforge.org/projects/ruby/changeset/2454
Author: lsansonetti at apple.com
Date: 2009-09-01 19:58:41 -0700 (Tue, 01 Sep 2009)
Log Message:
-----------
fix for #12, support DYLD_FRAMEWORK_PATH for framework load (patch by maarten at iridia.nl)
Modified Paths:
--------------
MacRuby/trunk/objc.m
Modified: MacRuby/trunk/objc.m
===================================================================
--- MacRuby/trunk/objc.m 2009-09-02 02:51:03 UTC (rev 2453)
+++ MacRuby/trunk/objc.m 2009-09-02 02:58:41 UTC (rev 2454)
@@ -320,7 +320,7 @@
NSString *path;
NSBundle *bundle;
NSError *error;
-
+
rb_scan_args(argc, argv, "11", &framework, &search_network);
Check_Type(framework, T_STRING);
@@ -379,6 +379,14 @@
stringByAppendingPathComponent:@"Library"];
FIND_LOAD_PATH_IN_LIBRARY(dir);
}
+
+ dirs = [[[[NSProcessInfo processInfo] environment] valueForKey:@"DYLD_FRAMEWORK_PATH"] componentsSeparatedByString: @":"];
+ for (i = 0, count = [dirs count]; i < count; i++) {
+ NSString *dir = [dirs objectAtIndex:i];
+ path = [dir stringByAppendingPathComponent:frameworkName];
+ if ([fileManager fileExistsAtPath:path])
+ goto success;
+ }
#undef FIND_LOAD_PATH_IN_LIBRARY
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090901/6a271f56/attachment-0001.html>
More information about the macruby-changes
mailing list