4

我已经使用 py2app 0.6.3 在我的 Mac OS X 10.7 上编译了Python 屏幕保护程序,但是当我在系统偏好设置中打开屏幕保护程序时,我收到以下消息:

您不能在这台计算机上使用 Silly Balls 屏幕保护程序。

我读过这条消息意味着它需要编译为 64 位。

我在 64 位系统上运行 Python 2.7.1 64 位。

如何使用 py2app 编译 64 位应用程序以使屏幕保护程序示例工作?

4

1 回答 1

3

像这样的东西 - 注意'LSArchitecturePriority':'x86_64',

#cat ./setup.py 
"""
This is a setup.py script generated by py2applet

Usage:
    python setup.py py2app
"""

from setuptools import setup, find_packages

APP = ['YourApp.py']
DATA_FILES = []
OPTIONS = {
    'argv_emulation': False,
    'semi_standalone':'False',
    'optimize': 2,
    'includes': [
        ...
    ],
    'site_packages': 'True',
    'plist' : {
        'LSPrefersPPC' : False,
        'LSArchitecturePriority' : 'x86_64',
    }
}

setup(
    name = "YourApp",
    version = "0.0.4",
    author = "Iam",
    author_email = "info@test.com",
    description = ("An demonstration of how to create, document, and publish MacOS app"),
    app=APP,
    data_files=DATA_FILES,
    options={'py2app': OPTIONS},
    setup_requires=['py2app'],
)
于 2011-10-20T18:42:03.360 回答