Create a Mac installer

Often, when I’m installing a driver or piece of software on my mac.
I’ll open the disk image - there’s a package in it. I click on that and I get a dialogue box that goes something like
Install>Where to install > agree with conditions>input your password>(installs)>Package complete…

or something like that to this effect.

I have been using a DMG creator, but it does make users jump through hoops to get it running. This installer above seems to install the app and it’s ready to run!

How do I create this? Can I have the package install the app to applications and the data folder to application support (and maybe some fonts to the font folder)?

Beside VirtualBox, I do not saw a macOS application that uses an Installer since… ages.

Look at Xojo: drag and drop from the dmg file and that is all.

Unless you have a good (and solid reason *) I do not understand why I would use an installer for macOS applications.

  • Valid case(s) to use an Installer on macOS can exist.

There used to be an Apple tool called PackageMaker which created the dirt of installer you describe. But some quick googling shows it was broken by Yosemite and has not been replaced. Most Mac users expect to install using a disk image. I would stick to hat route.

App Wrapper by @Sam Rowlands can create a pkg installer.
But I wouldn’t recommend going that way unless it is really necessary. Most Mac users expect to have a DMG and just drag & drop to applications folder.

You will see power users turn away from unnecessarily .pkg’d apps.
It’s considered suspicious on Mac to have an installer for no reason.

I use App Wrapper to code-sign my Mac version. I wouldn’t want to do without it.

After a night, I come back to you for the Font question.

If your application needs a specific font (assuming you own the right to do so), you can install it inside your application and it will be available to it without an install in your user’s system folder.

Imagine that I do not know (beside using a double click in the font and follow the instructions) how one nowadays on macOS can install a Font ! (watch the sentence !!!)

There certainly exists some Declare to do that / alternative thinking for Windows if you Cross compile).

App Wrapper with DMG Canvas can make it easily (sign App and make a DMG)

pkgbuild – Build an OS X Installer component package from on-disk files

An installer can be useful for programs that need to install drivers or programs that require higher privileges, which a simple bundle cannot do. It is not quite clear at the pkgBuild page, though.