[Rubycocoa-devel 605] RubyCocoa.framework & AppKit

Back to archive index

Laurent Sansonetti lsans****@apple*****
Thu Jan 11 02:18:09 JST 2007


Hi,

I just modified the project in apple-unstable to make  
RubyCocoa.framework link only against Foundation.

$ otool -L framework/build/Default/RubyCocoa.framework/RubyCocoa
framework/build/Default/RubyCocoa.framework/RubyCocoa:
         @executable_path/../Frameworks/RubyCocoa.framework/Versions/A/ 
RubyCocoa (compatibility version 1.0.0, current version 1.0.0)
         /System/Library/Frameworks/Foundation.framework/Versions/C/ 
Foundation (compatibility version 300.0.0, current version 621.0.0)
         /usr/lib/libxml2.2.dylib (compatibility version 9.0.0,  
current version 9.16.0)
         /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/ 
lib/libruby.1.dylib (compatibility version 1.8.0, current version 1.8.5)
         /usr/lib/libSystem.B.dylib (compatibility version 1.0.0,  
current version 101.0.0)

Before it was building for AppKit too.

The reason is that some people would like to write console-based  
applications with RubyCocoa, and not depend on AppKit.

Using osx/cocoa will load AppKit dynamically though. Almost (all?)  
people use osx/cocoa. But using osx/foundation will not load it.

I also added a new method, OSX.framework_loaded?, to know if a given  
framework has been loaded.

$ ruby -r osx/foundation -e "p OSX.framework_loaded?('AppKit')"
false
$ ruby -r osx/cocoa -e "p OSX.framework_loaded?('AppKit')"
true

Also I deprecated osx/addressbook (I should have done it earlier), now  
that we support AddressBook via a BridgeSupport metadata file.

$ ruby -r osx/addressbook -e ""
The osx/addressbook script has been deprecated, and its use is now  
discouraged. Please do `OSX.require_framework "AddressBook"` instead.

Laurent



More information about the Rubycocoa-devel mailing list
Back to archive index