From 3fb889ff24a899baa3201540109653d81b5cb005 Mon Sep 17 00:00:00 2001 From: 13038267101 Date: Fri, 10 Mar 2023 17:36:20 +0800 Subject: [PATCH] add oem unis modify;change compile bat script and something about releated code --- build.sh | 6 ++++++ hgdriver/hgdev/char_const.h | 34 ++++++++++++++++++++++++++++-- hgdriver/hgdev/hg_scanner.h | 16 ++++++++++++-- hgdriver/hgdev/scanner_manager.cpp | 5 ++++- hgdriver/wrapper/hg_log.cpp | 2 ++ 5 files changed, 58 insertions(+), 5 deletions(-) diff --git a/build.sh b/build.sh index 9042d52..7dfca6d 100755 --- a/build.sh +++ b/build.sh @@ -75,6 +75,12 @@ elif [ "$oem" == "zj" ]; then sed -i "s/DOEM_HUAGAO/DOEM_ZHONGJING/g" hgdriver/hgdev/CMakeLists.txt sed -i "s/DOEM_HUAGAO/DOEM_ZHONGJING/g" hgdriver/wrapper/CMakeLists.txt sed -i "s/1%m%d1/1%m%d9/g" hgdriver/wrapper/CMakeLists.txt +elif [ "$oem" == "zg" ]; then + ver3=17 + + sed -i "s/DOEM_HUAGAO/DOEM_ZIGUANG/g" hgdriver/hgdev/CMakeLists.txt + sed -i "s/DOEM_HUAGAO/DOEM_ZIGUANG/g" hgdriver/wrapper/CMakeLists.txt + sed -i "s/1%m%d1/1%m%d9/g" hgdriver/wrapper/CMakeLists.txt fi project_sanename="project(sane-$oem"sane")" diff --git a/hgdriver/hgdev/char_const.h b/hgdriver/hgdev/char_const.h index 11460de..bb79e3d 100644 --- a/hgdriver/hgdev/char_const.h +++ b/hgdriver/hgdev/char_const.h @@ -122,7 +122,34 @@ //#define BRAND_COMPANY_GPS "百度地图访问" #define BRAND_COMPANY_GPS "\347\231\276\345\272\246\345\234\260\345\233\276\350\256\277\351\227\256" #define BRAND_URL_GPS "https://j.map.baidu.com/67/BWSu" - +#elif defined(OEM_ZIGUANG) + // #define COMPANY_NAME "紫光股份有限公司" + #define COMPANY_NAME "\347\264\253\345\205\211\350\202\241\344\273\275\346\234\211\351\231\220\345\205\254\345\217\270" + // #define BRAND_APP_NAME "紫光扫描应用程序" + #define BRAND_APP_NAME "\347\264\253\345\205\211\346\211\253\346\217\217\345\272\224\347\224\250\347\250\213\345\272\217" + // #define BRAND_TITLE_VERSION "版本" + #define BRAND_TITLE_VERSION "\347\211\210\346\234\254" + // #define BRAND_TITLE_COPYRIGHT "版权" + #define BRAND_TITLE_COPYRIGHT "\347\211\210\346\235\203" + #define BRAND_COPYRIGHT "\347\264\253\345\205\211\350\202\241\344\273\275\346\234\211\351\231\220\345\205\254\345\217\270\347\211\210\346\235\203\346\211\200\346\234\211\302\2512020" + // #define BRAND_TITE_MANUFACTOR "制造商/开发商" + #define BRAND_TITE_MANUFACTOR "\345\210\266\351\200\240\345\225\206/\345\274\200\345\217\221\345\225\206" + // #define BRAND_TITLE_URL "公司网址" + #define BRAND_TITLE_URL "\345\205\254\345\217\270\347\275\221\345\235\200" + #define BRAND_COMPANY_URL "www.uniscan.com" + #define BRAND_URL_COMPANY_URL "http://www.uniscan.com" + //#define BRAND_TITLE_TEL "联系电话" + #define BRAND_TITLE_TEL "\350\201\224\347\263\273\347\224\265\350\257\235" + #define BRAND_COMPANY_TEL "400-700-8188" + //#define BRAND_TITLE_ADDRESS "地址" + #define BRAND_TITLE_ADDRESS "\345\234\260\345\235\200" + // #define BRAND_COMPANY_ADDRESS "北京市海淀区清华大学紫光大楼" + #define BRAND_COMPANY_ADDRESS "\345\214\227\344\272\254\345\270\202\346\265\267\346\267\200\345\214\272\346\270\205\345\215\216\345\244\247\345\255\246\347\264\253\345\205\211\345\244\247\346\245\274" + //#define BRAND_TITLE_GPS "导航地址" + #define BRAND_TITLE_GPS "\345\257\274\350\210\252\345\234\260\345\235\200" + //#define BRAND_COMPANY_GPS "百度地图访问" + #define BRAND_COMPANY_GPS "\347\231\276\345\272\246\345\234\260\345\233\276\350\256\277\351\227\256" + #define BRAND_URL_GPS "https://j.map.baidu.com/dd/eNIJ" #else // #define COMPANY_NAME "宁波华高信息科技有限公司" #define COMPANY_NAME "\345\256\201\346\263\242\345\215\216\351\253\230\344\277\241\346\201\257\347\247\221\346\212\200\346\234\211\351\231\220\345\205\254\345\217\270" @@ -201,4 +228,7 @@ #define SCANNER_NAME_CT_138 "CUMTENN CT-138" #define SCANNER_NAME_CT_238 "CUMTENN CT-238" -#define SCANNER_NAME_ZJ_6500 "Microtek A3HG Scanner" \ No newline at end of file +#define SCANNER_NAME_ZJ_6500 "Microtek A3HG Scanner" + +#define SANNNER_NAME_ZG_Q7110 "Uniscan Q7110" +#define SANNNER_NAME_ZG_Q1070 "Uniscan Q1070" \ No newline at end of file diff --git a/hgdriver/hgdev/hg_scanner.h b/hgdriver/hgdev/hg_scanner.h index 73de0ff..d25495d 100644 --- a/hgdriver/hgdev/hg_scanner.h +++ b/hgdriver/hgdev/hg_scanner.h @@ -55,8 +55,14 @@ #else #define HGVERSION_LIBNANE "libZjVersion.so" #endif +#elif defined(OEM_ZIGUANG) + #ifdef WIN32 + #define HGVERSION_LIBNANE "ZGVersion.dll" + #else + #define HGVERSION_LIBNANE "libZGVersion.so" +#endif #else -#define OEM_HUAGAO + #define OEM_HUAGAO #ifdef WIN32 #define HGVERSION_LIBNANE "HGVersion.dll" #else @@ -526,7 +532,9 @@ public: #elif defined(OEM_CANGTIAN) static const std::string helpfile_ = "/opt/apps/com.cumtennchina.cumtennscan/entries/help/CumtennScan_scanSettings_Help_manual.pdf";//帮助文档路径 #elif defined(OEM_ZHONGJING) - static const std::string helpfile_ = "/opt/apps/com.microtekchina.microtekscan/entries/help/MicrotekScan_scanSettings_Help_manual.pdf";//帮助文档路径 + static const std::string helpfile_ = "/opt/apps/com.microtekchina.microtekscan/entries/help/MicrotekScan_scanSettings_Help_manual.pdf";//帮助文档路径 + #elif defined(OEM_ZIGUANG) + static const std::string helpfile_ = "/opt/apps/com.unisgroup.uniscan/entries/help/UnisScan_scanSettings_Help_manual.pdf";//帮助文档路径 #else static const std::string helpfile_ ="/opt/apps/com.huagaochina.huagoscan/entries/help/HuaGoScan_scanSettings_Help_manual.pdf";//帮助文档路径 #endif @@ -539,6 +547,8 @@ public: static const std::string helpfile_ = "/opt/apps/scanner-driver-cumtenn/doc/CumtennScan_scanSettings_Help_manual.pdf";//帮助文档路径 #elif defined(OEM_ZHONGJING) static const std::string helpfile_ = "/opt/apps/scanner-driver-microtek/doc/MicrotekScan_scanSettings_Help_manual.pdf";//帮助文档路径 + #elif defined(OEM_ZIGUANG) + static const std::string helpfile_ = "/opt/apps/scanner-driver-unis/doc/UnisScan_scanSettings_Help_manual.pdf";//帮助文档路径 #else static const std::string helpfile_ ="/opt/apps/scanner-driver-huagao/doc/HuaGoScan_scanSettings_Help_manual.pdf";//帮助文档路径 #endif @@ -551,6 +561,8 @@ public: static const std::string helpfile_ = "CumtennScan_scanSettings_Help_manual.pdf";//帮助文档路径 #elif defined(OEM_ZHONGJING) static const std::string helpfile_ = "MicrotekScan_scanSettings_Help_manual.pdf";//帮助文档路径 + #elif defined(OEM_ZIGUANG) + static const std::string helpfile_ = "UniScan_scanSettings_Help_manual.pdf";//帮助文档路径 #else static const std::string helpfile_ = "HuaGoScan_scanSettings_Help_manual.pdf";//帮助文档路径 #endif diff --git a/hgdriver/hgdev/scanner_manager.cpp b/hgdriver/hgdev/scanner_manager.cpp index 0aea6b7..d8b048b 100644 --- a/hgdriver/hgdev/scanner_manager.cpp +++ b/hgdriver/hgdev/scanner_manager.cpp @@ -59,6 +59,9 @@ g_supporting_devices[] = { , {0x3308, 0x0138, SCANNER_NAME_CT_238, SCANNER_NAME_CT_238, "", &hg_scanner_mgr::create_scanner_g239} #elif defined(OEM_ZHONGJING) {0X05DA, 0x9220, SCANNER_NAME_ZJ_6500, "S6500", "",& hg_scanner_mgr::create_scanner_g439} +#elif defined(OEM_ZIGUANG) + {0x32ec, 0x0200, SANNNER_NAME_ZG_Q7110,"", "", & hg_scanner_mgr::create_scanner_g239} + , {0x32ec, 0x0210, SANNNER_NAME_ZG_Q1070, "", "", &hg_scanner_mgr::create_scanner_g402} #else {0x3072, PID_AND_NAME(100, SCANNER_NAME_HG_G100), "G100", "", &hg_scanner_mgr::create_scanner_g100} , {0x3072, PID_AND_NAME(139, SCANNER_NAME_HG_G100), "G100", "", &hg_scanner_mgr::create_scanner_g239} @@ -138,7 +141,7 @@ hg_scanner_mgr* hg_scanner_mgr::instance(sane_callback cb) } void hg_scanner_mgr::clear(void) { - if (hg_scanner_mgr::inst_) + if (hg_scanner_mgr::inst_) { { std::lock_guard lock(hg_scanner_mgr::inst_->mutex_dev_); diff --git a/hgdriver/wrapper/hg_log.cpp b/hgdriver/wrapper/hg_log.cpp index 736889b..d9f0714 100644 --- a/hgdriver/wrapper/hg_log.cpp +++ b/hgdriver/wrapper/hg_log.cpp @@ -646,6 +646,8 @@ extern "C" home += "CumTennScan"; #elif defined(OEM_ZHONGJING) home += "MicrotekScan"; +#elif defined(OEM_ZIGUANG) + home += "UnisScan"; #else home += "HuaGoScan"; #endif;