RE: Postflight script failing to execute from a package.
site_archiver@lists.apple.com Delivered-To: installer-dev@lists.apple.com Thread-index: AcbneTsRppF2R5wdQPqRZlq9fmilEgAAzVPAACV6ZCA= 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 - matt@ambientdesign.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Installer-dev mailing list (Installer-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/installer-dev/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com
participants (1)
-
Matt Fox-Wilson