0

I want to make an OSX application bundle that installs a command-line tool. Is this possible, and if so, how? The docs make it sound like the keys APInstallerURL and APFiles in info.plist can be used for this, but they don't make it clear how.

1 Answer 1

0

I would just have the app:

  • First, check if the executable is already installed (e.g. check the return code of which yourExecutable)
  • If not installed, copy the executable to /usr/local/bin/, or somewhere else (your pick)
  • If not copied to /usr/local/bin/, add the executable's location to the user's $PATH (add the following line to the end of their ~/.bash_profile: export PATH=$PATH:/path/to/executable)

If the application bundle is exclusively for installing the tool, you could even do all this in AppleScript.

2
  • The problem is that this has the same downside as .pkg files; the file can't be uninstalled automatically.
    – Dan
    Apr 19, 2016 at 17:17
  • Unless you include an uninstaller to reverse the process : ) Apr 19, 2016 at 17:47

You must log in to answer this question.

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