Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There are two approaches on OS X:</p> <ol> <li><p>OS X defines application and user-level "application support" folders. These are in <code>/Library/Application Support</code> for system-wide and in <code>~/Library/Application Support/</code> for user-level support files. Application support folders are supposed to be named by the app's bundle identifier (e.g. com.company.app), but many just use the application name. In general, OS X uses this pattern (system-level in <code>/Library</code> and user-level in <code>~/Library</code> for application support, preferences, plugins, etc.). <code>/Library</code> is, by default read-only for non-administrator users. If your command line tool is run as root (or via <code>sudo</code>), then you could put your database file in <code>/Library/Application Support/your-app</code>. Of course, since you'll need to do this in an installer script (either traditional unix style or via an OS X installation package), you could modify the read-write permissions of your db file.</p></li> <li><p>As others have pointed out, OS X is a UNIX OS, so you can create <code>/var/lib</code> or any other folder to your liking. Many UNIX ports do this as it keeps things more consistent with other OSes that they support. If you do this, make sure to provide an unistaller script that removes the folders you add (assuming nothing else has been added to them by other apps/users/etc.!). Mac users generally frown on installers throwing crap all over the file system without an easy way to clean it up. Also, MacPorts, and Fink (two OSS package managers for OS X) use the <code>/opt</code> and <code>/sw</code> trees respectively. You probably don't want to mess with those trees as it could cause problems for users of these package managers. Of course, one of the best ways to go if you want to keep things UNIX-y is to package your app for MacPorts or Fink. MacPorts is of the BSD ports tree lineage and Fink is of the debian lineage. MacPorts is the Apple-sanctioned package manager, but both seem popular.</p></li> </ol>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload