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

brew linkapps deprecated, thoughts? #450

Closed
jwmann opened this issue Feb 4, 2017 · 8 comments
Closed

brew linkapps deprecated, thoughts? #450

jwmann opened this issue Feb 4, 2017 · 8 comments

Comments

@jwmann
Copy link

jwmann commented Feb 4, 2017

In reference to Homebrew/brew/pull/1808
brew linkapps has been deprecated.

I compile MacVim using Homebrew and use linkapps all the time. Works somewhat fine.
Though since it'll eventually be removed I can't imagine myself having to manually link the .app bundle into /Applications/ every single time I upgrade.

The suggestion is to move .app type formula to brew cask
I'm not sure how that'll help the situation though.

Thoughts?

@splhack
Copy link
Contributor

splhack commented Feb 4, 2017

🤷‍♂️

@splhack
Copy link
Contributor

splhack commented Feb 6, 2017

ln -Fs `find /usr/local -name "MacVim.app"` /Applications/MacVim.app

@splhack splhack closed this as completed Feb 6, 2017
@justusgraham
Copy link

Homebrew already links as @splhack suggested, yet it doesn't overcome the issues with spotlight. I've only been able to open macvim from terminal with mvim <filename>, or from opening within finder/Applications

@jwmann
Copy link
Author

jwmann commented Feb 22, 2017

I typically open MacVim via double clicking a file from the Finder.

Right now brew linkapps for the most part still works as intended, however it has been marked as deprecated.
The reason I made this issue was because of homebrew suggesting .app style formulae to migrate to brew casks and also to kind of brainstorm about the possible loss of brew linkapps

I'm curious why brew linkapps just can't copy the .app to /Applications instead of a symlink. That should solve any Spotlight issues.

@luispuerto
Copy link

sometimes is necessary to have access to the app in the cellar directory. I just installed a package in R and it didn't work properly because I moved the QGIS.app from the cellar to /applications.

I really think that the best solution would be move the app instead of link/symboic-linking it, and then create a symbolic-link in its place. I did that with this case and I fixed the problem while I had only one copy of the bundle app and I can call the app from spotlight (like any other mac app)

@Grueslayer
Copy link

Another option hard links (instead of symbolic ones) or Aliases like this:

find /Applications -type l -depth 1 | while read f; do osascript -e "tell app \"Finder\" to make new alias file at POSIX file \"/Applications\" to POSIX file \"$(stat -f%Y "$f")\""; rm "$f"; done

@akrabat
Copy link

akrabat commented Jan 2, 2020

For anyone who ends up here via Google, the preferred method to install via Homebrew seems to be the cask:

brew cask install macvim

will install MacVim into /Applications and also set up /usr/local/bin/vim & friends for you:

==> Installing Cask macvim
==> Moving App 'MacVim.app' to '/Applications/MacVim.app'.
==> Linking Binary 'mvim' to '/usr/local/bin/gview'.
==> Linking Binary 'mvim' to '/usr/local/bin/gvim'.
==> Linking Binary 'mvim' to '/usr/local/bin/gvimdiff'.
==> Linking Binary 'mvim' to '/usr/local/bin/mview'.
==> Linking Binary 'mvim' to '/usr/local/bin/mvimdiff'.
==> Linking Binary 'mvim' to '/usr/local/bin/view'.
==> Linking Binary 'mvim' to '/usr/local/bin/vim'.
==> Linking Binary 'mvim' to '/usr/local/bin/vimdiff'.
==> Linking Binary 'mvim' to '/usr/local/bin/mvim'.
🍺  macvim was successfully installed!

@ychin
Copy link
Member

ychin commented Feb 6, 2020

They do behave somewhat differently, as Homebrew directly checks out the repository and builds the code locally, which is a somewhat more involved step and allows you to check out later changes than casks, which only distribute binaries built by us when I do a release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants