Question

I'm trying to make an Installer package for a Mail.app plugin I've created. It needs to do two things: 1. Install the .mailbundle (which is simply a folder) to ~/Library/Mail/Bundles 2. Run two Terminal commands to enable Mail bundles

The crux of the issue seems to stem from the fact that I'm trying to install in the user's home folder, because the PackageMaker app doesn't seem to have a "currently logged in user" variable so when I specify who should be the owner of a file. Right now I have myself specified as the owner, thinking PackageMaker would intelligently take that to mean "the current user" but it doesn't seem to; when I try to install the package on another person's machine, an unknown user (likely me) is the owner of the folder, and the postinstall script that enables Mail bundles doesn't seem to take effect (likely because Installer is being run as root, which prevents the defaults program from writing to the current user's Mail preferences file).

I've done a great deal of looking for this stuff, but most people seem to be installing their own standalone apps, and nobody's doing stuff that strictly exists in the home folder. I'm going to try a simple shell script that the user can double-click to install the plugin, but I really need this to work as a pkg so that Sparkle works.

Another thing I'd like to be able to do is check whether Mail is running at install time and prompt the user to quit the program. Right now I can silently quit the program but I'd rather have the user quit themselves, just to be safe. I know it's possible because the iTunes updater will do it, but I don't see any straightforward way to do it in PackageMaker, so I'm guessing a more creative solution will be needed.

Any ideas?

Was it helpful?

Solution

Download the GrowlMail source code and look at the MakeFile. I think you might need to move the files in that manner by the use of a script.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top