views:

45

answers:

2

Why is it that some Mac Apps are perfectly happy to be simply copied into the /Applications folder, and others require installation-wizard software? Are there advantages to the wizards?

+1  A: 

In some cases it is necessary for an application to install support files in other locations; for example, some programs add libraries in "/usr/local/lib" or add binaries in "/usr/local/bin"; others need to install support files in "/Library/Frameworks" or in "/Library/Application Support". For those situations, using the *.pkg and *.mpkg installers is really the best solution available, since dragging and dropping the app won't cut it.

That said, if it is possible to simply drop your application into "/Applications", then distributing a ".dmg" file with your application in it and with instructions to drag-and-drop it to "/Applications" is a much better way of distributing your application than to rely on the "*.pkg" and "*.mpkg" installers. There are also some major downsides to using the *.pkg and *.mpkg installers... they can very easily clobber permissions and destroy important system files, so a drag-and-drop solution is much safer, simpler, and cleaner.

Michael Aaron Safyan
+2  A: 

You may be interested in what Apple has to say on the subject. This is in Software Delivery Guide.

In particular, check out the two chapters Manual installs and Managed installs.

Some of the points in favor of package installers are:

  • support for custom installs
  • support for pre and post operations, such as quitting app and daemons before upgrading
mouviciel
I was under the impression that the bundle format of the objects you see in /Applications (which are just folders full of executables and other resources) support a post/pre installation script when being moved into /Applications, or that the expectation was that the application itself would check the system to see if it needed to do the pre/post steps itself.
Armentage
@Armentage, don't know if the bundle format supports it, but the application, itself, can very easily determine if it was just installed (by checking for a property in NSUserDefaults, and such properties will be nil the first time the application runs), running the postflight behavior, and then marking the property as true (so subsequent runs of the application won't perform that).
Michael Aaron Safyan
Yes -- I agree with this very strongly. It seems ridiculous to need a post-install script, when the application can just do whatever it needs to do the first time it is run.
Armentage
In the process of upgrading an already installed application possibly running together with its helper daemon, the post-install script is best located in a dedicated install package.
mouviciel