From 41a84a7f1fe0b62b2fbbb3fda992f586b6c43f9e Mon Sep 17 00:00:00 2001 From: Thijs Schreijer Date: Mon, 7 Oct 2013 23:00:25 +0200 Subject: modified architecture detection as per http://support.microsoft.com/kb/556009 --- install.bat | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/install.bat b/install.bat index 7ece98bc..8d8b3e4c 100644 --- a/install.bat +++ b/install.bat @@ -389,15 +389,22 @@ local function look_for_lua_install () end local function get_architecture() - -- detect processor arch - proc = io.popen([[.\bin\bin\uname -m]]):read("*l") - if proc:match("i[%d]86") then - proc = "x86" - elseif proc:match("amd64") or proc:match("x86_64") then - proc = "x86_64" - else + -- detect processor arch + local tmpname = [[.\_architect_temp.txt]] + local cmd = [[REG.exe Query HKLM\Hardware\Description\System\CentralProcessor\0 >"]]..tmpname.. [["]] + if not exec(cmd) then die("Could not detect processor architecture") - end + end + local f = io.open(tmpname, "r") + local proc = f:read('*a') + f:close() + os.remove(tmpname) + + if proc:match("x86") then + proc = "x86" + else + proc = "x86_64" + end return proc end -- cgit v1.2.3-55-g6feb