summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-12-28 20:23:02 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2018-12-29 09:58:09 +0100
commit648f24f5d1dae3f0fd5b132d68a5e39066f2572d (patch)
tree68a56efb90d57d8e33af2a190d09fbd1f570e413 /external
parentc3c2ac6afad6b154d83dbe555f5b276e5909718b (diff)
tdf#114635: reimplement TWAIN-based scan using 32-bit shim on Windows
Since TWAIN is only actually available as 32-bit component on Windows, to use it in a 64-bit program, we need a 32-bit shim program that does all actual communication with TWAIN subsystem. This change reimplements TWAIN implementation to be a separate 32-bit process. Image is transfered from the shim to main program using file mapping API. This reverts most of commit 585d9806961342e95f7318fb947bd31e9f86dee0. 64-bit LibreOffice doesn't bundle TWAIN DSM library now. TWAIN DSM source code is still used for TWAIN headers. Change-Id: I46f178ad36acd97a9eff156624b99036fcbb83f8 Reviewed-on: https://gerrit.libreoffice.org/65688 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'external')
-rw-r--r--external/twain_dsm/ExternalPackage_twain_dsm.mk20
-rw-r--r--external/twain_dsm/ExternalProject_twain_dsm.mk33
-rw-r--r--external/twain_dsm/Module_twain_dsm.mk8
-rw-r--r--external/twain_dsm/TWAIN_DSM_VS2015.vcxproj.filters.patch54
-rw-r--r--external/twain_dsm/TWAIN_DSM_VS2015.vcxproj.patch265
-rw-r--r--external/twain_dsm/UnpackedTarball_twain_dsm.mk9
-rw-r--r--external/twain_dsm/fix-non-us-ascii-chars-part1.patch26
-rw-r--r--external/twain_dsm/fix-non-us-ascii-chars-part2.patch44
8 files changed, 2 insertions, 457 deletions
diff --git a/external/twain_dsm/ExternalPackage_twain_dsm.mk b/external/twain_dsm/ExternalPackage_twain_dsm.mk
deleted file mode 100644
index a2d1bb2ad32e..000000000000
--- a/external/twain_dsm/ExternalPackage_twain_dsm.mk
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-$(eval $(call gb_ExternalPackage_ExternalPackage,twain_dsm,twain_dsm))
-
-$(eval $(call gb_ExternalPackage_use_external_project,twain_dsm,twain_dsm))
-
-ifeq ($(OS),WNT)
-$(eval $(call gb_ExternalPackage_add_file,twain_dsm,$(LIBO_BIN_FOLDER)/TWAINDSM.dll,PCBuild/out/TWAINDSM.dll))
-endif
-
-# headers are not delivered, but used from unpacked dir pub/include/
-
-# vim: set noet sw=4 ts=4:
diff --git a/external/twain_dsm/ExternalProject_twain_dsm.mk b/external/twain_dsm/ExternalProject_twain_dsm.mk
deleted file mode 100644
index f1e2285f7583..000000000000
--- a/external/twain_dsm/ExternalProject_twain_dsm.mk
+++ /dev/null
@@ -1,33 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-$(eval $(call gb_ExternalProject_ExternalProject,twain_dsm))
-
-$(eval $(call gb_ExternalProject_use_unpacked,twain_dsm,twain_dsm))
-
-$(eval $(call gb_ExternalProject_register_targets,twain_dsm,\
- build \
-))
-
-ifeq ($(OS),WNT)
-
-$(call gb_ExternalProject_get_state_target,twain_dsm,build) :
- $(call gb_ExternalProject_run,build,\
- MSBuild.exe visual_studio/TWAIN_DSM_VS2015.sln /t:Build \
- /p:Configuration=$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release) \
- /p:Platform=$(if $(filter INTEL,$(CPUNAME)),Win32,x64) \
- /p:OutDir=../PCBuild/out/ /p:IntDir=../PCBuild/obj/ \
- $(if $(filter 140,$(VCVER)),/p:PlatformToolset=v140 /p:VisualStudioVersion=14.0 /ToolsVersion:14.0) \
- $(if $(filter 150,$(VCVER)),/p:PlatformToolset=v141 /p:VisualStudioVersion=15.0 /ToolsVersion:15.0) \
- $(if $(filter 150-10,$(VCVER)-$(WINDOWS_SDK_VERSION)),/p:WindowsTargetPlatformVersion=$(UCRTVERSION)) \
- )
-
-endif
-
-# vim: set noet sw=4 ts=4:
diff --git a/external/twain_dsm/Module_twain_dsm.mk b/external/twain_dsm/Module_twain_dsm.mk
index 10db9b9a4dac..bbaedb77b5d0 100644
--- a/external/twain_dsm/Module_twain_dsm.mk
+++ b/external/twain_dsm/Module_twain_dsm.mk
@@ -10,15 +10,11 @@
$(eval $(call gb_Module_Module,twain_dsm))
ifeq ($(OS),WNT)
-
+ifeq ($(BUILD_X86),TRUE)
$(eval $(call gb_Module_add_targets,twain_dsm,\
UnpackedTarball_twain_dsm \
- $(if $(filter X86_64,$(CPUNAME)), \
- ExternalProject_twain_dsm \
- ExternalPackage_twain_dsm \
- ) \
))
-
+endif
endif
# vim: set noet sw=4 ts=4:
diff --git a/external/twain_dsm/TWAIN_DSM_VS2015.vcxproj.filters.patch b/external/twain_dsm/TWAIN_DSM_VS2015.vcxproj.filters.patch
deleted file mode 100644
index e73ae63dc855..000000000000
--- a/external/twain_dsm/TWAIN_DSM_VS2015.vcxproj.filters.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-diff --git a/visual_studio/TWAIN_DSM_VS2015.vcxproj.filters b/visual_studio/TWAIN_DSM_VS2015.vcxproj.filters
-new file mode 100755
-index 000000000000..a17a30d0097f
---- /dev/null
-+++ b/visual_studio/TWAIN_DSM_VS2015.vcxproj.filters
-@@ -0,0 +1,47 @@
-+<?xml version="1.0" encoding="utf-8"?>
-+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-+ <ItemGroup>
-+ <Filter Include="Source Files">
-+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
-+ <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
-+ </Filter>
-+ <Filter Include="Header Files">
-+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
-+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
-+ </Filter>
-+ <Filter Include="Resource Files">
-+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
-+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx</Extensions>
-+ </Filter>
-+ </ItemGroup>
-+ <ItemGroup>
-+ <ClCompile Include="..\src\apps.cpp">
-+ <Filter>Source Files</Filter>
-+ </ClCompile>
-+ <ClCompile Include="..\src\dsm.cpp">
-+ <Filter>Source Files</Filter>
-+ </ClCompile>
-+ <ClCompile Include="..\src\hook.cpp">
-+ <Filter>Source Files</Filter>
-+ </ClCompile>
-+ <ClCompile Include="..\src\log.cpp">
-+ <Filter>Source Files</Filter>
-+ </ClCompile>
-+ </ItemGroup>
-+ <ItemGroup>
-+ <ClInclude Include="..\src\dsm.h">
-+ <Filter>Header Files</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\src\resource.h">
-+ <Filter>Header Files</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\src\twain.h">
-+ <Filter>Header Files</Filter>
-+ </ClInclude>
-+ </ItemGroup>
-+ <ItemGroup>
-+ <ResourceCompile Include="..\src\dsm.rc">
-+ <Filter>Resource Files</Filter>
-+ </ResourceCompile>
-+ </ItemGroup>
-+</Project>
-\ No newline at end of file
diff --git a/external/twain_dsm/TWAIN_DSM_VS2015.vcxproj.patch b/external/twain_dsm/TWAIN_DSM_VS2015.vcxproj.patch
deleted file mode 100644
index 40e131d2ad71..000000000000
--- a/external/twain_dsm/TWAIN_DSM_VS2015.vcxproj.patch
+++ /dev/null
@@ -1,265 +0,0 @@
-diff --git a/visual_studio/TWAIN_DSM_VS2015.vcxproj b/visual_studio/TWAIN_DSM_VS2015.vcxproj
-new file mode 100755
-index 000000000000..425c39966171
---- /dev/null
-+++ b/visual_studio/TWAIN_DSM_VS2015.vcxproj
-@@ -0,0 +1,258 @@
-+<?xml version="1.0" encoding="utf-8"?>
-+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-+ <ItemGroup Label="ProjectConfigurations">
-+ <ProjectConfiguration Include="Debug|Win32">
-+ <Configuration>Debug</Configuration>
-+ <Platform>Win32</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="Debug|x64">
-+ <Configuration>Debug</Configuration>
-+ <Platform>x64</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="Release|Win32">
-+ <Configuration>Release</Configuration>
-+ <Platform>Win32</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="Release|x64">
-+ <Configuration>Release</Configuration>
-+ <Platform>x64</Platform>
-+ </ProjectConfiguration>
-+ </ItemGroup>
-+ <PropertyGroup Label="Globals">
-+ <ProjectGuid>{5F73EBC7-6A0E-4CBF-A37C-CB167E4CC379}</ProjectGuid>
-+ <RootNamespace>TWAINDSM</RootNamespace>
-+ <Keyword>Win32Proj</Keyword>
-+ <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
-+ </PropertyGroup>
-+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-+ <ConfigurationType>DynamicLibrary</ConfigurationType>
-+ <CharacterSet>MultiByte</CharacterSet>
-+ <PlatformToolset>v140</PlatformToolset>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-+ <ConfigurationType>DynamicLibrary</ConfigurationType>
-+ <CharacterSet>MultiByte</CharacterSet>
-+ <PlatformToolset>v140</PlatformToolset>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
-+ <ConfigurationType>DynamicLibrary</ConfigurationType>
-+ <CharacterSet>MultiByte</CharacterSet>
-+ <PlatformToolset>v140</PlatformToolset>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
-+ <ConfigurationType>DynamicLibrary</ConfigurationType>
-+ <CharacterSet>MultiByte</CharacterSet>
-+ <PlatformToolset>v140</PlatformToolset>
-+ </PropertyGroup>
-+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
-+ <ImportGroup Label="ExtensionSettings">
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <PropertyGroup Label="UserMacros" />
-+ <PropertyGroup>
-+ <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)15_32\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)15_32\</IntDir>
-+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)15_64\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)15_64\</IntDir>
-+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)15_32\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)15_32\</IntDir>
-+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)15_64\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)15_64\</IntDir>
-+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-+ <TargetName>TWAINDSM</TargetName>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-+ <TargetName>TWAINDSM</TargetName>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-+ <TargetName>TWAINDSM</TargetName>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-+ <TargetName>TWAINDSM</TargetName>
-+ </PropertyGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-+ <PreBuildEvent>
-+ <Message>create pub folders if do not exist</Message>
-+ <Command>
-+ </Command>
-+ </PreBuildEvent>
-+ <ClCompile>
-+ <Optimization>Disabled</Optimization>
-+ <AdditionalIncludeDirectories>.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;TWAIN_DSM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <MinimalRebuild>true</MinimalRebuild>
-+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
-+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
-+ <PrecompiledHeader>
-+ </PrecompiledHeader>
-+ <WarningLevel>Level4</WarningLevel>
-+ <TreatWarningAsError>false</TreatWarningAsError>
-+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-+ </ClCompile>
-+ <Link>
-+ <OutputFile>$(OutDir)TWAINDSM.dll</OutputFile>
-+ <SuppressStartupBanner>true</SuppressStartupBanner>
-+ <AdditionalLibraryDirectories>..\..\pub\external\lib;..\..\pub\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
-+ <ModuleDefinitionFile>..\src\dsm.def</ModuleDefinitionFile>
-+ <GenerateDebugInformation>true</GenerateDebugInformation>
-+ <ProgramDatabaseFile>$(OutDir)TWAINDSM.pdb</ProgramDatabaseFile>
-+ <SubSystem>Windows</SubSystem>
-+ <RandomizedBaseAddress>true</RandomizedBaseAddress>
-+ <DataExecutionPrevention>true</DataExecutionPrevention>
-+ <ImportLibrary>$(OutDir)TWAINDSM.lib</ImportLibrary>
-+ <TargetMachine>MachineX86</TargetMachine>
-+ </Link>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-+ <PreBuildEvent>
-+ <Message>create pub folders if do not exist</Message>
-+ <Command>
-+ </Command>
-+ </PreBuildEvent>
-+ <Midl>
-+ <TargetEnvironment>X64</TargetEnvironment>
-+ </Midl>
-+ <ClCompile>
-+ <Optimization>Disabled</Optimization>
-+ <AdditionalIncludeDirectories>.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>_DEBUG;_WINDOWS;_USRDLL;TWAIN_DSM_EXPORTS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <MinimalRebuild>true</MinimalRebuild>
-+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
-+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
-+ <PrecompiledHeader>
-+ </PrecompiledHeader>
-+ <WarningLevel>Level4</WarningLevel>
-+ <TreatWarningAsError>false</TreatWarningAsError>
-+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-+ </ClCompile>
-+ <ResourceCompile>
-+ <PreprocessorDefinitions>_VC80_UPGRADE=0x0710;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ </ResourceCompile>
-+ <Link>
-+ <OutputFile>$(ProjectDir)\$(OutDir)TWAINDSM.dll</OutputFile>
-+ <SuppressStartupBanner>true</SuppressStartupBanner>
-+ <AdditionalLibraryDirectories>..\..\pub\external\lib;..\..\pub\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
-+ <ModuleDefinitionFile>..\src\dsm.def</ModuleDefinitionFile>
-+ <GenerateDebugInformation>true</GenerateDebugInformation>
-+ <ProgramDatabaseFile>$(OutDir)TWAINDSM.pdb</ProgramDatabaseFile>
-+ <SubSystem>Windows</SubSystem>
-+ <RandomizedBaseAddress>true</RandomizedBaseAddress>
-+ <DataExecutionPrevention>true</DataExecutionPrevention>
-+ <ImportLibrary>$(OutDir)TWAINDSM.lib</ImportLibrary>
-+ <TargetMachine>MachineX64</TargetMachine>
-+ </Link>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-+ <PreBuildEvent>
-+ <Message>create pub folders if do not exist</Message>
-+ <Command>
-+ </Command>
-+ </PreBuildEvent>
-+ <ClCompile>
-+ <AdditionalIncludeDirectories>.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;TWAIN_DSM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
-+ <PrecompiledHeader>
-+ </PrecompiledHeader>
-+ <WarningLevel>Level3</WarningLevel>
-+ <TreatWarningAsError>false</TreatWarningAsError>
-+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-+ </ClCompile>
-+ <Link>
-+ <OutputFile>$(OutDir)TWAINDSM.dll</OutputFile>
-+ <AdditionalLibraryDirectories>..\..\pub\external\lib;..\..\pub\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
-+ <ModuleDefinitionFile>..\src\dsm.def</ModuleDefinitionFile>
-+ <GenerateDebugInformation>true</GenerateDebugInformation>
-+ <SubSystem>Windows</SubSystem>
-+ <OptimizeReferences>true</OptimizeReferences>
-+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
-+ <RandomizedBaseAddress>true</RandomizedBaseAddress>
-+ <DataExecutionPrevention>true</DataExecutionPrevention>
-+ <ImportLibrary>$(OutDir)TWAINDSM.lib</ImportLibrary>
-+ <TargetMachine>MachineX86</TargetMachine>
-+ </Link>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-+ <PreBuildEvent>
-+ <Message>create pub folders if do not exist</Message>
-+ <Command>
-+ </Command>
-+ </PreBuildEvent>
-+ <Midl>
-+ <TargetEnvironment>X64</TargetEnvironment>
-+ </Midl>
-+ <ClCompile>
-+ <AdditionalIncludeDirectories>.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>NDEBUG;_WINDOWS;_USRDLL;TWAIN_DSM_EXPORTS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
-+ <PrecompiledHeader>
-+ </PrecompiledHeader>
-+ <WarningLevel>Level3</WarningLevel>
-+ <TreatWarningAsError>false</TreatWarningAsError>
-+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-+ </ClCompile>
-+ <ResourceCompile>
-+ <PreprocessorDefinitions>_VC80_UPGRADE=0x0710;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ </ResourceCompile>
-+ <Link>
-+ <OutputFile>$(ProjectDir)\$(OutDir)TWAINDSM.dll</OutputFile>
-+ <AdditionalLibraryDirectories>..\..\pub\external\lib;..\..\pub\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
-+ <ModuleDefinitionFile>..\src\dsm.def</ModuleDefinitionFile>
-+ <GenerateDebugInformation>true</GenerateDebugInformation>
-+ <SubSystem>Windows</SubSystem>
-+ <OptimizeReferences>true</OptimizeReferences>
-+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
-+ <RandomizedBaseAddress>true</RandomizedBaseAddress>
-+ <DataExecutionPrevention>true</DataExecutionPrevention>
-+ <ImportLibrary>$(OutDir)TWAINDSM.lib</ImportLibrary>
-+ <TargetMachine>MachineX64</TargetMachine>
-+ </Link>
-+ </ItemDefinitionGroup>
-+ <ItemGroup>
-+ <ClCompile Include="..\src\apps.cpp" />
-+ <ClCompile Include="..\src\dsm.cpp" />
-+ <ClCompile Include="..\src\hook.cpp" />
-+ <ClCompile Include="..\src\log.cpp" />
-+ </ItemGroup>
-+ <ItemGroup>
-+ <ClInclude Include="..\src\dsm.h" />
-+ <ClInclude Include="..\src\resource.h" />
-+ <ClInclude Include="..\src\twain.h" />
-+ </ItemGroup>
-+ <ItemGroup>
-+ <ResourceCompile Include="..\src\dsm.rc" />
-+ </ItemGroup>
-+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-+ <ImportGroup Label="ExtensionTargets">
-+ </ImportGroup>
-+</Project>
-\ No newline at end of file
diff --git a/external/twain_dsm/UnpackedTarball_twain_dsm.mk b/external/twain_dsm/UnpackedTarball_twain_dsm.mk
index ac0c3ce7c8c6..11be31e9eb81 100644
--- a/external/twain_dsm/UnpackedTarball_twain_dsm.mk
+++ b/external/twain_dsm/UnpackedTarball_twain_dsm.mk
@@ -11,13 +11,4 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,twain_dsm))
$(eval $(call gb_UnpackedTarball_set_tarball,twain_dsm,$(TWAIN_DSM_TARBALL)))
-$(eval $(call gb_UnpackedTarball_set_patchlevel,twain_dsm,1))
-
-$(eval $(call gb_UnpackedTarball_add_patches,twain_dsm, \
- external/twain_dsm/TWAIN_DSM_VS2015.vcxproj.patch \
- external/twain_dsm/TWAIN_DSM_VS2015.vcxproj.filters.patch \
- external/twain_dsm/fix-non-us-ascii-chars-part1.patch \
- external/twain_dsm/fix-non-us-ascii-chars-part2.patch \
-))
-
# vim: set noet sw=4 ts=4:
diff --git a/external/twain_dsm/fix-non-us-ascii-chars-part1.patch b/external/twain_dsm/fix-non-us-ascii-chars-part1.patch
deleted file mode 100644
index 0fb29dee45ce..000000000000
--- a/external/twain_dsm/fix-non-us-ascii-chars-part1.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-diff --git a/src/apps.cpp b/src/apps.cpp
-index 54c6347573fa..45d169d5b148 100755
---- a/src/apps.cpp
-+++ b/src/apps.cpp
-@@ -1,7 +1,7 @@
- /***************************************************************************
- * TWAIN Data Source Manager version 2.1
- * Manages image acquisition data sources used by a machine.
-- * Copyright © 2007 TWAIN Working Group:
-+ * Copyright (C) 2007 TWAIN Working Group:
- * Adobe Systems Incorporated,AnyDoc Software Inc., Eastman Kodak Company,
- * Fujitsu Computer Products of America, JFL Peripheral Solutions Inc.,
- * Ricoh Corporation, and Xerox Corporation.
-diff --git a/src/log.cpp b/src/log.cpp
-index 496e9d9c52a1..3b05307981ad 100755
---- a/src/log.cpp
-+++ b/src/log.cpp
-@@ -1,7 +1,7 @@
- /***************************************************************************
- * TWAIN Data Source Manager version 2.1
- * Manages image acquisition data sources used by a machine.
-- * Copyright © 2007 TWAIN Working Group:
-+ * Copyright (C) 2007 TWAIN Working Group:
- * Adobe Systems Incorporated,AnyDoc Software Inc., Eastman Kodak Company,
- * Fujitsu Computer Products of America, JFL Peripheral Solutions Inc.,
- * Ricoh Corporation, and Xerox Corporation.
diff --git a/external/twain_dsm/fix-non-us-ascii-chars-part2.patch b/external/twain_dsm/fix-non-us-ascii-chars-part2.patch
deleted file mode 100644
index 29e78bf00faf..000000000000
--- a/external/twain_dsm/fix-non-us-ascii-chars-part2.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-diff --git a/src/dsm.cpp b/src/dsm.cpp
-index 1b74285c5d72..efd8f443ca02 100755
---- a/src/dsm.cpp
-+++ b/src/dsm.cpp
-@@ -1,7 +1,7 @@
- /***************************************************************************
- * TWAIN Data Source Manager version 2.1
- * Manages image acquisition data sources used by a machine.
-- * Copyright © 2007 TWAIN Working Group:
-+ * Copyright (C) 2007 TWAIN Working Group:
- * Adobe Systems Incorporated,AnyDoc Software Inc., Eastman Kodak Company,
- * Fujitsu Computer Products of America, JFL Peripheral Solutions Inc.,
- * Ricoh Corporation, and Xerox Corporation.
-@@ -38,7 +38,7 @@
- /*! \mainpage Data Source Manager
- *
- * The Source Manager provides the communication path between the
-- * Application and the Source, supports the user’s selection of a
-+ * Application and the Source, supports the user's selection of a
- * Source, and loads the Source for access by the Application.
- * Communications from Application to Source Manager or the Source
- * to Source Manager (via DAT_NULL) arrive in exclusively through
-@@ -51,7 +51,7 @@
- *
- *
- *
-- * Copyright © 2007 TWAIN Working Group: Adobe Systems Incorporated,
-+ * Copyright (C) 2007 TWAIN Working Group: Adobe Systems Incorporated,
- * AnyDoc Software Inc., Eastman Kodak Company,
- * Fujitsu Computer Products of America, JFL Peripheral Solutions Inc.,
- * Ricoh Corporation, and Xerox Corporation.
-diff --git a/src/dsm.h b/src/dsm.h
-index f7afb316d3de..c156d3843a9e 100755
---- a/src/dsm.h
-+++ b/src/dsm.h
-@@ -1,7 +1,7 @@
- /***************************************************************************
- * TWAIN Data Source Manager version 2.1
- * Manages image acquisition data sources used by a machine.
-- * Copyright © 2007 TWAIN Working Group:
-+ * Copyright (C) 2007 TWAIN Working Group:
- * Adobe Systems Incorporated,AnyDoc Software Inc., Eastman Kodak Company,
- * Fujitsu Computer Products of America, JFL Peripheral Solutions Inc.,
- * Ricoh Corporation, and Xerox Corporation.