Skip to content
This repository has been archived by the owner on Aug 23, 2024. It is now read-only.

Build for arm64 macs #297

Closed
pztrn opened this issue Apr 14, 2022 · 12 comments
Closed

Build for arm64 macs #297

pztrn opened this issue Apr 14, 2022 · 12 comments
Assignees
Labels
enhancement New feature or request

Comments

@pztrn
Copy link
Contributor

pztrn commented Apr 14, 2022

Currently sonixd built only for amd64 architecture, but not for arm64 for macOS.

Can you please add an arm64 build?

@pztrn pztrn added the enhancement New feature or request label Apr 14, 2022
@jeffvli
Copy link
Owner

jeffvli commented Apr 14, 2022

I pushed a mac arm64 build to the latest release. I don't have a macOS device so I can't test it, so let me know if you run into any problems.

@jeffvli jeffvli self-assigned this Apr 14, 2022
@pztrn
Copy link
Contributor Author

pztrn commented Apr 14, 2022

It just won't start :D Which is strange:

 % file /Applications/Sonixd.app/Contents/MacOS/Sonixd
/Applications/Sonixd.app/Contents/MacOS/Sonixd: Mach-O 64-bit executable arm64

There is no traceback or something like that, system says that application is corrupted and won't start even if I replace code signature using locally trusted dev certificate.

@jeffvli
Copy link
Owner

jeffvli commented Apr 14, 2022

I think I may have to update the electron-builder package to get arm64 builds to work. Let me re-push some builds.


You can also try packaging yourself. I added the arm64 target to the macOS build, so you should just be able to do the following:

  1. Clone from the main branch
  2. Navigate (cd) into the root repo directory
  3. Run yarn (install yarn globally if you don't have it)
  4. Run yarn package
  5. View the binaries in the /release directory in the repo folder

@jeffvli
Copy link
Owner

jeffvli commented Apr 14, 2022

I pushed a new build using electron builder v22.14.13. Let me know if it works now.

@pztrn
Copy link
Contributor Author

pztrn commented Apr 14, 2022

It works after I've forcefully removed it from quarantine:

sudo xattr -r -d com.apple.quarantine /Applications/Sonixd.app

@jeffvli
Copy link
Owner

jeffvli commented Apr 14, 2022

I'm guessing it is because the binaries aren't signed (Apple developer license is expensive!). I'm glad it's working now though.
I'll pin this thread in case anyone else has trouble running it.

@jeffvli jeffvli pinned this issue Apr 14, 2022
@jeffvli jeffvli closed this as completed Apr 14, 2022
@pztrn
Copy link
Contributor Author

pztrn commented Apr 25, 2022

Also, after removing from quarantine when updating versions it might be needed to remove and then add back Sonixd to Accessibility settings for global hotkeys to work. After that Sonixd should be restarted.

@pythoninthegrass
Copy link

I'm guessing it is because the binaries aren't signed (Apple developer license is expensive!). I'm glad it's working now though. I'll pin this thread in case anyone else has trouble running it.

You sure about that? I'm an "Apple dev" and it costs me nothing. Have you tried something like this?

@pythoninthegrass
Copy link

I can attempt to fork this and do a POC if you'd like. Haven't made anything in Electron so it might not be as timely as a core contributor doing the thing.

@jeffvli
Copy link
Owner

jeffvli commented May 21, 2022

@pythoninthegrass
From step 1 in the article you linked, unless there's a way to get around the cost?

Go to the Apple website to enroll in the Developer Program: https://developer.apple.com/programs/
This comes with a cost. At the time of this writing, it was 99 USD per membership per year.

I'm currently in the process of rewriting the app, so the current version will probably be archived/deprecated unless you or someone else wants to fork and revive it as a separate project.

@pythoninthegrass
Copy link

Ah! Must be different from the portal I was thinking of to download xcode. I won't mess with signing if you're in-flight with a new version?

@pythoninthegrass
Copy link

Also, you should setup GH sponsorship and I could chip in for your Apple dev license.

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

No branches or pull requests

3 participants