cxfreeze图标错误python34

时间:2014-07-09 01:35:53

标签: python icons options setup.py

我有一个像gorsel.py这样的python脚本。我想通过setup.py将其转换为exe,但我得到了图标错误。

我的设置代码:


import sys
from cx_Freeze import setup, Executable

build_exe_options = {"packages": ["os"], "excludes": ["Tkinter"]}
 . base = None
    if sys.platform == "win32":
        base = "Win32GUI"
    setup(  name = "sifreleme",
            version = "0.1",
            description = "My GUI application!",
            options = {"build_exe": build_exe_options},
            executables = [Executable("gorsel.py", base=base)])
    try:
        import tkinter  except ImportError:
        import Tkinter as tkinter`

如何修复我的setup.py脚本?谢谢

1 个答案:

答案 0 :(得分:1)

将此添加到build_exe_options:"icon": "path/to/icon.ico"