更换sane/scanner/lang三个模块名称,避免与第三方APP模块名称冲突

This commit is contained in:
gb 2023-10-20 11:13:18 +08:00
parent 07d094acd0
commit 78f5a7baa7
4 changed files with 11 additions and 11 deletions

View File

@ -456,12 +456,12 @@ int hg_scanner::hg_version_init_handle()
{ {
int ret = SCANNER_ERR_OK; int ret = SCANNER_ERR_OK;
#ifndef WIN32 #ifndef WIN32
string scanner_path = hg_log::get_module_full_path(LIBNAME); string scanner_path = hg_log::get_module_full_path(MODULE_NAME_SCANNER);
if (scanner_path.empty()) if (scanner_path.empty())
{ {
return SCANNER_ERR_OUT_OF_RANGE; return SCANNER_ERR_OUT_OF_RANGE;
} }
scanner_path = scanner_path.substr(0, scanner_path.size() - strlen(LIBNAME)); scanner_path = scanner_path.substr(0, scanner_path.size() - strlen(MODULE_NAME_SCANNER));
string HGVersionlib_path = scanner_path + HGVERSION_LIBNANE; string HGVersionlib_path = scanner_path + HGVERSION_LIBNANE;
if (access(HGVersionlib_path.c_str(), F_OK) != 0) if (access(HGVersionlib_path.c_str(), F_OK) != 0)
@ -482,8 +482,8 @@ int hg_scanner::hg_version_init_handle()
HGVersion_Free_ = (SDKHGVersion_Free_)dlsym(Dynamicopen_HGVersion_pHandle_, "HGVersion_DestroyMgr"); HGVersion_Free_ = (SDKHGVersion_Free_)dlsym(Dynamicopen_HGVersion_pHandle_, "HGVersion_DestroyMgr");
#else #else
string scanner_path = hg_log::get_module_full_path(LIBNAME); string scanner_path = hg_log::get_module_full_path(MODULE_NAME_SCANNER);
scanner_path = scanner_path.substr(0, scanner_path.size() - strlen(LIBNAME)); scanner_path = scanner_path.substr(0, scanner_path.size() - strlen(MODULE_NAME_SCANNER));
string HGVersionlib_path = scanner_path + HGVERSION_LIBNANE; string HGVersionlib_path = scanner_path + HGVERSION_LIBNANE;
wchar_t* Prclibbuffer = new wchar_t[HGVersionlib_path.length() + 1]; wchar_t* Prclibbuffer = new wchar_t[HGVersionlib_path.length() + 1];

View File

@ -866,8 +866,8 @@ int hg_scanner_300::initdevice()
{ {
if (fw.substr(4, 6) == "230303") if (fw.substr(4, 6) == "230303")
{ {
string scanner_path = hg_log::get_module_full_path(LIBNAME); string scanner_path = hg_log::get_module_full_path(MODULE_NAME_SCANNER);
scanner_path = scanner_path.substr(0, scanner_path.size() - strlen(LIBNAME)); scanner_path = scanner_path.substr(0, scanner_path.size() - strlen(MODULE_NAME_SCANNER));
scanner_path += "update.zip"; scanner_path += "update.zip";
set_firmware_upgrade(scanner_path); set_firmware_upgrade(scanner_path);
return SCANNER_ERR_OK; return SCANNER_ERR_OK;
@ -1558,8 +1558,8 @@ int hg_scanner_300::set_updata0303(void)
{ {
if (fw.substr(4, 6) == "230303") if (fw.substr(4, 6) == "230303")
{ {
string scanner_path = hg_log::get_module_full_path(LIBNAME); string scanner_path = hg_log::get_module_full_path(MODULE_NAME_SCANNER);
scanner_path = scanner_path.substr(0, scanner_path.size() - strlen(LIBNAME)); scanner_path = scanner_path.substr(0, scanner_path.size() - strlen(MODULE_NAME_SCANNER));
scanner_path += "update.zip"; scanner_path += "update.zip";
set_firmware_upgrade(scanner_path); set_firmware_upgrade(scanner_path);
} }

View File

@ -353,8 +353,8 @@ namespace hg_imgproc
HGBase_FreeImg = (SDKHGBase_FreeImage_)dlsym(Dynamicopen_HGBase_pHandle_,"HGBase_DestroyImage"); HGBase_FreeImg = (SDKHGBase_FreeImage_)dlsym(Dynamicopen_HGBase_pHandle_,"HGBase_DestroyImage");
#else #else
string scanner_path = hg_log::get_module_full_path("scanner.dll"); string scanner_path = hg_log::get_module_full_path(MODULE_NAME_SCANNER);
scanner_path = scanner_path.substr(0, scanner_path.size() - strlen("scanner.dll")); scanner_path = scanner_path.substr(0, scanner_path.size() - strlen(MODULE_NAME_SCANNER));
string HGImagePrclib_path = scanner_path + IMGPRC_LIBNANE; string HGImagePrclib_path = scanner_path + IMGPRC_LIBNANE;
string HGBaselib_path = scanner_path + HGBASE_LIBNAME; string HGBaselib_path = scanner_path + HGBASE_LIBNAME;

View File

@ -31,7 +31,7 @@
#if defined(WIN32) || defined(_WIN64) #if defined(WIN32) || defined(_WIN64)
#include "../../../sdk/include/huagao/brand.h" #include "../../../sdk/include/huagao/brand.h"
#ifndef HGSCANNER_EXPORT #ifndef HGSCANNER_EXPORT
#pragma comment(lib, "scanner.lib") #pragma comment(lib, "scannerqd.lib")
#endif #endif
#define VERSION_MAJOR VERSION_MAIN #define VERSION_MAJOR VERSION_MAIN
#define VERSION_MINOR VERSION_SUB #define VERSION_MINOR VERSION_SUB