Hello Paul,
>> Hopefully this will be helpful. I still would prefer if LuaDist was installed into separate folder outside ZBS as it would make things much easier, however this should work.
>
> Thank you for the detailed suggestion. I did make some progress, even
> though I'm not completely out of the woods yet.
>
> I managed to come up with some configuration that allowed me to run
> "dist.install('lpeg')", get lpeg DLL and be able to load it (after
> copying manually where it needs to be). I tried with and without
> dist_info files you sent and it worked in both cases, so, I'm not
> going to use them for now. There are several things that can be
> streamlined:
>
> 1. Is it possible to extract only files.Runtime files and nothing
> else? Do I specify conf.components = {"Runtime"}? I tried that, but
> still got all the files installed.
LuaDist will always download all the files of the package to a temporary folder. From there it will install files as specified by conf.components and entries in dist_info files table.
> 2. Is it possible to get the directory the module was installed into
> (in this case it was "lpeg-0.10.2")? Even better, it is possible to
> specify that the Runtime for the module should be installed into
> directory "X" instead of "lpeg-0.10.2/lib/lua" (or at least skip
> lpeg-0.10.2 part)?
Not for binary packages, for source packages you can specify INSTALL_[LIB|INCLUDE|BIN|LUA_LUAC] destinations. As for the lpeg-0.10.2 prefix, this is probably the temporary directory used by the luadist cli tool before it tries to install the files to a destination.
You can however specify the top level directory for the module to be deployed into using the install command e.g.:
dist = require 'dist'
conf = require 'dist.config'
conf.binary = true
conf.components = { 'Runtime' }
dist.install( ‘lpeg', '/Users/drahosp/Desktop/lpeg' )
>
> 3. It would be great to avoid using "module" and to allow local
> variables to be used (as I described earlier, dist = require "dist"
> doesn't work from a sandboxed environment).
I am already working on a updated version of the utility that will also support installation of “builtin” type rocks. It should be ready for my talk on LuaDist for Lua Workshop. It will be lua-5.1 5.2 and LuaJIT compatible without module.
> 4. How do I specify if I want Lua 5.1 or Lua 5.2 version of the module?
The dependency handler determines this based on the installed lua version or in case where the install destination does not contain any lua you can simply install the lua version you want first (or fake it using the dist_info files). For example this will install lua-5.1.5 first (or skip it if its installed) and progress to install lpeg that is lua-5.1.5 compatible.
dist.install( { 'lua-5.1.5', 'lpeg' }, '/Users/drahosp/Desktop/test' )
pd
> Thank you!
>
> Paul.
>
> On Fri, Oct 11, 2013 at 3:23 PM, Peter Drahoš <
ra...@necroraiders.net> wrote:
>> On 11 Oct, 2013, at 19:59 , Paul K <
paulc...@gmail.com> wrote:
>>
>>> Hi Peter,
>>>
>>>> A quick update on this. I tried to test the ability to run "install" from ZBS, but ran into several issues I need your help with.
>>> Do you have any suggestions on what I should try to do differently? Essentially, I'd like to be able to install LuaDist binary modules to the directories I specify by running from a non-LuaDist aware interpreter (I have all bootstrap modules and can configure it any way needed, but need help with
dist.info files).
>>
>> Hello Paul,
>> sorry I missed your previous message. LuaDist basically looks for ../share/luadist-git/dists/* folder that stores
dist.info files for information about installed modules. It does not analyze the interpreter itself so it is not aware of anything not defined with
dist.info. You basically need to manually enter
dist.info files for each installed module into the /share/luadist-git/dists directory.
>>
>> For luadist-git you can extract the info files from attachment into
>> [executable]../share/luadist-git/dists
>>
>> In case your architecture is different from arch=“Darwin” type=“x86_64” (it needs to match settings in dist/config.lua) you may need to edit the info files accordingly.
>>
>> This should provide luadist with all the info it needs and additional binary modules will simply be added without installation of the already present dependencies.
>>
>> Hopefully this will be helpful. I still would prefer if LuaDist was installed into separate folder outside ZBS as it would make things much easier, however this should work.
>>
>> pd
>>
>> --
>> You received this message because you are subscribed to a topic in the Google Groups "LuaDist" group.
>> To unsubscribe from this topic, visithttps://
groups.google.com/d/topic/luadist/iWh4VXT2QoI/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email
toluadist+...@googlegroups.com.
> --
> You received this message because you are subscribed to the Google Groups "LuaDist" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
toluadist+...@googlegroups.com.