How to Build a DMG Package on macOS Monterey

This post tells you how to build a DMG package for your application on macOS Monterey.

Process

Create a blank disk

Open Disk Utility application. Click File -> New Image -> Blank Image.

image.png

Decide image name (Name), image size (Size, a little bit larger than your application is preferred), image format (Format) and location (Save As).

image.png

Then click Save.

Right click on the new disk and click Show in Finder.

image.png

Open a Terminal window and change directory to the new disk path.

1
cd /Volumes/<YourDiskImageName>

Then run the following script.

1
ln -s /Applications Applications

Then close the Terminal window.

Add your application file

Open another Finder window and drag your application into the new disk.

Beautify your layout

Right click on the new disk window and click Show view options.

Then change the settings as you like.

Eject the disk

Eject the new disk on Finder or Disk Utility.

Convert the image

Click Images -> Convert on Disk Utility.

image.png

Select the new disk and click Choose.

Change the location (Save As) and click Convert.

Buy a cup of coffee for the author.