月度归档:2015年06月

Pyinstaller打包单个bundle时封装额外的资源文件

Pyinstaller简易使用说明:

安装:

pip install pyinstaller

在待打包目录下

新建一个批处理specgen.bat,内容为

pyi-makespec.exe Name.py -F -w –icon=fav.ico

新建一个批处理exegen.bat,内容为

pyinstaller.exe Name.spec

执行specgen.bat生成spec文件(若有需要,对其进行修改)

执行exegen.bat生成可执行文件,结果位于dist目录下

正文:

在编程时往往会引用一些额外文件,如图片,音乐等。

若是用Pyinstaller打包为文件夹,那么这些文件直接复制过去就行。… Read More