简体   繁体   English

如何在OSX .pkg中设置背景图像?

[英]How does one set a background image in an OSX .pkg?

I am creating a .pkg installer for my OSX application and I am having trouble figuring out how to set the background image. 我正在为我的OSX应用程序创建.pkg安装程序,但在确定如何设置背景图像时遇到了麻烦。

I am creating my installer in my build script like this: 我在构建脚本中创建安装程序,如下所示:

pkgbuild --root $APP_FOLDER --identifier "com.company.product" $FINAL_PKG

This works great but I have not been able to find any information about setting the background image in the man pages. 这很好用,但我无法在手册页中找到有关设置背景图像的任何信息。 I have seen package installers that have custom background images, how does one set it? 我已经看到具有自定义背景图片的软件包安装程序,请问如何设置呢?

EDIT: 编辑:

Here is a screenshot of a package installer with a custom background: 这是带有自定义背景的软件包安装程序的屏幕截图:

在此处输入图片说明

This was most likely done with a tool apple had for creating installers. 这很可能是通过苹果用于创建安装程序的工具完成的。

You might be able to find it if you search for it on the OS X developer site of Apple 如果在Apple的OS X开发人员网站上搜索它,则可能会找到它

EDIT: 编辑:

See also 也可以看看

NOTE: 注意:

I don't think an installer is the best solution! 我认为安装程序不是最佳解决方案! Making your app in a way that frees you from an installer is not hard. 以使您摆脱安装程序的方式来制作应用程序并不难。 License Agreement, Pre- and Post script functions can be coded in-app. 许可协议,前后脚本功能都可以在应用内进行编码。

Ah ha! 啊哈! There is a resources flag that goes along with productbuild. productbuild附带一个资源标志。 Here is a stackoverflow question addressing the resources: How do I build an OS X installer package with a custom background with productbuild? 这是一个解决资源的stackoverflow问题: 如何使用productbuild如何构建具有自定义背景的OS X安装程序包?

It mentions --resources /path/Resources 它提到--resources / path / Resources

and an en.lproj subdirectory, and an XML resources file. 和一个en.lproj子目录,以及一个XML资源文件。 You can specify the background.jpg or modify an existing one. 您可以指定background.jpg或修改现有的background.jpg。

Hope this points you in the right direction(s). 希望这可以为您指明正确的方向。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM