Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Add prebuild Electron for arm64 #319

Merged
merged 2 commits into from Nov 8, 2020
Merged

Conversation

dennisameling
Copy link
Contributor

Identify the Bug

Currently, including keytar as a dependency results in the following error on Windows arm64:

error C:\repos\desktop\app\node_modules\keytar: Command failed.
Exit code: 1
Command: prebuild-install || node-gyp rebuild
Arguments:
Directory: C:\repos\desktop\app\node_modules\keytar
Output:
prebuild-install WARN install No prebuilt binaries found (target=9.3.1 runtime=electron arch=arm64 libc= platform=win32)

C:\repos\desktop\app\node_modules\keytar>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
gyp info it worked if it ends with ok
gyp info using node-gyp@5.1.0
gyp info using node@14.13.0 | win32 | arm64
gyp info find Python using Python version 3.8.5 found at "C:\Python38\python.exe"
gyp info find VS using VS2019 (16.7.30330.147) found at:
gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"
Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
  async.cc
  main.cc
  keytar_win.cc
  win_delay_load_hook.cc
C:\repos\desktop\app\node_modules\keytar\src\main.cc(1,10): fatal error C1083: Cannot open include file: 'napi.h': No such file or directory [C:\repos\desktop\app\node_modules\keytar\build\keytar.vcxproj]
C:\repos\desktop\app\node_modules\keytar\src\async.cc(4,10): fatal error C1083: Cannot open include file: 'napi.h': No such file or directory [C:\repos\desktop\app\node_modules\keytar\build\keytar.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Windows_NT 10.0.19042
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\repos\desktop\app\node_modules\keytar
gyp ERR! node -v v14.13.0

Related issue: #297

Description of the Change

This PR adds prebuilds for Electron on arm64, which solved the issue for me when trying locally and adding Keytar through yarn link keytar (while trying to add support for arm64 to GitHub Desktop desktop/desktop#9691)

Alternate Designs

Possible Drawbacks

Verification Process

Release Notes

  • Add prebuild Electron binaries for arm64

@shiftkey
Copy link
Contributor

shiftkey commented Nov 1, 2020

@dennisameling thanks for submitting this. The changes looks straight-forward, and it's neat that this support is already there in prebuild.

I'm going to look at addressing this as well as #317 in the next update, hopefully this week. I'll let you know if I have any questions or feedback about it.

Copy link
Contributor

@shiftkey shiftkey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution @dennisameling!

@shiftkey shiftkey merged commit 321ea32 into atom:master Nov 8, 2020
@dennisameling dennisameling deleted the prebuild-arm64 branch November 18, 2020 11:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants