【发布时间】:2019-01-31 07:14:56
【问题描述】:
我对 Mac OS 的了解非常有限,并且有几个与 DMG 安装程序相关的问题。
我们有一个可以在 Windows、Mac 和 Ubuntu 上运行的应用程序。我们使用Chef Omnibus为所有三个操作系统生成安装程序。
我们的 DMG 安装程序有点基本但运行良好,即我们的应用程序已按应有的方式安装。但是,我们的用户没有简单的方法来启动应用程序 - 他们需要自己去寻找安装文件夹并找到启动 .sh 文件并运行它。
根据我目前收集到的信息,Mac OS 捆绑包 .app 可以帮助我们解决这个问题。但是,我没有找到有关如何在 Omnibus 安装程序创建过程中创建捆绑包的任何信息。我可以看到 bundle 是 follow a specific structure:
的文件夹和文件的集合- 一个 info.plist 文件
- 一个可执行文件 - 这可能是我们上面提到的 bash 文件
- 资源文件夹
- ...以及其他各种文件
我发现创建捆绑包最简单的方法是使用 xCode 编辑器,但这不是我们的选择。我们在 CI 过程中自动创建安装程序,我们更喜欢保持这种方式,它非常高效和可靠。最好的办法是以某种方式扩展 Omnibus 流程,以便我们也能得到这个捆绑文件。但是,在这一点上,我什至不确定这是否可能。
我真的被困住了,所以我很感激任何指点。
这是我们的 distribution.xml 文件以供参考,以防它与此问题相关。 Omnibus 将它用于 productbuild 命令。我一直在寻找扩展它的选项,但与捆绑无关:
<?xml version="1.0" standalone="no"?>
<installer-gui-script minSpecVersion="1">
<title><%= friendly_name %></title>
<background file="background.png" alignment="bottomleft" mime-
type="image/png"/>
<welcome file="welcome.html" mime-type="text/html"/>
<license file="license.html" mime-type="text/html"/>
<!-- Generated by productbuild - - synthesize -->
<pkg-ref id="<%= identifier %>"/>
<options customize="never" require-scripts="false"/>
<choices-outline>
<line choice="default">
<line choice="<%= identifier %>"/>
</line>
</choices-outline>
<choice id="default"/>
<choice id="<%= identifier %>" visible="false">
<pkg-ref id="<%= identifier %>"/>
</choice>
<pkg-ref id="<%= identifier %>" version="<%= version %>"
onConclusion="none"><%= component_pkg %></pkg-ref>
<domains enable_anywhere="false" enable_currentUserHome="true"
enable_localSystem="false" />
</installer-gui-script>
【问题讨论】:
标签: macos chef-infra installation bundle dmg