How to get user access to PackageMaker?

I am trying to create an installation package. I have all my components, and I think I understand most of the process. I want to have a setup / setup script that runs as part of the setup. I planned to put it either as an action after installation, or after installing the script.

The problem is that I need user input. I cannot figure out how to get user input in a script, or how to add a page to the installation interface, where there is room for user input, and then pass this to a script.

I suppose I could write an apple-script with a dialog box to ask a question, and then pass this information into my shell script (or write all this in applescript), but this seems unnecessarily complicated ...

Is there a normal way to do this?

thanks

+4
source share
2 answers

You can create an installer plug-in, which is a Cocoa downloadable package that can contain your own user interface and code. When you add the plug-in to the Installer package, the Installer application displays your plug-in interface as an additional step in the installation process.

Apple code sample and available documentation here . There is a great explanation of the process here .

Unfortunately, inserting a plug-in package into your installer package has become unnecessarily complicated, as in PackageMaker 3.0 and in its flat format.

Once you have created your plug-in, you must first create your installer package as usual. After creating it, you need to go to the Edit menu in PackageMaker and open the Flat Packet Editor . Open the installer package and insert the plug-in in the appropriate place, as in Finder, with the installer package 2.0. That is, you need to create the Plugins folder and inside it you need to insert your package and the InstallerSections.plist file (which is shown in the example above).

+5
source

Can you expand this to everyone? I copied these two β€œfiles” into the plugins directory through the flat package editor, as you said. However, after saving, closing, and reopening the package, the plugin directory disappeared.

0
source

Source: https://habr.com/ru/post/1310762/


All Articles