osx - Installer for a simple Mac OS command-line tool? -
how can build novice-usable (clickable download) installer mac os x command-line tool, , should binary installed novice user no knowledge of shell paths can open terminal app , type "foo" run freshly installed foo tool?
can installer install documentation user can type "man foo"?
are there other options should considered make use of pure command-line (stdin, stdout) tool accessible novice mac user?
what's minimum version of os x you're targeting? 10.6 (and iirc 10.5) include /usr/local/bin in default path, 10.4 did not. long don't need support 10.4, should put executable in /usr/local/bin , man page in /usr/local/share/man/man1 (or whatever appropriate chapter number is).
for building installer itself, can use apple's packagemaker utility (part of xcode). create prototype local folder bin , share/man/man1 subfolders , populate them files. create package project in packagemaker, , choose organization name , minimum target os. drag prototype folder project's contents sidebar. set destination /usr/local. switch contents tab , edit ownership , permissions files should installed (the owner/group should root/admin, rwxrwxr-x perms on folders , executable, rw-rw-r-- on man page). if irrelevant files (e.g. .ds_store) snuck in, exclude them. around other settings want change, save project , build installer. test it, make sure expect.
Comments
Post a Comment