如何启用“使用低分辨率”在视网膜显示屏上的应用程序发货? [英] How to enable "use low resolution" on Retina display for an Application when shipping it?
问题描述
我有一个应用程序打破了HiDPI模式,除非我在finder中选择获取信息,并勾选打开低分辨率复选框。修复应用程序不是一个选项,因为它是使用不再由其供应商真正积极维护的编写软件。
I have an application that breaks in HiDPI mode unless I chose "get Info" in finder and there tick the "open in low resolution" checkbox. Fixing the application is not an option as it was made using authoring software that is no longer really actively maintained by its vendor.
现在这里是事情:当我拿应用程序,将其放在桌面上,将其压缩,然后将打开在低分辨率复选框设置为true,删除应用程序并解压缩原始复选框保持选中状态。
所以,无论OS X存储属性打开在低分辨率,它不是与文件一起。这意味着,当分发应用程序到其他Retina Mac系统,它会再次中断,直到手动检查每个系统上的复选框。
Now here is the thing: When I take the application, put it on the desktop, zip it and afterwards set the "open in low resolution" checkbox to true, delete the application and unzip the original one the checkbox stays checked. So wherever OS X stores the property "open in low resolution" it's not along with the file. That means that when distributing the application to other Retina Mac systems it'll be broken again until manually checking that checkbox on each system.
我发现 Info.plist
获得了一个 NSHighResolutionCapable
属性,并将 Boolean
添加到我的应用程序的 Info.plist
并将其设置为 false
,但无效。
I found that the Info.plist
got a NSHighResolutionCapable
property and I added that Boolean
to my app's Info.plist
and set it to false
but to no avail. That seems not to be equivalent to the "open in low resolution" option.
链接的文档是: 如果打开低分辨率复选框在默认情况下可以更改默认值:在Info.plist 中将NSHighResolutionCapable属性设置为YES,反之亦然不行...我想要的是一个开箱即用的解决方案。我想避免客户需要自己配置这个。
The linked document sais that: If the "Open in Low Resolution" checkbox is selected by default you can change the default by: Setting the NSHighResolutionCapable attribute to YES, in the Info.plist Well, the reverse does not work... What I'd like is an out of the box solution. I'd like to avoid that customers need to configure this on their own. It should simply be set when unzipping the application.
这两个问题:
a)是否可以配置什么等于打开低分辨率复选框与文件一起检查 - 例如在 Info.plist
中?
a) Is it possible to configure what equals the "open in low resolution" checkbox being checked along with the file - e.g. in the Info.plist
?
b)OS X存储我通过Finder的信息屏幕打开的打开在低分辨率复选框中的选项?
b) Where does OS X store the choices I made for the "open in low resolution" checkboxes I get to via Finder's Info screen?
EDIT December,7(added plist details):
如plist编辑器所示:
As seen in plist editor:
现代Xcode on Mavericks:
As seen in modern Xcode on Mavericks:
唯一的区别是显示的名称。 Xcode调用它的高分辨率能力,而在文件中它仍然是NSHighResolutionCapable
The only difference is the name that's displayed. Xcode calls it "High Resolution Capable" while in the file it's still really "NSHighResolutionCapable"
这里是我们关心的文件信息对话框的部分:
Here is the portion of the file info dialog we care for:
推荐答案
我目前无法检查,但可能是 NSHighResolutionCapable
键的存在或不存在缓存在启动服务数据库。这就是存储在Info.plist中指定的应用程序的大多数属性。将应用程序复制到USB闪存驱动器似乎证实了这一理论。
I'm not currently in a position to check, but it's likely that the presence or absence of the NSHighResolutionCapable
key is cached in the Launch Services database. That's where most properties of an app which are specified in the Info.plist are stored. The fact that copying the app to a USB thumb drive worked seems to confirm that theory.
您可以搜索以下命令的输出,查看应用程序的软件包ID,然后查看如果有任何明显与高分辨率能力有关:
You might search the output of the following command for your app's bundle ID and then see if there's anything obviously related to high resolution capability:
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -dump
如果有,则在修改应用程序的Info.plist后,它可能工作:
If there is, then, after you modify an app's Info.plist, it might work to do:
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -f /path/to/the/modified.app
如果没有,那么也许更强大:
If not, then perhaps the more powerful:
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -seed
如果没有帮助,那么(从我们上面的评论)似乎试图在一个新的用户帐户工作。
If none of that helps, then (from our above comments) it seems that trying in a new user account works.
这篇关于如何启用“使用低分辨率”在视网膜显示屏上的应用程序发货?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!