Compare commits

...

3 Commits

Author SHA1 Message Date
13038267101 7efc2e982e Merge branch 'master' of http://192.168.10.5:8099/sane/code_twain
reslove sane.rc conflict
2023-03-10 17:45:05 +08:00
13038267101 620bb87ae7 fatch conflict 2023-03-10 17:44:43 +08:00
13038267101 4b9694e8e8 change build bat script for oem unis and hgsetver tool code 2023-03-10 17:39:05 +08:00
7 changed files with 93 additions and 30 deletions

View File

@ -8,6 +8,7 @@ set BUILD_HW=false
set BUILD_LSC=false
set BUILD_CTS=false
set BUILD_ZJ=false
set BUILD_ZG=false
set BUILD_X86=true
set BUILD_X64=true
@ -21,7 +22,9 @@ if "%OEM%"=="hw" (
set BUILD_CTS=true
) else if "%OEM%" == "zj" (
set BUILD_ZJ=true
) else if "%OEM%" == "all" (
)else if "%OEM%" == "zg" (
set BUILD_ZG=true
)else if "%OEM%" == "all" (
set BUILD_HG=true
set BUILD_HW=true
set BUILD_LSC=true
@ -83,6 +86,12 @@ if "%BUILD_ZJ%"=="true" (
if "%BUILD_X64%"=="true" call :compile_zj zj x64
if %ERRORLEVEL% neq 0 goto end
)
if "%BUILD_ZG%"=="true" (
if "%BUILD_X86%"=="true" call :compile_zg zg x86
if %ERRORLEVEL% neq 0 goto end
if "%BUILD_X64%"=="true" call :compile_zg zg x64
if %ERRORLEVEL% neq 0 goto end
)
if "%BUILD_HG%"=="true" (
if "%BUILD_X86%"=="true" call :compile_hg hg x86
if %ERRORLEVEL% neq 0 goto end
@ -160,6 +169,15 @@ EXIT /B 0
EXIT /B 0
:compile_zg
call build_base.bat %1 %2
if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL%
call build_ds.bat %1 %2 200
if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL%
call build_ds.bat %1 %2 210
if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL%
EXIT /B 0
:end
echo final result = %ERRORLEVEL%

View File

@ -32,6 +32,11 @@ if "%OEM%" equ "zj" (
set CL=/DOEM_ZHONGJING /DBACKEND_NAME=zjsane
goto oem
)
if "%OEM%" equ "zg" (
set OEM_DIR=unis
set CL=/DOEM_ZIGUANG /DBACKEND_NAME=unissane
goto oem
)
if "%OEM%" equ "cts" (
set OEM_DIR=cumtenn
set CL=/DOEM_CANGTIAN /DBACKEND_NAME=ctssane

View File

@ -1,5 +1,5 @@
@echo off
echo "Parameter 1:hg | lsc| hw | zj | cts"
echo "Parameter 1:hg | lsc| hw | zj | cts | zg"
echo "Parameter 2:x86 | x64 "
echo "Parameter 3: 100 | 200 ... "
@ -38,6 +38,12 @@ if "%OEM%" equ "zj" (
set NAME=microtek%NAME%
goto oem
)
if "%OEM%" equ "zg" (
set OEM_DIR=unis
set CL=/DOEM_ZIGUANG /DPRODUCT_ID=%PID%
set NAME=unis%NAME%
goto oem
)
if "%OEM%" equ "cts" (
set OEM_DIR=cumtenn
set CL=/DOEM_CANGTIAN /DPRODUCT_ID=%PID%

View File

@ -51,8 +51,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 4,34,10000,22310
PRODUCTVERSION 4,34,10000,22310
FILEVERSION 4,40,17100,23069
PRODUCTVERSION 4,40,17100,23069
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -69,12 +69,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "宁波华高信息科技有限公司"
VALUE "FileDescription", "华高扫描仪应用程序"
VALUE "FileVersion", "4.34.10000.22310"
VALUE "FileVersion", "4.40.17100.23069"
VALUE "InternalName", "scanner.dll"
VALUE "LegalCopyright", "Copyright (C) HUAGOScan 2022"
VALUE "LegalCopyright", "Copyright (C) HUAGOScan 2023"
VALUE "OriginalFilename", "scanner.dll"
VALUE "ProductName", "HUAGOScan"
VALUE "ProductVersion", "4.34.10000.22310"
VALUE "ProductVersion", "4.40.17100.23069"
END
END
BLOCK "VarFileInfo"

View File

@ -5,23 +5,23 @@ EXPORTS
is_scanner_online
uninitialize
log_info
sane_hgsane_init
sane_hgsane_exit
sane_hgsane_get_devices
sane_hgsane_open
sane_hgsane_close
sane_hgsane_get_option_descriptor
sane_hgsane_control_option
sane_hgsane_get_parameters
sane_hgsane_start
sane_hgsane_read
sane_hgsane_cancel
sane_hgsane_set_io_mode
sane_hgsane_get_select_fd
sane_hgsane_strstatus
sane_hgsane_init_ex
sane_hgsane_io_control
sane_hgsane_err_desc
sane_hgsane_get_option_descriptor_ex
sane_hgsane_control_option_ex
sane_hgsane_read_ext_info
sane_unissane_init
sane_unissane_exit
sane_unissane_get_devices
sane_unissane_open
sane_unissane_close
sane_unissane_get_option_descriptor
sane_unissane_control_option
sane_unissane_get_parameters
sane_unissane_start
sane_unissane_read
sane_unissane_cancel
sane_unissane_set_io_mode
sane_unissane_get_select_fd
sane_unissane_strstatus
sane_unissane_init_ex
sane_unissane_io_control
sane_unissane_err_desc
sane_unissane_get_option_descriptor_ex
sane_unissane_control_option_ex
sane_unissane_read_ext_info

Binary file not shown.

View File

@ -17,6 +17,7 @@ enum oem
OEM_LISICHENG,
OEM_CANGTIAN,
OEM_ZHONGJING,
OEM_ZIGUANG
};
#define GET_ENUM_NAME_W(e, v) \
if(e == v) return L###e;
@ -96,6 +97,8 @@ int main()
vendor = OEM_CANGTIAN;
else if (wcsicmp(cmd->parameter(L"-oem"), L"zj") == 0)
vendor = OEM_ZHONGJING;
else if (wcsicmp(cmd->parameter(L"-oem"), L"zg") == 0)
vendor = OEM_ZIGUANG;
else
std::wcout << L" OEM '" << cmd->parameter(L"-oem") << L"' is not supported! set as OEM_NONE.\r\n";
}
@ -144,6 +147,7 @@ static std::wstring oem_str(oem o)
GET_ENUM_NAME_W(OEM_LISICHENG, o);
GET_ENUM_NAME_W(OEM_CANGTIAN, o);
GET_ENUM_NAME_W(OEM_ZHONGJING, o);
GET_ENUM_NAME_W(OEM_ZIGUANG, o);
}
static oem from_str(const wchar_t* str)
{
@ -153,6 +157,7 @@ static oem from_str(const wchar_t* str)
GET_ENUM_VALUE_W(OEM_LISICHENG, s);
GET_ENUM_VALUE_W(OEM_CANGTIAN, s);
GET_ENUM_VALUE_W(OEM_ZHONGJING, s);
GET_ENUM_VALUE_W(OEM_ZIGUANG, s);
return OEM_NOT;
}
static int oem_code(oem o)
@ -165,6 +170,8 @@ static int oem_code(oem o)
return 18;
else if (o == OEM_ZHONGJING)
return 20;
else if (o == OEM_ZIGUANG)
return 17;
else
return 10;
}
@ -178,6 +185,8 @@ static oem oem_from_code(int code)
return OEM_CANGTIAN;
else if (code == 20)
return OEM_ZHONGJING;
else if (code == 17)
return OEM_ZIGUANG;
else
return OEM_NONE;
}
@ -745,6 +754,8 @@ namespace rc
os = L"cumtenn";
else if (o == OEM_ZHONGJING)
os = L"microtek";
else if (o == OEM_ZIGUANG)
os = L"unis";
while (len > bgn)
{
bgn += first.length();
@ -774,6 +785,8 @@ namespace rc
os = L"cumtenn";
else if (o == OEM_ZHONGJING)
os = L"microtek";
else if (o == OEM_ZIGUANG)
os = L"unis";
while (len > bgn)
{
bgn += first.length();
@ -944,6 +957,8 @@ namespace rc
backend = L"cts";
else if (o == OEM_ZHONGJING)
backend = L"zj";
else if (o == OEM_ZIGUANG)
backend = L"unis";
else
backend = L"hg";
backend += L"sane";
@ -1007,6 +1022,8 @@ namespace rc
backend.insert(0, L"_cts");
else if (o == OEM_ZHONGJING)
backend.insert(0, L"_zj");
else if (o == OEM_ZIGUANG)
backend.insert(0, L"_unis");
else
backend.insert(0, L"_hg");
@ -1026,7 +1043,13 @@ namespace rc
{
prev = L"_zjsane_";
if (cont.find(prev) == std::wstring::npos)
return false;
{
prev = L"_unissane_";
if (cont.find(prev) == std::wstring::npos)
{
return false;
}
}
}
}
@ -1056,6 +1079,8 @@ namespace rc
backend.insert(0, L"cts");
else if (o == OEM_ZHONGJING)
backend.insert(0, L"zj");
else if (o == OEM_ZIGUANG)
backend.insert(0, L"unis");
else
backend.insert(0, L"hg");
@ -1072,9 +1097,14 @@ namespace rc
{
prev = L"cts_scanner_";
if (cont.find(prev) == std::wstring::npos)
return false;
{
prev = L"unis_scanner_";
if (cont.find(prev) == std::wstring::npos)
{
return false;
}
}
}
}
}
@ -1103,6 +1133,8 @@ namespace rc
target += L"cumtenn\\";
else if (o == OEM_ZHONGJING)
target += L"microtek\\";
else if (o == OEM_ZIGUANG)
target += L"unis\\";
else
target += L"huagao\\";
@ -1136,6 +1168,8 @@ namespace rc
target = L"cumtenn";
else if (param->o == OEM_ZHONGJING)
target = L"microtek";
else if (param->o == OEM_ZIGUANG)
target = L"unis";
target += tail;
while ((bgn = cont.find(first, bgn)) != std::wstring::npos)