Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mac OS installer package with Readme file containing images

I'm trying to set <readme> tag in Distribution.xml part of the package to contain something which may contain images. For now I've tried rtfd and pdf; for rtfd it compains that it can't open the file because of permissions lack and pdf is displayed as plain text. So the question is: how to use something that may contain images with Distribution.xml

like image 990
ixSci Avatar asked Sep 07 '25 06:09

ixSci


1 Answers

productbuild doesn't handle .rtfd files correctly but I have found that OS X 10.9 Mavericks doesn't handle HTML base 64 encoded images either.

My workaround is to use productbuild with dummmy .rtf files and then use pkgutil to repackage the installer.

Your distribution.xml file contains:

<welcome file='Welcome-ReplaceMe.rtf' />

and Welcome-ReplaceMe.rtf exists in a .lproj folder inside Resources. Once the installer is built, but before you sign it with productsign expand the package:

pkgutil --expand Installer.mpkg Installer.expanded

change the Distribution file inside Installer.expanded to use:

<welcome file='Welcome.rtfd' />

and delete the dummy Welcome-ReplaceMe.rtf and add Welcome.rftd. Finally repackage the installer:

pkgutil --flatten Installer.expanded Installer.mpkg
like image 72
nbeadman Avatar answered Sep 10 '25 17:09

nbeadman