ankurk91 / google-chat-electron

An unofficial desktop app for Google Chat :electron:
GNU General Public License v3.0
162 stars 49 forks source link

[mac] brew package update for darwin-arm64 #85

Closed AdamCoulterOz closed 2 years ago

AdamCoulterOz commented 2 years ago

I understand that previously we've had to go to security preferences and allow the app, but that doesn't apply on this binary (it says the package is damaged and doesn't show up in security preferences). Although the following command does work.

xattr -d com.apple.quarantine /Applications/google-chat-electron.app

https://github.com/Homebrew/homebrew-cask/pull/121925

also... I have a PR for adding the arm64 package on brew, it works only if you add the --no-quarantine flag or run the explicit xattr command... I've added that as a brew cask package caveats statement, hopefully you won't get as many people wasting your time.

ankurk91 commented 2 years ago

Huge thanks.

Homebrew may not allow to remove quarantine flag :(

https://github.com/ankurk91/google-chat-electron/issues/83 https://github.com/ankurk91/google-chat-electron/issues/80 https://github.com/ankurk91/google-chat-electron/issues/78

AdamCoulterOz commented 2 years ago

@ankurk91 It looks like there is actually a problem with the signature. Hence why it says the package is damaged and not just from an unknown developer.

https://github.com/Homebrew/homebrew-cask/pull/121925#discussion_r849384211

ankurk91 commented 2 years ago

If you have a M1 Machine, can you build and run the arm app on your local?

Install node.js v16.14.x and pnpm v6.32.x first.

git clone https://github.com/ankurk91/google-chat-electron
cd google-chat-electron
pnpm install

npm run pack:mac
npm run pack:mac-arm

npm run build:mac-zip
npm run build:mac-arm-zip

You must see 2 apps in your dist folder, try to run app from ./dist/google-chat-electron-darwin-arm64/.

ankurk91 commented 2 years ago

According to this comment, we should able to produce arm build on Intel machines as well https://github.com/ankurk91/google-chat-electron/pull/73#issuecomment-1067115137

And this is what we are doing via GitHub Actions as GH Actions does not have arm runners yet.

I don't have a M1 Machine to verify the build signature.

AdamCoulterOz commented 2 years ago

I am on an M1 ... I'll run it for you.

AdamCoulterOz commented 2 years ago

Still getting this...

adam@Adams-MacBook-Pro ~ % cd /Volumes/Code/GitHub/ankurk91/google-chat-electron/dist/google-chat-electron-darwin-arm64                         
adam@Adams-MacBook-Pro google-chat-electron-darwin-arm64 % codesign -v -f  google-chat-electron.app
google-chat-electron.app: code has no resources but signature indicates they must be present
ankurk91 commented 2 years ago

Thanks, need to figureout, what is wrong here. The build script is very easy to read and understand.

AdamCoulterOz commented 2 years ago

Do you have an Apple developer account? You need one to code sign, regardless if you submit for notarisation.

ankurk91 commented 2 years ago

No I dont have, I don't even have a physical Mac machine, I use VM to test the app :)

I used to have Mac book pro in past. But switched to Dell, since repairing the Mac book was not cheap.

Initially, I build this app for my Linux machine but later people asked for Mac build too

AdamCoulterOz commented 2 years ago

I think the only way to fix this is with an apple developer account. I think apple have changed something with self signed certificates for Apple arm64 binaries.

ankurk91 commented 2 years ago

I think this issue will remain un-resolved, since i will never going to buy apple developer account ($99) for a open source project.