MacOS – Workflow/tools for installing command line application on OS X (Yosemite or later)

command lineinstallmacos

I maintain a set of command line bioinformatics tools which we distribute as source and binaries for Linux, Windows, and OS X. Currently the binary distribution for OS X is just a zip file containing directories for the binaries and the documentation. Our install guide directs the user to unzip the archive, copy the binaries to the desired location, and update their PATH to point to the binaries. That's fine for the command line savvy users, but some users have never heard of /usr/local/bin let alone PATH. We'd love to have an installer that's in more of the OS X idiom.

Creating an application bundle doesn't seem to do the trick because our tools are strictly command line and they'll need a terminal session to use them. It seems like we could have used PackageMaker to create an installer, but that's now deprecated.

Is there a current standard installer for command line tools on OS X, preferably one with CPACK support?

Best Answer

The standard package format is the "pkg" format. It's not often used for applications, but it's fine for a terminal-only utility.

  • My go-to tool for creating packages is called Packages.
  • I haven't used it myself, but it looks like CMake supports PackageMaker, which is a third party tool for creating OS X packages.
  • There's also the built-in pkgbuild utility.

Just make sure you don't touch anything outside the standard paths (/Library, /Applications, or /usr/local/) and you'll be fine.