Installing command line tool bundled with application.

Discussion in 'Mac Programming' started by aliher, Aug 20, 2009.

  1. aliher macrumors newbie

    Mar 25, 2009
    I'm using a command line took to perform tasks within my app. I want to package it inside the application bundle. The task of compiling and adding it to the bundle doesn't look like a problem.
    The question is, how should it be used subsequently by the application?
    Should I run it right within a bundle (by getting bundle path and appending path within it)? I've read apple recommends copying it to "Library/Application Support" before using on the first launch. But it is unclear if I should use global Libraries or user Libraries directory and how should I tackle permissions if the global one is used. Having personal copy of utility in every users library doesn't seem like a good solution to me.
    Are there any apple guides that clarify this question? It looks like a rather common use-case to me.
  2. robbieduncan Moderator emeritus


    Jul 24, 2002
    If it should only ever be called by your app and not directly by the user in Terminal then it should stay in the bundle. Otherwise you should ask the user if they want to install it for themselves only or all users when they perform whatever action calls it. If they say all users you must authenticate to raise permissions and copy to the shared Library.

Share This Page