Re: PackageMaker home directrory installers for pre 10.5 systems
Re: PackageMaker home directrory installers for pre 10.5 systems
- Subject: Re: PackageMaker home directrory installers for pre 10.5 systems
- From: Stéphane Sudre <email@hidden>
- Date: Sun, 25 Nov 2007 17:19:19 +0100
On dimanche, novembre 25, 2007, at 04:38 PM, patrick machielse wrote:
Op 25 nov 2007, om 10:24 heeft Stéphane Sudre het volgende geschreven:
On dimanche, novembre 25, 2007, at 01:28 AM, patrick machielse wrote:
I'm developing a plugin (exporter) for iPhoto 08 that should be
installed in ~/Library/Application Support/iPhoto/Plugins. Since
installers are encouraged now, and I certainly don't want the user
to have to dig around in ~/Libarary/ (using the Finder, on paths
that Spotlight won't search) I thought I'd turn to PackageMaker.
For deployments on 10.5 I can specify that the product only be
installed into the user's Home Directory domain, and all is well.
However, this PackageMaker domain is not supported on 10.4 and the
(very light) documentation of PackageMaker doesn't explain how to
achieve the same result on earlier versions of the OS.
I've searched for a solution on the internet and it was suggested
some years ago that you could install the product in a temporary
directory and then have a post-install script move the installed
component to its final destination. Alternatively, a symlink to a
location in the home directory could be created in /tmp/ using a
pre-flight script, and the installer would install through that. Is
this still the way to do it in 2007?
If you need to support 10.4 or earlier, yes.
The flat package format which includes the new domain feature is 10.5
or later only.
Apple _could_ have supplied a more intelligent installer as part of
10.4.11 :-(
I'm afraid that while we think Apple can or should do a lot of things,
they still are limited by resources and schedules. I personally think
it's a good point that this domain features has been added in 10.5
(though I have some questions on the level of implementation of this
feature that I need to eliminate through tests. Such as: since it's at
the distribution script level, does this mean you can't have a specific
domain for a package inside a distribution? ).
I'm trying to install into the plugin folder by using the following
scripts:
preinstall.sh
-------------
#!/usr/bin/env sh
# install location for iPhoto exporters
PluginDir="$HOME/Library/Application Support/iPhoto/Plugins"
# create the plugin folder if needed
mkdir -p "$PluginDir"
# create a soft link in /var/tmp/
ln -shf "$PluginDir" /var/tmp/com.mycompany.myproduct
postinstall.sh
--------------
#!/usr/bin/env sh
# clean up the install symlink (OS X won't)
rm -f /var/tmp/com.mycompany.myproduct
The problm I'm having now (only tested on 10.5.1) is that the
Installer doesn't run my scripts. I can see that they are included in
the package, they just never seem to be executed. The same seems to be
true for the distribution action (get iPhoto and quit it); it never
seems to run.
What am I missing?
It could be the usual mistakes with preinstall and postinstall scripts.
They are only executed when the package is installed for the first time
on the system (*). If you want this to be run for every installation,
use preflight and postflight (**).
Otherwise, check the usual suspects:
- permissions
- file name (no extensions)
- line endings (Unix vs Mac vs Windows) (should be Unix).
My € 0.02 (***)
--
Stephane
(*) Removing the receipt used to be a workaround. I'm not sure anymore
with the new installation data base.
(**) A smart move in the 10.5 package format was to rename postflight
and preflight scripts to preinstall and postinstall. It can be
confusing if you know the old formats but in the end, it will be easier.
(***) The $ is so much depreciated these days.
_______________________________________________
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