From b2a82ff25dc286a298ee28681cc08df18ae28fd4 Mon Sep 17 00:00:00 2001 From: Marc Hoersken Date: Sun, 19 Feb 2017 19:47:28 +0100 Subject: [PATCH] Turn wiasane-util into a dynamic library and update dependencies --- devsane/devsane.vcxproj | 5 ++ wiasane-pkg/wiasane-pkg.vcxproj | 15 ++-- wiasane.iss | 2 + wiasane.sln | 8 +- wiasane/wiasane.inx | 3 + wiasane/wiasane.vcxproj | 6 ++ winsane-util/resource.h | 15 ++++ winsane-util/winsane-util.def | 25 ++++++ winsane-util/winsane-util.rc | 96 +++++++++++++++++++++++ winsane-util/winsane-util.vcxproj | 54 +++++++++++-- winsane-util/winsane-util.vcxproj.filters | 13 +++ winsane-util/winsane-util.vcxproj.user | 7 ++ winsane/winsane.vcxproj | 10 +++ 13 files changed, 243 insertions(+), 16 deletions(-) create mode 100644 winsane-util/resource.h create mode 100644 winsane-util/winsane-util.def create mode 100644 winsane-util/winsane-util.rc create mode 100644 winsane-util/winsane-util.vcxproj.user diff --git a/devsane/devsane.vcxproj b/devsane/devsane.vcxproj index 2d1b86c..0403d28 100644 --- a/devsane/devsane.vcxproj +++ b/devsane/devsane.vcxproj @@ -103,6 +103,11 @@ True + + + Always + + diff --git a/wiasane-pkg/wiasane-pkg.vcxproj b/wiasane-pkg/wiasane-pkg.vcxproj index 25289dc..e4ac795 100644 --- a/wiasane-pkg/wiasane-pkg.vcxproj +++ b/wiasane-pkg/wiasane-pkg.vcxproj @@ -80,17 +80,20 @@ - - {9a97a3c5-d74a-400e-9aaa-1588190924b7} + + {abe9a9db-5ba2-4c99-99f0-cf120ea3cf44} - - {cb743d7c-09b3-41af-9067-807f2ced7ad8} + + {b210e114-bf47-442f-8a8e-6719b6359eb8} {6f8f9679-52f6-4b8e-9edf-67de89ec3cfa} - - {b210e114-bf47-442f-8a8e-6719b6359eb8} + + {cb743d7c-09b3-41af-9067-807f2ced7ad8} + + + {9a97a3c5-d74a-400e-9aaa-1588190924b7} {59a26f4a-bcf6-4ea0-85a4-20de17c36bbb} diff --git a/wiasane.iss b/wiasane.iss index b8b8dae..3115860 100644 --- a/wiasane.iss +++ b/wiasane.iss @@ -18,6 +18,7 @@ [Files] Source: {#RedistDir32bit}\msvcp{#RedistSuffix}.dll; DestDir: {sys}; Flags: onlyifdoesntexist sharedfile uninsnosharedfileprompt uninsrestartdelete 32bit; Check: Not Is64BitInstallMode Source: {#RedistDir32bit}\msvcr{#RedistSuffix}.dll; DestDir: {sys}; Flags: onlyifdoesntexist sharedfile uninsnosharedfileprompt uninsrestartdelete 32bit; Check: Not Is64BitInstallMode +Source: {#SourceDir32bit}\winsane-util.dll; DestDir: {app}; Flags: overwritereadonly replacesameversion restartreplace uninsrestartdelete 32bit; Check: Not Is64BitInstallMode Source: {#SourceDir32bit}\winsane.dll; DestDir: {app}; Flags: overwritereadonly replacesameversion restartreplace uninsrestartdelete 32bit; Check: Not Is64BitInstallMode Source: {#SourceDir32bit}\wiasane.dll; DestDir: {app}; Flags: overwritereadonly replacesameversion restartreplace uninsrestartdelete 32bit; Check: Not Is64BitInstallMode Source: {#SourceDir32bit}\coisane.dll; DestDir: {app}; Flags: overwritereadonly replacesameversion restartreplace uninsrestartdelete 32bit; Check: Not Is64BitInstallMode @@ -27,6 +28,7 @@ Source: {#SourceDir32bit}\wiasane.cat; DestDir: {app}; Flags: overwritereadonly Source: {#SourceDir32bit}\winsane-dbg.exe; DestDir: {app}; Flags: overwritereadonly replacesameversion restartreplace uninsrestartdelete 32bit; Check: Not Is64BitInstallMode Source: {#RedistDir64bit}\msvcp{#RedistSuffix}.dll; DestDir: {sys}; Flags: onlyifdoesntexist sharedfile uninsnosharedfileprompt uninsrestartdelete 64bit; Check: Is64BitInstallMode Source: {#RedistDir64bit}\msvcr{#RedistSuffix}.dll; DestDir: {sys}; Flags: onlyifdoesntexist sharedfile uninsnosharedfileprompt uninsrestartdelete 64bit; Check: Is64BitInstallMode +Source: {#SourceDir64bit}\winsane-util.dll; DestDir: {app}; Flags: overwritereadonly replacesameversion restartreplace uninsrestartdelete 64bit; Check: Is64BitInstallMode Source: {#SourceDir64bit}\winsane.dll; DestDir: {app}; Flags: overwritereadonly replacesameversion restartreplace uninsrestartdelete 64bit; Check: Is64BitInstallMode Source: {#SourceDir64bit}\wiasane.dll; DestDir: {app}; Flags: overwritereadonly replacesameversion restartreplace uninsrestartdelete 64bit; Check: Is64BitInstallMode Source: {#SourceDir64bit}\coisane.dll; DestDir: {app}; Flags: overwritereadonly replacesameversion restartreplace uninsrestartdelete 64bit; Check: Is64BitInstallMode diff --git a/wiasane.sln b/wiasane.sln index d69628a..a0cc3b4 100644 --- a/wiasane.sln +++ b/wiasane.sln @@ -10,27 +10,29 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winsane", "winsane\winsane. EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wiasane", "wiasane\wiasane.vcxproj", "{6F8F9679-52F6-4B8E-9EDF-67DE89EC3CFA}" ProjectSection(ProjectDependencies) = postProject + {ABE9A9DB-5BA2-4C99-99F0-CF120EA3CF44} = {ABE9A9DB-5BA2-4C99-99F0-CF120EA3CF44} {B210E114-BF47-442F-8A8E-6719B6359EB8} = {B210E114-BF47-442F-8A8E-6719B6359EB8} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "coisane", "coisane\coisane.vcxproj", "{CB743D7C-09B3-41AF-9067-807F2CED7AD8}" ProjectSection(ProjectDependencies) = postProject - {B210E114-BF47-442F-8A8E-6719B6359EB8} = {B210E114-BF47-442F-8A8E-6719B6359EB8} {ABE9A9DB-5BA2-4C99-99F0-CF120EA3CF44} = {ABE9A9DB-5BA2-4C99-99F0-CF120EA3CF44} + {B210E114-BF47-442F-8A8E-6719B6359EB8} = {B210E114-BF47-442F-8A8E-6719B6359EB8} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "devsane", "devsane\devsane.vcxproj", "{9A97A3C5-D74A-400E-9AAA-1588190924B7}" ProjectSection(ProjectDependencies) = postProject - {B210E114-BF47-442F-8A8E-6719B6359EB8} = {B210E114-BF47-442F-8A8E-6719B6359EB8} {ABE9A9DB-5BA2-4C99-99F0-CF120EA3CF44} = {ABE9A9DB-5BA2-4C99-99F0-CF120EA3CF44} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wiasane-pkg", "wiasane-pkg\wiasane-pkg.vcxproj", "{BAADCDB5-1564-4046-B387-791E1538B840}" ProjectSection(ProjectDependencies) = postProject + {ABE9A9DB-5BA2-4C99-99F0-CF120EA3CF44} = {ABE9A9DB-5BA2-4C99-99F0-CF120EA3CF44} {B210E114-BF47-442F-8A8E-6719B6359EB8} = {B210E114-BF47-442F-8A8E-6719B6359EB8} - {59A26F4A-BCF6-4EA0-85A4-20DE17C36BBB} = {59A26F4A-BCF6-4EA0-85A4-20DE17C36BBB} {6F8F9679-52F6-4B8E-9EDF-67DE89EC3CFA} = {6F8F9679-52F6-4B8E-9EDF-67DE89EC3CFA} {CB743D7C-09B3-41AF-9067-807F2CED7AD8} = {CB743D7C-09B3-41AF-9067-807F2CED7AD8} + {9A97A3C5-D74A-400E-9AAA-1588190924B7} = {9A97A3C5-D74A-400E-9AAA-1588190924B7} + {59A26F4A-BCF6-4EA0-85A4-20DE17C36BBB} = {59A26F4A-BCF6-4EA0-85A4-20DE17C36BBB} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winsane-dbg", "winsane-dbg\winsane-dbg.vcxproj", "{59A26F4A-BCF6-4EA0-85A4-20DE17C36BBB}" diff --git a/wiasane/wiasane.inx b/wiasane/wiasane.inx index 49912b2..840b98c 100644 --- a/wiasane/wiasane.inx +++ b/wiasane/wiasane.inx @@ -8,6 +8,7 @@ DriverVer=20/10/2012,0.1.0.0 DriverPackageDisplayName=%WIASANE.DeviceDesc% [SourceDisksFiles.$ARCH$] +winsane-util.dll=1 winsane.dll=1 wiasane.dll=1 coisane.dll=1 @@ -62,6 +63,7 @@ HKR,,HardwareConfig,0x00000001,1 HKR,,CreateFileName,0x00000000,"AUTO" [WIASANE.CopyFiles] +winsane-util.dll winsane.dll wiasane.dll @@ -69,6 +71,7 @@ wiasane.dll HKR,,CoInstallers32,0x00010000,"coisane.dll,CoInstaller" [WIASANE.CoInstaller.CopyFiles] +winsane-util.dll winsane.dll coisane.dll diff --git a/wiasane/wiasane.vcxproj b/wiasane/wiasane.vcxproj index 884a9b7..11cec04 100644 --- a/wiasane/wiasane.vcxproj +++ b/wiasane/wiasane.vcxproj @@ -111,6 +111,9 @@ + + Always + Always @@ -143,6 +146,9 @@ + + {abe9a9db-5ba2-4c99-99f0-cf120ea3cf44} + {b210e114-bf47-442f-8a8e-6719b6359eb8} diff --git a/winsane-util/resource.h b/winsane-util/resource.h new file mode 100644 index 0000000..84deac3 --- /dev/null +++ b/winsane-util/resource.h @@ -0,0 +1,15 @@ +//{{NO_DEPENDENCIES}} +// Von Microsoft Visual C++ generierte Includedatei. +// Verwendet durch winsane-util.rc +// + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 801 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 802 +#endif +#endif diff --git a/winsane-util/winsane-util.def b/winsane-util/winsane-util.def new file mode 100644 index 0000000..5a523b1 --- /dev/null +++ b/winsane-util/winsane-util.def @@ -0,0 +1,25 @@ +LIBRARY WINSANE-UTIL + +EXPORTS + _Trace_ + HeapSafeFree + LocalSafeFree + GlobalSafeFree + StringDupA + StringDupW + StringConvWToA + StringConvAToW + StringCbAPrintfA + StringCbAPrintfW + StringCchAPrintfA + StringCchAPrintfW + StringCbAVPrintfA + StringCbAVPrintfW + StringCchAVPrintfA + StringCchAVPrintfW + LoadAString + MessageBoxR + SetWindowTextR + SetDlgItemTextR + ReadRegistryLong + ReadRegistryString diff --git a/winsane-util/winsane-util.rc b/winsane-util/winsane-util.rc new file mode 100644 index 0000000..9fc8e4f --- /dev/null +++ b/winsane-util/winsane-util.rc @@ -0,0 +1,96 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// Neutral resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU) +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL +#pragma code_page(1252) + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 0,1,2,10 + PRODUCTVERSION 0,1,2,10 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x9L +#else + FILEFLAGS 0x8L +#endif + FILEOS 0x40004L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "000004b0" + BEGIN + VALUE "CompanyName", "Marc Hörsken" + VALUE "FileDescription", "Scanner Access Now Easy - Windows Utility DLL" + VALUE "FileVersion", "0.1.2.10" + VALUE "InternalName", "winsane-util.dll" + VALUE "LegalCopyright", "Copyright © 2012-2016 Marc Hörsken. All rights reserved." + VALUE "OriginalFilename", "winsane-util.dll" + VALUE "ProductName", "Scanner Access Now Easy - WIA Driver" + VALUE "ProductVersion", "0.1.2.10" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0, 1200 + END +END + +#endif // Neutral resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// Deutsch (Deutschland) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU) +LANGUAGE LANG_GERMAN, SUBLANG_GERMAN +#pragma code_page(1252) + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include \0" +END + +3 TEXTINCLUDE +BEGIN + "\0" +END + +#endif // APSTUDIO_INVOKED + +#endif // Deutsch (Deutschland) resources +///////////////////////////////////////////////////////////////////////////// + + diff --git a/winsane-util/winsane-util.vcxproj b/winsane-util/winsane-util.vcxproj index f6f9bd7..cc71672 100644 --- a/winsane-util/winsane-util.vcxproj +++ b/winsane-util/winsane-util.vcxproj @@ -21,7 +21,7 @@ WindowsApplicationForDrivers8.0 - StaticLibrary + DynamicLibrary DbgengKernelDebugger @@ -35,7 +35,7 @@ - Windows7 + Win7 $(MSBuildProjectName) Unicode @@ -43,23 +43,53 @@ True True False + TestSign False False True + TestSign $(Configuration)\$(Platform)\ $(Configuration)\$(Platform)\Temp\ + http://timestamp.comodoca.com/authenticode + + + + + + %(AdditionalIncludeDirectories);$(DDK_INC_PATH) + 0x0009 + + + %(AdditionalIncludeDirectories);$(DDK_INC_PATH) + ISOLATION_AWARE_ENABLED;%(PreprocessorDefinitions) + + + True + All + + + %(AdditionalIncludeDirectories);$(DDK_INC_PATH) + + + winsane-util.def + %(AdditionalLibraryDirectories) + %(AdditionalDependencies) + True + + Disabled + _DEBUG_PREFIX="winsane-util";%(PreprocessorDefinitions) @@ -73,6 +103,14 @@ True + + + + + + + + @@ -81,11 +119,13 @@ - - - - - + + + + + + + \ No newline at end of file diff --git a/winsane-util/winsane-util.vcxproj.filters b/winsane-util/winsane-util.vcxproj.filters index b13e4fa..9b29822 100644 --- a/winsane-util/winsane-util.vcxproj.filters +++ b/winsane-util/winsane-util.vcxproj.filters @@ -47,5 +47,18 @@ Header Files + + Header Files + + + + + Resource Files + + + + + Resource Files + \ No newline at end of file diff --git a/winsane-util/winsane-util.vcxproj.user b/winsane-util/winsane-util.vcxproj.user new file mode 100644 index 0000000..b828074 --- /dev/null +++ b/winsane-util/winsane-util.vcxproj.user @@ -0,0 +1,7 @@ + + + + ProductionSign + E=info@marc-hoersken.de, CN="Open Source Developer, Marc Hörsken", O=Open Source Developer, C=DE | C5698D67670FEDE0F6B0642A4811D9D2F33FA857 + + \ No newline at end of file diff --git a/winsane/winsane.vcxproj b/winsane/winsane.vcxproj index f39d642..50d205e 100644 --- a/winsane/winsane.vcxproj +++ b/winsane/winsane.vcxproj @@ -97,6 +97,11 @@ True + + + Always + + @@ -125,5 +130,10 @@ + + + {abe9a9db-5ba2-4c99-99f0-cf120ea3cf44} + + \ No newline at end of file