2024-09-23 21:58:47 +08:00
|
|
|
# mower-ng 启动器
|
|
|
|
|
|
|
|
## 开发环境
|
|
|
|
|
2024-12-15 23:23:13 +08:00
|
|
|
安装 `pip-tools`
|
|
|
|
|
|
|
|
```bash
|
|
|
|
pip install pip-tools
|
|
|
|
```
|
|
|
|
|
|
|
|
安装依赖
|
|
|
|
|
|
|
|
```bash
|
|
|
|
pip-sync requirements.txt
|
|
|
|
```
|
2024-09-23 21:58:47 +08:00
|
|
|
|
|
|
|
## 打包
|
|
|
|
|
|
|
|
前端运行 `npm run build` 生成 `ui/dist`,之后安装 PyInstaller,运行
|
|
|
|
|
|
|
|
```bash
|
2024-12-15 21:57:17 +08:00
|
|
|
pyinstaller -w --add-data "ui/dist:ui/dist" --add-data "launcher/sys_config/config_dist.json:launcher/sys_config" launcher.py
|
2024-12-01 19:56:55 +08:00
|
|
|
```
|
|
|
|
|
2024-12-14 19:49:55 +08:00
|
|
|
在dist文件夹生成launcher文件夹
|
2024-12-01 19:56:55 +08:00
|
|
|
|
|
|
|
```bash
|
2024-12-14 22:14:10 +08:00
|
|
|
cd dist
|
|
|
|
py7zr c launcher.7z launcher
|
2024-09-23 21:58:47 +08:00
|
|
|
```
|