以下文件/目录需要打包分发给最终用户:
dist/DrawThings WebUI.app/- 主应用程序(已包含所有依赖)Launch_DrawThings_WebUI.command- 启动器(用户双击此文件)README.md- 用户使用说明LICENSE- 许可证
运行 ./create_package.sh 会自动生成 DrawThings_WebUI_MacOS.zip 分发包
build_standalone.py- PyInstaller打包脚本create_package.sh- 创建分发包脚本drawthings_standalone.spec- PyInstaller配置文件launcher.py- 应用启动器源码
config.json- 当前配置(运行时自动生成)config.example.json- 配置示例(已包含在应用中)requirements.txt- Python依赖列表
src/- Python源代码static/- 前端静态文件scripts/- 数据库迁移脚本tests/- 测试文件docs/- 文档
dev/- 存放旧的启动脚本、测试文件等
data/- 运行时数据(图片、日志、数据库)build/- 构建临时文件.gitignore- Git忽略配置.lingma/- Lingma配置
-
安装依赖:
python3 -m venv venv source venv/bin/activate pip install -r requirements.txt -
重新打包应用:
python build_standalone.py
-
创建分发包:
./create_package.sh
-
测试启动:
./Launch_DrawThings_WebUI.command