|
|
|
|
|
#include "Constant.h" |
|
|
#include <filesystem> |
|
|
#include <Windows.h> |
|
|
|
|
|
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(); |
|
|
|
|
|
const std::string Constant::WeChatOcrData = ( currPath / std::filesystem::path("wco_data") ).lexically_normal().string(); |
|
|
|
|
|
#ifdef _WIN64 |
|
|
const std::string Constant::MojoDllName = Constant::WeChatOcrData + "\\mmmojo_64.dll"; |
|
|
#else |
|
|
const std::string Constant::MojoDllName = Constant::WeChatOcrData + "\\mmmojo.dll"; |
|
|
#endif |
|
|
|