Re: Installation instructions - Bootstrap.bat

40 views
Skip to first unread message

steve donovan

unread,
Mar 12, 2013, 12:22:08 PM3/12/13
to luafor...@googlegroups.com
On Tue, Mar 12, 2013 at 4:24 PM, MC <macha...@gmail.com> wrote:
> I've downloaded and unpacked the Binaries, and I assume there's no build.bat
> or bootstrap.bat because the purpose of the binaries package is to provide
> them pre-built. But shouldn't we say that somewhere?

Absolutely - this is a binary-only package. One of the binaries is
LuaRocks, which I'm trying to integrate more closely with the
packages.

(watch the resulting ping-pong at
https://github.com/LuaDist/batteries/issues/1 )

The idea is to have as many prebuilt binaries as possible, even if
they aren't in the zip. Then LuaRocks can be used as the binary
delivery channel, and no compiler toolchain needed. (Although mingw
really is easy to install these days, check out the TDM install)

Which means there could be a point where the core zip could actually
be a good deal smaller...

steve d.

Peter Drahoš

unread,
Mar 12, 2013, 1:11:36 PM3/12/13
to luafor...@googlegroups.com
On 12 Mar, 2013, at 15:24 , MC <macha...@gmail.com> wrote:

> I'm simply working through the installation instructions on a system with no dev tools installed (other than VS2010, but that's another story...) and have a question:
>
> On the installation instructions page (https://github.com/LuaDist/Repository/wiki/LuaDist%3A-Installation), under the Building with MinGW section, after working through the MinGW and CMake installations (both perfectly documented on the Installation of System Dependencies page, btw), I get to:
>
> Building LuaDist can now be started using the build.bat script. Simply extract sources and run:
>
> cd unpacked\l
> uadist
> bootstrap.bat

Binaries != source, the install page suggests to use git to obtain the source of LuaDist/bootstrap[1] and all its submodules. The step is marked as optional, however GitHub removed the Download section recently which actually contained the sources referred to in the install page. If you use git to get the sources the install guide is spot on.

> I've downloaded and unpacked the Binaries, and I assume there's no build.bat or bootstrap.bat because the purpose of the binaries package is to provide them pre-built. But shouldn't we say that somewhere?

Binaries are pre-built and contain many useful modules (hence + batteries). However you can use the Binaries to avoid the bootstrap process and use bin/luadist.exe to build from source or download other binary packages.

For example run cmd:

$ cd LD/bin
$ luadist list

That will list of all installed modules inside the LD directory. We call that directory the "deployment" directory. The fun begins when you realize you can have multiple deployment directories per project or just use one.

$ luadist C:\lua-5.2 install lua

This will install only latest lua to the specified deployment directory which can be used for 5.2 based projects

$ luadist C:\lua-5.2 install luasocket

Will add luasocket to that deployment directory

$ luadist C:\LuaDist install luadist-git -source -binary=false

This replicates the functionality of bootstrap as it will install Lua and the luadist utility into a new deployment at C:\LuaDist. Now you could use the latest C:\LuaDist\bin\luadist instead of the one you used to install it

$ luadist install luaexpat

Running without any path specified will always install modules into the deployment directory luadist was started from, keeping everything in one place

> I'm just wondering if the top page should be an example of how to create and build a deployment package of "hello world" to cut down on some of the confusion. (I'm trying to approach this from the complete beginner viewpoint - the installation page does instruct Windows users to build it, but only after you've been provided pre-built binaries in the download shown above, right?

No binaries are needed for that, however the install page lists the git checkout stage as (optional) which it no longer is, the instructions need minor updates .. thanks for pointing that out.

pd


steve donovan

unread,
Mar 12, 2013, 1:28:29 PM3/12/13
to luafor...@googlegroups.com
On Tue, Mar 12, 2013 at 7:11 PM, Peter Drahoš <dra...@gmail.com> wrote:
> For example run cmd:
>
> $ cd LD/bin
> $ luadist list

Ah cool, Peter, the light has dawned. I was immediately able to say
'luadist install winapi' and there it was.

steve d.

MC

unread,
Mar 12, 2013, 2:20:51 PM3/12/13
to luafor...@googlegroups.com


On Tuesday, March 12, 2013 1:11:36 PM UTC-4, Peter Drahoš wrote:

> I'm just wondering if the top page should be an example of how to create and build a deployment package of "hello world" to cut down on some of the confusion.  (I'm trying to approach this from the complete beginner viewpoint - the installation page does instruct Windows users to build it, but only after you've been provided pre-built binaries in the download shown above, right?

No binaries are needed for that, however the install page lists the git checkout stage as (optional) which it no longer is, the instructions need minor updates .. thanks for pointing that out.

pd



Thanks very much for the excellent detail, Peter.  I have used Lua/LuaFileSystem/LuaSocket/etc. to create a Server Monitoring mechanism that I use to inform me of processor and disk utilization issues, web sites that are down, etc. on about 15 servers, so I know how to get stuff done, but I sure don't feel like I know "the easy way", if there is one.  That's what prompted my message (using a different e-mail address) on the Lua mailing list.  Since my SSD crashed and I had to start over with a clean slate anyway (with programs, build environment, etc., of course, not source), I just thought I'd try to simulate the "typical newbie" approach and go to the site Steve suggested I start with this time and read the instructions.  I did so much mucking around learning it to begin with that I'm sure I had every "distribution" out there on my system somewhere.  I'd like to with one, and only one, this time around...

Thanks again,

Mark

steve donovan

unread,
Mar 13, 2013, 12:22:33 AM3/13/13
to luafor...@googlegroups.com
On Tue, Mar 12, 2013 at 8:20 PM, MC <macha...@gmail.com> wrote:
> and go to the site Steve suggested I start with this time and read the
> instructions.

Which I should have done ;) I am impressed with how well luadist
works for downloading binaries, and there is already a large number of
them. (Unfortunately, LuaRocks does not have many, and they're
probably all built against the old MSVC 2005 runtime) This takes the
urgency out of patching LuaRocks to integrate properly as far as I'm
concerned.

For these tests I am just working with the batteries, and 'luadist
install' only lets me down if I choose a module that doesn't have an
associated binary. The resulting error message is a little obscure.
It would be most cool to have a more elaborate 'all modules' display
which gave a little summary and whether it was available as binary or
Lua source. That's more an issue to discuss in another forum, but the
point is that with a little bit more information, it's easy to make a
front-end with wxLua

steve d.
Reply all
Reply to author
Forward
0 new messages