Skip to content

Commit

Permalink
Install: log Rosetta detection, improve related docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lovell committed Jan 4, 2023
1 parent 6cda090 commit 5be36c2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
3 changes: 2 additions & 1 deletion docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ and that it can be located using `pkg-config --modversion vips-cpp`.
For help compiling libvips and its dependencies, please see
[building libvips from source](https://www.libvips.org/install.html#building-libvips-from-source).

The use of a globally-installed libvips is unsupported on Windows.
The use of a globally-installed libvips is unsupported on Windows
and on macOS when running Node.js under Rosetta.

## Building from source

Expand Down
4 changes: 0 additions & 4 deletions install/libvips.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,6 @@ 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}`);
}
Expand All @@ -153,7 +150,6 @@ try {
if (!semverSatisfies(process.versions.node, supportedNodeVersion)) {
handleError(new Error(`Expected Node.js version ${supportedNodeVersion} but found ${process.versions.node}`));
}

// Download to per-process temporary file
const tarFilename = ['libvips', minimumLibvipsVersionLabelled, platformAndArch].join('-') + '.tar.br';
const tarPathCache = path.join(libvips.cachePath(), tarFilename);
Expand Down
1 change: 1 addition & 0 deletions lib/libvips.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ const useGlobalLibvips = function () {
}
/* istanbul ignore next */
if (isRosetta()) {
log('Detected Rosetta, skipping search for globally-installed libvips');
return false;
}
const globalVipsVersion = globalLibvipsVersion();
Expand Down

0 comments on commit 5be36c2

Please sign in to comment.