开发者

Why use a Package Installer with your Macintosh App?

开发者 https://www.devze.com 2022-12-28 22:54 出处:网络
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

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?


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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消