简体   繁体   中英

How do you ask the user questions in an OS X installer built with pkgbuild/productbuild?

I'm building an installer using pkgbuild and productbuild, and I want part of the process to involve asking the user some simple questions. These questions can be answered by either check boxes (yes/no) or a small one-line text input field.

Once those questions are asked, I want to feed them to a postinstall script.

For more context, my product is a set of command-line tools that will live in /usr/local/X, where X is the name of my product. Then, a simple postinstall script is run to set some things up initially. pkgbuild already takes care of this nicely. What I'd really like is for the postinstall script to be provided the answers to my questions, maybe in an environment variable, so it can set things up accordingly.

如果不编写自定义插件,这是不可能的。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM