File size: 669 Bytes
17f5b5c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
#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(); // 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
|