mirror of
https://github.com/zotero/zotero.git
synced 2026-08-28 05:25:31 +00:00
Detect Windows-on-ARM in dir_build under an emulated shell
Some checks failed
CI / Detect changes (push) Has been cancelled
CI / Utilities Tests (push) Has been cancelled
CI / Build, Upload (push) Has been cancelled
CI / Test () (push) Has been cancelled
CI / Test (macOS NFS) (push) Has been cancelled
CI / Test (Windows arm64) (push) Has been cancelled
CI / Test (Windows x64) (push) Has been cancelled
Some checks failed
CI / Detect changes (push) Has been cancelled
CI / Utilities Tests (push) Has been cancelled
CI / Build, Upload (push) Has been cancelled
CI / Test () (push) Has been cancelled
CI / Test (macOS NFS) (push) Has been cancelled
CI / Test (Windows arm64) (push) Has been cancelled
CI / Test (Windows x64) (push) Has been cancelled
uname reports x86_64 in an emulated x64 shell, so the staged build got the wrong architecture.
This commit is contained in:
parent
f371240414
commit
74336ae253
1 changed files with 10 additions and 4 deletions
|
|
@ -76,10 +76,16 @@ if [[ $platform = "m" ]]; then
|
|||
else
|
||||
# Windows / Linux: derive arch if not supplied
|
||||
if [[ -z $arch ]]; then
|
||||
case "$(uname -m)" in
|
||||
arm64|aarch64) arch="arm64" ;;
|
||||
x86_64) arch="x64" ;;
|
||||
esac
|
||||
# On Windows on ARM, an emulated x64 shell reports x86_64 from uname, so check
|
||||
# the native architecture in the registry
|
||||
if [[ $platform = "w" ]] && reg.exe query 'HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' -v PROCESSOR_ARCHITECTURE 2> /dev/null | grep -q ARM64; then
|
||||
arch="arm64"
|
||||
else
|
||||
case "$(uname -m)" in
|
||||
arm64|aarch64) arch="arm64" ;;
|
||||
x86_64) arch="x64" ;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue