added missing ninject files.

made the starter configuration to start service on install optional, otherwise the services could fail to install.
Also added eventlog creation to the installer so it is ready to go when the service runs.
#24 #22
This commit is contained in:
chris.watts90@outlook.com 2017-02-18 21:35:39 +00:00
parent f1bf9de350
commit a63a4923a4

View File

@ -2,8 +2,29 @@
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"> xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Fragment> <Fragment>
<PropertyRef Id="STARTSERVICEONINSTALL"/>
<Component Id="CardReaderServiceStarter" Directory="INSTALLFOLDER"
Guid="{E37EA846-FF70-4D2C-95CF-EFD06850BBF3}" KeyPath="yes">
<ServiceControl Id="CardReaderServiceStarter"
Start="install"
Stop="uninstall"
Remove="uninstall"
Name="FlexitimeCardReaderService"
Wait="yes" />
<Condition><![CDATA[STARTSERVICEONINSTALL <> "false"]]></Condition>
</Component>
<Component Id="CardReaderEventLog" Directory="INSTALLFOLDER"
Guid="{A97DF87D-257C-4321-9ECA-0551FA9301C3}" KeyPath="yes">
<util:EventSource Log="CardReaderService"
EventMessageFile="[WindowsFolder]Microsoft.NET\Framework\v4.0.30319\EventLogMessages.dll"
Name="CardReaderDefaultLogger"/>
</Component>
<ComponentGroup Id="CardReaderServiceComponents" Directory="INSTALLFOLDER"> <ComponentGroup Id="CardReaderServiceComponents" Directory="INSTALLFOLDER">
<ComponentRef Id="CardReaderServiceStarter" />
<ComponentRef Id="CardReaderEventLog" />
<!-- Start the Smart Card Service which is a dependency of the PCSC library. --> <!-- Start the Smart Card Service which is a dependency of the PCSC library. -->
<Component Id="SmartCardServiceConfig" Guid="{73D2E31D-F256-457C-AFD5-EC456CDAD7E8}" KeyPath="yes"> <Component Id="SmartCardServiceConfig" Guid="{73D2E31D-F256-457C-AFD5-EC456CDAD7E8}" KeyPath="yes">
<ServiceControl Id="SmartCardServiceStarter" <ServiceControl Id="SmartCardServiceStarter"
@ -18,7 +39,7 @@
Source="$(var.CardReaderService.TargetDir)CardReaderService.exe" /> Source="$(var.CardReaderService.TargetDir)CardReaderService.exe" />
<ServiceInstall Id="CardReaderService" <ServiceInstall Id="CardReaderService"
Start="auto" Start="auto"
ErrorControl="normal" ErrorControl="ignore"
Type="ownProcess" Type="ownProcess"
Vital="yes" Vital="yes"
Name="FlexitimeCardReaderService" Name="FlexitimeCardReaderService"
@ -40,12 +61,6 @@
ResetPeriodInDays="1" ResetPeriodInDays="1"
RestartServiceDelayInSeconds="10" /> RestartServiceDelayInSeconds="10" />
</ServiceInstall> </ServiceInstall>
<ServiceControl Id="CardReaderServiceStarter"
Start="install"
Stop="uninstall"
Remove="uninstall"
Name="FlexitimeCardReaderService"
Wait="yes" />
</Component> </Component>
<Component Id="CardReaderServiceExeConfig" Guid="{E20D23BC-C8E7-49F8-962C-DE856A84258E}"> <Component Id="CardReaderServiceExeConfig" Guid="{E20D23BC-C8E7-49F8-962C-DE856A84258E}">
<File Id="CardReaderService.exe.config" <File Id="CardReaderService.exe.config"
@ -59,6 +74,18 @@
KeyPath="yes" KeyPath="yes"
Source="$(var.CardReaderService.TargetDir)Newtonsoft.Json.dll" /> Source="$(var.CardReaderService.TargetDir)Newtonsoft.Json.dll" />
</Component> </Component>
<Component Id="Ninject" Guid="{A5C71803-AD3C-45CB-9973-FB5B6C7579D2}">
<File Id="Ninject.dll"
Checksum="yes"
KeyPath="yes"
Source="$(var.CardReaderService.TargetDir)Ninject.dll" />
</Component>
<Component Id="NinjectConfig" Guid="{C7106002-A5E5-4223-AC34-75704C71D2F4}">
<File Id="NinjectConfig.xml"
Checksum="yes"
KeyPath="yes"
Source="$(var.CardReaderService.TargetDir)NinjectConfig.xml" />
</Component>
<Component Id="PCSC" Guid="{9DD367D4-3760-46DA-8A4A-6E801ED754D5}"> <Component Id="PCSC" Guid="{9DD367D4-3760-46DA-8A4A-6E801ED754D5}">
<File Id="pcsc_sharp.dll" <File Id="pcsc_sharp.dll"
Checksum="yes" Checksum="yes"