[squeak-dev] Copying a file from Squeak on Linux

Bert Freudenberg bert at freudenbergs.de
Tue Mar 4 11:21:24 UTC 2008


On Mar 4, 2008, at 5:01 , Bill Schwab wrote:

> Bert,
>
> My image reports its #vmPath as:
>
>     /usr/local/lib/squeak/3.9-8/
>
> and looking there, I see the vm and some plugins.  Is being in that
> directory enough, or is there something else I have to do to get it to
> see and/or report a plugin's existence?  Are they loaded at startup,
> only on demand, etc.?

On demand.

>> From my feeble experiments, I'm guessing that it is on demand.  I  
>> became
> curious over the DES plugin, which I now appear to have working.   
> To get
> there, I grabbed the plugin from
>
>    http://wiki.squeak.org/squeak/2410
>
> and then saved it as both
>
>    /usr/local/lib/squeak/3.9-8/DESPlugin
>    /usr/local/lib/squeak/3.9-8/DESPrims.so
>
> Not quite knowing what I was doing (make that being completely
> clueless), I am not sure which one made it work.  Any ideas?  The
> DESPlugin class comment includes:
>
>    You should build this plugin with the module name 'DESPrims'.
>
> and adding the .so seemed like might be a good idea.  Does the plugin
> load code try/ignore that extension?

You have to look in the image where the primitive is called, you'll  
have a line like

	<primitive: 'primitiveName' module: 'PluginName'>

That module name is used to find the plugin, see

See http://squeakvm.org/svn/squeak/trunk/platforms/unix/vm/ 
sqUnixExternalPrims.c

It tries to load the name as given, or with a "lib" prefix and ".so"  
suffix" (and ".dylib" for MacOS X).

Also it tries to find it in "./", $SQUEAK_PLUGIN_PATH, "/usr/local/ 
lib/squeak/3.9-8/", $LD_LIBRARY_PATH, and the system standard library  
directories ("/usr/lib" etc.).

If all that fails, it looks if this is an internal module.

- Bert -





More information about the Squeak-dev mailing list