lua-users home
lua-l archive

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



> -----Original Message-----
> From: lua-l-bounces@lists.lua.org [mailto:lua-l-bounces@lists.lua.org] On
> Behalf Of steve donovan
> Sent: dinsdag 20 mei 2014 10:12
> To: Lua mailing list
> Subject: Re: Makefile vs LUA_PATH inconsistency
> 
> On Tue, May 20, 2014 at 9:49 AM, Thijs Schreijer
> <thijs@thijsschreijer.nl> wrote:
> > I'm for keeping the platform differences minimal. So in this case the
> structure produced by `make install` (though not very windowish) will work
> fine. I would rather update the default paths in `luaconf.h`.
> 
> OK, so this makes the package (c)path versioned, but surely we get
> versioning from the fact that each separate Lua executable gets its
> own subtree based on its location?

One could, but that is outside the Lua distribution. Generally the Lua executable is (on Windows) installed in a path like;
   "C:\Program Files\Lua\5.2\bin\lua.exe"
But like mentioned; the version number in this path it _not_ in the Lua distribution, so it's chosen by the user. If he chooses to use;
   "C:\Program Files\Lua\bin\lua.exe"
Then his module paths would be (based on the default distribution from the makefile);
   "C:\Program Files\Lua\share\lua\5.2\mymodule.lua"


Worst case one would get paths like this;
   "C:\Program Files\Lua\5.2\share\lua\5.2\mymodule.lua"
With double versioning. Ugly, but still fully functional out-of-the-box. So pro's can change it the way they see fit, whilst for newbies there is nothing to worry about.


Thijs

PS. The make a full overlap possible with multiple Lua versions in a single tree, one would have to change the targets;
  \bin\lua.exe   -->  lua52.exe
  \bin\luac.exe  -->  luac52.exe
  \lib\liblua.a  -->  liblua52.a       <-- imo this already should be in the makefile

Then one could have "c:\program files\lua" to install to and have multiple independent Lua versions in there. Symlinks or a batch file can then be used to bind `lua.exe` to the default `luaXX.exe` version.