From de515d80d216fdb77159de97468aed9e107bc239 Mon Sep 17 00:00:00 2001 From: Nick Russler Date: Tue, 8 Nov 2016 12:22:56 +0100 Subject: [PATCH] Add MSI installer for win32 virtualsmartcard. Also ignore temporary VS artifacts and removes conflicting snprintf definition with standard definition --- .gitignore | 5 + .gitmodules | 3 + virtualsmartcard/src/vpcd/vpcd.c | 1 - virtualsmartcard/win32/BixVReader.sln | 56 ++++++ .../win32/BixVReader/BixVReader.inf | Bin 0 -> 3790 bytes .../win32/BixVReader/BixVReader.vcxproj | 190 ++++++++++++++++++ .../BixVReader/BixVReader.vcxproj.filters | 114 +++++++++++ .../win32/BixVReader/VirtualSCReader.idl | 3 +- virtualsmartcard/win32/BixVReader/internal.h | 30 +-- .../win32/BixVReaderInstaller/.gitignore | 5 + .../BixVReader.ini.template | 9 + .../BixVReaderInstaller.sln | 28 +++ .../BixVReaderInstaller.wixproj | 65 ++++++ .../win32/BixVReaderInstaller/Product.wxs | 64 ++++++ virtualsmartcard/win32/DevMsi | 1 + 15 files changed, 556 insertions(+), 18 deletions(-) create mode 100644 virtualsmartcard/win32/BixVReader.sln create mode 100644 virtualsmartcard/win32/BixVReader/BixVReader.inf create mode 100644 virtualsmartcard/win32/BixVReader/BixVReader.vcxproj create mode 100644 virtualsmartcard/win32/BixVReader/BixVReader.vcxproj.filters create mode 100644 virtualsmartcard/win32/BixVReaderInstaller/.gitignore create mode 100644 virtualsmartcard/win32/BixVReaderInstaller/BixVReader.ini.template create mode 100644 virtualsmartcard/win32/BixVReaderInstaller/BixVReaderInstaller.sln create mode 100644 virtualsmartcard/win32/BixVReaderInstaller/BixVReaderInstaller.wixproj create mode 100644 virtualsmartcard/win32/BixVReaderInstaller/Product.wxs create mode 160000 virtualsmartcard/win32/DevMsi diff --git a/.gitignore b/.gitignore index 710ba2e..9e7e35b 100644 --- a/.gitignore +++ b/.gitignore @@ -79,3 +79,8 @@ remote-reader/build/* .idea .gradle local.properties +/virtualsmartcard/bin +/virtualsmartcard/obj +/virtualsmartcard/lib +/virtualsmartcard/win32/BixVReader/Release +/virtualsmartcard/win32/Release diff --git a/.gitmodules b/.gitmodules index 5dc9ae1..bf2fc04 100644 --- a/.gitmodules +++ b/.gitmodules @@ -16,3 +16,6 @@ [submodule "ccid/src/OpenSC"] path = ccid/src/OpenSC url = https://github.com/frankmorgner/OpenSC +[submodule "virtualsmartcard/win32/DevMsi"] + path = virtualsmartcard/win32/DevMsi + url = https://github.com/nickrussler/DevMsi.git diff --git a/virtualsmartcard/src/vpcd/vpcd.c b/virtualsmartcard/src/vpcd/vpcd.c index c43abad..e430f1b 100644 --- a/virtualsmartcard/src/vpcd/vpcd.c +++ b/virtualsmartcard/src/vpcd/vpcd.c @@ -31,7 +31,6 @@ #include #include #define close(s) closesocket(s) -#define snprintf _snprintf #ifndef AI_NUMERICSERV #define AI_NUMERICSERV 0 #endif diff --git a/virtualsmartcard/win32/BixVReader.sln b/virtualsmartcard/win32/BixVReader.sln new file mode 100644 index 0000000..10c72c0 --- /dev/null +++ b/virtualsmartcard/win32/BixVReader.sln @@ -0,0 +1,56 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BixVReader", "BixVReader\BixVReader.vcxproj", "{1D286E48-DE79-41FF-844B-56ED3764D4DA}" +EndProject +Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "BixVReaderInstaller", "BixVReaderInstaller\BixVReaderInstaller.wixproj", "{9C30A09E-1A74-4091-93B7-6296F94CE77C}" + ProjectSection(ProjectDependencies) = postProject + {1D286E48-DE79-41FF-844B-56ED3764D4DA} = {1D286E48-DE79-41FF-844B-56ED3764D4DA} + {42C4F882-2757-4C0D-90D9-BC096810163E} = {42C4F882-2757-4C0D-90D9-BC096810163E} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DevMsi", "DevMsi\src\DevMsi\DevMsi.vcxproj", "{42C4F882-2757-4C0D-90D9-BC096810163E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1D286E48-DE79-41FF-844B-56ED3764D4DA}.Debug|x64.ActiveCfg = Debug|x64 + {1D286E48-DE79-41FF-844B-56ED3764D4DA}.Debug|x64.Build.0 = Debug|x64 + {1D286E48-DE79-41FF-844B-56ED3764D4DA}.Debug|x64.Deploy.0 = Debug|x64 + {1D286E48-DE79-41FF-844B-56ED3764D4DA}.Debug|x86.ActiveCfg = Debug|Win32 + {1D286E48-DE79-41FF-844B-56ED3764D4DA}.Debug|x86.Build.0 = Debug|Win32 + {1D286E48-DE79-41FF-844B-56ED3764D4DA}.Debug|x86.Deploy.0 = Debug|Win32 + {1D286E48-DE79-41FF-844B-56ED3764D4DA}.Release|x64.ActiveCfg = Release|x64 + {1D286E48-DE79-41FF-844B-56ED3764D4DA}.Release|x64.Build.0 = Release|x64 + {1D286E48-DE79-41FF-844B-56ED3764D4DA}.Release|x64.Deploy.0 = Release|x64 + {1D286E48-DE79-41FF-844B-56ED3764D4DA}.Release|x86.ActiveCfg = Release|Win32 + {1D286E48-DE79-41FF-844B-56ED3764D4DA}.Release|x86.Build.0 = Release|Win32 + {1D286E48-DE79-41FF-844B-56ED3764D4DA}.Release|x86.Deploy.0 = Release|Win32 + {9C30A09E-1A74-4091-93B7-6296F94CE77C}.Debug|x64.ActiveCfg = Debug|x64 + {9C30A09E-1A74-4091-93B7-6296F94CE77C}.Debug|x64.Build.0 = Debug|x64 + {9C30A09E-1A74-4091-93B7-6296F94CE77C}.Debug|x86.ActiveCfg = Debug|x86 + {9C30A09E-1A74-4091-93B7-6296F94CE77C}.Debug|x86.Build.0 = Debug|x86 + {9C30A09E-1A74-4091-93B7-6296F94CE77C}.Release|x64.ActiveCfg = Release|x64 + {9C30A09E-1A74-4091-93B7-6296F94CE77C}.Release|x64.Build.0 = Release|x64 + {9C30A09E-1A74-4091-93B7-6296F94CE77C}.Release|x86.ActiveCfg = Release|x86 + {9C30A09E-1A74-4091-93B7-6296F94CE77C}.Release|x86.Build.0 = Release|x86 + {42C4F882-2757-4C0D-90D9-BC096810163E}.Debug|x64.ActiveCfg = Debug|x64 + {42C4F882-2757-4C0D-90D9-BC096810163E}.Debug|x64.Build.0 = Debug|x64 + {42C4F882-2757-4C0D-90D9-BC096810163E}.Debug|x86.ActiveCfg = Debug|Win32 + {42C4F882-2757-4C0D-90D9-BC096810163E}.Debug|x86.Build.0 = Debug|Win32 + {42C4F882-2757-4C0D-90D9-BC096810163E}.Release|x64.ActiveCfg = Release|x64 + {42C4F882-2757-4C0D-90D9-BC096810163E}.Release|x64.Build.0 = Release|x64 + {42C4F882-2757-4C0D-90D9-BC096810163E}.Release|x86.ActiveCfg = Release|Win32 + {42C4F882-2757-4C0D-90D9-BC096810163E}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/virtualsmartcard/win32/BixVReader/BixVReader.inf b/virtualsmartcard/win32/BixVReader/BixVReader.inf new file mode 100644 index 0000000000000000000000000000000000000000..df60979a1a784be5cbdc1cd4fcb82a18a27fd835 GIT binary patch literal 3790 zcmb`KZEq7-5QXP+rT&LiM84TkOemnzt>oI_MWqBKF;PXU$YgD>Fm_~{LWKD1w9mQY z>%HErODsjJwRi8!%-l0GXJ-HX_Q-y;AMBB3_M46Dv%Ruo8(7~8erLAF*u;j*HCn0r zHLEl`XLic`-(mEGx3|3YZDAjo9awHVcE`?wjDnS)*pb-_J7shy?CIE;^>eP=PV58E zGj?~vf3aqX^p>lipkaiKxqY#pY@ers|GRd;bJO0i{~>qNT3iLU#)hmYc-miHL)Ppw zr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dev/null +++ b/virtualsmartcard/win32/BixVReader/BixVReader.vcxproj @@ -0,0 +1,190 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {1D286E48-DE79-41FF-844B-56ED3764D4DA} + {2177f19c-eb4c-4687-9e7f-f9eec1f12cf1} + v4.5 + 12.0 + Debug + Win32 + BixVReader + 10.0.14393.0 + + + + Windows10 + true + WindowsUserModeDriver10.0 + DynamicLibrary + Static + 1 + Desktop + Unicode + + + Windows10 + false + WindowsUserModeDriver10.0 + DynamicLibrary + Static + 1 + Desktop + Unicode + + + Windows10 + true + WindowsUserModeDriver10.0 + DynamicLibrary + Static + 1 + Desktop + Unicode + + + Windows10 + false + WindowsUserModeDriver10.0 + DynamicLibrary + Static + 1 + Desktop + Unicode + + + + + + + + + + + DbgengRemoteDebugger + + + DbgengRemoteDebugger + + + DbgengRemoteDebugger + + + DbgengRemoteDebugger + + + + true + internal.h + Sync + MultiThreadedDLL + false + + + true + + + Windows + .\Exports.def + Ws2_32.lib + + + + + true + internal.h + false + + + Windows + .\Exports.def + Ws2_32.lib + + + + + true + internal.h + false + + + Windows + .\Exports.def + Ws2_32.lib + + + + + true + internal.h + false + + + Windows + .\Exports.def + Ws2_32.lib + + + + + + + + + + + + \ No newline at end of file diff --git a/virtualsmartcard/win32/BixVReader/BixVReader.vcxproj.filters b/virtualsmartcard/win32/BixVReader/BixVReader.vcxproj.filters new file mode 100644 index 0000000..5a66b1b --- /dev/null +++ b/virtualsmartcard/win32/BixVReader/BixVReader.vcxproj.filters @@ -0,0 +1,114 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + {8E41214B-6785-4CFE-B992-037D68949A14} + inf;inv;inx;mof;mc; + + + + + + + + Driver Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + Source Files + + + + + Resource Files + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Source Files + + + \ No newline at end of file diff --git a/virtualsmartcard/win32/BixVReader/VirtualSCReader.idl b/virtualsmartcard/win32/BixVReader/VirtualSCReader.idl index dacd585..f0189fd 100644 --- a/virtualsmartcard/win32/BixVReader/VirtualSCReader.idl +++ b/virtualsmartcard/win32/BixVReader/VirtualSCReader.idl @@ -9,8 +9,7 @@ library VirtualSCReaderDriverLib { importlib("stdole2.tlb"); [ - uuid(d4112073-d09b-458f-a5aa-35ef21eef5de), - //uuid(10654262-B9BD-4636-8890-F66362CCC207), + uuid(A44A2DF4-DCA4-4767-8EC4-86FE611C2EA7), helpstring("VirtualSCReader Class") ] coclass VirtualSCReaderDriver diff --git a/virtualsmartcard/win32/BixVReader/internal.h b/virtualsmartcard/win32/BixVReader/internal.h index 7613d56..1d4c9d6 100644 --- a/virtualsmartcard/win32/BixVReader/internal.h +++ b/virtualsmartcard/win32/BixVReader/internal.h @@ -55,21 +55,21 @@ DEFINE_GUID(SmartCardReaderGuid, 0x50DD5230, 0xBA8A, 0x11D1, 0xBF,0x5D,0x00,0x00 // Include the type specific headers. // -class funcTrace { -public: - wchar_t funcN[500]; - funcTrace (char *func) { - wchar_t funcName[500]; - wsprintf(funcN,L"%S",func); - wsprintf(funcName,L"[BixVReader]IN -> %s",funcN); - OutputDebugString(funcName); - } - ~funcTrace () { - wchar_t funcName[500]; - wsprintf(funcName,L"[BixVReader]OUT -> %s",funcN); - OutputDebugString(funcName); - } -}; +//class funcTrace { +//public: +// TCHAR funcN[500]; +// funcTrace (char *func) { +// TCHAR funcName[500]; +// wsprintf(funcN, _T("%S"), func); +// wsprintf(funcName, _T("[BixVReader]IN -> %s"), funcN); +// OutputDebugString(funcName); +// } +// ~funcTrace () { +// TCHAR funcName[500]; +// wsprintf(funcName, _T("[BixVReader]OUT -> %s"), funcN); +// OutputDebugString(funcName); +// } +//}; //#define inFunc funcTrace _ftrace(__FUNCTION__); #define inFunc \ No newline at end of file diff --git a/virtualsmartcard/win32/BixVReaderInstaller/.gitignore b/virtualsmartcard/win32/BixVReaderInstaller/.gitignore new file mode 100644 index 0000000..9cfadf3 --- /dev/null +++ b/virtualsmartcard/win32/BixVReaderInstaller/.gitignore @@ -0,0 +1,5 @@ +/.vs +/obj +/bin + +*.sdf \ No newline at end of file diff --git a/virtualsmartcard/win32/BixVReaderInstaller/BixVReader.ini.template b/virtualsmartcard/win32/BixVReaderInstaller/BixVReader.ini.template new file mode 100644 index 0000000..a8d217d --- /dev/null +++ b/virtualsmartcard/win32/BixVReaderInstaller/BixVReader.ini.template @@ -0,0 +1,9 @@ +[Driver] +NumReaders=1 + +[Reader0] +RPC_TYPE=2 +VENDOR_NAME=Virtual Smart Card Architecture +VENDOR_IFD_TYPE=Virtual PCD +TCP_PORT=35963 +DECIVE_UNIT=0 \ No newline at end of file diff --git a/virtualsmartcard/win32/BixVReaderInstaller/BixVReaderInstaller.sln b/virtualsmartcard/win32/BixVReaderInstaller/BixVReaderInstaller.sln new file mode 100644 index 0000000..a60dc0b --- /dev/null +++ b/virtualsmartcard/win32/BixVReaderInstaller/BixVReaderInstaller.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.23107.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "BixVReaderInstaller", "BixVReaderInstaller.wixproj", "{9C30A09E-1A74-4091-93B7-6296F94CE77C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9C30A09E-1A74-4091-93B7-6296F94CE77C}.Debug|x64.ActiveCfg = Debug|x64 + {9C30A09E-1A74-4091-93B7-6296F94CE77C}.Debug|x64.Build.0 = Debug|x64 + {9C30A09E-1A74-4091-93B7-6296F94CE77C}.Debug|x86.ActiveCfg = Debug|x86 + {9C30A09E-1A74-4091-93B7-6296F94CE77C}.Debug|x86.Build.0 = Debug|x86 + {9C30A09E-1A74-4091-93B7-6296F94CE77C}.Release|x64.ActiveCfg = Release|x64 + {9C30A09E-1A74-4091-93B7-6296F94CE77C}.Release|x64.Build.0 = Release|x64 + {9C30A09E-1A74-4091-93B7-6296F94CE77C}.Release|x86.ActiveCfg = Release|x86 + {9C30A09E-1A74-4091-93B7-6296F94CE77C}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/virtualsmartcard/win32/BixVReaderInstaller/BixVReaderInstaller.wixproj b/virtualsmartcard/win32/BixVReaderInstaller/BixVReaderInstaller.wixproj new file mode 100644 index 0000000..6de77f2 --- /dev/null +++ b/virtualsmartcard/win32/BixVReaderInstaller/BixVReaderInstaller.wixproj @@ -0,0 +1,65 @@ + + + + Debug + x86 + 3.10 + 9c30a09e-1a74-4091-93b7-6296f94ce77c + 2.0 + BixVReaderInstaller + Package + $(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets + $(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets + + + bin\$(Configuration)\ + obj\$(Configuration)\ + Debug + + + bin\$(Configuration)\ + obj\$(Configuration)\ + + + Debug + bin\$(Platform)\$(Configuration)\ + obj\$(Platform)\$(Configuration)\ + + + bin\$(Platform)\$(Configuration)\ + obj\$(Platform)\$(Configuration)\ + + + + + + + BixVReader + {1d286e48-de79-41ff-844b-56ed3764d4da} + True + True + Binaries;Content;Satellites + INSTALLFOLDER + + + DevMsi + {42c4f882-2757-4c0d-90d9-bc096810163e} + True + True + Binaries;Content;Satellites + INSTALLFOLDER + + + + + + + + \ No newline at end of file diff --git a/virtualsmartcard/win32/BixVReaderInstaller/Product.wxs b/virtualsmartcard/win32/BixVReaderInstaller/Product.wxs new file mode 100644 index 0000000..83787c3 --- /dev/null +++ b/virtualsmartcard/win32/BixVReaderInstaller/Product.wxs @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Installed + Installed + + + NOT REMOVE + NOT REMOVE + + + \ No newline at end of file diff --git a/virtualsmartcard/win32/DevMsi b/virtualsmartcard/win32/DevMsi new file mode 160000 index 0000000..30b6fb7 --- /dev/null +++ b/virtualsmartcard/win32/DevMsi @@ -0,0 +1 @@ +Subproject commit 30b6fb7fd6268aa576c72f5b3bd3a3810c5797ad