PackageMaker - executing scripts

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?

Bill

I believe that’s the case; I’ll try to confirm it.

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:

  1. Script should be perl or bash shell - I am using a shell script.
  2. Resources directory should be created at the same hierarchical level as the installation directory to contain the scripts.
  3. script names need to be preflight, postinstall, postupgrade, etc.
  4. 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!

Thanks!
Bill

Hi,

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”.

gl,

THanks - I tried the same and can’t get mine to run for some reason. Maybe I am missing something small and will restart from the beginning.

You are using an Applescript applications file - .app?
Thanks,
Bill

Hi Bill,

Yes. I used an AppleScript app. although it worked with only preflight and postflight. I think it’s an old version (1.1) also.

gl,