Skip to content

Commit b28b209

Browse files
author
Dave Kozma
committed
Add macOS build support
1 parent a7e0dd4 commit b28b209

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ $ pnpm add c2pa-node
6464
This command will download precompiled binaries for the following systems:
6565
- Linux x86_64
6666
- Linux aarch64 (ARM)
67+
- macOS aarch64 (Apple Silicon)
68+
- macOS x86_64 (Intel Mac)
6769
- Windows x86
6870
- Windows ARM
6971

70-
**Note**: macOS will be coming as soon as we add signed builds.
71-
7272
For all other platforms, you will need Rust installed on your system, as the `postinstall` step will attempt to build our Rust SDK into a native Node.js module on your machine.
7373

7474
### Building custom binaries

scripts/postinstall.js

+4-9
Original file line numberDiff line numberDiff line change
@@ -56,19 +56,14 @@ function getPlatform() {
5656
return 'aarch64-unknown-linux-gnu';
5757
} else if (arch === 'x64' && platform === 'linux') {
5858
return 'x86_64-unknown-linux-gnu';
59+
} else if (arch === 'arm64' && platform === 'darwin') {
60+
return 'aarch64-apple-darwin';
61+
} else if (arch === 'x64' && platform === 'darwin') {
62+
return 'x86_64-apple-darwin';
5963
} else if (platform === 'win32') {
6064
return 'x86_64-pc-windows-msvc';
6165
}
6266

63-
// TODO: Support macOS by default once we have signed builds
64-
if (process.env.ENABLE_MAC_BUILDS) {
65-
if (arch === 'arm64' && platform === 'darwin') {
66-
return 'aarch64-apple-darwin';
67-
} else if (arch === 'x64' && platform === 'darwin') {
68-
return 'x86_64-apple-darwin';
69-
}
70-
}
71-
7267
console.log(
7368
`Can not find binary for architecture: ${arch} and platform: ${platform}, attempting to build Rust`,
7469
);

0 commit comments

Comments
 (0)