下面是我用来编译python脚本的代码,它可以正常工作,它可以按照它应该的方式进行编译:
from cx_Freeze import setup, Executable
exe=Executable(
script="BattleShips/battleships.py",
base="Win32Gui",
)
includefiles=["BattleShips/boo.wav","BattleShips/yay.wav","BattleShips/boom.wav","BattleShips/finish.wav","BattleShips/titleimage.gif"]
includes=[]
excludes=[]
packages=[]
setup(
version = "1.0",
description = "BattleShips game!",
author = "Shivam Paw",
name = "BattleShips",
options = {'build_exe': {'excludes':excludes,'packages':packages,'include_files':includefiles}},
executables = [exe]
)
现在我需要用相同的include来编译它,但是它对mac有效。在
只有在mac上才能使用bdist_dmg吗?在
如果是这样的话,无论如何我可以编译它,这样它将适用于mac,但从我的Windows7 pc?在
谢谢。在
作为回答:
不,不能冻结到Windows计算机上的Mac应用程序-cx\u freeze支持不同的平台,但在每个平台上,它只能生成该平台的可执行格式。在
文档:http://cx-freeze.readthedocs.org/en/latest/faq.html#freezing-for-other-platforms
我不知道有什么替代品可以让你在Windows上制作一个Mac应用。在
相关问题 更多 >
编程相关推荐