2

I used Packages to create a.pkg installer for a Mac OS X LaunchDaemon.

During install, I would like the user to be able to provide a few values for the configuration file. The resulting file is a simple text configuration file which will be sourced by a shell script when it is run.

Is there some tool that would make it easy to create a fill-in form with a few text fields? This would be presented to the user during install, and then save the values provided (or make them available to a postinstall shell script).

If there is no such tool, I guess I could do it with the shell and a few reads in a Terminal. But in that case, how to start that interactive shell script from my postinstall script?

mivk
  • 13,452
  • 5
  • 76
  • 69
  • Did you find any solution? – Parag Bafna Nov 13 '20 at 04:22
  • @ParagBafna: no, I didn't. It was a small project for mainly personal use, so if I remember correctly, I just abandoned the fancy pkg installer project. But I would still like to know of a simple way to do something like that. – mivk Nov 13 '20 at 18:24
  • There is no option to pass a custom parameter to pkg installer. One solution is to use launchctl environment variable. https://stackoverflow.com/questions/55511165/pass-variables-to-the-installer-on-osx-package-installer. Another solution is to pass value to executable after installation via command-line argument. – Parag Bafna Nov 17 '20 at 12:35

1 Answers1

0

Not sure, you can do it with the Distribution.dist XML file. It is JavaScript, but I have not looked though the definitions, since it comes out all garbled on my current version of Safari.

The easiest would be to create a small applications dialog run from the script, which you have full control over.