自己生成的exe文件比release 下载的大很多
prozyy opened this issue · comments
prozyy commented
pip install pyinstaller
pyinstaller --noconfirm -F -w --additional-hooks-dir=. --add-data=".version;." --add-data="macast/xml/;macast/xml" --add-data="i18n/zh_CN/LC_MESSAGES/.mo;i18n/zh_CN/LC_MESSAGES" --add-data="assets/*;assets" --add-binary="bin/mpv.exe;bin" --icon=assets/icon.ico Macast.py
生成的Macast.exe 78.2Mb
下载作者编译好的,只有42.4M
请问生成这个程序是需要有啥额外操作么?
xfangfang commented
可以fork我的项目,改动代码后,在github-actions中点击编译,或者将代码传到dev_test分支,github-actions会自动进行编译的。
在本地编译的话需要新建一个虚拟环境,避免无用的包被打包进去