如何从Windows PC创建Pygame dmg文件?

时间:2019-04-09 04:21:24

标签: python macos pygame

我已经在python3&pygame中创建了一个游戏。它很简单,并使用了几个图像和声音文件。我使用cx_freeze将其制作为Windows exe文件,但我不知道如何为它创建mac文件(尽管在Windows计算机上)

由于没有Mac,我无法在Mac上执行此操作。我尝试使用bdist_dmg和bdist_mac命令,但无法识别。通过这个,我的意思是我进入了cmd并输入:“ py setup.py bdist_mac”,它将把我的安装文件(下面)变成dmg文件。

import cx_Freeze
import os
os.environ['TCL_LIBRARY'] = "C:\\Users\\knify\\AppData\\Local\\Programs\\Python\\Python37-32\\tcl\\tcl8.6"
os.environ['TK_LIBRARY'] = "C:\\Users\\knify\\AppData\\Local\\Programs\\Python\\Python37-32\\tcl\\tk8.6"

executables = [cx_Freeze.Executable("file.py")]

cx_Freeze.setup(
    name="Game",
    options={"build_exe": {"packages":["pygame","time","random"],
                       "include_files": ["bg.jpg","one.png","two.png","three.png","four.png","five.png","bg.png","block.png","button.png","icon.png","pointer.png","sound.wav","wood.jpg"]}},
executables = executables

)

0 个答案:

没有答案