Re: postinstall scripts not executing
Re: postinstall scripts not executing
- Subject: Re: postinstall scripts not executing
- From: Steve Stockman <email@hidden>
- Date: Thu, 14 Aug 2008 13:58:07 -0500
- Thread-topic: postinstall scripts not executing
I don't know about documentation, but a big argument against an installer
writing prefs is that you can't know whether there is any connection between
the user installing the app and the user(s) actually running it; they often
are not the same. (Well, if it is an in-house application, then MAYBE you
can know...)
You can iterate the "/Users" folder and stash initial prefs into each
"Library/Preferences" subdirectory (and maybe
"/var/root/Library/Preferences" if you have some wild idea that someone may
need the app while logged in as root), but that does nothing for networked
users, and finding all networked user home directories can be a pain (such
pain being magnified by the possibility of offline servers).
A much better idea is for the application, at launch, check for the
existence of preferences for the current user only, and set up some default
values if none yet exist. NSUserDefaultsController makes this quite easy,
but even if you don't use Cocoa preferences it's still a fairly simple
matter to copy default preference values out of some file buried in the
application bundle.
Steve Stockman
Software Architect
Consumer Products - Macintosh
Symantec Corporation
www.symantec.com
> From: "Gignac, Jason (HAS-SAT)" <email@hidden>
> Date: Thu, 14 Aug 2008 12:51:42 -0500
> To: Luke Bellandi <email@hidden>, Jeremy Matthews
> <email@hidden>
> Cc: "email@hidden" <email@hidden>
> Subject: Re: postinstall scripts not executing
>
> Is there any particular documentation on the why-and-wherefores of the
> discouragement against pref-writing?
_______________________________________________
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