Re: giving a plug-in path in script file
Re: giving a plug-in path in script file
- Subject: Re: giving a plug-in path in script file
- From: Bill Coderre <email@hidden>
- Date: Tue, 10 Jan 2006 07:55:06 -0800
On Jan 10, 2006, at 6:41 AM, Kamran wrote:
I developed a plug_in for QuarkXpress 6.0 and need to install two
items inside QuarkXpress folder, one is a extension that goes to
XTension folder of Quark and the other is a folder containing a few
files in it for internal application usage,and should be located into
QuarkXpress as well.
My Question is how can I determine these path in a script file during
installation? It could be possible that machine has two version of
Quark installed and I want to ignore the path of version with lower
version than 6.0.
There are two ways to do this: Using the Locator functionality, and
Installing to a temporary location, then moving files during postflight.
Using Locator
Let's say you have your installer archive set up so your files are in
their correct location in /Applications/QuarkXpress.app/whatever/
stuff/goes/here.
You could use the locator functionality to "find" Quark and
disqualify incorrect versions based on version number. Read about it
here, especially listing 7:
http://developer.apple.com/documentation/DeveloperTools/Conceptual/
SoftwareDistribution/Concepts/sd_find_file.html#//apple_ref/doc/uid/
20001941
If all you are going to do is to install some files, this will work
well. It will even ask the user which copy of Quark to update if more
than one qualifies. There is a bit of a problem if you have to use
preflight or postflight scripts that operate on these pieces, because
the locator doesn't provide info to the scripts. However, if you
don't need to do that, I'd probably use this method.
Also, I'm not sure if it will work correctly in older versions of OS
X. Be sure to test, and lock out installations on old systems, or the
install will fail.
Installing to a temporary location
Have the files installed, by default, in a folder in a temporary
location, such as /var/tmp/<com.company.pkg.productname>/whatever/
stuff/goes/here. In postflight, move the files to the correct
location, and clean up your temporary folder.
/tmp is automatically cleaned up on restart, but /var/tmp is not.
However, /tmp is world writeable and /var/tmp is only available to
root, so there's fewer security concerns writing into /var/tmp. Just
pick up after yourself.
The obvious shortcoming to this plan is if there's more than one
qualifying copy of Quark. At the end of install, you could
theoretically run whatever program you want, put up a window, get
user input, etc. HOWEVER, this is not the best user experience.
Ideally, once the user clicks "Install," they should be able to walk
away.
Obviously, both of these approaches have their own drawbacks. There's
no perfect solution, even in 10.4.x so far.
If you find a case where you cannot do what you need to do without
committing horrible atrocities, by all means file a bug and the
Installer team will look at possible enhancements for future OS
versions.
_______________________________________________
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