I'm trying to build dmg of .app file using following hdutil command:
hdiutil create -srcfolder /Users/me/My.app My.dmg
It works as expected as it creates My.dmg correctly. Problem started happening when I add two more files in to .app bundle before calling that hdutil command. The hdutil ends up with error:
diskimages-helper: resize request is above maximum size allowed.
hdiutil: create failed - Invalid argument
Thanks for any help you can provide.
I had the same problem. The solution I found at Apple Support Communities worked for me. I ended up adding an empty .Trash
file into the folder before calling hdiutil:
touch root_folder/.Trash
or with Ant in my case:
<touch file="root_folder/.Trash"/>
You can optionally specify a '-size' parameter when you invoke hdiutil. If you specify a size large enough that the disk image doesn't need to be resized during .dmg creation, it seems you can avoid this error.
E.g.:
hdiutil create -size 240m -fs HFS+ -srcfolder test -volname Test test.dmg
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With