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

Add a build for darwin-arm64 #7

Closed
jedahan opened this issue Jan 13, 2021 · 24 comments
Closed

Add a build for darwin-arm64 #7

jedahan opened this issue Jan 13, 2021 · 24 comments
Labels
os-macos Issues specific to Apple hardware

Comments

@jedahan
Copy link

jedahan commented Jan 13, 2021

Mind making a build for apple silicon? <3

@Jacalz
Copy link
Owner

Jacalz commented Jan 14, 2021

Definitely :)
That is something that I have been wanting to do, but there are a few things that need to be sorted out first. Some of these are:

I think those are the biggest blockers currently. The big 2.1.0 release (currently in the develop branch) of wormhole-gui should be released sometime at the end of January. My plan is to hopefully have working darwin-arm64 release builds around 2.2.0 or later.

As a side-note, do you have access to an M1 mac currently? It would be great to know if the darwin-amd64 build of wormhole-gui works using Rosetta2 :)

@Jacalz Jacalz added the os-macos Issues specific to Apple hardware label Jan 14, 2021
@jedahan
Copy link
Author

jedahan commented Jan 14, 2021

Oh, darwin-amd64 works well with Rosetta2 lol. Let's sit tight until the ecosystem catches up then.

@Jacalz
Copy link
Owner

Jacalz commented Jan 14, 2021

Indeed. Thanks for confirming. Will update the README to say that it works (non-native) on Apple Silicon then 🙂

@jedahan jedahan closed this as completed Jan 14, 2021
@Jacalz Jacalz reopened this Jan 14, 2021
@Jacalz
Copy link
Owner

Jacalz commented Jan 14, 2021

Let's keep this open please. Still hasn't been fixed ;)

@Jacalz Jacalz changed the title darwin-arm64 build? Add a build for darwin-arm64 Jan 15, 2021
@Jacalz
Copy link
Owner

Jacalz commented Feb 8, 2021

There is now some effort being done to fix this upstream in Fyne. Tagging it here for future reference: fyne-io/fyne#1922

@Jacalz
Copy link
Owner

Jacalz commented Mar 8, 2021

All of the necessary work for getting this done is now landed or in the process of landing.
@jedahan Do you by any chance think that you could test this macOS arm64 binary to see if it works?
wormhole-gui-dev-darwin-arm64.zip

@jedahan
Copy link
Author

jedahan commented Mar 8, 2021

Screen Shot 2021-03-08 at 1 29 34 PM

@Jacalz
Copy link
Owner

Jacalz commented Mar 9, 2021

Thanks for testing. It looks like there was an issue with binaries having to be signed in order to be working. Do you think you could test this one as well?
wormhole-gui-test2-darwin-arm64.zip

@Jacalz
Copy link
Owner

Jacalz commented Mar 9, 2021

Nerver mind. Looks like that isn't working either. We might need to get proper signing up and running.

@HenkPoley
Copy link

HenkPoley commented Mar 10, 2021

Building on M1 works fine for me 👍. On main branch, edit go.mod to use fyne v2.0.1 (the 'develop' branch will probably be fine)

#!/bin/sh

# git clone https://github.com/Jacalz/wormhole-gui.git
# cd wormhole-gui
# ./build-macos.sh

FYNE=~/go/bin/fyne
if [ ! -f "$FYNE" ]; then
    echo "$FYNE does not exist, installing now.."
    go get fyne.io/fyne/v2/cmd/fyne
fi

go clean
rm -rf ./wormhole-gui.app
~/go/bin/fyne package -icon internal/assets/icon/icon-512.png

Then start with open ./wormhole-gui.app

(I did generate the KHR header files recently and put them in include/ somewhere, may be relevant)

@Jacalz
Copy link
Owner

Jacalz commented Mar 10, 2021

Thanks for the notes @HenkPoley. I appreciate it.

This is not so much an issue about wormhole-gui not being able to compile, but more of an issue with me not having an M1 computer. I need to cross-compile it and to do so, I have been using fyne-io/fyne-cross#34. There seems to be a few issues with code signing that needs to be sorted before I can compile release binaries for distribution.

@Jacalz

This comment was marked as outdated.

@Jacalz
Copy link
Owner

Jacalz commented Mar 18, 2021

Could someone please test out fyne-io/fyne-cross#34 (comment) and get back with the results in that thread? Would be great if we could try and get this solved for everyone to enjoy 🙂

@JayBrown
Copy link

By the way: the CFBundleShortVersionString in the macOS app's Info.plist has 1.0 as the version number, even though the correct version number is (currently) 2.2.0. That should be fixed for the next release.

@JayBrown
Copy link

JayBrown commented Mar 28, 2021

@Jacalz: you can just ad-hoc sign macOS apps, or even use a third-party certificate not issued by Apple. These will still cause problems, however, so you could either tell users how to remove the quarantine extended attribute—i.e. xattr -dr com.apple.quarantine /Applications/wormhole-gui.app—, or tell them how to sign an app themselves—e.g. codesign --force --sign - --deep /Applications/wormhole-gui.app—, or (even better) you offer a download method that will circumvent macOS' security mechanisms. The latter would be a curl command that downloads the release zip archive directly into /Applications. Downloads performed with cURL do not receive a quarantine XA, and if the download winds up directly in an applications directory, i.e. usually either /Applications or ~/Applications, and is unzipped there, you will also have circumvented TCC. See here: https://lapcatsoftware.com/articles/without-notarization.html

@Jacalz
Copy link
Owner

Jacalz commented Mar 31, 2021

By the way: the CFBundleShortVersionString in the macOS app's Info.plist has 1.0 as the version number, even though the correct version number is (currently) 2.2.0. That should be fixed for the next release.

Oh, indeed. I have just not gotten around to fixing that yet. Might require some changes to the tooling that cross-compiles the release binaries.

Sorry for the very late answer. @JayBrown That is very good information, but I’m afraid that it doesn’t lead to a very user-friendly way for the users to use this application. I think that property signed binaries (perhaps through the App Store) will be the only sensible solution. It will require some funding, but will be a very good change for the users.

@JayBrown
Copy link

JayBrown commented Mar 31, 2021

Oh, I'm totally aware that this wouldn't be user-friendly. Just saying that there are other ways, but they all involve the Terminal in some way. Another thing… a question: am I correct in assuming that wormhole-gui is a stub, and that the user still needs to install the main program, e.g. with Homebrew? Then, besides signing & notarizing, it might also be a good idea to bundle that program with wormhole-gui, as the developers of Syncthing did. Then we'd have a true standalone with a simple drag&drop installation… you can't get any more user-friendly than that. ;)

@Jacalz
Copy link
Owner

Jacalz commented Mar 31, 2021

Another thing… a question: am I correct in assuming that wormhole-gui is a stub, and that the user still needs to install the main program, e.g. with Homebrew? Then, besides signing & notarizing, it might also be a good idea to bundle that program with wormhole-gui, as the developers of Syncthing did. Then we'd have a true standalone with a simple drag&drop installation… you can't get any more user-friendly than that. ;)

I'm afraid that that is not correct. I am using the native Go API, so everything is compiled in to a static binary. Better for portability and better for performance. It is literally just a drag and drop already 🙂

I suggest that you have another read through the README. Feel free to mention any parts that you think should be worded differently to be more clear. I guess I should stop calling it a "graphical user interface" now that it is mature enough to be used quite regularly 😅

@Jacalz
Copy link
Owner

Jacalz commented May 4, 2021

Good news people. It looks like binaries are working on M1, assuming that you turn off apple quarantine attribute for gatekeeper. See fyne-io/fyne-cross#39 (comment) for more information. This means that the next release will finally have M1 binaries available for download 🚀

However, these will, like the issue above kind of hints at, not be signed and thus not be valid by Apple. I still recommend sponsoring for a possible Mac App Store version in the future, but until then, you should be able to enjoy native binaries on your machines 🙂

@Jacalz Jacalz added this to the v2.3.0 - Next major release milestone May 4, 2021
@Jacalz Jacalz modified the milestones: v2.4.0 - Next big release, v2.3.0 - Next minor release Aug 4, 2021
@Jacalz
Copy link
Owner

Jacalz commented Aug 7, 2021

Sorry for the long wait with this. I have been busy with a lot of other stuff. Planning to hopefully have this out with the next release in a week or two :)

@Jacalz
Copy link
Owner

Jacalz commented Aug 11, 2021

This is now available in the v2.3.0 release: https://github.com/Jacalz/wormhole-gui/releases/tag/v2.3.0.

@Jacalz Jacalz closed this as completed Aug 11, 2021
@HenkPoley
Copy link

HenkPoley commented Aug 12, 2021

Ah: This the quarantine stuff, that is mentioned near the download. Anyways, not useable in this state by common end-users.


macOS Big Sur says: wormhole-gui is damaged and cannot be opened. Move it to the trash. Unarchiver has created this file on an unknown date. Buttons: Move to trash / Cancel.

image

Note, Unarchiver is not shipped with macOS by default, but it is common to use. But it's native Archive tool gives a similar error:

image

wormhole-gui is damaged and cannot be opened. Move it to the trash. Safari has downloaded this file ..date.. on ..time.. from ..url... Buttons: Move to trash / Cancel.

@Jacalz
Copy link
Owner

Jacalz commented Aug 12, 2021

Does it work if you turn of the quarantine feature? I think this post should help with that: https://discussions.apple.com/thread/3145071. Could you also try to not open it using unarchiver? The regular unarchiving application on macOS should work, I think.

I know that this is an unfortunate way to have to provide M1 binaries, but it’s what I can provide at the moment. I am a Linux user primarily and getting binaries up on the Mac App Store would mean that I need to pay for an Apple Developer Account and then most likely invest in something better than my old 2011 iMac down the line.

@Jacalz
Copy link
Owner

Jacalz commented Jan 29, 2023

I have added some notes to the README in b6979ac for how to avoid the issue with binaries being marked as broken. They were basically put into quarantine as they were downloaded from the internet. Following the new guidelines should get the binaries up and running :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
os-macos Issues specific to Apple hardware
Projects
None yet
Development

No branches or pull requests

4 participants