diff --git a/resource/global/txwy/resource/tasks.json b/resource/global/txwy/resource/tasks.json index 4d163418a5..0788d72020 100644 --- a/resource/global/txwy/resource/tasks.json +++ b/resource/global/txwy/resource/tasks.json @@ -1293,6 +1293,7 @@ ] }, "LE-Open": { + "algorithm": "OcrDetect", "text": [ "塵影餘音", "活動", diff --git a/src/Cpp/main.cpp b/src/Cpp/main.cpp index c3cc5ae573..54a57e3202 100644 --- a/src/Cpp/main.cpp +++ b/src/Cpp/main.cpp @@ -14,14 +14,28 @@ int main([[maybe_unused]] int argc, char** argv) // AsstSetUserDir(cur_path.c_str()); // 这里默认读取的是可执行文件同目录下 resource 文件夹里的资源 + bool load_error = false; bool loaded = AsstLoadResource(cur_path.string().c_str()); - - // 增量更新外服的资源 - // const auto oversea_path = cur_path / "resource" / "global" / "YoStarJP"; - // loaded &= AsstLoadResource(oversea_path.string().c_str()); - if (!loaded) { - std::cout << "load resource failed" << std::endl; + load_error = true; + std::cerr << "-------- load resource failed --------" << std::endl; + } + +#ifdef ASST_DEBUG + const auto overseas_dir = cur_path / "resource" / "global"; + for (const auto& client : { "YoStarJP", "YoStarEN", "YoStarKR", "txwy" }) { + const auto overseas_path = overseas_dir / client; + bool loaded = AsstLoadResource(cur_path.string().c_str()); + // 增量更新外服的资源 + loaded &= AsstLoadResource(overseas_path.string().c_str()); + if (!loaded) { + load_error = true; + std::cerr << "-------- load resource failed: " << client << " --------" << std::endl; + } + } +#endif + + if (load_error) { return -1; }