-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plans to Support Apple Silicon builds? #5392
Comments
any update on this? |
@eengoron see here they have put this ticket in backlog and marked closed even still electron-builder is not supporting ARM64 build. #5095 |
@ahmadwaliesipick -- I mentioned that ticket in my original message. That ticket was closed without resolution, so I opened a new one. cc @develar |
Yes @eengoron . Do you have any information are they working on ARM64 build? |
Unfortunately, it looks like it's time to consider migrating to electron-packager for this issue :( |
Anyone is willing to open a pull request? Fix should be easy, as far I see. |
Can we get this issued pinned, saves all the duplicate issues being made and easier to focus for people helping out with pull requests and debugging. Either this one or any of the others |
FWIW, I was able to build an I was able to package via both Unfortunately, I'm actually unable to test the app though as I don't have a compatible MacOS version installed right now. Just to be verbose, here's the error alert
Maybe someone would be willing to test this? 😉 Here are the changes I made: package.json excerpt:
Patch 1:
Patch 2:
|
I have Apple Silicon Big Sur machine will check and back to you. |
@mmaietta I have tested but build failed because some packages not found while rebuild https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.13/node-v64-darwin-x64.tar.gz |
@mmaietta here is npm log |
@mmaietta your patches are working I managed to build my app for arm. It can be opened on the Apple DTK but crashes shortly after related to something about a electron, I will investigate and see If I can find any fixes. If you need your app tested on a DTK I'm free to test it. |
@abhishekmatcha I expect native node modules are going to cause some issues for arm64 builds (see blog) |
@mmaietta I noticed another place where x64 is hardcoded but it's not included in your patch @deathlyrage can you please also test if you can sign/notarize your application well? And what about MAS builds? |
You need at least node-gyp 7.1.2 to build native modules for Mac/ARM64 |
Attempting to use x64 and arm64 targets together result in them uploading under the same name in deployment. Edit: doesn't look like this works, might be hard coded somewhere. |
@aabuhijleh signing and notarization is working. Haven't tested MAS as I'm not using it yet. |
I am able to create build and notarized. But i have sqlite3 error now. |
can we create dmg for arm64? |
I have installed latest sqlite3 but still facing same error |
You need to use a dmg or .zip when transfering your .app to your mac, as copying the folder can loose some attributes and macos big sur won't load images that it cant verify, I had this problem and changed the target to dmg and it worked. |
I 'm not good at english ~ |
Wow, I wasn't expecting such quick responses! 😁
@ahmadwaliesipick you'll need 11.0.0-beta.1 or higher, that's when arm64 dist started to be released for Electron. For any native modules, you'll likely need to recompile directly as @ljy-xian mentioned since it'll be highly unlikely any other packages have already been packaging/storing arm64 builds for mac yet. The sqlite error is due to the fact that your native addon is not available in arm64 - From: https://www.electronjs.org/blog/apple-silicon#native-modules
I recall some additional code that was conditional for adding the arch in the name, but I'll need to look that back up. I previously had to write some scripting for doing the same artifactName arch-injection for compiling ia32 vs x64 Windows apps separately. Seems the patch files might need to get a bit longer, possibly better in a gist soon Nice catch @aabuhijleh! I don't use mas and definitely overlooked that point. |
@ljy-xian Thanks for reply. |
@mmaietta i am using 11.0.0-beta.20 |
i patch electron-builder directly as @mmaietta mentioned |
@ljy-xian what should be in target? then it create correct mac-arm-64 build but dmg not create. |
Please anyone share the correct format of electron-builder params and target params to create arm64 dmg. |
@mmaietta i am still not able to resolve
|
@ahmadwaliesipick because you're getting the same error for the same issue, and the info you're providing is very limited to assist. Also, sqlite3 built to that directory just fine for me...
|
PR has been merged and release cut performed! Please upgrade and begin stress testing. Probably should open new issues for anything found and close this issue. For posterity's sake, maybe also link any new issues here for tracking purposes? |
Would like to help testing but am totally lost. Could anyone give an update on the current steps required to build for M1? |
There are some open PRs to fix follow-up issues. |
@Xiphe If you are looking for the package.json updates required for universal builds, you could try this: https://github.com/csett86/jitsi-meet-electron/blob/universal/package.json But as @lutzroeder said, there are some follup fixes currently required, see https://github.com/csett86/jitsi-meet-electron/tree/universal/patches |
Thanks a lot! I decided to go with separate builds for mac in order to have less size overhead. |
Thanks a lot for everyone's work on this! |
But has anyone gotten the auto updating to work with arm64? I am able to build 2 separate versions for mac (x64 and arm64). But when I auto update the arm64 version, it updates to the x64 version. Is there something we need to do to tell the auto-updater which arch we need? |
@transparentech You will need to update electron-updater to the 4.3.7 beta. Works for me. |
Anyone running into "ReferenceError: u is not defined" for auto update for arm64? I have two separate s3 bucket, one for arm64 and one for x64. When I check for updates on arm64, the autoUpdater gets "ReferenceError: u is not defined" but not for x64. The only difference is how I build the app: Arm64: Really appreciate all the hard work on this! Update: I think it might have been a problem with s3 (not 100% sure) but I came back to this without any code changes or loading a new build and the error disappeared and auto update works now |
Hm, strange...
and when I run
removing node_modules completely, then running npm install didn't help... |
@lutzroeder This is similar to what I mentioned earlier (#5481 (comment)) @AleksMeshkov You can apply this patch to fix the bug: https://github.com/webcatalog/translatium/blob/master/patches/app-builder-lib%2B22.10.4.patch |
Is notarization working when built using Using electron-notarize to perform notarization |
I'd imagine that would be in an
|
Edit: Problem solved. The Old post: Hi, I am a little confused on what I am doing wrong.
This is my package.json
As you see, I have both arm64 and x64 in my mac target The M1 mac app is built out, but only one dmg file is produced (x64) when I run |
Are there current plans to support Apple Silicon builds with
electron-builder
? We're currently in the process of making sure our electron app is ready for ARM support, so I wanted to make sure that we'd be able to build to those targets usingelectron-builder
.If so, what does the release timeline look like for that?
Since #5095 was closed with no resolution, I figured it best to open a new issue.
The text was updated successfully, but these errors were encountered: