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
.
Decide image name (Name
), image size (Size
, a little bit larger than your application is preferred), image format (Format
) and location (Save As
).
Then click Save
.
Add the Applications folder link
Right click on the new disk and click Show in Finder
.
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.
Select the new disk and click Choose
.
Change the location (Save As
) and click Convert
.