andrewringler / git-annex-turtle

git-annex-turtle provides Apple Finder integration for git-annex on macOS, including custom badge icons, contextual menus and a Menubar icon. It is free, open-source and licensed under The MIT License.
MIT License
53 stars 3 forks source link

Homebrew Cask support? #1

Open louy2 opened 6 years ago

louy2 commented 6 years ago

As titled.

Reference: https://caskroom.github.io/

andrewringler commented 6 years ago

Hi, thanks for the suggestion. I think that seems like a reasonable thing to do.

git-annex-turtle depends on git-annex being installed. Does it seem reasonable to have the git-annex-turtle cask depend on the git-annex brew formula? Dependencies are a supported feature of brew casks. BTW it appears that git-annex was once available as cask, but now it is just a formula.

In related news, it looks like we will bundle git-annex-turtle with the git-annex.dmg. I think that this will just be for the .dmg file though. I don't think it makes sense to include git-annex-turtle in the git-annex brew formula.

Andrew

louy2 commented 6 years ago

I am not sure whether a cask formula can depend on a brew formula. But the way Homebrew works is it links binaries and libraries to their proper locations in /usr/local so they should be present in PATH. I thought the WebApp was not included in the brew formula but https://github.com/caskroom/homebrew-cask/issues/24214 told me and I confirmed that git annex webapp works.

I was a bit confused when git-annex-turtle didn't work for me, so I removed it. Now that you mentioned it, it might be because I installed git-annex through Homebrew but not git-annex.dmg. Now that I got git-annex.app too it works. So there's that.

On another note, the way most according to the spirit of an App Bundle is probably bundling git-annex within it directly, despite the possible duplication. Or as TortoiseGit does, an option to download a PortableGit to be embedded after installation.

andrewringler commented 6 years ago

v0.1 of git-annex-turtle performed a search for git and git-annex binaries on launch and failing to find them exited… v0.2 performs a more extensive search for these binaries including brew locations, so you should be able to delete your /Applications/git-annex now if you kept the brew version around. v0.2 now exposes these locations in the Preferences menu so you can see what it found. TODO is to actually let the user know if it found nothing…

Most likely, in the future git-annex-turtle will be bundled with the git-annex dmg, so this might all become less relevant. Yes, I could probably offer to download git-annex for a user if it is missing.