Re: Check for file before installing
Re: Check for file before installing
- Subject: Re: Check for file before installing
- From: Peter Bierman <email@hidden>
- Date: Fri, 21 Sep 2007 11:46:19 -0700
At 9:04 AM -0400 9/21/07, email@hidden wrote:
I am trying to figure out if there is a way to check for a certain font in
Library/Fonts, and if not then install it. Problem is there is no receipt
for it since it is a font that should have come standard with the OS, but
could possibly have been deleted by the user. Only way I can see to check
for the existence of a file is through receipts - is there another way?
And is there a way to cancel this package of the metapackage if it finds it
but continue on with the rest of the install?
Yes, using a distribution script, you can write a JavaScript function
that uses system.fileAtPath() to check for the file. You can then tie
that JavaScript function to the selected state of your replacement
font package.
At 9:32 AM -0700 9/21/07, Jack Repenning wrote:
Your idea is deeper and more troublesome that you seem to suppose.
If you do this, you will have created the situation where two
different packages install the same file. No installer I know of
handles this well.
While I agree that this situation makes life hard for the installer,
the Mac OS X Installer handles this as well as can be expected. The
OS itself installs many many files that overlap between packages.
The consequences are that when multiple packages own the same file,
upgrading any one of those packages has the potential to replace or
remove that file, leaving the other packages in an inconsistent state.
When you know the circumstances of upgrading, you can work around
this issue. For example, with Annette's issue, if she replaces a font
that should exist anyway, then system upgrades will update or replace
that font as necessary.
-pmb
_______________________________________________
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