开发者

How to ask the user something from a Mac OS X Installer Package

I have a PKG Installer Package for my application build and imaged into a DMG. I create it from a root directory structure using PackageMaker command line interface. My installer copies some kernel extensions that need to be loaded into th开发者_Python百科e kernel so i have to ask for reboot during the installation because if user is upgrading an existing installation i will have to unload the old KEXTs first and i can't do that in some cases. To make my installer work without the reboot and reload kernel extensions manually i will first have to ask the user to do a couple of things related to my application.

The question is, how do i display this request from my installer? I want the user to see a message that says "You have to do this and that to proceed", an OK button and try again. I figured out that i can check the condition to require user's attention in the InstallationCheck script and do kext loading and unloading from a postflight script, but how do i display a message itself?


You can create an Installer plugin that will show up as a new page when the user runs the installer. It might be a little overkill for what you want, though.

Here's a link to Apple's sample code: https://developer.apple.com/library/mac/#samplecode/InstallerPluginSample/Introduction/Intro.html

There are also a few web pages that provide a bit more documentation, but I can't find them right now.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜