Skip to content

Commit

Permalink
Turn wiasane-util into a dynamic library and update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
mback2k committed Feb 19, 2017
1 parent fc0b0ae commit b2a82ff
Show file tree
Hide file tree
Showing 13 changed files with 243 additions and 16 deletions.
5 changes: 5 additions & 0 deletions devsane/devsane.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@
<OptimizeReferences>True</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<Content Include="$(SolutionDir)winsane-util\$(OutDir)winsane-util.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<ClInclude Include="resource.h" />
<ClInclude Include="devsane.h" />
Expand Down
15 changes: 9 additions & 6 deletions wiasane-pkg/wiasane-pkg.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,20 @@
<FilesToPackage Include="@(Inf->'%(CopyOutput)')" Condition="'@(Inf)'!=''" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\devsane\devsane.vcxproj">
<Project>{9a97a3c5-d74a-400e-9aaa-1588190924b7}</Project>
<ProjectReference Include="..\winsane-util\winsane-util.vcxproj">
<Project>{abe9a9db-5ba2-4c99-99f0-cf120ea3cf44}</Project>
</ProjectReference>
<ProjectReference Include="..\coisane\coisane.vcxproj">
<Project>{cb743d7c-09b3-41af-9067-807f2ced7ad8}</Project>
<ProjectReference Include="..\winsane\winsane.vcxproj">
<Project>{b210e114-bf47-442f-8a8e-6719b6359eb8}</Project>
</ProjectReference>
<ProjectReference Include="..\wiasane\wiasane.vcxproj">
<Project>{6f8f9679-52f6-4b8e-9edf-67de89ec3cfa}</Project>
</ProjectReference>
<ProjectReference Include="..\winsane\winsane.vcxproj">
<Project>{b210e114-bf47-442f-8a8e-6719b6359eb8}</Project>
<ProjectReference Include="..\coisane\coisane.vcxproj">
<Project>{cb743d7c-09b3-41af-9067-807f2ced7ad8}</Project>
</ProjectReference>
<ProjectReference Include="..\devsane\devsane.vcxproj">
<Project>{9a97a3c5-d74a-400e-9aaa-1588190924b7}</Project>
</ProjectReference>
<ProjectReference Include="..\winsane-dbg\winsane-dbg.vcxproj">
<Project>{59a26f4a-bcf6-4ea0-85a4-20de17c36bbb}</Project>
Expand Down
2 changes: 2 additions & 0 deletions wiasane.iss
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
8 changes: 5 additions & 3 deletions wiasane.sln
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
3 changes: 3 additions & 0 deletions wiasane/wiasane.inx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -62,13 +63,15 @@ HKR,,HardwareConfig,0x00000001,1
HKR,,CreateFileName,0x00000000,"AUTO"

[WIASANE.CopyFiles]
winsane-util.dll
winsane.dll
wiasane.dll

[WIASANE.CoInstaller.AddReg]
HKR,,CoInstallers32,0x00010000,"coisane.dll,CoInstaller"

[WIASANE.CoInstaller.CopyFiles]
winsane-util.dll
winsane.dll
coisane.dll

Expand Down
6 changes: 6 additions & 0 deletions wiasane/wiasane.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<Content Include="$(SolutionDir)winsane-util\$(OutDir)winsane-util.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="$(SolutionDir)winsane\$(OutDir)winsane.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
Expand Down Expand Up @@ -143,6 +146,9 @@
<FilesToPackage Include="$(TargetPath)" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\winsane-util\winsane-util.vcxproj">
<Project>{abe9a9db-5ba2-4c99-99f0-cf120ea3cf44}</Project>
</ProjectReference>
<ProjectReference Include="..\winsane\winsane.vcxproj">
<Project>{b210e114-bf47-442f-8a8e-6719b6359eb8}</Project>
</ProjectReference>
Expand Down
15 changes: 15 additions & 0 deletions winsane-util/resource.h
Original file line number Diff line number Diff line change
@@ -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
25 changes: 25 additions & 0 deletions winsane-util/winsane-util.def
Original file line number Diff line number Diff line change
@@ -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
96 changes: 96 additions & 0 deletions winsane-util/winsane-util.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"

#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include <windows.h>
/////////////////////////////////////////////////////////////////////////////
#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 <windows.h>\0"
END

3 TEXTINCLUDE
BEGIN
"\0"
END

#endif // APSTUDIO_INVOKED

#endif // Deutsch (Deutschland) resources
/////////////////////////////////////////////////////////////////////////////


54 changes: 47 additions & 7 deletions winsane-util/winsane-util.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<PropertyGroup Label="PropertySheets">
<DriverType />
<PlatformToolset>WindowsApplicationForDrivers8.0</PlatformToolset>
<ConfigurationType>StaticLibrary</ConfigurationType>
<ConfigurationType>DynamicLibrary</ConfigurationType>
</PropertyGroup>
<PropertyGroup Label="Globals">
<DebuggerFlavor Condition="'$(IsKernelModeToolset)'=='True'">DbgengKernelDebugger</DebuggerFlavor>
Expand All @@ -35,31 +35,61 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration">
<TargetVersion>Windows7</TargetVersion>
<TargetVersion>Win7</TargetVersion>
<TargetName>$(MSBuildProjectName)</TargetName>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)'=='Debug'">
<UseDebugLibraries>True</UseDebugLibraries>
<LinkIncremental>True</LinkIncremental>
<WholeProgramOptimization>False</WholeProgramOptimization>
<SignMode>TestSign</SignMode>
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)'=='Release'">
<UseDebugLibraries>False</UseDebugLibraries>
<LinkIncremental>False</LinkIncremental>
<WholeProgramOptimization>True</WholeProgramOptimization>
<SignMode>TestSign</SignMode>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<PropertyGroup>
<OutDir>$(Configuration)\$(Platform)\</OutDir>
<IntDir>$(Configuration)\$(Platform)\Temp\</IntDir>
<TimeStampServer>http://timestamp.comodoca.com/authenticode</TimeStampServer>
</PropertyGroup>
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
</ImportGroup>
<ItemGroup>
<PropertyPageSchema Include="$(WDKContentRoot)build\1033\sign.xml" />
</ItemGroup>
<ItemDefinitionGroup>
<ResourceCompile>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories>
<Culture>0x0009</Culture>
</ResourceCompile>
<ClCompile>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>ISOLATION_AWARE_ENABLED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>
</ExceptionHandling>
<SDLCheck>True</SDLCheck>
<AssemblerOutput>All</AssemblerOutput>
</ClCompile>
<Midl>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories>
</Midl>
<Link>
<ModuleDefinitionFile>winsane-util.def</ModuleDefinitionFile>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>True</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG_PREFIX="winsane-util";%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
Expand All @@ -73,6 +103,14 @@
<OptimizeReferences>True</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="resource.h" />
<ClInclude Include="winsane-util_str.h" />
<ClInclude Include="winsane-util_dbg.h" />
<ClInclude Include="winsane-util_mem.h" />
<ClInclude Include="winsane-util_reg.h" />
<ClInclude Include="winsane-util_res.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="winsane-util_str.cpp" />
<ClCompile Include="winsane-util_dbg.cpp" />
Expand All @@ -81,11 +119,13 @@
<ClCompile Include="winsane-util_res.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="winsane-util_str.h" />
<ClInclude Include="winsane-util_dbg.h" />
<ClInclude Include="winsane-util_mem.h" />
<ClInclude Include="winsane-util_reg.h" />
<ClInclude Include="winsane-util_res.h" />
<ResourceCompile Include="winsane-util.rc" />
</ItemGroup>
<ItemGroup>
<None Include="winsane-util.def" />
</ItemGroup>
<ItemGroup>
<FilesToPackage Include="$(TargetPath)" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>
13 changes: 13 additions & 0 deletions winsane-util/winsane-util.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,18 @@
<ClInclude Include="winsane-util_mem.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="resource.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="winsane-util.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<None Include="winsane-util.def">
<Filter>Resource Files</Filter>
</None>
</ItemGroup>
</Project>
Loading

0 comments on commit b2a82ff

Please sign in to comment.