Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I package a Mac OS application for install?

I know on windows there are a bunch of installer tools you can use to create an installer, but on Mac OS I've seen two ways to install apps:

  1. A DMG file which you download, double-click, then run an application inside - the application typically has you drag an icon to another icon (representing the Applications folder) to install the app

  2. Another type of file which launches an apparently standard installer, which sometimes brings up a warning like "This installer may run a program to determine if you can go ahead with the install"

What's the "standard" way of packaging an app for install on Mac OS? Is one of the above the Apple-recommended way?

Thanks.

like image 988
Colen Avatar asked Aug 10 '11 16:08

Colen


People also ask

Where is installer package in Mac?

Choose Manage > Install Packages, then select a . pkg or . mpkg file to install. Alternatively, you can drag an installer package to the package list window.

How do you install an install on macOS?

If Uninstall [App] or [App] Uninstaller is shown, double-click it, then follow the onscreen instructions. If an app isn't in a folder or doesn't have an Uninstaller: Drag the app from the Applications folder to the Trash (at the end of the Dock).


1 Answers

Apple is very clearly making the "standard" to be downloading a program from the App Store. This has the benefit of making application installation transparent to the normal user. And, believe it or not, normal people have a lot of trouble with the concept of installing a program. Of course that benefit comes with some costs, but this isn't the place for that debate–there are plenty of other places for that.

Assuming you don't want to or can't go the App Store route, both PKG and DMG are common ways to distribute a program. Use a PKG if you need to install files aside from your application bundle (which should not be a common use case). In all other cases use a DMG that prompts the user to copy the application into the Applications folder. But a lot of your users will not understand that they need to do that (unless your target audience is solely knowledgeable computer users). They will run your application from the disk image. Ideally in this case, your program will detect that it is running from a disk image and offer to copy itself into the Applications folder.

like image 143
SSteve Avatar answered Oct 04 '22 04:10

SSteve