Pergunta

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

Foi útil?

Solução 2

Since I didn't find solution I used some workaround:

  1. Convert RTF to HTML
  2. Use this site to convert image to embeded html image and replace all linked images in the original html
  3. Use html instead of rtfd in the Distribution.xml

Drawback is that it require more work to be done and html is displayed differently in the package than I saw in browsers.

Outras dicas

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

I have no solution, just a creative workaround :)

I tried to apply the existing answers.

An HTML file with embedded images (base64 encoded) didn't work in my case

So I tried to get the image file inside the package, right next to the HTML file and something like <img src="./success.png" alt="success">, which didn't work either :/

My out-of-the-box solution was to just use an emoji instead of the image. In my case all I wanted was this green checkmark you'd see on the conlusion screen anyways. There's an emoji (✅) that looks quite similar.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top