如何打包Mac OS应用程序以进行安装? [英] How do I package a Mac OS application for install?

查看:421
本文介绍了如何打包Mac OS应用程序以进行安装?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道Windows上有很多安装程序工具可用于创建安装程序,但是在Mac OS上,我看到了两种安装应用程序的方法:

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. 您下载的DMG文件,双击它,然后在其中运行一个应用程序-该应用程序通常会让您将一个图标拖到另一个图标(代表Applications文件夹)以安装该应用程序

  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

另一种类型的文件,它启动一个看似标准的安装程序,有时会发出警告,例如此安装程序可能会运行程序以确定您是否可以继续安装"

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"

打包要在Mac OS上安装的应用程序的标准"方式是什么?以上是苹果推荐的方法之一吗?

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

谢谢.

推荐答案

Apple非常明确地制定了从App Store下载程序的标准".这具有使应用程序安装对普通用户透明的好处.而且,不管您是否相信,普通人在安装程序的概念上都会遇到很多麻烦.当然,受益要付出一些代价,但这不是辩论的地方-还有很多其他地方.

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.

假设您不想或不能走App Store路线,PKG和DMG都是分发程序的常用方法.如果您需要安装应用程序捆绑包之外的文件(这不是常见用例),请使用PKG.在所有其他情况下,请使用DMG提示用户将应用程序复制到应用程序"文件夹中.但是您的许多用户都不知道他们需要这样做(除非您的目标受众只是知识渊博的计算机用户).他们将从磁盘映像运行您的应用程序.在这种情况下,理想情况下,您的程序将检测到它正在从磁盘映像运行,并主动将其复制到Applications文件夹中.

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.

这篇关于如何打包Mac OS应用程序以进行安装?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆