lua-users home
lua-l archive

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


Am 20.05.2014 16:21 schröbte Thijs Schreijer:

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.

What default Windows behavior? Are we still talking about the install
target of the Unix Makefile that also happens to work for MinGW?

I should have called it the MinGW target probably.

There already is a mingw target. It only builds, it doesn't install.


And it
seems you *do* want to declare that behavior the default on Windows.

I don't care. Really not. It's just that it is the easiest way to
make a "predictable" Lua installation on Windows, using either some
GCC variant or the MS tools. If you call it "defining default
behaviour" on my behalf, also fine, I also don't care about that.
What I do care about is consistency and ease of use for newbies.

What alternative would you suggest that works on Windows, using any
of the available toolchains, doesn't require a lot of upfront
fiddling to build, nor a lot of afterwork to relocate files, fix
paths etc. ?

There is no option on Windows that works that way. At the very least you have to put `lua[c].exe` and `lua5x.dll` in a directory in PATH, move the three or four public include files into a directory in your compiler's include path, and the import library (and/or dll) into your compiler's library directory. As an alternative you could just use the extracted archive as final installation, but then you have to add the `src` directory to PATH, INCLUDE, and LIB (or specify the latter two via compiler options).

For a newbie I would just say "run this installer", or if he/she really wants to get dirty: "Put lua.exe and lua5x.dll in a directory in your PATH, and when you want to compile your own extensions, then come back for detailed instructions for your compiler".


Are
you using MSYS by any chance? It seems that plain MinGW doesn't have
`rm` or `install` executables (or a `mkdir` that understands `-p`), so
you really have to work hard to make the install target work for MinGW ...

Iirc, some on the list use TDM as well.

So, I assume TDM includes those programs?!


Also you should probably avoid GNU make features or you will break the
Makefile for some Unixes. And I think you are missing some `.exe` file
extensions in the modified install target.

Which then? (Note that lua and luac do not need the .exe extension when building)

Also when installing? Does `install` copy `lua.exe` if you just say `lua`?


Philipp