neanes / neanes

Neanes is a free and open source scorewriter for notating Byzantine chant in Byzantine notation.
https://neanes.github.io/neanes/
GNU General Public License v3.0
35 stars 9 forks source link

macOS-arm64 build doesn't work #670

Closed gugushvili closed 2 weeks ago

gugushvili commented 2 weeks ago

If I try to run versions 0.4.27 or 0.4. 28, I get an error message:

“Neanes” is damaged and can’t be opened. You should move it to the Bin.

I'm on Mac with Apple silicon running Sonoma 14.4.1. Version 0.4.26 works fine.

basil commented 2 weeks ago

I can reproduce the problem but I don't know what's causing it.

The problem seems specific to release builds, as a local build at https://github.com/neanes/neanes/releases/tag/v0.4.28 works fine for me, using Node 22.0.0, NPM 10.2.3, and macOS Sonoma 14.4.1. Not sure what is different about the official release builds.

danielgarthur commented 2 weeks ago

Recently Github switched to using an M1 Mac for builds by default. From what I had read that wouldn't be an issue, but that seems false. I can switch the build to the non-M1 build machine and I bet that will fix it. Not sure how it will affect M1 users, though. Maybe we need multiple Mac builds?

gugushvili commented 2 weeks ago

Mine is with M1 chip, so GitHub probably is not the issue (?).

danielgarthur commented 2 weeks ago

The timing lines up too perfectly for it to be a coincidence, I think. I am adding another build. I can confirm that the current build doesn't work on a non-M1 Mac, so another (non-ARM64) build is necessary, regardless.

danielgarthur commented 2 weeks ago

0.4.29 now has a regular macOS build, which is working on a non-M1 Mac. Please try it on your Mac and let me know how it goes. Neanes-0.4.29.dmg.

Maybe I should just get rid of the arm64 build if it's not working and I don't have a way of testing it.

gugushvili commented 2 weeks ago

This regular macOS build works fine.

danielgarthur commented 2 weeks ago

When you received the message about the file being damaged, was that when you tried to open the dmg or were you able to open the dmg, and move Neanes to Applications, and only when running the installed program it showed the message?

gugushvili commented 2 weeks ago

Opening dmg and putting Neanes into Applications was going fine, but I was getting the error message every time I tried to run the installed programme. This happened both with 0.4.27 and 0.4.28. I'm not getting the error with the regular macOS build in 0.4.29 and the programme works fine, as far as I can see for now.

danielgarthur commented 2 weeks ago

I think this is relevant: https://github.com/electron-userland/electron-builder/issues/5850.

The summary is that M1 macs require code-signing for all applications, where as Intel Macs do not. I have no desire to pay Apple 100USD every year for a developer license so that I can code sign.

https://github.com/electron-userland/electron-builder/issues/5850#issuecomment-1821648559 suggests that I might be able to use an ad-hoc signature. I could give that a try.

danielgarthur commented 2 weeks ago

For now, I'm removing the arm64 build.

basil commented 2 weeks ago

If we really want to do this, I can buy the certificate and add it as a secret in GitHub. Just let me know.