[VM][OS X] FFI plugin 1.1.0b1
Marcel Weiher
marcel at metaobject.com
Mon Mar 4 11:07:29 UTC 2002
On Sunday, March 3, 2002, at 10:07 PM, Alain Fischer wrote:
> After a lot of hour trying to call the functions of my own framework
> trough the FFI plugin,
> I have finally figured out that this work only if my framework is
> installed in:
> /System/Library/Frameworks
> Which is not nice since Apple is not recommanding to change anything in
> this location.
Yes, installing anything /System is not a good idea.
> What would be nice is if the framework location could be anywere in:
> (the application bundle of the VM) (the best solution)
> ~/Library/Frameworks
> /Library/Frameworks
> /Network/Library/Frameworks
With CocoaSqueak, you can just add the framework in question to the
CocoaSqueak application and recompile/relink. This is probably the
smoothest option, resulting in a custom VM with your precise
functionality. CocoaSqueak was designed specifically to make this sort
of thing easy, by splitting off most of the grunt Squeak-VM stuff into
frameworks. This split turns the app itself into a tiny skeleton that
is easy to customize.
Another option is to load the framework into your address-space
dynamically, for example using NSBundle, which may be accessed through
the Objective-C bridge.
> I have tried to found where the framework module is loaded in the VM
> code when called
> by the FFI plugin but found noting. The only part which seem to run the
> external function
> is a bunch of incomprehensible assembler code for me.
Whatever you do, the framework first has to be linked into your VM,
either dynamically or 'statically'.
> I need some advice from the VM guru. Will it be simple to modify the
> FFI plugin to find
> framework in the correct location or to develop a specific plugin ?
The easiest option would probably be creating a custom VM.
Marcel
--
Marcel Weiher Metaobject Software Technologies
marcel at metaobject.com www.metaobject.com
Metaprogramming for the Graphic Arts. HOM, IDEAs, MetaAd etc.
More information about the Squeak-dev
mailing list
|