编译64位Mac应用程序与py2app [英] Compile 64-bit Mac app with py2app
本文介绍了编译64位Mac应用程序与py2app的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我编译一个 Python的屏幕保护程序我使用py2app 0.6.3的Mac OS X 10.7,但是当我在系统preferences打开屏幕保护程序我得到以下信息:
I've compiled a Python screen saver on my Mac OS X 10.7 using py2app 0.6.3, but when I open the screen saver in System Preferences i get the following message:
您不能使用愚蠢的球屏保此计算机上。
You cannot use the Silly Balls screen saver on this computer.
我读过这条消息意味着它需要被编译为64位。
I've read that this message means it needs to be compiled for 64-bit.
我的64位在64位系统上运行的Python 2.7.1。
I'm running Python 2.7.1 64-bit on a 64-bit system.
推荐答案
事情是这样的 - 请注意LSArchitecturePriority':'x86_64的
Something like this - note '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'],
)
这篇关于编译64位Mac应用程序与py2app的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文