我们目前使用productbuild --component (根据下面的帖子:Mac app store productbuild)将我们的mac安装程序构建为pkg文件。
这非常好用,但我也希望在此安装程序中添加一个许可证文件。
使用packagemaker,您可以指定选项--resources path_to_resources_file。如果您将一个License.txt放在指定的资源文件夹中,安装程序会神奇地包含一个许可步骤。
虽然productbuild的手册页也描述了--resources选项,但在实践中,这似乎不适用于--component选项。它似乎完全忽略了这个选项。
根据productbuild手册页,--component选项显然只接受产品定义plist (我查看了plist选项,似乎没有一个选项适用于许可证文件)、一个组件、一个可选的安装路径和一个输出路径。尽管--sign选项也可以使用。
有没有人知道在使用productbuild --component时,是否有可能(如果可能,如何包含安装程序的许可文件)?
提前谢谢。
Iain
发布于 2013-03-15 20:03:34
在您作为参数传递给productbuild的分发文件中,包含一个许可证元素,如下所示:
<?xml version="1.0" encoding="utf-8"?>
<installer-gui-script minSpecVersion="1">
<title>My Awesome App</title>
<welcome file="welcome.html" />
<readme file="readme.html" />
<license file="license.html" />
<conclusion file="conclusion.html" />
<options customize="never" />
<choices-outline>
<line choice="install"/>
</choices-outline>
<choice id="install" visible="true" title="Install" description="Installation description goes here">
<pkg-ref id="com.prosc.RemoteExecution.install.pkg">#installer.pkg</pkg-ref>
</choice>
</installer-gui-script>这些文件需要位于您在传递给productbuild的--resources参数中指定的任何目录中,如下所示:
productbuild --distribution distribution.xml --resources building/ "Mac Installer.pkg"https://stackoverflow.com/questions/11953439
复制相似问题