How do I find out what plugins my current VM was built with? This is about an already built VM, not VMMaker.
The closest I have found is SmalltalkImage current listBuiltinModules and listLoadedModules. I believe that external, unloaded modules will not appear in either.
I'm trying to figure out if I'm setup so I can use some of the font packages. I'm running a 3.10 image (but 3.9 VM) on Linux (Debian Lenny).
How do I get a list of all plugins?
On Mon, 2009-03-23 at 13:53 -0700, Ross Boylan wrote:
How do I find out what plugins my current VM was built with? This is about an already built VM, not VMMaker.
The closest I have found is SmalltalkImage current listBuiltinModules and listLoadedModules. I believe that external, unloaded modules will not appear in either.
I'm trying to figure out if I'm setup so I can use some of the font packages. I'm running a 3.10 image (but 3.9 VM) on Linux (Debian Lenny).
How do I get a list of all plugins?
On Linux you can find them in the same directory as the VM, something like /usr/local/lib/squeak/3.10-1/ for example, which you can discover by following the symlink you likely use to start Squeak in /usr/local/bin/ or /usr/bin/ .
A way to do this in a more platform independent method would be nice.
Ken
Smalltalk listLoadedModulesSmalltalkImage current listLoadedModules
On Mon, Mar 23, 2009 at 1:53 PM, Ross Boylan ross@biostat.ucsf.edu wrote:
How do I find out what plugins my current VM was built with? This is about an already built VM, not VMMaker.
The closest I have found is SmalltalkImage current listBuiltinModules and listLoadedModules. I believe that external, unloaded modules will not appear in either.
I'm trying to figure out if I'm setup so I can use some of the font packages. I'm running a 3.10 image (but 3.9 VM) on Linux (Debian Lenny).
How do I get a list of all plugins?
Oops. Sorry. Post-prandial posting. Forgive me.
On Mon, Mar 23, 2009 at 2:26 PM, Eliot Miranda eliot.miranda@gmail.comwrote:
Smalltalk listLoadedModulesSmalltalkImage current listLoadedModules
On Mon, Mar 23, 2009 at 1:53 PM, Ross Boylan ross@biostat.ucsf.eduwrote:
How do I find out what plugins my current VM was built with? This is about an already built VM, not VMMaker.
The closest I have found is SmalltalkImage current listBuiltinModules and listLoadedModules. I believe that external, unloaded modules will not appear in either.
I'm trying to figure out if I'm setup so I can use some of the font packages. I'm running a 3.10 image (but 3.9 VM) on Linux (Debian Lenny).
How do I get a list of all plugins?
Ross Boylan wrote:
I'm trying to figure out if I'm setup so I can use some of the font packages. I'm running a 3.10 image (but 3.9 VM) on Linux (Debian Lenny).
How do I get a list of all plugins?
You don't. External, unloaded plugins can't be enumerated since they are just platform shared libraries (DLLs). They could be found anywhere in your search path which makes it very difficult to list them explicitly.
The right way to solve your problem is to provide an entry point in your plugin that can be used to detect whether the plugin is available. A useful thing to do here is to provide a primitiveVersion because later on you'll be able to use that to detect whether the user has an outdated plugin version. Then you can simply implement something like:
MyClass>>pluginVersion "Returns the plugin version, or nil if the plugin cannot be loaded" <primitive: 'primitiveVersion' module: 'MyPlugin'> ^nil "indicates failure"
MyClass>>isPluginPresent "Returns true if the plugin is present" ^self pluginVersion notNil
MyClass>>isPluginOfTheRightVersion "Returns true if the plugin is of the right version" ^(self pluginVersion ifNil:[0]) > self minimumVersion
Cheers, - Andreas
Andreas Raab wrote:
MyClass>>pluginVersion "Returns the plugin version, or nil if the plugin cannot be loaded" <primitive: 'primitiveVersion' module: 'MyPlugin'> ^nil "indicates failure"
...and out of curiosity - is there currently a way to "enumerate" these entry points? That would probably be nice to have otherwise, some convention.
regards, Göran
Göran Krampe wrote:
Andreas Raab wrote:
MyClass>>pluginVersion "Returns the plugin version, or nil if the plugin cannot be loaded" <primitive: 'primitiveVersion' module: 'MyPlugin'> ^nil "indicates failure"
...and out of curiosity - is there currently a way to "enumerate" these entry points? That would probably be nice to have otherwise, some convention.
By "entry points" you mean primitives? If so, no, there isn't. The entry points are regular library symbols and I don't think the platforms provide a way of enumerating these.
Although, I will point out that (IIRC) Igor and Eliot have both mentioned changing the plugin interface to export a list of symbols that might be enumerable.
Cheers, - Andreas
On 24.03.2009, at 08:46, Andreas Raab wrote:
Göran Krampe wrote:
Andreas Raab wrote:
MyClass>>pluginVersion "Returns the plugin version, or nil if the plugin cannot be loaded" <primitive: 'primitiveVersion' module: 'MyPlugin'> ^nil "indicates failure"
...and out of curiosity - is there currently a way to "enumerate" these entry points? That would probably be nice to have otherwise, some convention.
By "entry points" you mean primitives? If so, no, there isn't. The entry points are regular library symbols and I don't think the platforms provide a way of enumerating these.
They are not only library symbols, but also held in an array ...
Although, I will point out that (IIRC) Igor and Eliot have both mentioned changing the plugin interface to export a list of symbols that might be enumerable.
... and that array could easily be made accessible to a primitive I'd think.
- Bert -
On Tuesday 24 Mar 2009 2:23:31 am Ross Boylan wrote:
I'm trying to figure out if I'm setup so I can use some of the font packages. I'm running a 3.10 image (but 3.9 VM) on Linux (Debian Lenny).
How do I get a list of all plugins?
Plugins are shared libraries packaged in the same directory as the executable: $ dpkg -L squeak-vm .... /usr/lib/squeak/3.10-3/AioPlugin /usr/lib/squeak/3.10-3/B3DAcceleratorPlugin /usr/lib/squeak/3.10-3/ClipboardExtendedPlugin /usr/lib/squeak/3.10-3/DBusPlugin /usr/lib/squeak/3.10-3/FileCopyPlugin /usr/lib/squeak/3.10-3/GStreamerPlugin /usr/lib/squeak/3.10-3/ImmX11Plugin /usr/lib/squeak/3.10-3/KedamaPlugin /usr/lib/squeak/3.10-3/KedamaPlugin2 /usr/lib/squeak/3.10-3/MIDIPlugin /usr/lib/squeak/3.10-3/OggPlugin /usr/lib/squeak/3.10-3/PseudoTTYPlugin /usr/lib/squeak/3.10-3/RomePlugin /usr/lib/squeak/3.10-3/Squeak3D /usr/lib/squeak/3.10-3/SqueakFFIPrims /usr/lib/squeak/3.10-3/UUIDPlugin /usr/lib/squeak/3.10-3/UnixOSProcessPlugin /usr/lib/squeak/3.10-3/VideoForLinuxPlugin /usr/lib/squeak/3.10-3/XDisplayControlPlugin ...
Subbu
squeak-dev@lists.squeakfoundation.org