This repository has been archived by the owner on May 18, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix arm64 keytar binary is used for x64 build when building with CI (#…
…620) For unknown reason, if the app is built on GitHub Actions, `app-x64.asar.unpacked/node_modules/keytar/build/Release/keytar.node` is ARM64 binary (couldn't reproduce to on M1 Mac) so we opt to use universal binary instead.
- Loading branch information
1 parent
28d6d80
commit ce65c7e
Showing
1 changed file
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
diff --git a/node_modules/keytar/README.md b/node_modules/keytar/README.md | ||
index 91141b7..e70d398 100644 | ||
--- a/node_modules/keytar/README.md | ||
+++ b/node_modules/keytar/README.md | ||
@@ -1,3 +1,5 @@ | ||
+For unknown reason, if the app is built on GitHub Actions, `app-x64.asar.unpacked/node_modules/keytar/build/Release/keytar.node` is ARM64 binary (couldn't reproduce to on M1 Mac) so we opt to use universal binary instead. | ||
+ | ||
# keytar - Node module to manage system keychain | ||
|
||
[![Travis Build Status](https://travis-ci.org/atom/node-keytar.svg?branch=master)](https://travis-ci.org/atom/node-keytar) | ||
diff --git a/node_modules/keytar/binding.gyp b/node_modules/keytar/binding.gyp | ||
index 9be3dcb..df66b96 100644 | ||
--- a/node_modules/keytar/binding.gyp | ||
+++ b/node_modules/keytar/binding.gyp | ||
@@ -7,7 +7,18 @@ | ||
], | ||
'cflags!': [ '-fno-exceptions' ], | ||
'cflags_cc!': [ '-fno-exceptions' ], | ||
- 'xcode_settings': { 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES', | ||
+ 'xcode_settings': { | ||
+ 'OTHER_CFLAGS': [ | ||
+ '-arch x86_64', | ||
+ '-arch arm64' | ||
+ ], | ||
+ 'OTHER_LDFLAGS': [ | ||
+ '-Wl, -bind_at_load', | ||
+ '-framework CoreFoundation -framework CoreServices', | ||
+ '-arch x86_64', | ||
+ '-arch arm64' | ||
+ ], | ||
+ 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES', | ||
'CLANG_CXX_LIBRARY': 'libc++', | ||
'MACOSX_DEPLOYMENT_TARGET': '10.7', | ||
}, | ||
diff --git a/node_modules/keytar/package.json b/node_modules/keytar/package.json | ||
index 4616f65..1108853 100644 | ||
--- a/node_modules/keytar/package.json | ||
+++ b/node_modules/keytar/package.json | ||
@@ -30,7 +30,7 @@ | ||
], | ||
"types": "./keytar.d.ts", | ||
"scripts": { | ||
- "install": "prebuild-install || npm run build", | ||
+ "install": "npm run build", | ||
"build": "node-gyp rebuild", | ||
"lint": "npm run cpplint", | ||
"cpplint": "node-cpplint --filters legal-copyright,build-include,build-namespaces src/*.cc", | ||
@@ -50,8 +50,7 @@ | ||
"prebuild": "^10.0.1" | ||
}, | ||
"dependencies": { | ||
- "node-addon-api": "^3.0.0", | ||
- "prebuild-install": "^6.0.0" | ||
+ "node-addon-api": "^3.0.0" | ||
}, | ||
"binary": { | ||
"napi_versions": [ |