lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Thu, Sep 26, 2013 at 6:18 PM, Sean Conner <> wrote:
>   Coming from the Unix world, I'm used to the "configure; make; make
> install" method of installation [1].  And unless I change it with some
> options to configure, everything ends up installed in /usr/local.

As a practical contribution to this otherwise entertaining discussion,
I've put together a generic installer script here:

The basic idea is that you customize the script and put a little
install function up front. For instance, LDoc is easy, since it's just
a matter of creating a wrapper which points to ldoc.lua in the dir you
extracted the archive:

function install()
    requires ('pl','Penlight')
    install_script 'ldoc'

Penlight itself would be (the pl directory is a subdir of lua)

function install()
    from 'lua'
    install_lua_package 'pl'

Currently this script is sitting uneasily between 'dead simple' and
'covers everything'; I have had to make assumptions. On Unix, if you
run as su, scripts go to /usr/local/bin and modules go to the usual
places. If not su, it will try to find a directory on the Lua module
path which is user-writeable, and ditto for /home/user/bin for

On Windows, the only standard locations for executables are the ones
you are not supposed to write to, su or no. So I write scripts into
the directory of the Lua interpreter.

It's the kind of thing which badly needs command-line parameters,
although if we could keep these to under a dozen then 'install --help'
will be easier to read ;)

steve d.