BlueBubblesApp / bluebubbles-server

Server for forwarding iMessages to clients within the BlueBubbles App ecosystem
https://bluebubbles.app
Apache License 2.0
554 stars 47 forks source link

Native Apple Silicon/arm64 support #636

Closed craftycorvid closed 4 months ago

craftycorvid commented 7 months ago

Closes #383

zlshames commented 7 months ago

I'm not 100% sure this alone will fix it. I also think I need an arm mac to compile this properly for apple silicon. I've tried compiling on my intel mac, and it works, but crashes on startup due to dependency linking and stuff

craftycorvid commented 7 months ago

I've been running a build with these changes for a couple weeks without issues on my M2 MacBook.

You should be able to compile it on your Intel mac, electron has built-in support for cross-compiling. I'd be happy to test a build of yours to make sure it runs correctly.

zlshames commented 7 months ago

I've been running a build with these changes for a couple weeks without issues on my M2 MacBook.

You should be able to compile it on your Intel mac, electron has built-in support for cross-compiling. I'd be happy to test a build of yours to make sure it runs correctly.

If you join our Discord and DM me, I'm down to send you an arm64 build built by me.

duronald commented 5 months ago

Are there any updates on this? I'm happy to test too.

zlshames commented 5 months ago

Are there any updates on this? I'm happy to test too.

I think the issue i ran into was that when i built for arm64, the DMG would crash on startup. I think I may require an M1 mac to compile it properly? I'm not sure why it would matter, but those were my findings. I can test again if you'd like to DM me on Discord to try.

zlshames commented 4 months ago

I've implemented this into the development branch. There is no cloudflared Apple Silicon binary though, so that will still run using rosetta. Same with ngrok and zrok (i'm assuming).

craftycorvid commented 4 months ago

There's a cloudflared arm64 binary in this PR that I got from homebrew: https://formulae.brew.sh/formula/cloudflared

zrok also has one there: https://formulae.brew.sh/formula/zrok#default

ngrok seem to be stuck on Intel.

zlshames commented 4 months ago

I've been using: https://github.com/cloudflare/cloudflared/releases

How come homebrew has an apple silicon build, but the github doesn't 🤔

I also see that the builds say, arm64-sonoma or arm64-ventura. Does that mean those specifically run on those macos versions? or what? what if i run the ventura one on big sur?

craftycorvid commented 4 months ago

Actually ngrok has an apple silicon build on their downloads page: https://ngrok.com/download

craftycorvid commented 4 months ago

I've been using: https://github.com/cloudflare/cloudflared/releases

How come homebrew has an apple silicon build, but the github doesn't 🤔

I also see that the builds say, arm64-sonoma or arm64-ventura. Does that mean those specifically run on those macos versions? or what? what if i run the ventura one on big sur?

It's unclear why they don't have a build on their release page: https://github.com/cloudflare/cloudflared/issues/534

Homebrew builds against each version of MacOS in case built-in dependencies changed. The build against the oldest version of MacOS you want to support is probably the correct one.

zlshames commented 4 months ago

I've been using: https://github.com/cloudflare/cloudflared/releases How come homebrew has an apple silicon build, but the github doesn't 🤔 I also see that the builds say, arm64-sonoma or arm64-ventura. Does that mean those specifically run on those macos versions? or what? what if i run the ventura one on big sur?

It's unclear why they don't have a build on their release page: cloudflare/cloudflared#534

Homebrew builds against each version of MacOS in case built-in dependencies changed. The build against the oldest version of MacOS you want to support is probably the correct one.

right, but the oldest one is ventura, but this binary needs to support all the way down to high sierra. I know the official builds do, but im not 100% sure of these builds

craftycorvid commented 4 months ago

Big Sur is the furthest back that arm64 support could possibly go, but I get your point. Homebrew seems to drop older versions of MacOS pretty quickly.

zlshames commented 4 months ago

Big Sur is the furthest back that arm64 support could possibly go, but I get your point. Homebrew seems to drop older versions of MacOS pretty quickly.

i was more meaning for the x86 builds. However, I guess I can get the x86 build from the github, but then use the homebrew build for the arm64 build. That's probably a good solution.

fwiw, zrok does put out arm64 builds: https://docs.zrok.io/docs/guides/install/macos/

zlshames commented 4 months ago

@craftycorvid do you know how i can download the raw binary from homebrew's formulae website? when i try using the link in the JSON it fails with a 401

craftycorvid commented 4 months ago

I had to download it using the package manager. They're doing some sort of authentication on their links that the package manager handles.

zlshames commented 4 months ago

@craftycorvid i ended up following this guide: https://github.com/orgs/Homebrew/discussions/4335#discussioncomment-5353698

A bit annoying... but not too bad I guess