Sparkle Framework:如何更改应用程序名称?
我有一个 Cocoa 应用程序,我已更改了该应用程序的名称。我正在使用优秀的 Sparkle 框架 (http://sparkle-project.org) 为我的项目提供更新用户。
不幸的是,Sparkle 似乎不支持开箱即用的应用程序名称更改。我希望有一些技巧,以便我可以为已经拥有该应用程序的用户提供新命名版本的更新。
I have a Cocoa application for which I've changed the name. I'm using the excellent Sparkle Framework (http://sparkle-project.org) to provide updates to my users.
Unfortunately, it appears that Sparkle doesn't support application name changes out of the box. I'm hoping there is some hack so that I can provide users who already have the app with an update to the newly named version.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不确定仅使用普通 Sparkle 框架是否可以做到这一点。原因是应用程序的文件名可能与 Info.plist 中定义的
CFBundleName
不同。 Sparkle 需要确保它正在更新正确的文件系统结构,无论它的名称是什么。考虑以下场景:
Adium.app
,其CFBundleName
为Adium
。Instant Messenger.app
。Instant Messenger.app
,CFBundleName 仍为Adium
。您可以希望菜单栏中的应用程序名称已更改这一事实会提示用户自行重命名,或者您可以在应用程序启动时使用一些技巧来退出应用程序,重命名它,然后在确定的情况下重新启动它满足标准。但我不推荐后者,用户不喜欢应用程序决定在未经许可的情况下自行移动。
I'm not sure this is possible using only the vanilla Sparkle framework. The reasoning is that the file name of the application can differ from the
CFBundleName
defined in Info.plist. Sparkle needs to ensure it is updating the correct file system structure, no matter what it may be named.Consider the following scenario:
Adium.app
whoseCFBundleName
isAdium
.Instant Messenger.app
.Instant Messenger.app
and the CFBundleName is stillAdium
.You can either hope that the fact that your application name has changed in the menu bar will prompt the user to rename it themselves, or your can pull some trickery at application startup to quit the application, rename it, and re-launch it if certain criteria are satisfied. I don't recommend the latter though, users do not like applications deciding to move themselves around without permission.