使用方法 :pyinstaller 选项 参数
必要参数:
scriptname 脚本名称name of scriptfiles to be processed or exactly one .spec-file. If a .spec-file is specified, most options are unnecessary and are ignored.
可靠参数:
-h, --help | 显示帮助信息并退出 |
-v, --version | 输出版本信息并退出 |
--distpath DIR | 生成可执行文件存放目录,默认脚本目录下dist文件夹 |
--workpath WORKPATH | 临时文件存放目录,默认脚本目录下build文件夹 |
--clean | 清空PyInstaller之前的缓存和临时文件 |
-D, --onedir | 生成包含可执行文件的文件夹(默认选项) |
-F, --onefile | 只生成一个可执行exe文件 |
--specpath DIR | 生成spec文件的目录(默认当前目录) |
-n NAME, --name NAME | 可执行文件exe和spec的名称(默认为第一个脚本的名称) |
-y, --noconfirm Replace output directory (default:
SPECPATH\dist\SPECNAME) without asking for
confirmation
--upx-dir UPX_DIR Path to UPX utility (default: search the execution
path)
-a, --ascii Do not include unicode encoding support (default:
included if available)
--log-level LEVEL Amount of detail in build-time console messages. LEVEL
may be one of TRACE, DEBUG, INFO, WARN, ERROR,
CRITICAL (default: INFO).
What to bundle, where to search:
--add-data <SRC;DEST or SRC:DEST>
Additional non-binary files or folders to be added to
the executable.