如何将图标添加到cx_Freeze创建的exe文件中?
这是setup.py:
import cx_Freeze
exe = [cx_Freeze.Executable("file.py")]
cx_Freeze.setup( name = "downloads", version = "1.0", options = {"build_exe": {"packages": ["time","clipboard","base64","random","smtplib","binascii",], "include_files": []}}, executables = exe )
答案 0 :(得分:2)
这是cx_Freeze.Executable对象的一部分。有关详细信息,请参阅documentation。有效:
cx_Freeze.Executable("file.py", icon = "my_icon.ico")