create-dmg icon indicating copy to clipboard operation
create-dmg copied to clipboard

License addition doesn't work on macOS Big Sur

Open ghost opened this issue 4 years ago • 6 comments

Version: 5.3.0

When I'm trying to add license.txt it fails with the following message:

✖ Code signing failed. The DMG is fine, just not code signed.
hdiutil: unflatten: verb not recognized
Usage: /usr/bin/hdiutil <verb> <options>
<verb> is one of the following:
help
attach
detach
eject
verify
create
compact
convert
burn
info
checksum
chpass
erasekeys
imageinfo
isencrypted
makehybrid
mount
mountvol
unmount
plugins
resize
segment
pmap
udifderez
udifrez

It seems to be a known issue and here's how it's fixed in electron-builder.

ghost avatar Jan 18 '21 11:01 ghost

What is your npm version? Did you try updating npm and electron-builder to the latest version? Seems like an issue with electron-builder.

ardaa avatar Jan 18 '21 14:01 ardaa

What is your npm version? Did you try updating npm and electron-builder to the latest version? Seems like an issue with electron-builder.

My npm version is 6.14.8, but I think it's irrelevant, electron-builder is not used in this project anyway I've just used it for the reference.

I believe the problem is in this piece of code: https://github.com/sindresorhus/create-dmg/blob/cbabf27d2646d870a925ed704a4e7d0779e66a6e/sla.js#L67

There's no unflatten verb in hdiutil on macOS Big Sur.

ghost avatar Jan 18 '21 16:01 ghost

There's a solution in https://stackoverflow.com/a/64836269/64949

sindresorhus avatar Jan 18 '21 17:01 sindresorhus

Fellow @create-dmg devs have recently added https://github.com/create-dmg/create-dmg/commit/f75cc032d77672adab60cebd49db000a8ff7446 to solve the same issue.

ghost avatar Feb 01 '21 09:02 ghost

For a working fix, albeit maybe short-term: https://github.com/sindresorhus/create-dmg/pull/66

dxdc avatar Nov 20 '21 21:11 dxdc

As I understand, alternate solution is to disable license addition in this project and use separate executable to add license from here: https://github.com/argv-minus-one/dmg-license

kafeg avatar Oct 26 '23 11:10 kafeg