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 Philipp Janda
> Sent: dinsdag 20 mei 2014 12:07
> To: lua-l@lists.lua.org
> Subject: Re: Makefile vs LUA_PATH inconsistency
> 
> Am 20.05.2014 11:19 schröbte Thijs Schreijer:
> >
> >> -----Original Message-----
> >> From: lua-l-bounces@lists.lua.org [mailto:lua-l-bounces@lists.lua.org] On
> >> Behalf Of Philipp Janda
> >> Sent: dinsdag 20 mei 2014 11:07
> >> To: lua-l@lists.lua.org
> >> Subject: Re: Makefile vs LUA_PATH inconsistency
> >>
> >> Am 20.05.2014 09:59 schröbte Thijs Schreijer:
> >>>
> >>> Can't we use the currently created structure as the "widely accepted
> >>> subfolder tree"? There is no technical reason that it won't work.
> >>> It's just not very windowish, and it limits platform differences.
> >>>
> >>
> >> The way I see it is: There is no default directory structure for the
> >> standalone interpreter on Windows. The mingw target is included in the
> >> Unix Makefile as a convenience, and that Unix Makefile uses the usual
> >> Unix installation locations. No reason to read something into it for
> >> Windows ...
> >>
> >
> > I agree, but it also doesn't hurt to adopt those, does it? And
> > adopting them would resolve a number of minor newbie issues, like
> > default installations not working.
> 
> What is a default installation on Windows? Do you really want to declare
> something a Unix Makefile does on Windows for one particular compiler by
> accident to be the default for Windows?
> The Unix paths aren't even a good fit on Windows (e.g. the lua5x.dll
> must be in the same directory as the executable or at least in PATH, and
> not in a lib subdirectory), and every compiler already has its own set
> of paths where it looks for include files or libraries.
> 
> Someone mentioned MS had rules for the locations of modules, scripts,
> etc. I'd rather see those locations added on Windows (or use the paths
> from LfW or LuaDist), so that you can write an installer for Lua that
> fits well with the rest of the Windows ecosystem (although an installer
> could just as easily set environment variables and/or use the paths
> relative to the executable).
> 
> Philipp
> 
> 

I don't want to make any defaults, I don't want Windows to look like unix. I totally agree with everything you say, but....

It's impossible to NOT have a default, and as long as we get one along with the Lua package, can we at least make that one work out-of-the-box?

Have a look here [1]. I put the proposed changes in a github repo. The changes do not hurt anyone, but they do fix the default Windows behaviour.
Besides path updates in `luaconf.h`, fixes the makefile to include the dll upon installation, and fixes `make clean` to remove the .exe and .dll files. Fixes the Visual Studio build to have LUA_COMPAT_ALL, as on all other platforms, and includes a `luavsinstall.bat` batch file that mimics `make install` for the Visual Studio build. 

It's not very Windowish, but it doesn't hurt anyone, stays close to other platforms, fixes several flaws, and most of all; makes Windows work on the defaults.

Thijs


[1] https://github.com/Tieske/lua52/pull/1