Skip to content

Commit

Permalink
chore: 更新脚本和文档提示
Browse files Browse the repository at this point in the history
  • Loading branch information
MistEO committed May 24, 2024
1 parent 8535fa1 commit f15feb7
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ MaaFramework 实践模板。
git clone --recursive https://github.com/MaaXYZ/MaaPracticeBoilerplate.git
```

**请注意,一定要完整克隆子项目,不要漏了 `--recursive`**
**请注意,一定要完整克隆子项目,不要漏了 `--recursive`,也不要下载 zip 包!**

2. 下载 MaaFramework 的 [Release 包](https://github.com/MaaXYZ/MaaFramework/releases),解压到 `deps` 文件夹中。

Expand All @@ -28,11 +28,11 @@ MaaFramework 实践模板。
- 也可以在本地安装后测试:

1. 执行安装脚本
```bash
python ./install.py
```

```bash
python ./install.py
```

2. 运行 `install/MaaPiCli.exe`

5. 完成开发工作后,上传您的代码并发布版本。
Expand All @@ -51,7 +51,7 @@ MaaFramework 实践模板。
6. 发版您的版本

需要先修改仓库设置 `Settings` - `Actions` - `General` - `Read and write permissions` - `Save`

```bash
# CI 检测到 tag 会自动进行发版
git tag v1.0.0
Expand Down
7 changes: 7 additions & 0 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@


def configure_ocr_model():
if not (assets_dir / "MaaCommonAssets" / "OCR").exists():
print("Please clone this repository completely, don’t miss \"--recursive\", and don’t download the zip package!")
print("请完整克隆本仓库,不要漏掉 \"--recursive\",也不要下载 zip 包!")
exit(1)

shutil.copytree(
assets_dir / "MaaCommonAssets" / "OCR" / "ppocr_v4" / "zh_cn",
assets_dir / "resource" / "base" / "model" / "ocr",
Expand All @@ -15,3 +20,5 @@ def configure_ocr_model():

if __name__ == "__main__":
configure_ocr_model()

print("OCR model configured.")
7 changes: 7 additions & 0 deletions install.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@


def install_deps():
if not (working_dir / "deps" / "bin").exists():
print("Please download the MaaFramework to \"deps\" first.")
print("请先下载 MaaFramework 到 \"deps\"。")
sys.exit(1)

shutil.copytree(
working_dir / "deps" / "bin",
install_path,
Expand Down Expand Up @@ -69,3 +74,5 @@ def install_chores():
install_deps()
install_resource()
install_chores()

print(f"Install to {install_path} successfully.")

0 comments on commit f15feb7

Please sign in to comment.