#include "Constant.h" #include #include std::filesystem::path getExecutablePath() { char path[MAX_PATH]; GetModuleFileNameA(NULL, path, MAX_PATH); return std::filesystem::path(path).parent_path(); } std::filesystem::path currPath = getExecutablePath(); // std::filesystem::current_path(); const std::string Constant::WeChatOcrData = ( currPath / std::filesystem::path("wco_data") ).lexically_normal().string(); // ".\\wco_data"; #ifdef _WIN64 const std::string Constant::MojoDllName = Constant::WeChatOcrData + "\\mmmojo_64.dll"; #else const std::string Constant::MojoDllName = Constant::WeChatOcrData + "\\mmmojo.dll"; #endif