Skip to content

Latest commit

 

History

History
15 lines (12 loc) · 331 Bytes

build-exe-onefile.md

File metadata and controls

15 lines (12 loc) · 331 Bytes

编译exe程序

# -F 打包成单个文件
# --onconsole 不显示控制台
# --add-data 额外文件,一般是其他依赖

pyinstaller -F --noconsole --add-data "./poppler;./poppler" main.py
# 获取add-data的文件夹 
folder = pathlib.Path(__file__).parent.resolve()
print(f'{folder}/poppler')