aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThijs Schreijer <thijs@thijsschreijer.nl>2013-05-04 00:20:53 +0200
committerThijs Schreijer <thijs@thijsschreijer.nl>2013-05-04 00:20:53 +0200
commitc1df8ac831cc0e97264220a79f56f6f0fe3e3f51 (patch)
treef523f85f1224dacedc7c8afa14149c2638d380e2
parent0d8edd1fe84f57cbbde28c3ae8dd94f5cd537834 (diff)
downloadluarocks-c1df8ac831cc0e97264220a79f56f6f0fe3e3f51.tar.gz
luarocks-c1df8ac831cc0e97264220a79f56f6f0fe3e3f51.tar.bz2
luarocks-c1df8ac831cc0e97264220a79f56f6f0fe3e3f51.zip
changed failure to detect runtime into a warning. objdump.exe does not support 64bit windows
-rw-r--r--install.bat11
1 files changed, 8 insertions, 3 deletions
diff --git a/install.bat b/install.bat
index e1e7cb76..d5e32957 100644
--- a/install.bat
+++ b/install.bat
@@ -272,7 +272,7 @@ local function get_file_runtime(p,f) -- path, filename
272 local outfile = "output.txt" 272 local outfile = "output.txt"
273 local content 273 local content
274 -- analyze binary 274 -- analyze binary
275 if exec([[.\bin\objdump -x "]]..infile..[[" > ]]..outfile) then 275 if exec([[.\bin\objdump -x "]]..infile..[[" > ]]..outfile..[[ 2<&1]]) then
276 -- read temp file 276 -- read temp file
277 local fh = io.open(outfile) 277 local fh = io.open(outfile)
278 content = fh:read("*a") 278 content = fh:read("*a")
@@ -321,7 +321,12 @@ local function get_runtime()
321 end 321 end
322 end 322 end
323 end 323 end
324 return (type(vars.LUA_RUNTIME) == "string") 324 if type(vars.LUA_RUNTIME) ~= "string" then
325 -- analysis failed, issue a warning
326 vars.LUA_RUNTIME = "MSVCR80"
327 print("*** WARNING ***: could not analyse the runtime used, defaulting to "..vars.LUA_RUNTIME)
328 end
329 return true
325end 330end
326 331
327local function look_for_lua_install () 332local function look_for_lua_install ()
@@ -353,7 +358,7 @@ local function look_for_lua_install ()
353 if look_for_headers(directory) then 358 if look_for_headers(directory) then
354 print("Headers found, checking runtime to use...") 359 print("Headers found, checking runtime to use...")
355 if get_runtime() then 360 if get_runtime() then
356 print("Runtime found, now testing interpreter...") 361 print("Runtime check completed, now testing interpreter...")
357 if exec(S[[$LUA_BINDIR\$LUA_INTERPRETER -v 2>NUL]]) then 362 if exec(S[[$LUA_BINDIR\$LUA_INTERPRETER -v 2>NUL]]) then
358 print(" Ok") 363 print(" Ok")
359 return true 364 return true