Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,20 @@ foreach ($arg in $args) {
if ($arg -like "--dir=*") { $InstallDir = $arg.Substring(6) }
}

# Detect architecture (ARM64 vs x64). PROCESSOR_ARCHITEW6432 is set to ARM64
# when an x86/x64 process runs under emulation on ARM hardware, so check both to
# resolve ARM64 even from an emulated shell; anything else falls back to amd64.
if ($env:PROCESSOR_ARCHITECTURE -eq "ARM64" -or $env:PROCESSOR_ARCHITEW6432 -eq "ARM64") {
$Arch = "arm64"
} else {
$Arch = "amd64"
# Detect the OS architecture. RuntimeInformation.OSArchitecture reports the real
# OS arch (Arm64) even from an x64 process running under emulation on ARM64 --
# unlike $env:PROCESSOR_ARCHITECTURE, which reports the emulated "AMD64", and
# PROCESSOR_ARCHITEW6432, which is unset for 64-bit emulated processes. Fall back
# to the env vars only if the .NET API is somehow unavailable.
try {
$osArch = [System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture
$Arch = if ($osArch -eq 'Arm64') { "arm64" } else { "amd64" }
} catch {
if ($env:PROCESSOR_ARCHITECTURE -eq "ARM64" -or $env:PROCESSOR_ARCHITEW6432 -eq "ARM64") {
$Arch = "arm64"
} else {
$Arch = "amd64"
}
}

Write-Host "codebase-memory-mcp installer (Windows)"
Expand Down
Loading