lua-users home
lua-l archive

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



> On Dec 2, 2021, at 12:20 PM, steve donovan <steve.j.donovan@gmail.com> wrote:
> 
> On Thu, Dec 2, 2021 at 5:38 PM Lorenzo Donati
> <lorenzodonatibz@tiscali.it> wrote:
>> It would be nice to have a complete "portable" application (in the
>> Windows sense, i.e. relocatable), so that it doesn't depend on system
>> paths. Maybe just use a specific env var like EL_DEFAULT_HOME, where the
>> user could specify the directory el needs.
> 
> I like this idea. Even in the Linux-y world, people are starting to
> get annoyed with stuff being put in their nice tidy home directories.

I recently did some lua work for two projects and ended up needing exactly this (having all the stuff to be installed - lua, .h files, libraries, & modules, even the source tree — in a single directory hierarchy (eg <foo>/lib, <foo>/bin, <foo>/include, etc). I came up with two approaches. In the first, I wrote our own version of lua.c which replaced the compiled-in package.path with a setting of our own choosing. In the other, I modified luaconf.h and the Makefiles to allow LUA_ROOT to be set from the command line:
#ifndef LUA_ROOT
#define LUA_ROOT	"/usr/local/"
#endif



> Sorry that my essays get too large. As Blaise Pascal once wrote at the
> end of a letter "I have made this longer than usual because I have not
> had time to make it shorter."

Perfection is achieved not when you have added everything that can be added, but when you have taken away everything that can be taken away