lua-users home
lua-l archive

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





On Thu, May 15, 2014 at 1:47 PM, Thijs Schreijer <thijs@thijsschreijer.nl> wrote:
When building Lua using MinGW, the following structure is produced;

{root}
  +-- bin
  +-- include
  +-- lib
  |    +-- lua
  |         +-- 5.2
  +-- man
  |    +-- man1
  +-- share
       +-- lua
            +-- 5.2

But checking the default paths; (added some linebreaks for readability)
C:\Temp\lua\5.2>bin\lua
Lua 5.2.1  Copyright (C) 1994-2012 Lua.org, PUC-Rio
> print("PATH: "..package.path .. "\n\nCPATH: " .. package.cpath)
PATH:
C:\Temp\lua\5.2\bin\lua\?.lua;
C:\Temp\lua\5.2\bin\lua\?\init.lua;
C:\Temp\lua\5.2\bin\?.lua;
C:\Temp\lua\5.2\bin\?\init.lua;
.\?.lua

CPATH:
C:\Temp\lua\5.2\bin\?.dll;
C:\Temp\lua\5.2\bin\loadall.dll;
.\?.dll
>

So any files placed in the generated ./lib/lua/5.2/ or ./share/lua/5.2/ paths will not be found. So the make file is inconsistent with the default paths.

Shouldn't the default paths be updated to include those locations, and make it consistent?

Thijs


Do you think that path should be different (like use (_WIN32 && !(_MINGW) ) ) or should the make file build an alternate structure?

If Lua is typically put in a sandbox, then I'd change the Makefile. If it's typically put inside part of the MinGW sandbox, then changing the luaconf.h would make more sense.

Either way, it should be consistent. It would be nice if you didn't having to set environment variables for default installations and that should be an attainable goal.

-Andrew