使用PyInstaller打包方法:https://www.jianshu.com/p/1d1bb1a81fe7
打包程序icon为python默认图片,如何修改?
1,准备一个.ico格式的图片,例如我放在D:/test文件夹下,打包文件在统计目录为hello.py
2,打包命令
# pyinstaller --onefile --icon=xx.ico --clean --paths=D:/test/ D:/test/hello.py
执行打包命令,就可以了
修改窗口图片代码:
window.iconbitmap("tmp.ico")
网友评论