1

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?

2 Answers 2

3

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.

3
  • Sorry, I had I typo in my question, I meant PakageMaker not PackageManger. Yes, CMake supports PackageMaker, but PackageMaker is deprecated since Yosemite. Thanks for pointing me to pkgbuild. I may have to create my own CMake scripts to use pkgbuild. Apr 15, 2016 at 1:02
  • Another possibility: stackoverflow.com/a/33043862/2454476 (creating .pkg files on linux). Apr 15, 2016 at 1:09
  • Or you could write a script, Applescript would be good for user input, but shell script could suffice.
    – user14492
    Apr 29, 2016 at 17:48
0

You may want to have a look at EPM, the Easy Package Manager.

It can package Mac OS X pkg as well as RedHat RPM, Debian deb and then some more package formats -- all from the same source files, immediately after the build step.

It was originally written by Michael Sweet, the author of CUPS (who now works for Apple), and is still maintained by him.

The documentation is here:

EPM is available via MacPorts (albeit in an older version, v4.1, whereas the current one is v4.3).

To use it in your Makefile, it is as easy as adding an additional target like this:

osx:
    epm -f osx -v -s doc/epmlogo.tif $(MY_PROJECT) 

Of course, you can also use it standalone (not from the Makefile) to package your software.

It requires you to create a list of files with their paths, permissions and some other meta info which should be packaged.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .