• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Newbie using Packages.app - place files in User libraries?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie using Packages.app - place files in User libraries?


  • Subject: Re: Newbie using Packages.app - place files in User libraries?
  • From: Karl Kuehn <email@hidden>
  • Date: Wed, 21 Sep 2011 15:41:38 -0700

On Sep 21, 2011, at 3:22 PM, Robin Miller wrote:

On Sep 21, 2011, at 6:16 PM, Karl Kuehn wrote:

Note: many of these same problems exist for sys-admins as well, but their screwups in these cases are easier to remediate (i.e.: it is easier for users to yell at them personally). And in those cases a post flight script using 'defaults write' will work for simple cases. For more complex ones I would advise using Python or Ruby and the ObjC scripting bridge.

I'm a sysadmin, not a developer in this case. This is for a packagized build where we want to place some software and preconfigured settings onto a freshly imaged machine. The same package might be used as well to deploy the same software onto existing machines in the environment. It's just settings for a utility to display some system information, so it is very unlikely that a user would have their own settings for this, and I can't alter the defaults built into the app.

Then your best solutions are a post flight script using either 'defaults write' (man defaults for more details) if you are only putting in simple key-value pairs. If you are putting in more complicated things (anything nested), or they might have to be integrated into settings, then I would recommend skipping up:

http://wranglingmacs.blogspot.com/2010/05/using-plists-from-python.html
Some people will talk about PlistBuddy, but once you get to things complicated enough for that the step to Python/Ruby with the ObjC bridge is so small that I found the annoyances with PlistBuddy not to be worth it.

Note: be sure to run the Installer as the user you want the preferences to apply to. That means not making it require authentication, which might put a crimp into your plans. Trying to make it work for a user while running under root winds up to be a more difficult job that most would thing (there are so many corner cases).
--
Karl Kuehn
email@hidden
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Newbie using Packages.app - place files in User libraries? (From: Robin Miller <email@hidden>)
 >Re: Newbie using Packages.app - place files in User libraries? (From: Karl Kuehn <email@hidden>)
 >Re: Newbie using Packages.app - place files in User libraries? (From: Robin Miller <email@hidden>)

  • Prev by Date: Re: Newbie using Packages.app - place files in User libraries?
  • Next by Date: Problem installing when multiple iso's with are mounted
  • Previous by thread: Re: Newbie using Packages.app - place files in User libraries?
  • Next by thread: Problem installing when multiple iso's with are mounted
  • Index(es):
    • Date
    • Thread