我正在使用productbuild
为 MacOS Mojave 创建一个 .pkg 安装程序。我已阅读Distribution.xml 文件的架构参考。我成功地使用它来包含自定义欢迎。因此,当我运行时,我知道我的资源路径被正确使用:
productbuild --resources ./res --sign "$PKG_SIGN_ID" --distribution Distribution.xml foo.pkg
但我似乎无法创建自定义背景图像。我尝试了各种 jpg 和 png 图像。
我已经阅读了这个问题和答案,并且在我的资源目录中尝试了使用和不使用en.lproj
子目录。
我Distribution.xml
最终看起来像这样:
<?xml version="1.0" encoding="utf-8"?>
<installer-gui-script minSpecVersion="1">
<background file="background.jpg" mime-type="image/jpeg" scaling="tofit"/>
<welcome file="welcome.html"/>
<title>My App</title>
<pkg-ref id="com.foo.myapp"/>
<options customize="never" require-scripts="false"/>
<choices-outline>
<line choice="default">
<line choice="com.foo.myapp"/>
</line>
</choices-outline>
<choice id="default"/>
<choice id="com.foo.myapp" visible="false">
<pkg-ref id="com.foo.myapp"/>
</choice>
<pkg-ref id="com.foo.myapp" version="1.0" onConclusion="none">foo.pkg</pkg-ref>
</installer-gui-script>
这不再可能与莫哈韦沙漠有关吗?