diff options
| author | Ignacio Burgueño <ignaciob@inconcertcc.com> | 2013-07-03 10:57:55 -0300 |
|---|---|---|
| committer | Ignacio Burgueño <ignaciob@inconcertcc.com> | 2013-07-03 10:57:55 -0300 |
| commit | 57e6fbca8b0dfe050e594d3da389d1f8d291ed80 (patch) | |
| tree | d9afeb3ea168b37f108308b5ea5de0977cc28e82 | |
| parent | d3ab714991d1c9accb37942f2b04a296b679cccd (diff) | |
| download | luarocks-57e6fbca8b0dfe050e594d3da389d1f8d291ed80.tar.gz luarocks-57e6fbca8b0dfe050e594d3da389d1f8d291ed80.tar.bz2 luarocks-57e6fbca8b0dfe050e594d3da389d1f8d291ed80.zip | |
Try to detect runtime when specifying INC, LIB and BIN flags.
When passing /INC /LIB and /BIN flags, the runtime used by the supplied
Lua installation is not probed, so vars.LUA_RUNTIME remains being nil,
which causes an error.
| -rw-r--r-- | install.bat | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/install.bat b/install.bat index d5e32957..15f26070 100644 --- a/install.bat +++ b/install.bat | |||
| @@ -5,7 +5,7 @@ rem=rem --[[ | |||
| 5 | local vars = {} | 5 | local vars = {} |
| 6 | 6 | ||
| 7 | vars.PREFIX = [[C:\LuaRocks]] | 7 | vars.PREFIX = [[C:\LuaRocks]] |
| 8 | vars.VERSION = "2.0" | 8 | vars.VERSION = "2.1" |
| 9 | vars.SYSCONFDIR = [[C:\LuaRocks]] | 9 | vars.SYSCONFDIR = [[C:\LuaRocks]] |
| 10 | vars.ROCKS_TREE = [[C:\LuaRocks]] | 10 | vars.ROCKS_TREE = [[C:\LuaRocks]] |
| 11 | vars.SCRIPTS_DIR = nil | 11 | vars.SCRIPTS_DIR = nil |
| @@ -340,9 +340,13 @@ local function look_for_lua_install () | |||
| 340 | look_for_link_libraries(vars.LUA_LIBDIR) and | 340 | look_for_link_libraries(vars.LUA_LIBDIR) and |
| 341 | look_for_headers(vars.LUA_INCDIR) | 341 | look_for_headers(vars.LUA_INCDIR) |
| 342 | then | 342 | then |
| 343 | if exec(S"$LUA_BINDIR\\$LUA_INTERPRETER -v 2>NUL") then | 343 | if get_runtime() then |
| 344 | print(" Ok") | 344 | print("Runtime check completed, now testing interpreter...") |
| 345 | return true | 345 | if exec(S[[$LUA_BINDIR\$LUA_INTERPRETER -v 2>NUL]]) then |
| 346 | print(" Ok") | ||
| 347 | return true | ||
| 348 | end | ||
| 349 | print(" Interpreter returned an error, not ok") | ||
| 346 | end | 350 | end |
| 347 | end | 351 | end |
| 348 | return false | 352 | return false |
