在 64 位 OS X 10.6 上使胖二进制文件更喜欢 32 位的正确方法? [英] Proper way to make a fat binary prefer to be 32bit on 64bit OS X 10.6?

查看:33
本文介绍了在 64 位 OS X 10.6 上使胖二进制文件更喜欢 32 位的正确方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我问用户你想在 32 位模式还是 64 位模式下运行",他们选择 32 位.我如何向操作系统注册这个事实?我看过arch 命令,但我不想编写包装二进制文件的脚本.我怀疑有一种 plist-y 方法可以做到这一点,但我找不到文档(除了 arch).

Suppose I ask the user "do you want to run in 32bit mode or 64bit mode" and they pick 32bit. How do I register this fact with the operating system? I've looked at the arch command, but I don't want to have to write a script that wraps the binary. I suspect there is a plist-y way to do this, but I can't find documentation (other than arch).

推荐答案

尝试使用这个 Info.plist 键,LSArchitecturePriority:

Try using this Info.plist key, LSArchitecturePriority:

<key>LSArchitecturePriority</key>
<array>
    <string>i386</string>
    <string>x86_64</string>
    <string>ppc</string>
    <string>ppc64</string>
</array>

不要通过动态更改程序的包来做到这一点.运行您的程序的用户可能没有写入权限.如果您需要针对每个用户执行此操作,则首选包装脚本.

Just don't do this by dynamically altering your program's bundle. The user running your program might not have permission to write to it. If you need to do this on a per-user basis, a wrapper script would be a preferred alternative.

这篇关于在 64 位 OS X 10.6 上使胖二进制文件更喜欢 32 位的正确方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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