如何使用productbuild构建具有自定义背景的OS X安装程序包? [英] How do I build an OS X installer package with a custom background with productbuild?

查看:235
本文介绍了如何使用productbuild构建具有自定义背景的OS X安装程序包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个项目,该项目依赖于现在不推荐使用的PackageMaker工具来创建OS X的安装程序.我正在努力将其更新为使用

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.

推荐答案

这是我的资源文件夹的样子:

This is what my resource folder looks like:

作为cmd参数,我使用:--resources /path/Resources

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

由于我没有使用PackageMaker GUI,并且我的安装程序工具从各个点开始手动创建了分发XML文件,所以只能说您必须指定此background.jpg文件,以便它最终出现在分发中XML文件为:

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"/>

尽管该文件位于en.lproj文件夹中,也不应使用路径指定该文件.

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

这篇关于如何使用productbuild构建具有自定义背景的OS X安装程序包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆