22

say for example you want to install Inkscape. You can install it either by downloading the app from the inkscape website or by downloading it via Homebrew.

What are the pros and cons of both approaches? And if I install it via Homebrew, will Inkscape behave like a normal app, e.g will it show up in the applications folder?

user2426316
  • 7,131
  • 20
  • 52
  • 83

1 Answers1

8

homebrew (like Macports) is a package manager. It allows you to manage packages (update, delete etc.). Most importantly, homebrew will compile the application on your platform. That's especially important for ports, e.g. from Linux.

homebrew will give you greater and more fine grained control over what you install, where, what compilation attributes you want to use etc. But this comes at the cost of a bit more complexity and the need to know your way around the command line.

Downloading a binary and putting it in the Applications folder is easier by far and usually works fine. If your not a developer and don't need to manage many different tools then I'd recommend sticking with binary downloads. If you're a developer however, you will most likely not get around a package manager if you need tools like Tex, ghostscript, ImageMagick and so on.

To answer your last question too: no, the application will not show up in the Applications folder automatically (at least that's the case with Macports). You'll have to create a symlink yourself if you want that, e.g.

$ ln -s /opt/local/bin/python /Applications/myPython

Edit:

@Ned Deily

Your example above doesn't make a lot of sense. /opt/local/bin/python is not an app bundle in the OS X sense (rather, it is something you run from a shell command line) so why would you create a symlink to it in /Applications?

That is true. It was just the first thing that popped into my mind as an (arguably bad) example.

Also, MacPorts does install app bundles into /Applications using the subfolder MacPorts

Also true. But it's the responsibility of the package maintainers to tell MacPorts to do that (I think...), so don't count on it. I went and installed Inkscape through MacPorts. That installs a runnable which needs the -g option to run with GUI (but I didn't have X-Server...). So no luck with installing an app bundle in Applications.

@user2426316
The short answer is yes, it's possible to have both the compiled binary and the app bundle. To be more precise though, I would install either one or the other. Depending on how the application has been written, two installations might interact with each other in unforeseeable ways. It might well be that both share configuration files and thus even "know" about changes made in the other instance. But this behavior can lead to overwrites if the developer wasn't careful. On the other hand, they might use a separate set of configuration files and if you take some time to configure the application you'll have to do that a second time in the other instance.

Another point to think about is that both instances will probably get updates from time to time. Will you always keep the instances in sync? Is that even possible (maybe there's no new app bundle that includes the same changes)?

All in all I see more trouble and frankly no benefit (except for eye candy maybe). Rather create a script to run the binary or a symlink and assign a fancy icon to that file.

Max Leske
  • 5,007
  • 6
  • 42
  • 54
  • Thanks! So would it be possible to have both versions (the homebrew package AND a binary in the applications folder) on one computer. I have installed inkscape via homebrew but also would like to have just the app with its icon :) – user2426316 Jun 23 '13 at 21:17
  • 1
    Your example above doesn't make a lot of sense. `/opt/local/bin/python` is not an app bundle in the OS X sense (rather, it is something you run from a shell command line) so why would you create a symlink to it in `/Applications`? Also, MacPorts *does* install app bundles into `/Applications` using the subfolder `MacPorts`. – Ned Deily Jun 23 '13 at 21:19
  • It would be better to give your responses in the comment section, and not in the main answer body. Thanks. – hadi Feb 19 '14 at 00:57
  • @hadi what on earth are you talking about? And why are you commenting on a post from June last year? – Max Leske Feb 19 '14 at 07:50
  • I found the question through Google search, and got some good information from your response (thanks!). But noticed that it got unnecessarily long because of the responses to comments that you appended appended to your main answer. – hadi Feb 19 '14 at 10:35
  • @AlexanderKucheryuk This isn't about binary vs. compilation, it's about why one would want to use homebrew instead of downloading an application. It is true that homebrew gives you the option to compile from source but that isn't specific to homebrew. You can just as well download the source code of the respective program and compile it, the binaries are always just there for convenience (and for those programs that don't give you the source you will not find them on homebrew either). – Max Leske Mar 04 '21 at 05:33
  • It's just one aspect. And not exclusive to homebrew. – Max Leske Mar 04 '21 at 16:42