Problems creating "complex" installation
Problems creating "complex" installation
- Subject: Problems creating "complex" installation
- From: Rob Keniger <email@hidden>
- Date: Thu, 8 Oct 2009 11:24:36 +1000
Hi all,
It's been a few years since I used PackageMaker to build an installer and so PackageMaker 3 is new to me. I'm having problems.
I need to create an installer that can do the following:
- install my app in /Applications
- install a bunch of plug-ins for other applications in various locations
The problem I have is that each plug-in needs to be installed if and only if the application it supports is present.
For example, I have a plug-in for Panic's Coda application that needs to be stored here:
~/Library/Application Support/Coda/Plug-ins/
So, in order to install it, I need to detect whether Coda is installed. From what I can tell, the installer's JavaScript support is only able to query running applications. So, I wrote a command line tool that uses Launch Services to check whether Coda exists, using a call like this:
LSFindApplicationForInfo(kLSUnknownCreator, CFSTR("com.panic.Coda"), NULL, NULL, &appURLRef);
The tool works fine and returns 0 if Coda exists and 1 if it doesn't, however basing the plug-in installation on "Result of Script" in PackageMaker does not seem to work, and in fact the installer doesn't include the command-line tool in the package, it just references the original file on my machine, so it can't work. The appallingly terse documentation for PackageMaker does not even mention the "result of script" step so I have no idea how this is supposed to work.
I also can't see how to install to the user's Application Support folder. If I enter the installation path as "~/Library/Application Support/Coda/Plug-ins/" then I get a folder called "~" at the root of the installation volume. Not helpful. Is there a way to install in the user's domain? I am having trouble finding it.
I thought that perhaps I could use Installer plug-ins to handle all of this, and I managed to find the example code and the headers that appear to be the only documentation for this. However, PackageMaker 3 seems to have no idea that installer plug-ins exist and since it no longer creates a bundle there seems to be no way to use them.
I have downloaded Iceberg which appears at least to be sensibly designed and possibly flexible enough to do what I want but I must admit I am flailing at this point.
Can anyone help me with any of the issues I'm having?
Many thanks,
--
Rob Keniger
_______________________________________________
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