RE: Postflight script failing to execute from a package.
RE: Postflight script failing to execute from a package.
- Subject: RE: Postflight script failing to execute from a package.
- From: "Matt Fox-Wilson" <email@hidden>
- Date: Thu, 5 Oct 2006 13:59:20 +1300
I have an update on the problem I was having with a postflight script not
triggering, I have managed to get it working and the solution was kind of
esoteric. It looks like the script was actually executing, but the installer
was returning an error when trying to run it.
Basically, the line 'open -b com.mycompany.myapp' was returning and error in
the installer even though it was working fine from Terminal. The install
path to the app had a space in it, and while Terminal didn't mind, the
installer was reporting that it couldn't find the file, and that the file
name was everything up to the first space.
I shifted to using: 'open $2/MyApp.app' ($2 because I allow the user to
relocate the install) and had exactly the same problem. The path to the
installed app was: 'Applications/ArtRage 2/ArtRage Updater.app' but the
installer using the postflight script was trying to open
'Applications/ArtRage'.
So I added quotes: 'open "$2/ArtRage Updater.app"' and it started working.
It's weird that I could run the original line from Terminal with no problem
but not in the installer.
The final script reads:
#!/bin/sh
open "$2/ArtRage Updater.app"
exit 0
So it's working now and I'll know to include the quotes next time! Thanks
again for the assistance trying to track this down.
- Matt Fox-Wilson
- email@hidden
_______________________________________________
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