Closed rphillips closed 9 years ago
Note: changing line 9 to "windows-ia32' solved this
So we can compare it with IA64
and use the 64-bit version in that case? I'm not quite sure how to do this in powershell.
something like
if ($ENV:PROCESSOR_ARCHITECTURE -eq "IA64") {
$LUVI_ARCH = "Windows-amd64"
}
elseif ($ENV:PROCESSOR_ARCHITECTURE -eq "x86") {
$LUVI_ARCH = "Windows-ia32"
}
Or
if ([System.Environment]::Is64BitProcess) {
//Do 64-bit stuff
} else {
//Do 32-bit stuff
}
One should note both of these have pitfalls, if run in a 32 bit powershell. Ref for rphillips` code http://stackoverflow.com/questions/1738985/why-processor-architecture-always-returns-x86-instead-of-amd64
This [1] needs some smarter detection: https://github.com/luvit/lit/blob/master/get-lit.ps1#L5
64bits:
32bits: