enough is enough - how to make a dmg the way you expect it

enough isenough - how to make a dmg the way you expect it

June 2008, GuyHoffman

here is thestep-by-step instruction to making a dmg to distribute your software that willopen in icon mode, with a background image, and symbolic links (aliases) todrop your file in.

for people whodon't want to "read more" or trust os x magic.

just a step-by-step.follow me.

  1. Open Disk Utility
  2. Press on 'New Image'. Use the following options:
    1. Pick a Volume Name - we will from now call it NAME
    2. Volume Size - should be enough to contain your files. Note that you can pick a custom size, not just the preset ones. Don't worry if it's bigger than you think you need. There's a some overhead. The final file will be smaller.
    3. Leave everything else as is. Make sure the Image Format is "read/write disk image".
  3. Save as NAME.dmg
  4. If it's not already open, open the new dmg file. This creates a Disk Volume mount, and an icon on the Desktop
  5. Using the terminal, create a directory called .backgroundinside the Volume. Your new Volume can be found under/Volumes/NAME/ - the directory can be any name, the dot just makes sure it's not visible in the Finder
  6. Put your background image in that directory
  7. Double-click on the Disk Volume icon on the Desktop, to open it as most users will
  8. Arrange the folder as you like it - remove the menu bar, change it to icon mode, make aliases to your install folders and drag them into the window, and using Cmd-J open the Display Preferences to choose the background image. Make sure you select the one that's inside the Volume's background folder.
  9. Eject (Unmount) the Volume
  10. Mount the volume again (by double-clicking on the dmg file)
  11. Now make a new directory somewhere, let's call it staging
  12. Put all the same files you put in the Volume into staging, including the .background directory with the image.
  13. In the terminal, copy the .DS_Store file from the Volume tostaging
  14. You can now eject/unmount the Volume
  15. In the terminal, go to the directory containing staging and run the following two commands (credit goes to jwz)
    1. hdiutil makehybrid -hfs -hfs-volume-name NAME -hfs-openfolder staging staging -o tmp.dmg
    2. hdiutil convert -format UDZO tmp.dmg -o NAME.dmg
    3. Remember, NAME is your App/Volume/Dist name, all the rest is verbatim
  16. You can now remove tmp.dmg

Voilà! You nowhave a properly sized, compressed, read-only dmg file that will open as youwant it with a background image and links to folders.

For comments,suggestions, and bug-reports, please write guyθmedia·mit·edu. from : http://web.media.mit.edu/~guy/misc/dmg-howto.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值