mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-17 18:01:26 +08:00
chore: 增加一些加载时的日志打印
This commit is contained in:
@@ -46,7 +46,7 @@ bool inited()
|
||||
|
||||
AsstBool AsstSetUserDir(const char* path)
|
||||
{
|
||||
auto os_path = asst::utils::path(path);
|
||||
auto os_path = std::filesystem::absolute(asst::utils::path(path));
|
||||
return asst::UserDir.set(os_path);
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ AsstBool AsstLoadResource(const char* path)
|
||||
{
|
||||
using namespace asst::utils::path_literals;
|
||||
|
||||
auto os_path = asst::utils::path(path);
|
||||
auto os_path = std::filesystem::absolute(asst::utils::path(path));
|
||||
auto res_path = os_path / "resource"_p;
|
||||
if (asst::ResDir.empty()) {
|
||||
asst::ResDir.set(res_path);
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
bool asst::AvatarCacheManager::load(const std::filesystem::path& path)
|
||||
{
|
||||
LogTraceFunction;
|
||||
Log.info("load", path);
|
||||
|
||||
m_path = path;
|
||||
|
||||
|
||||
@@ -29,13 +29,20 @@ static std::filesystem::path prepare_paddle_dir(const std::filesystem::path& dir
|
||||
asst::OcrPack::OcrPack()
|
||||
: m_ocr_option(std::make_unique<fastdeploy::RuntimeOption>()), m_det(nullptr), m_rec(nullptr), m_ocr(nullptr)
|
||||
{
|
||||
LogTraceFunction;
|
||||
m_ocr_option->UseOrtBackend();
|
||||
}
|
||||
|
||||
asst::OcrPack::~OcrPack() {}
|
||||
asst::OcrPack::~OcrPack()
|
||||
{
|
||||
LogTraceFunction;
|
||||
}
|
||||
|
||||
bool asst::OcrPack::load(const std::filesystem::path& path)
|
||||
{
|
||||
LogTraceFunction;
|
||||
Log.info("load", path);
|
||||
|
||||
bool use_temp_dir = false;
|
||||
auto paddle_dir = prepare_paddle_dir(path, &use_temp_dir);
|
||||
|
||||
|
||||
@@ -9,6 +9,9 @@ ASST_SUPPRESS_CV_WARNINGS_END
|
||||
|
||||
bool asst::TilePack::load(const std::filesystem::path& path)
|
||||
{
|
||||
LogTraceFunction;
|
||||
Log.info("load", path);
|
||||
|
||||
if (!std::filesystem::exists(path)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user