PackageMaker 适合我吗?

发布于 2024-08-20 15:44:24 字数 361 浏览 6 评论 0原文

我有一个要分发的应用程序。 几乎所有内容都独立包含在一个捆绑包中,因此我可以将第一个版本的捆绑包放入 DMG 中 - 但这不适用于升级,因此我认为我最好提前解决该流程。

我一直在研究 PackageMaker,它看起来很简单。然而,我有一些非常具体的要求,可能会导致问题,并且从阅读 PM 文档中并不清楚这是否可能:

首先,我希望安装程序自动选择安装两个不同版本的应用程序,具体取决于先前是否安装了该应用程序的先前版本。

其次,我不想只覆盖以前的应用程序包,我只是希望安装程序覆盖其中的文件并添加新文件 - 换句话说,我希望应用程序包中的某些文件保留以前的版本。

这是我可以使用 PackageMaker 实现的目标,还是我应该寻找不同的方法?

I have an application to be distributed.
Pretty much everything is self-contained within one bundle so I could just put the bundle in a DMG for the first version-- however this won't work for upgrades, so I figured I'd best work out the process ahead of time.

I've been looking at PackageMaker and it seems straightforward enough. However I have a couple of very specific requirements which may cause problems, and it wasn't apparent from reading the PM docs as to whether this is even possible:

First of all, I want the installer to automatically choose between installing two different versions of the app, depending upon whether a previous version of the application has previously been installed.

Secondly, I don't want to just overwrite the previous application's bundle, I just want the installer to overwrite files within it and add new ones -- in other words, I want certain files within the application bundle to remain from the previous version.

Is this something I could achieve with PackageMaker, or should I look for a different approach?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

傲娇萝莉攻 2024-08-27 15:44:24

您可以使用安装程序包执行很多操作,例如运行 shell 脚本,该脚本又允许您执行所有操作。


我感觉你不是用 Mac 的方式做的。在应用程序包中存储数据的情况并不常见,通常这些内容会存储在 ~/Library/Application Support/ 中。我认为这两个不同的应用程序非常相似,为什么不只是设置一个首选项呢?

就我个人而言,我认为现在 .zip 是分发应用程序的最佳方式。它会自动解压缩并在下载堆栈中显示与您的应用程序图标。 (当然,前提是您从互联网上获得它。)

You can do a lot with an installer package, for example run a shell script which in turn allows you to do everything.


I get the feeling that you're doing it not the Mac way. It's uncommon to store data in the application bundle, normally such stuff goes to ~/Library/Application Support/. I presume that those two different applications are quite similar, why not just set a preference?

Personally, I feel that today a .zip is the best way to distribute your apps. It gets automatically decompressed and shows up with your application icon in the downloads stack. (Only if you get it from the internet, of course.)

心是晴朗的。 2024-08-27 15:44:24

如需更新,请查看 sparkle 框架。第一次安装只是从互联网上复制应用程序包,然后用户只需要求进行更新,而不必离开您的应用程序来做任何事情

For updating look at the sparkle framework. The forst install is just copy the application bundle from the internet and te user then just asks to do update and does not have to leave your application to do anything

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文