Updated November 2024
If you want to make a package the hard way then sure. Just:
... • load up Terminal
, • read the entire man
pages for pkgbuild
and productbuild
, • look up the 20 year old documentation in the legacy archive on Apple's developer website, • make a distribution file, • a Component file (maybe?), • try writing some long commands, • fail, • fail again, • read 17 posts on the internet before finding out why slightly-wrong thing you're doing is breaking the entire process in an indecipherable way (it's a good thing the internet is full of people who have failed before trying to do this!), • try it again, • run it through code sign validation, • don't forget to look up
, no, make that altoolnotarytool
, • to learn how to notarize it, • staple
, • and now three days later you've finally made one package. Congratulations.
... OR ...
Yes, really. Package Builder is the easiest way to make a macOS installer package, even code signed and notarized.
Of course there are more options in Package Builder, like customizing:
Background Image
Localized Welcome Text
License Agreements
Install Scripts
Install Requirements
Multiple Choices
Code Signing
Notarization
... but the point is: it's really easy.
For creating a fully code signed and notarized macOS package installer, with the option of automating building of the disk image? There's honestly no easier option. And if you want to place your pkg inside of a disk image, that's easy too, with DMG Canvas.
If you want to put your .pkg in a disk image, it's also super easy with DMG Canvas! Just use the drag-and-drop visual editor to layout your disk image, drop the Package Builder file into the window, and DMG Canvas will automatically build your package and place it into the disk image for you.