window 方式
@echo off
set PROJECT_ROOT=%~dp0\..\
set PYTHONPATH=%PROJECT_ROOT%\
pyinstaller -F --distpath "%PROJECT_ROOT%\bin" --workpath "%tmp%" --clean "%PROJECT_ROOT%\bin\py_gen_parm.spec"
spec配置文件 py_gen_parm.spec
# -*- mode: python ; coding: utf-8 -*-
import os
from PyInstaller.building.api import PYZ, EXE
from PyInstaller.building.build_main import Analysis
cur_dic = os.getcwd(