下载 MaaDeps 预编译依赖
(skip_if_exist: bool = True)
| 167 | |
| 168 | |
| 169 | def bootstrap_maadeps(skip_if_exist: bool = True) -> bool: |
| 170 | """下载 MaaDeps 预编译依赖""" |
| 171 | maadeps_dir = ( |
| 172 | PROJECT_BASE / "agent" / "cpp-algo" / "MaaUtils" / "MaaDeps" / "vcpkg" / "installed" |
| 173 | ) |
| 174 | if skip_if_exist and maadeps_dir.exists() and any(maadeps_dir.iterdir()): |
| 175 | print(Console.ok(t("inf_maadeps_exist"))) |
| 176 | return True |
| 177 | |
| 178 | print(Console.info(t("inf_bootstrap_maadeps"))) |
| 179 | script_path = PROJECT_BASE / "tools" / "maadeps-download.py" |
| 180 | return run_command([sys.executable, str(script_path)]) |
| 181 | |
| 182 | |
| 183 | _dep_3rdparty_inited = False |
no test coverage detected