Does anyone know how to execute a script through PackageMaker? Documentation says the file needs to be executable and be named correctly, ie. preflight, postuprade, postinstall, etc. It also needs the correct permissions 775.
I have an AppleScript application I want to run after my package has been installed. I named is postinstall and made sure it has the right permissions, but it is never executed. Not sure why…
Or does one have to create a shell script called postinstall that calls to the applescript app?
I know now that PackageMaker scripts must be shell or perl scripts. The documentation also says that external scripts can be called by the shell script, but I tried this and cannot get it to work.
All I want to do is have the installer run a simply applescript either before or after the installation completes.
I have read the documentation and know that:
Script should be perl or bash shell - I am using a shell script.
Resources directory should be created at the same hierarchical level as the installation directory to contain the scripts.
script names need to be preflight, postinstall, postupgrade, etc.
scripts need to have proper permissions so they can be executed.
Incidentally, my shell script works fine outside the installer, but the installer does not execute it for some reason.
Well, if anyone what reads this knows how to do this, I would really appreciate the answer!
You can run an AppleScript applet. I just created a folder named Resources that contains an AppleScript application. I named the script app “preflight” and the script ran after pressing install in the installer.
Edited: try using either “preflight” or “postflight”.