Regarding the disk image (DMG) approach, typically this is implemented in a way that makes obvious to the user that they need to drag the app over to their /Applications folder. (Sometimes this is done with a pre-existing alias of the /Applications folder next to the app icon on the DMG, and then a background image that has an arrow between them or text instructions overlaid that explains what to do.) Too often, though, users just double-click the app and run it from the disk image, which gets confusing (what if they eject the disk image? what happens next time they try to run the app?)
Alexander Limi, one of the Mozilla Firefox developers, has two great articles about getting your OS X app to detect when it's being run from the installer disk image, and then offering to copy itself to the /Applications folder.
It's an approach that's now accepted enough to have generated at least one code class, M3InstallController, to enable the behavior in your own app. The developer of another OS X app that takes this approach released his own code example, as well.
So if you go the route of a disk image with an app that needs to be dragged into the /Applications folder, strongly consider detecting whether the user is running the app from the disk image, and offer to move it for them! Your users, and your support folks, will thank you. :)
I don't think there's a fixed answer. If you just have an application bundle, I think most end-users expect a DMG. But if you're installing a menu extension -- or anything else that would need to be in a Library directory, you'll usually need a pkg file.
I've used both for different types of installs. They both work. As long as you use one of these two (and not some type of wacky install script), people will be happy IMHO.
Mac 应用程序的趋势是带有可拖动安装应用程序的漂亮 DMG。或者甚至可能只是一个压缩的应用程序,它知道如何在启动时将自身复制到用户的应用程序目录中。
除非绝对必要,否则不要使用安装程序。
The trend for Mac apps is a nice DMG with a drag-installable application on it. Or maybe even just a ZIPped application that knows how to copy itself to the user's Applications directory when launched.
Don't use an installer unless you absolutely have to.
Disk image if installing is as simple as drag-and-drop, package installer if you need to install supporting files outside of the app bundle.
Also note that with a disk image, it's a good idea to offer to install the app for the user if they run the program from the image. Otherwise some people will never actually install the program and just keep the disk image around forever.
发布评论
评论(5)
关于磁盘映像 (DMG) 方法,通常以一种让用户明显知道他们需要将应用程序拖到其 /Applications 文件夹的方式实现。 (有时,这是通过 DMG 上应用程序图标旁边的 /Applications 文件夹的预先存在的别名,然后是在它们之间有箭头的背景图像或覆盖的文本说明来解释要执行的操作来完成的。)太常见了,不过,用户只需双击该应用程序并从磁盘映像运行它,这会让人感到困惑(如果他们弹出磁盘映像怎么办?下次尝试运行该应用程序时会发生什么?)
Alexander Limi,Mozilla Firefox 开发人员之一,有两篇很棒的文章,介绍如何让 OS X 应用程序检测何时从安装程序磁盘映像运行,然后将其自身复制到 /Applications 文件夹。
这是一种现在已经足够被接受的方法,可以生成至少一个代码类,M3InstallController,在您自己的应用程序中启用该行为。另一款采用这种方法的 OS X 应用的开发者也发布了他自己的代码示例。
因此,如果您使用需要拖放到 /Applications 文件夹中的应用程序的磁盘映像,请强烈考虑检测用户是否正在从磁盘映像运行该应用程序,并主动为他们移动它!您的用户和支持人员将会感谢您。 :)
Regarding the disk image (DMG) approach, typically this is implemented in a way that makes obvious to the user that they need to drag the app over to their /Applications folder. (Sometimes this is done with a pre-existing alias of the /Applications folder next to the app icon on the DMG, and then a background image that has an arrow between them or text instructions overlaid that explains what to do.) Too often, though, users just double-click the app and run it from the disk image, which gets confusing (what if they eject the disk image? what happens next time they try to run the app?)
Alexander Limi, one of the Mozilla Firefox developers, has two great articles about getting your OS X app to detect when it's being run from the installer disk image, and then offering to copy itself to the /Applications folder.
It's an approach that's now accepted enough to have generated at least one code class, M3InstallController, to enable the behavior in your own app. The developer of another OS X app that takes this approach released his own code example, as well.
So if you go the route of a disk image with an app that needs to be dragged into the /Applications folder, strongly consider detecting whether the user is running the app from the disk image, and offer to move it for them! Your users, and your support folks, will thank you. :)
我认为没有固定的答案。如果您只有一个应用程序包,我认为大多数最终用户都期望 DMG。但是,如果您要安装菜单扩展,或者需要位于库目录中的任何其他内容,则通常需要 pkg 文件。
我将两者用于不同类型的安装。他们都工作。只要您使用这两个之一(而不是某种类型的古怪安装脚本),人们就会很高兴恕我直言。
I don't think there's a fixed answer. If you just have an application bundle, I think most end-users expect a DMG. But if you're installing a menu extension -- or anything else that would need to be in a Library directory, you'll usually need a pkg file.
I've used both for different types of installs. They both work. As long as you use one of these two (and not some type of wacky install script), people will be happy IMHO.
zip 的优点:
dmgs 的优点:
不要使用 .pkgs,除非您需要将捆绑包放在某个位置。 (WebKit 捆绑包、内核扩展...)
Advantages of zips:
Advantages of dmgs:
Don't use .pkgs unless you need to place your bundle in a certain location. (WebKit bundles, Kernel extensions...)
Mac 应用程序的趋势是带有可拖动安装应用程序的漂亮 DMG。或者甚至可能只是一个压缩的应用程序,它知道如何在启动时将自身复制到用户的应用程序目录中。
除非绝对必要,否则不要使用安装程序。
The trend for Mac apps is a nice DMG with a drag-installable application on it. Or maybe even just a ZIPped application that knows how to copy itself to the user's Applications directory when launched.
Don't use an installer unless you absolutely have to.
如果安装就像拖放一样简单,则使用磁盘映像;如果需要在应用程序包之外安装支持文件,则使用软件包安装程序。
另请注意,对于磁盘映像,如果用户从映像运行程序,最好为用户安装应用程序。否则,有些人永远不会真正安装该程序,而只是永远保留磁盘映像。
Disk image if installing is as simple as drag-and-drop, package installer if you need to install supporting files outside of the app bundle.
Also note that with a disk image, it's a good idea to offer to install the app for the user if they run the program from the image. Otherwise some people will never actually install the program and just keep the disk image around forever.