Improve experience for those using Apple M1 devices #2460

- For Rosetta x64, prevent use of global ARM64 libvips
- For ARM64, improve error message when global libvips not found
This commit is contained in:
Lovell Fuller
2021-02-22 13:49:28 +00:00
parent cc37b59309
commit 4264c0577e
3 changed files with 23 additions and 2 deletions

View File

@@ -74,6 +74,9 @@ try {
if (arch === 'ia32' && !platformAndArch.startsWith('win32')) {
throw new Error(`Intel Architecture 32-bit systems require manual installation of libvips >= ${minimumLibvipsVersion}`);
}
if (platformAndArch === 'darwin-arm64') {
throw new Error("Please run 'brew install vips' to install libvips on Apple M1 (ARM64) systems");
}
if (platformAndArch === 'freebsd-x64' || platformAndArch === 'openbsd-x64' || platformAndArch === 'sunos-x64') {
throw new Error(`BSD/SunOS systems require manual installation of libvips >= ${minimumLibvipsVersion}`);
}