Merge branch 'dev' of http://192.168.10.5:8099/sane/code_twain into dev
This commit is contained in:
commit
6350c2fe1d
|
@ -100,18 +100,18 @@ rem ----------------------------------------------------------------------------
|
|||
mkdir %LIB_PATH%
|
||||
mkdir %COMMON_LIB_PATH%
|
||||
|
||||
MSBuild.exe "%~dp0\lang\lang.vcxproj" /p:Configuration=Release /p:Platform=%CPU% /p:IntDir=%TMP_PATH%\lang\ /p:OutDir=%BIN_PATH%\
|
||||
MSBuild.exe "%~dp0\lang\yuyanbao.vcxproj" /p:Configuration=Release /p:Platform=%CPU% /p:IntDir=%TMP_PATH%\lang\ /p:OutDir=%BIN_PATH%\
|
||||
if %ERRORLEVEL% neq 0 goto end
|
||||
call :move_libs %BIN_PATH% lang %LIB_PATH%
|
||||
copy /y %LIB_PATH%\lang.lib %COMMON_LIB_PATH%
|
||||
MSBuild.exe "%~dp0\device\scanner.vcxproj" /p:Configuration=Release /p:Platform=%CPU% /p:IntDir=%TMP_PATH%\scanner\ /p:OutDir=%BIN_PATH%\
|
||||
call :move_libs %BIN_PATH% yuyanbao %LIB_PATH%
|
||||
copy /y %LIB_PATH%\yuyanbao.lib %COMMON_LIB_PATH%
|
||||
MSBuild.exe "%~dp0\device\scannerqd.vcxproj" /p:Configuration=Release /p:Platform=%CPU% /p:IntDir=%TMP_PATH%\scanner\ /p:OutDir=%BIN_PATH%\
|
||||
if %ERRORLEVEL% neq 0 goto end
|
||||
call :move_libs %BIN_PATH% scanner %LIB_PATH%
|
||||
copy /y %LIB_PATH%\scanner.lib %COMMON_LIB_PATH%
|
||||
MSBuild.exe "%~dp0\sane\sane.vcxproj" /p:Configuration=Release /p:Platform=%CPU% /p:IntDir=%TMP_PATH%\sane\ /p:OutDir=%BIN_PATH%\
|
||||
call :move_libs %BIN_PATH% scannerqd %LIB_PATH%
|
||||
copy /y %LIB_PATH%\scannerqd.lib %COMMON_LIB_PATH%
|
||||
MSBuild.exe "%~dp0\sane\sanexy.vcxproj" /p:Configuration=Release /p:Platform=%CPU% /p:IntDir=%TMP_PATH%\sane\ /p:OutDir=%BIN_PATH%\
|
||||
if %ERRORLEVEL% neq 0 goto end
|
||||
call :move_libs %BIN_PATH% sane %LIB_PATH%
|
||||
copy /y %LIB_PATH%\sane.lib %COMMON_LIB_PATH%
|
||||
call :move_libs %BIN_PATH% sanexy %LIB_PATH%
|
||||
copy /y %LIB_PATH%\sanexy.lib %COMMON_LIB_PATH%
|
||||
goto end
|
||||
|
||||
REM move_libs src_dir src_name dst_dir
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
LIBRARY scanner
|
||||
LIBRARY scannerqd
|
||||
EXPORTS
|
||||
hg_scanner_initialize
|
||||
hg_scanner_uninitialize
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by scanner.rc
|
||||
// Microsoft Visual C++ 生成的包含文件。
|
||||
// 供 scannerqd.rc 使用
|
||||
//
|
||||
|
||||
// 新对象的下一组默认值
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LocalDebuggerCommand>C:\Program Files\HuaGoScan\HuaGoScan.exe</LocalDebuggerCommand>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -70,9 +70,9 @@ BEGIN
|
|||
VALUE "CompanyName", "宁波华高信息科技有限公司"
|
||||
VALUE "FileDescription", "华高扫描仪应用程序"
|
||||
VALUE "FileVersion", "4.40.17100.23069"
|
||||
VALUE "InternalName", "scanner.dll"
|
||||
VALUE "InternalName", "scannerqd.dll"
|
||||
VALUE "LegalCopyright", "Copyright (C) HUAGOScan 2023"
|
||||
VALUE "OriginalFilename", "scanner.dll"
|
||||
VALUE "OriginalFilename", "scannerqd.dll"
|
||||
VALUE "ProductName", "HUAGOScan"
|
||||
VALUE "ProductVersion", "4.40.17100.23069"
|
||||
END
|
|
@ -22,7 +22,7 @@
|
|||
<VCProjectVersion>16.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{9ed4b425-73e0-423e-9712-455e777481b4}</ProjectGuid>
|
||||
<RootNamespace>scanner</RootNamespace>
|
||||
<RootNamespace>scannerqd</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
|
@ -118,7 +118,8 @@
|
|||
</IgnoreAllDefaultLibraries>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>copy "$(TargetPath)" C:\Windows\twain_32\HuagoTwain\ /Y </Command>
|
||||
<Command>copy "$(TargetPath)" C:\Windows\twain_32\HuagoTwain\ /Y
|
||||
$(SolutionDir)movlib.bat $(TargetName) $(PlatformTarget) huagao</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
|
@ -347,7 +348,7 @@
|
|||
<Text Include="..\..\code_device\hgdriver\wrapper\CMakeLists.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="scanner.rc" />
|
||||
<ResourceCompile Include="scannerqd.rc" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
|
@ -453,7 +453,7 @@
|
|||
<Text Include="..\..\code_device\hgdriver\wrapper\CMakeLists.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="scanner.rc">
|
||||
<ResourceCompile Include="scannerqd.rc">
|
||||
<Filter>资源文件</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
|
@ -1,4 +1,4 @@
|
|||
LIBRARY lang
|
||||
LIBRARY yuyanbao
|
||||
EXPORTS
|
||||
lang_initialize
|
||||
lang_get_supported_languages
|
|
@ -22,14 +22,14 @@
|
|||
<VCProjectVersion>16.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{7776ab6d-6296-4f7a-a6ed-e9a4d6290dd9}</ProjectGuid>
|
||||
<RootNamespace>lang</RootNamespace>
|
||||
<RootNamespace>yuyanbao</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
|
@ -103,11 +103,11 @@
|
|||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableUAC>false</EnableUAC>
|
||||
<ModuleDefinitionFile>lang.def</ModuleDefinitionFile>
|
||||
<ModuleDefinitionFile>yuyanbao.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
<Command>copy "$(TargetPath)" C:\Windows\twain_32\HuagoTwain\ /Y
|
||||
$(SolutionDir)movlib.bat $(TargetName) $(PlatformTarget) huagao</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
|
@ -128,7 +128,7 @@
|
|||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableUAC>false</EnableUAC>
|
||||
<ModuleDefinitionFile>lang.def</ModuleDefinitionFile>
|
||||
<ModuleDefinitionFile>yuyanbao.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
|
@ -148,7 +148,7 @@
|
|||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableUAC>false</EnableUAC>
|
||||
<ModuleDefinitionFile>lang.def</ModuleDefinitionFile>
|
||||
<ModuleDefinitionFile>yuyanbao.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
|
@ -173,7 +173,7 @@
|
|||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableUAC>false</EnableUAC>
|
||||
<ModuleDefinitionFile>lang.def</ModuleDefinitionFile>
|
||||
<ModuleDefinitionFile>yuyanbao.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
|
@ -202,7 +202,7 @@
|
|||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="lang.def" />
|
||||
<None Include="yuyanbao.def" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
|
@ -43,7 +43,7 @@
|
|||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="lang.def">
|
||||
<None Include="yuyanbao.def">
|
||||
<Filter>源文件</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
|
@ -1,6 +1,6 @@
|
|||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ 生成的包含文件。
|
||||
// 供 sane.rc 使用
|
||||
// 供 sanexy.rc 使用
|
||||
//
|
||||
#define IDCANCEL2 3
|
||||
#define IDD_INDICATOR 101
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
</Project>
|
|
@ -214,6 +214,15 @@ namespace sane_opt_trans
|
|||
{
|
||||
VALUE_TO_TWAIN(g_paper_map, val);
|
||||
|
||||
std::string lat("\xe6\xa8\xaa\xe5\x90\x91"), // 横向
|
||||
v(to_default_language(val, nullptr));
|
||||
size_t pos = v.find(lat);
|
||||
if (pos != std::string::npos)
|
||||
{
|
||||
v.erase(pos, lat.length());
|
||||
VALUE_TO_TWAIN(g_paper_map, v.c_str());
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
const char* switch_paper_lateral(const char* val)
|
||||
|
|
|
@ -367,9 +367,9 @@ BEGIN
|
|||
VALUE "CompanyName", "上海中晶科技有限公司"
|
||||
VALUE "FileDescription", "中晶扫描仪应用程序"
|
||||
VALUE "FileVersion", "4.37.20000.23034"
|
||||
VALUE "InternalName", "sane.dll"
|
||||
VALUE "InternalName", "sanexy.dll"
|
||||
VALUE "LegalCopyright", "Copyright (C) MICROTEKScan 2023"
|
||||
VALUE "OriginalFilename", "sane.dll"
|
||||
VALUE "OriginalFilename", "sanexy.dll"
|
||||
VALUE "ProductName", "MICROTEKScan"
|
||||
VALUE "ProductVersion", "4.37.20000.23034"
|
||||
END
|
|
@ -22,9 +22,9 @@
|
|||
<VCProjectVersion>16.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{6eec8a02-7f98-4422-8ed6-2434d43bd1e1}</ProjectGuid>
|
||||
<RootNamespace>sane</RootNamespace>
|
||||
<RootNamespace>sanexy</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
<ProjectName>sane</ProjectName>
|
||||
<ProjectName>sanexy</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
|
@ -113,12 +113,13 @@
|
|||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ModuleDefinitionFile>$(ProjectDir)sane.def</ModuleDefinitionFile>
|
||||
<ModuleDefinitionFile>$(ProjectDir)sanexy.def</ModuleDefinitionFile>
|
||||
<AdditionalManifestDependencies>
|
||||
</AdditionalManifestDependencies>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>copy "$(TargetPath)" C:\Windows\twain_32\HuagoTwain\$(TargetName) /y</Command>
|
||||
<Command>copy "$(TargetPath)" C:\Windows\twain_32\HuagoTwain\ /Y
|
||||
$(SolutionDir)movlib.bat $(TargetName) $(PlatformTarget) huagao</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
|
@ -139,7 +140,7 @@
|
|||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ModuleDefinitionFile>$(ProjectDir)sane.def</ModuleDefinitionFile>
|
||||
<ModuleDefinitionFile>$(ProjectDir)sanexy.def</ModuleDefinitionFile>
|
||||
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
|
@ -159,8 +160,8 @@
|
|||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>scanner.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ModuleDefinitionFile>$(ProjectDir)sane.def</ModuleDefinitionFile>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ModuleDefinitionFile>$(ProjectDir)sanexy.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
|
@ -183,8 +184,8 @@
|
|||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>scanner.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ModuleDefinitionFile>$(ProjectDir)sane.def</ModuleDefinitionFile>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ModuleDefinitionFile>$(ProjectDir)sanexy.def</ModuleDefinitionFile>
|
||||
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
|
@ -243,13 +244,13 @@
|
|||
<ClInclude Include="scanner.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="sane.def" />
|
||||
<None Include="sanexy.def" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="..\..\code_device\hgsane\CMakeLists.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="sane.rc" />
|
||||
<ResourceCompile Include="sanexy.rc" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
|
@ -163,7 +163,7 @@
|
|||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="sane.def">
|
||||
<None Include="sanexy.def">
|
||||
<Filter>源文件</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
@ -171,7 +171,7 @@
|
|||
<Text Include="..\..\code_device\hgsane\CMakeLists.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="sane.rc">
|
||||
<ResourceCompile Include="sanexy.rc">
|
||||
<Filter>资源文件</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
|
@ -1588,6 +1588,7 @@ int scanner::set_is_multiout(bool enable)
|
|||
int scanner::thread_start(void)
|
||||
{
|
||||
scan_over_ = false;
|
||||
double_handle_ = DOUBLE_FEED_NEED_UI;
|
||||
|
||||
int ret = hg_sane_middleware::instance()->start(handle_, NULL);
|
||||
|
||||
|
@ -1949,6 +1950,7 @@ EX_OPTION_HANDLER_IMPL(paper)
|
|||
int now = sane_opt_trans::paper_to_twain(buf),
|
||||
init = sane_opt_trans::paper_to_twain(def),
|
||||
val = 0;
|
||||
std::vector<int> exists;
|
||||
|
||||
local_utility::free_memory(def);
|
||||
do
|
||||
|
@ -1959,8 +1961,10 @@ EX_OPTION_HANDLER_IMPL(paper)
|
|||
{
|
||||
value_role role = VAL_ROLE_NONE;
|
||||
val = sane_opt_trans::paper_to_twain(desc->constraint.string_list[i]);
|
||||
if (val == -1)
|
||||
if (val == -1 || std::find(exists.begin(), exists.end(), val) != exists.end())
|
||||
continue;
|
||||
|
||||
exists.push_back(val);
|
||||
if (val == now)
|
||||
role = VAL_ROLE_CURRENT;
|
||||
if (val == init)
|
||||
|
@ -3576,15 +3580,23 @@ int scanner::handle_device_event(int ev_code, void* data, unsigned int* len)
|
|||
|
||||
if (simg->flag.statu && callback::abnormal_image)
|
||||
{
|
||||
if (callback::abnormal_image(simg) == SANE_Abnormal_Image_Discard)
|
||||
if (double_handle_ == DOUBLE_FEED_NEED_UI)
|
||||
{
|
||||
wchar_t info[128] = { 0 };
|
||||
if (callback::abnormal_image(simg) == SANE_Abnormal_Image_Discard)
|
||||
{
|
||||
wchar_t info[128] = { 0 };
|
||||
|
||||
swprintf_s(info, _countof(info) - 1, L"Discard image %d for the status is: %d\r\n", simg->src_id, simg->flag.statu);
|
||||
log_info(info, LOG_LEVEL_DEBUG_INFO);
|
||||
swprintf_s(info, _countof(info) - 1, L"Discard image %d for the status is: %d\r\n", simg->src_id, simg->flag.statu);
|
||||
log_info(info, LOG_LEVEL_DEBUG_INFO);
|
||||
|
||||
return 0;
|
||||
double_handle_ = DOUBLE_FEED_DISCARD;
|
||||
}
|
||||
else
|
||||
double_handle_ = DOUBLE_FEED_KEEP;
|
||||
}
|
||||
|
||||
if (double_handle_ == DOUBLE_FEED_DISCARD)
|
||||
return 0;
|
||||
}
|
||||
|
||||
swprintf_s(name, _countof(name) - 1, L"img_%05u.bmp", ++img_ind_);
|
||||
|
|
|
@ -40,6 +40,13 @@ class scanner : public ISaneInvoker, virtual public refer
|
|||
int bytes;
|
||||
}SIMPLEOPT;
|
||||
|
||||
enum
|
||||
{
|
||||
DOUBLE_FEED_NEED_UI = 0, // 需要用户抉择
|
||||
DOUBLE_FEED_KEEP, // 用户选择保存
|
||||
DOUBLE_FEED_DISCARD, // 用户选择丢弃
|
||||
};
|
||||
|
||||
SANE_Handle handle_;
|
||||
SCANNERID id_;
|
||||
int err_;
|
||||
|
@ -47,6 +54,7 @@ class scanner : public ISaneInvoker, virtual public refer
|
|||
int prev_start_result_;
|
||||
int dpi_;
|
||||
int fetch_imgs_ = 0; // count for images has fetched by APP
|
||||
int double_handle_ = DOUBLE_FEED_NEED_UI; //
|
||||
bool is_bIndicator;
|
||||
bool is_show_setting_;
|
||||
unsigned int img_ind_;
|
||||
|
|
Binary file not shown.
|
@ -3,17 +3,26 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
|||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.33214.272
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sane", "..\sane\sane.vcxproj", "{6EEC8A02-7F98-4422-8ED6-2434D43BD1E1}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sanexy", "..\sane\sanexy.vcxproj", "{6EEC8A02-7F98-4422-8ED6-2434D43BD1E1}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{9ED4B425-73E0-423E-9712-455E777481B4} = {9ED4B425-73E0-423E-9712-455E777481B4}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "scanner", "..\device\scanner.vcxproj", "{9ED4B425-73E0-423E-9712-455E777481B4}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "scannerqd", "..\device\scannerqd.vcxproj", "{9ED4B425-73E0-423E-9712-455E777481B4}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{7776AB6D-6296-4F7A-A6ED-E9A4D6290DD9} = {7776AB6D-6296-4F7A-A6ED-E9A4D6290DD9}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "twain", "..\twain\twain.vcxproj", "{C3B47CE2-27CE-4509-AB59-3C0F194F0FCE}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{6EEC8A02-7F98-4422-8ED6-2434D43BD1E1} = {6EEC8A02-7F98-4422-8ED6-2434D43BD1E1}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "setup", "setup", "{F6774650-403F-476C-8373-2EA8D4AF06FF}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hgsetver", "hgsetver\hgsetver.vcxproj", "{A7528596-FBA2-4FFF-8649-C8D0EEBC6554}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lang", "..\lang\lang.vcxproj", "{7776AB6D-6296-4F7A-A6ED-E9A4D6290DD9}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "yuyanbao", "..\lang\yuyanbao.vcxproj", "{7776AB6D-6296-4F7A-A6ED-E9A4D6290DD9}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
|
|
@ -1373,12 +1373,12 @@ static bool set_ver(const wchar_t* file, oem vendor, bool x86, int pid, int main
|
|||
//if (!rc::change_vcxproj_predefine(rcf.c_str(), vendor))
|
||||
// std::wcout << "change predefines failed: " << rcf.c_str() << std::endl;
|
||||
|
||||
rcf = base + L"\\..\\sane\\sane.rc";
|
||||
rcf = base + L"\\..\\sane\\sanexy.rc";
|
||||
STR_SIMPLIFY_PATH(rcf);
|
||||
if (!rc::set_rc_ver(rcf.c_str(), main, sub, build, patch, cn.c_str(), scn.c_str(), vs.c_str()))
|
||||
std::wcout << "change version failed: " << rcf.c_str() << std::endl;
|
||||
|
||||
rcf = base + L"\\..\\sane\\sane.def";
|
||||
rcf = base + L"\\..\\sane\\sanexy.def";
|
||||
STR_SIMPLIFY_PATH(rcf);
|
||||
if (!rc::change_file(rcf.c_str(), ¶m, rc::change_sane_def))
|
||||
std::wcout << "change exporting-definition failed: " << rcf.c_str() << std::endl;
|
||||
|
@ -1388,7 +1388,7 @@ static bool set_ver(const wchar_t* file, oem vendor, bool x86, int pid, int main
|
|||
//if (!rc::change_vcxproj_predefine(rcf.c_str(), vendor))
|
||||
// std::wcout << "change predefines failed: " << rcf.c_str() << std::endl;
|
||||
|
||||
rcf = base + L"\\..\\device\\scanner.rc";
|
||||
rcf = base + L"\\..\\device\\scannerqd.rc";
|
||||
STR_SIMPLIFY_PATH(rcf);
|
||||
if (!rc::set_rc_ver(rcf.c_str(), main, sub, build, patch, cn.c_str(), scn.c_str(), vs.c_str()))
|
||||
std::wcout << "change version failed: " << rcf.c_str() << std::endl;
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
# movlib proj-name cpu oem
|
||||
|
||||
set NAME=%1
|
||||
set CPU=%2
|
||||
set OEM=%3
|
||||
set SRCDIR=%~dp0\..\..\release\win\%CPU%\OEM\%OEM%\
|
||||
set DSTDIR=%~dp0\..\..\sdk\lib\win\%CPU%\OEM\%OEM%\
|
||||
|
||||
mkdir "%DSTDIR%"
|
||||
move /y "%SRCDIR%\%NAME%.exp" "%DSTDIR%"
|
||||
move /y "%SRCDIR%\%NAME%.lib" "%DSTDIR%"
|
||||
move /y "%SRCDIR%\%NAME%.pdb" "%DSTDIR%"
|
|
@ -147,7 +147,7 @@ namespace load_sane_util
|
|||
sane_path = reg_get_app_installing_path(®_path);
|
||||
if (!sane_path.empty())
|
||||
{
|
||||
sane_path += L"\\sane.dll";
|
||||
sane_path += /*L"\\sane.dll";*/ L"\\" + m2u(MODULE_NAME_SANE, CP_UTF8);
|
||||
load_dll(sane_path.c_str(), &sane_module);
|
||||
if (sane_module)
|
||||
{
|
||||
|
|
|
@ -601,6 +601,20 @@ static void copy_type(std::string& to, Str64 from)
|
|||
{
|
||||
to = load_sane_util::ansi2utf8(from.data());
|
||||
}
|
||||
static std::wstring scanner_status_desc(int ss)
|
||||
{
|
||||
#define RETURN_IF_MATCH(v) \
|
||||
if(ss == v) \
|
||||
return L###v;
|
||||
|
||||
RETURN_IF_MATCH(SCANNER_STATUS_NOT_INIT);
|
||||
RETURN_IF_MATCH(SCANNER_STATUS_READY);
|
||||
RETURN_IF_MATCH(SCANNER_STATUS_SCAN_1);
|
||||
RETURN_IF_MATCH(SCANNER_STATUS_SCANNING);
|
||||
RETURN_IF_MATCH(SCANNER_STATUS_STOPPED);
|
||||
|
||||
return std::move(L"unknown statu " + std::to_wstring(ss));
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
bool list_value_at(std::list<T>& lst, int ind, T& t)
|
||||
|
@ -1060,6 +1074,8 @@ Result huagao_ds::identityOpenDs(const Identity& id)
|
|||
}
|
||||
Result huagao_ds::identityCloseDs(const Identity&)
|
||||
{
|
||||
load_sane_util::to_log(1, L"identityCloseDs, scanner status is '%s'\r\n", scanner_status_desc(scanner_status_).c_str());
|
||||
|
||||
if (notify_close_thread_.get() && notify_close_thread_->joinable())
|
||||
notify_close_thread_->join();
|
||||
|
||||
|
@ -2576,13 +2592,13 @@ void huagao_ds::init_support_caps(void)
|
|||
if (Msg::Set == msg) {
|
||||
auto autodetectborder = data.currentItem<CapType::IAutomaticBorderDetection>();
|
||||
int ret = SCANNER_ERR_OK;
|
||||
SET_SANE_OPT_EX(ret, scanner_, is_size_check, (bool*)&autodetectborder);
|
||||
SET_SANE_OPT_EX(ret, scanner_, ex_auto_paper_size, (bool*)&autodetectborder);
|
||||
return ret == SCANNER_ERR_OK ? success() : badValue();
|
||||
}
|
||||
Bool init = false,
|
||||
erase = false;
|
||||
std::vector<bool> all;
|
||||
GET_SANE_OPT_EX(bool, scanner_, is_size_check, NULL, &all);
|
||||
GET_SANE_OPT_EX(bool, scanner_, ex_auto_paper_size, NULL, &all);
|
||||
init = (bool)all[sane_opts::RANGE_POS_DEFAULT];
|
||||
erase = (bool)all[sane_opts::RANGE_POS_CURRENT];
|
||||
return CapSupGetAllReset<Bool, Bool, CapType::IAutomaticBorderDetection>(msg, data, { false,true }, erase, init, erase ? 1 : 0, 0);
|
||||
|
|
Loading…
Reference in New Issue