如何确保桌面程序在全新安装后正常运行?

发布于 2024-08-17 00:21:55 字数 607 浏览 3 评论 0原文

动机 - 我已经准备好了新版本的 Cocoa 应用程序,它在所有 Beta 测试人员的机器上运行良好。所以我释放了它。事实证明,一个关键功能根本无法在其他人的计算机上运行。哎呀!是的,再读一遍:我发布的软件不起作用。

原因 -使用过我的应用程序的早期版本的用户(请阅读:我所有忠实的 Beta 测试人员)已经拥有旧版本的文件夹 ~/Application Support/MyApp/。由于新版本中存在严重错误,该文件夹对于软件的运行是必需的。对于其他人来说,因为该文件夹不存在,所以它不起作用。

正如你可以想象的那样,这非常令人尴尬,我希望这种事永远不会再发生。

补救措施?当然,确保这一点的直接方法是在发布新版本之前实际下载并安装在“干净”的计算机上。但这似乎不切实际,因为随着时间的推移,我将用完那些从未尝试过我的应用程序的 Mac 朋友(最终所有人都会尝试过;-)),而且因为我之前并不急于“格式化 c:”我的 Mac每个版本......

这就是我需要您帮助的地方:

我如何确保以前从未使用过我的软件的用户将获得与使用过我的软件的用户相同的结果?

Motivation — I had a new version of my Cocoa application ready that worked fine on all beta testers' machines. So I released it. Turns out that a crucial feature simply doesn't work on anybody else's computer. Yikes! Yes, read that again: I released software that didn't work.

Cause — Users who had used previous versions my app (read: all my loyal beta testers) already had a folder ~/Application Support/MyApp/ from an older version. Due to the critical bug in the new release, this folder was necessary for the software to work. And for everybody else, because the folder did not exist, it didn't work.

As you can imagine, this is extremely embarrassing, and I want this to never, ever, happen again.

Remedies? — The straight-forward way to ensure this, of course, is to actually download and install it on a "clean" machine just before you publish a new release. But this seems impractical, because in time I will run out of friends with a Mac who have never tried my app yet (eventually all will have ;-)), and because I'm not eager to "format c:" my Mac before every single release…

This is where I need your help:

How can I ensure that a user who has never used my software before will get the same results as someone who has?

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

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

发布评论

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

评论(2

温柔戏命师 2024-08-24 00:21:55

虚拟机(VMWare Workstation 等)可用于测试应用程序的全新安装。您可以启动一个新的虚拟操作系统,安装您的东西,测试它,然后在完成后删除虚拟机。还有一些方法可以自动启动虚拟机,这可以让您的生活变得更加轻松。

另一件要做的事情是确定您的应用程序所需的所有先决条件,并在启动时添加对这些内容的检查。如果某些设置不正确,您可以尝试在代码中进行设置,或者通知用户进行设置。

Virtual machines (VMWare Workstation, etc.) can be useful for testing clean installs of applications. You can start up a new virtual OS, install your stuff, test it, then delete the VM when you're done. There are ways to automate the spinning-up of a VM as well, which can make your life even easier.

Another thing to do is to determine all the prerequisites your app requires, and add checks for these things at startup. If something is not setup right, you can either attempt to set it up within your code, or inform the user to do it.

情绪操控生活 2024-08-24 00:21:55

更轻量级的方法可能是使用 AppZapper 等工具来删除所有内容 - 临时文件、首选项、缓存、历史记录等 - 与要测试的应用程序相关。

A more lightweight approach might be using tools like AppZapper to get rid of everything — temporary files, preferences, cache, history, etc – related to the app to test.

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