From 57e6fbca8b0dfe050e594d3da389d1f8d291ed80 Mon Sep 17 00:00:00 2001 From: Ignacio BurgueƱo Date: Wed, 3 Jul 2013 10:57:55 -0300 Subject: 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. --- install.bat | 12 ++++++++---- 1 file 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 --[[ local vars = {} vars.PREFIX = [[C:\LuaRocks]] -vars.VERSION = "2.0" +vars.VERSION = "2.1" vars.SYSCONFDIR = [[C:\LuaRocks]] vars.ROCKS_TREE = [[C:\LuaRocks]] vars.SCRIPTS_DIR = nil @@ -340,9 +340,13 @@ local function look_for_lua_install () look_for_link_libraries(vars.LUA_LIBDIR) and look_for_headers(vars.LUA_INCDIR) then - if exec(S"$LUA_BINDIR\\$LUA_INTERPRETER -v 2>NUL") then - print(" Ok") - return true + if get_runtime() then + print("Runtime check completed, now testing interpreter...") + if exec(S[[$LUA_BINDIR\$LUA_INTERPRETER -v 2>NUL]]) then + print(" Ok") + return true + end + print(" Interpreter returned an error, not ok") end end return false -- cgit v1.2.3-55-g6feb