java - Productbuild --distribution : package xxx. 无法加载 pkg

标签 java macos app-store productbuild pkg-file

我正在尝试使用productbuild命令打包应用程序,以创建一个包含许可证文件的pkg文件。我的做法如下:

# Creates the first package  
productbuild --sign "3rd Party Mac Developer Installer: Tamaggo" --component tamaggo\ ibi.app /Applications/ tamaggoibi.pkg

# Creates a package that will hold the first one using a distribution file
productbuild --distribution tamaggo\ ibi.app/Contents/distribution.xml --package-path . --sign "3rd Party Mac Developer Installer: Tamaggo" bassel.pkg

我总是收到以下警告:

productbuild:警告:无法加载包./tamagoibi.pkg

如果我双击第一个创建的包,安装就会成功完成。如果我双击另一个,则什么也不会发生。

我只是不明白第一个包出了什么问题导致它无法加载。

这是 distribution.xml 文件:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN""http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<installer-gui-script minSpecVersion="1">
<title>tamaggo ibi</title>
<license file="license.html" />
<background file="ApplicationBackground.gif" />
<options customize="never" allow-external-scripts="no"/>
<choices-outline>
    <line choice="choice0"/>
</choices-outline>

<choice id="choice0" title="Install tamaggo ibi">
    <pkg-ref id="tamaggoibi" />
</choice>

<pkg-ref id="tamaggoibi" version="1.6">#tamaggoibi.pkg</pkg-ref>
</installer-gui-script>

最佳答案

使用 pkgbuild 解决了我原来的问题,我发现这真的很好 post这帮助我将许可证添加到安装程序中。

关于java - Productbuild --distribution : package xxx. 无法加载 pkg,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16573338/

相关文章:

react-native - 如何安装 React Native 应用程序而不将其发布到任何商店?

java:如何将文件转换为utf8

java - 将算法 C 翻译成 Python

ios - 在同一个 Xcode 项目中拥有 iOS 和 macOS 应用程序

c++ - 奇怪的 C++ 链表错误

macos - 如何在状态栏应用程序中定位 NSPopover (macOS)

ios - 基于 IOT 的应用程序向 AppStore 提交流程

java - 如何在JAVA中更改firefox配置文件首选项字段,例如 “security.insecure_field_warning.contextual.enabled”

java - 连接到多个 mongo 数据库主机并在 spring boot 中使用不同的数据库进行身份验证

swift - 在 NSDocument 子类中, print() 正在获取 printDocument() 的修复程序