sindresorhus / create-dmg

Create a good-looking DMG for your macOS app in seconds

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Custom DMG icon is gone after uploading and downloading

zachgibson opened this issue · comments

When I create my Disk Image it has the custom icon, but then if I upload it to S3 or GitHub and download it, the icon is missing. It might be something I’m doing, but have you ever seen this happen?

Left is original, right is after downloading from GitHub.
image

I got the same issue.

Checked hashes with shasum -a 256 and size with stat -f%z. Both are the same. But Finder reports different file sizes. For downloaded file Finder displays size the same as stat -f%z. But original file is 1mb larger.

I had this problem too, after zipping the dmg and opening it in windows I found out that there is __MACOSX folder beside the dmg file which probably contains the icon. So distributing zip instead of dmg itself resolves the problem although it's not ideal.

I'm experiencing this behavior as well.

Here is the answer
Compress the DMG before you upload it. There is an invisible side-car file for the DMG (makes no sense to me why). When you compress the DMG the sidecar file is included. When someone downloads the zip file OS X automatically displays the contents of the zip file - the DMG with its icon.