简体   繁体   English

使用 pkgbuild 向安装添加自定义步骤

[英]Add custom step to installation using pkgbuild

I see that pkgbuild can be used to create installation files for MAC.我看到pkgbuild可用于为 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.在“安装”和“摘要”之间说,我可以添加一个名为“安装插件”的步骤,如果用户选择继续,我可以运行一个脚本来下载插件。 ? ?

在此处输入图片说明

在此处输入图片说明

It is possible with Installer Plug-ins, but I highly discourage it: It seems Apple removed all documentation about it from the developer page.安装程序插件是可能的,但我强烈反对它:Apple 似乎从开发人员页面中删除了有关它的所有文档。 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 :这些天我发现的唯一细节是在框架头文件中,比如InstallerPlugins/InstallerPane.h

在此处输入图片说明

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 .这里

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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