How do I build an OS X installer package with a custom background with productbuild?

我的梦境 提交于 2019-12-06 00:54:19

问题


I've got a project that relies on the now deprecated PackageMaker tool to create an installer for OS X. I'm working on updating it to use pkgbuild and productbuild. I'm trying to add a custom background to the installer by passing the --resources flag to productbuild with the directory containing the background image. I don't get any errors from the productbuild command, but when I open the package in Pacifist, I don't see my resources included at all. I've tried referencing the background image in distribution.xml, but it doesn't seem to make a difference. I'm at a loss for what to try next to debug this.


回答1:


This is what my resource folder looks like:

As cmd parameter I use: --resources /path/Resources

Since I'm not using the PackageMaker GUI and my installer tool creates the Distribution XML file manually from various bits and pieces, I can only say that you have to specify this background.jpg file so that it ends up in the Distribution XML file as:

<background file="background.jpg" alignment="topleft" scaling="none"/>

Ie despite it being in the en.lproj folder the file should not be specified with a path.



来源:https://stackoverflow.com/questions/13963465/how-do-i-build-an-os-x-installer-package-with-a-custom-background-with-productbu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!