diff options
-rw-r--r-- | install.bat | 23 |
1 files 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 () | |||
389 | end | 389 | end |
390 | 390 | ||
391 | local function get_architecture() | 391 | local function get_architecture() |
392 | -- detect processor arch | 392 | -- detect processor arch |
393 | proc = io.popen([[.\bin\bin\uname -m]]):read("*l") | 393 | local tmpname = [[.\_architect_temp.txt]] |
394 | if proc:match("i[%d]86") then | 394 | local cmd = [[REG.exe Query HKLM\Hardware\Description\System\CentralProcessor\0 >"]]..tmpname.. [["]] |
395 | proc = "x86" | 395 | if not exec(cmd) then |
396 | elseif proc:match("amd64") or proc:match("x86_64") then | ||
397 | proc = "x86_64" | ||
398 | else | ||
399 | die("Could not detect processor architecture") | 396 | die("Could not detect processor architecture") |
400 | end | 397 | end |
398 | local f = io.open(tmpname, "r") | ||
399 | local proc = f:read('*a') | ||
400 | f:close() | ||
401 | os.remove(tmpname) | ||
402 | |||
403 | if proc:match("x86") then | ||
404 | proc = "x86" | ||
405 | else | ||
406 | proc = "x86_64" | ||
407 | end | ||
401 | return proc | 408 | return proc |
402 | end | 409 | end |
403 | 410 | ||