我使用python脚本通过py2exe制作exe。我已经介绍了许多设置的示例。我正在使用Windows 7 64位和Python 2.7。
from distutils.core import setup
import py2exe
import time
setup(
windows = [
{
"script": "myapp.py",
"icon_resources": [(1, "Windows.ico")]
}
],
)
time.sleep(2)
但通过此setup.py产生的区域包含带有默认exe image的myApp.exe,而不是我包含的图标。在CMD中,我正在使用 python sup.py py2exe
我通过gui2exe使用py2exe,并且对图标从来没有问题。
使用gui2exe,您不必编写设置。
您可以在这里获得http://code.google.com/p/gui2exe/只需双击启动gui2exe.py(无需安装)即可。