Re: Installing plugins
Re: Installing plugins
- Subject: Re: Installing plugins
- From: Rob Keniger <email@hidden>
- Date: Fri, 27 May 2005 12:20:26 +1000
On 27/05/2005, at 9:40, John Kirkham wrote:
I've tried this and got it to work using:
CFArrayRef LSCopyApplicationURLsForURL (
CFURLRef inURL,
LSRolesMask inRolesMask
);
This requires a URL that would be handled by the expected
application - this means that if you wanted to find apps that
handle a certain document you'd need to know where one is or create
a dummy one (ie, here file-type is specified by the file name
extension).
The second field allows you to specify the role so you could narrow
it down to a list of editors that handle that file-type.
The result is an array of URL's that point to the applications that
handle it. Note that special characters, including spaces, are URL-
encoded so you have to handle this if you want a more typical unix
path string.
Thanks, John. I did see this method but I wasn't sure about using
dummy files, I guess I could do that.
I hope this helps. I'm sure there must be a better way to do it,
so if you find out please post back to this list. Thanks.
In Mac OS 10.3 and later the installer also lets you locate
installed applications using the bundle identifier. If you haven't
already checked it out, try reading the following:
http://developer.apple.com/documentation/DeveloperTools/Conceptual/
SoftwareDistribution/Concepts/sd_find_file.html#//apple_ref/doc/uid/
20001941
I've tried this and can't seem to get it to work. I created a
TokenDefinitions.plist file in my Resources folder like so:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://
www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UserLocation</key>
<array>
<dict>
<key>searchPlugin</key>
<string>LaunchServicesLookup</string>
<key>identifier</key>
<string>com.adobe.GoLive</string>
</dict>
</array>
</dict>
</plist>
No matter what I do, the installer never prompts me to choose one of
the installed copies of GoLive, even though I have four different
versions installed that all use the com.adobe.GoLive bundle identifier.
I'm also not entirely sure how the tokens are accessed. If, for
example, I want to access the installation location from postflight I
use the $2 argument passed to the script. However, even with the
TokenDefinitions.plist file above present, the value of $2 is always
the default install location, NOT the one that the UserLocation token
should have found.
I thought perhaps it would be possible to access $UserLocation as an
environment variable but no success.
Although there's good documentation about creating Tokens, there
doesn't seem to be any documentation about what exactly the Tokens
can be used for and how to use them.
I did find this message:
http://lists.apple.com/archives/installer-dev/2004/Dec/msg00009.html
Which describes the $DESTINATION_TOKEN environment variable, but it
looks like this will not be reliable.
--
rob.keniger
------ menumachine for adobe golive ------
build dynamic drop-down menus in seconds
------- http://www.menumachine.com -------
_______________________________________________
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