Muthukumar
Muthukumar

Reputation: 9579

Add custom step to installation using pkgbuild

I see that pkgbuild can be used to create installation files for MAC. All the examples that I see have the standard steps as shown below.

I wonder if we can add custom steps to this and execute a script during that step. Say in between "Installation" and "Summary", could I add a step called "Install Plugins" and if the user selects continue, I can run a script to download the plugins. ?

enter image description here

Upvotes: 0

Views: 732

Answers (1)

catlan
catlan

Reputation: 25246

enter image description here

It is possible with Installer Plug-ins, but I highly discourage it: It seems Apple removed all documentation about it from the developer page. Not a good sign for its future. Which makes sense with the focus in recent years of locking down the system, because a Installer Plug-ins has like full system access.

The only details I find these days are in the framework header files, like InstallerPlugins/InstallerPane.h:

enter image description here

If you use Plug-ins, Install will present the user an alert with "This package will run a program to determine if the software can be installed." See here.

Upvotes: 1

Related Questions