Hi all,
I've been working on a custom build of Cog (rev 2886) on Linux. I notice that the VM always looks for plugins in the same directory as the VM binary, and thus we need a wrapper script to set SQUEAK_PLUGINS and LD_LIBRARY_PATH correctly.
I'd like to do away with the wrapper script in my specific case, since I know in advance where everything will be installed. Is there a way to specify the plugin directory at compile time?
Cheers, Colin |
Hi Colin,
>I've been working on a custom build of Cog (rev 2886) on Linux. I notice that the VM always looks for plugins in the same directory as the VM binary, and thus we need a wrapper script to set SQUEAK_PLUGINS and LD_LIBRARY_PATH correctly. >I'd like to do away with the wrapper script in my specific case, since I know in advance where everything will be installed. Is there a way to specify the plugin directory at compile time? At the bottom of the class comment of VMMaker is a discussion of plugins. In there is this little snippet:
My guess on hacking it would be on the class side of VMMaker under the accessing protocol: coreVMDirName, machinesDirName, etc... That's just conjecture on my part. cheers. tty |
On Wed, Apr 2, 2014 at 1:33 PM, gettimothy <[hidden email]> wrote:
Hi tty, That's surprising. I would have thought that loading plugins would be a platform-specific operation. I didn't think to look at VMMaker. Surely that's about generating plugin code, and not loading shared libraries?
On the other hand, I *did* fix filenames. I'll have to track down the author of that comment. :-) Thanks! Colin |
In reply to this post by tty
On 02-04-2014, at 11:33 AM, gettimothy <[hidden email]> wrote: > Hi Colin, > > >I've been working on a custom build of Cog (rev 2886) on Linux. I notice that the VM always looks for plugins in the same directory as the VM binary, and thus we need a wrapper script to set SQUEAK_PLUGINS and LD_LIBRARY_PATH correctly. > >I'd like to do away with the wrapper script in my specific case, since I know in advance where everything will be installed. Is there a way to specify the plugin directory at compile time? > > > > At the bottom of the class comment of VMMaker is a discussion of plugins. > > In there is this little snippet: > > > Known problems:- > a) since Squeak has really poor filename handling, you can't simply change the directory names to '/foo/bar/myEvilCodeBase' and expect it to work. You fix file names and I'll fix VMMaker :-) > > My guess on hacking it would be on the class side of VMMaker under the accessing protocol: coreVMDirName, machinesDirName, etc... > > > That's just conjecture on my part. That’s the bit about dealing with plugins at generate time rather than compile time. Colin, look into platforms/unix/vm/sqUnixExternalPrims.c->ioLoadModule() where there is if (( handle= tryLoading( "./", pluginName)) || (handle= tryLoadingPath("SQUEAK_PLUGIN_PATH", pluginName)) || (handle= tryLoadingPath("LD_LIBRARY_PATH", pluginName)) || (handle= tryLoading( "", pluginName)) # if defined(VM_X11DIR) || (handle= tryLoading(VM_X11DIR"/", pluginName)) # endif ) Add path to test, remove other checks, search database, whatever. Actually, adding ability to check across the net for a newer-than-local version might be interesting…. tim -- tim Rowledge; [hidden email]; http://www.rowledge.org/tim Oxymorons: Sanitary landfill |
In reply to this post by Colin Putney-3
On 02-04-2014, at 11:39 AM, Colin Putney <[hidden email]> wrote: > > On the other hand, I *did* fix filenames. I'll have to track down the author of that comment. :-) That would be me. About 15 years ago. Are you seriously expecting me to believe that filenames have been fixed *that* quickly? tim -- tim Rowledge; [hidden email]; http://www.rowledge.org/tim Strange OpCodes: MTP: MounT Programmer |
In reply to this post by Colin Putney-3
>>Surely that's about generating plugin code, and not loading shared libraries?
erp. My apologies. I am quite famous for solving the wrong problem. |
In reply to this post by Colin Putney-3
On 02.04.2014, at 19:17, Colin Putney <[hidden email]> wrote: > Hi all, > > I've been working on a custom build of Cog (rev 2886) on Linux. I notice that the VM always looks for plugins in the same directory as the VM binary, and thus we need a wrapper script to set SQUEAK_PLUGINS and LD_LIBRARY_PATH correctly. > > I'd like to do away with the wrapper script in my specific case, since I know in advance where everything will be installed. Is there a way to specify the plugin directory at compile time? Another way would be using a full module path name in the image (just go through all primitive methods and hack the literal). - Bert - smime.p7s (5K) Download Attachment |
Free forum by Nabble | Edit this page |