Hi Bill,
Thanks for your prompt reply. I
think this is just what I need! One question, just to be sure…
If I understand what you’re saying,
then the postflight script runs asynchronously. Is that right? So
even though I’m holding up the completion of the postflight script, the
Installer will proceed along, displaying the final dialog and quitting once the
user dismisses that dialog? If this is so, then I get you 100%.
We are already launching our app (just
doing so a wee bit earlier than we’d like), so we’ve already
addressed the permission issues. And we don’t require a restart, so
that isn’t a problem.
Steve
From: Bill Coderre
[mailto:email@hidden]
Sent: Wednesday, June 07, 2006
3:34 PM
To: Steve Johnson
Cc: email@hidden
Subject: Re: How to do something
(like launch an app) at the VERY end of an install?
What the Apple apps do is to make a postflight script that waits for
the Apple Installer to quit (ie. it's no longer in the process list) and then
run a program.
The unix command we tend
to use is killall -s Installer because that's easy. if
that's not available, you have to use ps
and then grep etc etc. To launch a
program, use "open."
Be aware of permissions
issues! Your postflight might be running as root, and you might wish the
program being launched to run as the user. If so, you'll need to use "su" to switch to the user logged in
(which I think is the environment variable USER, but check).
This becomes "complicated" if the installer might restart. In
that case, you want to add an item to the login items. (I am not remembering
all the details offhand. I sincerely doubt anyone would mind if you were to
read some Apple installers to see what they do and then do something similar.
Technically, the code is copyright, but doing something similar increases the
likelihood that your code will work in the long run.)
On Jun 7, 2006, at 1:54 PM, Steve Johnson wrote:
My installer currently launches a setup tool in the
"postflight" script to
allow the user to configure the newly installed software. The problem with
this is that the installer then display one more "The installation
is
complete" dialog that shows up behind the setup tool, and it's
just a bit
annoying that the installer can't be completely done before it runs the
I've always figured there was no easy way to the better thing...to
launch
the setup tool AFTER the final dialog is dismissed. I've noticed lately,
however, that a few of Apple's own installers exhibit this desired
behavior.
The Boot Camp installer, for example, launches the Boot Camp Assistant
after
the final dialog is dismissed.
Is there any not-too-difficult way for me to add this behavior to my
installer? TIA for any
help.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Help/Unsubscribe/Update your Subscription: