Skip to content
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

Apple Sillicon native builds #19

Closed
lannonbr opened this issue May 1, 2021 · 7 comments
Closed

Apple Sillicon native builds #19

lannonbr opened this issue May 1, 2021 · 7 comments
Labels
enhancement New feature or request

Comments

@lannonbr
Copy link

lannonbr commented May 1, 2021

So I was browsing around the Electron-builder repo which you use to build the app of Script Kit and was interested in an Apple Silicon build for Script Kit, as Electron & NodeJS now support native builds for the M1 chip. Early next week I'm getting a M1 Mac Mini and am curious in testing out Script Kit for the new architecture.

From this pinned issue on electron-builder: electron-userland/electron-builder#5689, it looks like they support both M1 specific builds as well as universal builds which have a single package for both architectures. I would definitely be interested in pulling down a development branch of Script Kit and trying to get a functional build.

Is there anything important I should keep an eye on or things to watch out for when trying to build it as a native M1 app that is dependent on the architecture other than telling Electron to build for ARM & having the install-node.sh script in the kit repo grab either a universal or ARM build of Node?

@lannonbr lannonbr added the enhancement New feature or request label May 1, 2021
@johnlindquist
Copy link
Collaborator

I have an M1 mac mini, I didn't realize their was a specific build I should try... 🤯 (It's been working great on the current build.)

Your assumptions are correct, thr electron build and node install should be the only platform-specific pieces.

I'd be happy to show you how to get set up for dev. I'm sure there will be some rough edges for other people getting set up.

I'll take a stab at doing the M1 build next week though. Maybe it's just changing a couple flags...

@lannonbr
Copy link
Author

lannonbr commented May 1, 2021

Yeah what I am assuming is if you downloaded the dmg of Kit, it probably is running node & Electron through Rosetta 2 as the defaults for electron-builder with the --mac flag is to compile for x86.

Once I get my base setup of VS Code and Node setup on the machine I definitely would be interested in getting a dev version of the app setup to do things like this.

@lannonbr
Copy link
Author

lannonbr commented May 1, 2021

Looking further, packaging directly on the M1 seems to be not fully functional yet due to upstream packages as shown here: electron-userland/electron-builder#5816

So what would likely need to be done is build the app on an intel mac and then copy the outputted artifact over to an M1 mac for testing.

@johnlindquist
Copy link
Collaborator

Cool. Thanks for the info.

My dev machine is an intel MBP. The mac mini m1 is a dedicated streaming/recording/testing box. I control it primarily through the "screen sharing" app on my MBP, so sounds like I'm set 👍

@johnlindquist
Copy link
Collaborator

Before we can cut public releases:

This repo generates a releases feed used by the auto-updater. The app checks that feed for alpha/beta/main builds.

  • I don't know if we can generate a separate feed for m1 builds

  • I don't know how to configure the auto-updater to pick up a different feed

My initial conclusion is that we keep a separate repo rather than worrying about in-app flags/configuration. Otherwise, I'd need an expert to review what we're doing to keep it in a single repo

@lannonbr
Copy link
Author

Am I to assume this is now resolved as of 1.3.0 beta 29?

@johnlindquist
Copy link
Collaborator

Yup! I think it's all sorted now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants