source: nscp/helpers/installers/installer/Product.wxs @ e11d494

0.4.00.4.10.4.2
Last change on this file since e11d494 was e11d494, checked in by Michael Medin <michael@…>, 22 months ago

2011-07-25

  • merged in all 0.3.9 changes into 0.4.0
  • refactored where filter to be "non template" to drastically reduce compile time (as well as potentially size if I ever go dll instead of static link)
  • streamlined checkeventlog toi be same as "the other" where filters as well as dropped support of "old" syntax.
  • Property mode set to 100644
File size: 16.3 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:fire="http://schemas.microsoft.com/wix/FirewallExtension" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
3
4        <?if "$(var.arch)" = "x64"?>
5                <?define Postfix.GUID = "DD5862EE637C" ?>
6                <?define ProgramFiles = "ProgramFiles64Folder" ?>
7                <?define Win64 = "yes" ?>
8                <?define Plattform = "x64" ?>
9        <?else?>
10                <?define Postfix.GUID = "DD5862EE637B" ?>
11                <?define ProgramFiles = "ProgramFilesFolder" ?>
12                <?define Win64 = "no" ?>
13                <?define Plattform = "x86" ?>
14        <?endif?>
15
16        <?define Version.String = "$(var.Version.Major).$(var.Version.Minor).$(var.Version.Revision).$(var.Version.Build)" ?>
17        <?define UpgradeCode = "0B36E3B7-0042-452d-B376-57E0C07ADDAA" ?>
18       
19        <?include config.wxs ?>
20
21        <Product Id="*" Name="$(var.App.Title) ($(var.arch))" Language="1033" Version="$(var.Version.String)" Manufacturer="MySolutions NORDIC" UpgradeCode="$(var.UpgradeCode)">
22
23                <Package Id="*" Description="A simple windows monitor agent for (amongst others) Nagios."
24                                                 Comments="This will appear in the file summary stream." InstallerVersion="200" Compressed="yes" Languages="1033" Platform="$(var.Plattform)" />
25
26                <Upgrade Id="$(var.UpgradeCode)">
27                        <UpgradeVersion Property="OLDAPPFOUND" IncludeMinimum="yes" Minimum="0.3.0.0" IncludeMaximum="no" Maximum="$(var.Version.String)"/>
28                        <UpgradeVersion Property="NEWAPPFOUND" IncludeMinimum="no" Minimum="$(var.Version.String)" OnlyDetect="yes"/>
29                </Upgrade>
30
31                <?if "$(var.arch)" = "x64"?>
32                        <Condition Message="Win32 bit version not supported (by installer) on x64 bit platform (get x64 bit version instead)">VersionNT64</Condition>
33                <?else?>
34                        <Condition Message="x64 bit version not supported (by installer) on Win32 bit platform (get Win32 bit version instead)">NOT VersionNT64</Condition>
35                <?endif?>
36                <Media Id="1" Cabinet="Product.cab" EmbedCab="yes" CompressionLevel="high" />
37                <Directory Id="TARGETDIR" Name="SourceDir">
38                        <Directory Id="$(var.ProgramFiles)">
39                                <Directory Id="INSTALLLOCATION" Name="$(var.App.Path)">
40                                        <Component Id="MainClient" Guid="F6636DB0-A0B9-4dd2-B74C-$(var.Postfix.GUID)" Win64="$(var.Win64)">
41                                                <File Id="NSClientEXE" Name="nscp.exe" DiskId="1" KeyPath="yes"
42                                                                Source="$(var.Source)/nscp.exe" Vital="yes">
43                                                        <Shortcut Id="StartmenuNSClientTest" Directory="ProgramMenuDir"
44                                                                Name="$(var.App.Title) ($(var.arch), test)" WorkingDirectory="INSTALLDIR" Icon="nscp.exe"
45                                                                Advertise="yes" IconIndex="0" Arguments="--test" Description="Run $(var.App.Title) in test mode" />
46                                                        <fire:FirewallException Id="FWX1" Name="NSClient++ Monitoring Agent" Scope="any" IgnoreFailure="yes" />
47                                                </File>
48                                                <ServiceInstall Id="SWCNSCP"
49                                                        Name="[SERVICE_NAME]" DisplayName="$(var.App.Title) ($(var.arch))"
50                                                        Type="ownProcess" Start="auto" ErrorControl="normal" Interactive="no"
51                                                        Description="Monitoring agent for nagios (and others) used to respond to status queries"
52                                                        Arguments="--service --run --name [SERVICE_NAME]" />
53                                                <ServiceControl Id="StartSWCNSCP" Name="[SERVICE_NAME]" Start="install" Stop="both" Wait="yes" Remove="uninstall" />
54                                                <RemoveFolder Id="RemoveMenuShortcuts" Directory="ProgramMenuDir" On="uninstall" />
55                                        </Component>
56                                        <Component Id="Shortcuts" Guid="E6636DB0-A0B9-4dd2-B74C-$(var.Postfix.GUID)" Win64="$(var.Win64)">
57                                                <Shortcut Id="StartmenuNSClientStart" Directory="ProgramMenuDir" Name="Start $(var.App.Title) ($(var.arch))"
58                                                                  WorkingDirectory='INSTALLDIR' Icon="nscp.exe" IconIndex="0"
59                                                                  Arguments="--service --name [SERVICE_NAME] --start" Description="Start the $(var.App.Title) service" />
60                                                <Shortcut Id="StartmenuNSClientStop" Directory="ProgramMenuDir" Name="Stop $(var.App.Title) ($(var.arch))"
61                                                                  WorkingDirectory='INSTALLDIR' Icon="nscp.exe" IconIndex="0"
62                                                                  Arguments="--service --name [SERVICE_NAME] --stop" Description="Stop the $(var.App.Title) service" />
63                                                <Shortcut Id="StarmentNSCHelp" Directory="ProgramMenuDir" Name="Documentation"
64                                                                  Target="[HELP_LINK]" Icon="doc.ico"
65                                                                  Description="Visit the NSClient++ WIKI for documentation">
66                                                </Shortcut>
67                                                <RegistryValue Root="HKCU" Key="Software\NSClient++\Installer" Name="shortcuts" Type="integer" Value="1" KeyPath="yes"/>
68                                        </Component>
69                                        <Component Id="Helpers" Guid="A6636DB0-A0B9-4dd2-B74C-$(var.Postfix.GUID)" Win64="$(var.Win64)">
70                                                <!--
71                                                <File Id="NSClientTRAY" Name="nstray.exe" DiskId="1"
72                                                                Source="$(var.Source)/nstray.exe" Vital="yes">
73                                                        <Shortcut Id="StartmenuNSClientTray" Directory="ProgramMenuDir" Name="NSCPTray"
74                                                                LongName="$(var.App.Title) ($(var.arch)) system tray)" WorkingDirectory="INSTALLDIR" Icon="nstray.exe"
75                                                                IconIndex="0" Description="Start the $(var.App.Title) systemtray agent"/>
76                                                </File>
77                                                -->
78                                                <File Id="ErrorReporter" Name="reporter.exe" DiskId="1" Source="$(var.Source)/reporter.exe" Vital="yes" />
79                                                <!--
80                                                        <File Id="NSClientINI" Name="NSC.ini" LongName="NSC.ini" DiskId="1" Source="$(var.Path.ini)/NSC.ini" Vital="yes"/>
81                                                -->
82                                        </Component>
83                                        <Component Id="RandomFiles" Guid="B4636DB0-A0B9-4dd2-B74C-$(var.Postfix.GUID)" Win64="$(var.Win64)">
84                                                <File Id="Changelog" Name="changelog.txt" DiskId="1" Source="$(var.Source)/changelog" Vital="no" />
85                                                <File Id="Counters" Name="counters.defs" DiskId="1" Source="$(var.Source)/counters.defs" Vital="no" />
86                                                <File Id="License" Name="license.txt" DiskId="1" Source="$(var.Source)/license.txt" Vital="no" KeyPath="yes" />
87                                                <File Id="settingsMap" Name="old-settings.map" DiskId="1" Source="$(var.Source)/old-settings.map" Vital="no" />
88
89                                                <RemoveFile Id="LogFile1" Name="nsclient.log" On="uninstall" />
90                                                <RemoveFile Id="LogFile2" Name="nsc.log" On="uninstall" />
91                                                <RemoveFile Id="OldConfig" Name="nsc.old" On="uninstall" />
92                                                <RemoveFile Id="NewConfig" Name="nsc.new" On="uninstall" />
93                                        </Component>
94                                        <Component Id="NagiosDocumentation" Guid="9B490E67-5472-4267-889C-$(var.Postfix.GUID)" Win64="$(var.Win64)">
95                                                <File Id="doc.usage.nagios" Name="Nagios Usage Guide.pdf" DiskId="1" Source="$(var.Source)/docs/Nagios Usage Guide.pdf" Vital="no" KeyPath="yes">
96                                                        <Shortcut Id="Startmenu.doc.nagios" Directory="ProgramMenuDir" Name="Nagios Usage Guide" Advertise="yes"
97                                                                          WorkingDirectory="INSTALLDIR" Description="Nagios Usage Guide"/>
98                                                </File>
99                                        </Component>
100                                        <Component Id="ReferenceDocumentation" Guid="8B490E67-5472-4267-889C-$(var.Postfix.GUID)" Win64="$(var.Win64)">
101                                                <File Id="doc.reference" Name="NSClient++ Reference Manual.pdf" DiskId="1" Source="$(var.Source)/docs/NSClient++ Reference Manual.pdf" Vital="no" KeyPath="yes">
102                                                        <Shortcut Id="Startmenu.doc.ref" Directory="ProgramMenuDir" Name="NSClient++ Reference Manual" Advertise="yes"
103                                                                          WorkingDirectory="INSTALLDIR" Description="NSClient++ Reference Manual"/>
104                                                </File>
105                                        </Component>
106                                        <Directory Id="INSTALLLOCATION_SECURITY" Name="security">
107                                                <Component Id="NRPEServerCert" Guid="5A0246F8-5167-45db-2E46-$(var.Postfix.GUID)" Win64="$(var.Win64)">
108                                                        <File Id="NRPECert" Name="nrpe_dh_512.pem" DiskId="1" Source="$(var.Source)/security/nrpe_dh_512.pem" Vital="no"/>
109                                                </Component>
110                                        </Directory>
111                                        <Directory Id="INSTALLLOCATION_MODS" Name="modules">
112                                                <Component Id="NRPEServer" Guid="5A0246F8-5167-45db-B246-$(var.Postfix.GUID)" Win64="$(var.Win64)">
113                                                        <File Id="NRPEListenerDLL" Name="NRPEListener.dll" DiskId="1" Source="$(var.Source)/modules/NRPEServer.dll" Vital="no" />
114                                                        <File Id="NRPEClientDLL" Name="NRPEClient.dll" DiskId="1" Source="$(var.Source)/modules/NRPEClient.dll" Vital="no" />
115                                                </Component>
116                                                <Component Id="NSCListener" Guid="6DAF8BB9-9A56-48f5-B2C5-$(var.Postfix.GUID)" Win64="$(var.Win64)">
117                                                        <File Id="NSCListenerDLL" Name="NSClientListener.dll" DiskId="1" Source="$(var.Source)/modules/NSClientServer.dll" Vital="no" />
118                                                </Component>
119                                                <Component Id="NSCA" Guid="8820A304-C596-4393-A72F-$(var.Postfix.GUID)" Win64="$(var.Win64)">
120                                                        <File Id="NSCAAgentDLL" Name="NSCAAgent.dll" DiskId="1" Source="$(var.Source)/modules/NSCAAgent.dll" Vital="no" />
121                                                        <File Id="SchedulerDLL" Name="Scheduler.dll" DiskId="1" Source="$(var.Source)/modules/Scheduler.dll" Vital="no" />
122                                                </Component>
123                                                <Component Id="Plugins" Guid="9B490E67-5472-4266-96DC-$(var.Postfix.GUID)" Win64="$(var.Win64)">
124                                                        <!-- NOT PORTED MODULES !
125                                                                <File Id="ModRemoteConfiguration.dll" Name="RmtCfg.dll" LongName="RemoteConfiguration.dll" DiskId="1" Source="$(var.Source)/modules/RemoteConfiguration.dll" Vital="no" />
126                                                                <File Id="ModSysTray.dll" Name="SysTray.dll" LongName="SysTray.dll" DiskId="1" Source="$(var.Source)/modules/SysTray.dll" Vital="no" />
127                                                                <File Id="A_DebugLogMetrics.dll" Name="ADebug.dll" LongName="A_DebugLogMetrics.dll" DiskId="1" Source="$(var.Source)/modules/A_DebugLogMetrics.dll" Vital="no" />
128                                                        -->
129                                                        <File Id="ModCheckEventLog.dll" Name="CheckEventLog.dll" DiskId="1" Source="$(var.Source)/modules/CheckEventLog.dll" Vital="no" />
130                                                        <File Id="ModCheckExternalScripts.dll" Name="CheckExternalScripts.dll" DiskId="1" Source="$(var.Source)/modules/CheckExternalScripts.dll" Vital="no" />
131                                                        <File Id="ModCheckHelpers.dll" Name="CheckHelpers.dll" DiskId="1" Source="$(var.Source)/modules/CheckHelpers.dll" Vital="no" />
132                                                        <File Id="ModCheckSystem.dll" Name="CheckSystem.dll" DiskId="1" Source="$(var.Source)/modules/CheckSystem.dll" Vital="no" />
133                                                        <File Id="ModCheckWMI.dll" Name="CheckWMI.dll" DiskId="1" Source="$(var.Source)/modules/CheckWMI.dll" Vital="no" />
134                                                        <File Id="ModFileLogger.dll" Name="FileLogger.dll" DiskId="1" Source="$(var.Source)/modules/FileLogger.dll" Vital="no" />
135                                                        <File Id="ModLUAScript.dll" Name="LUAScript.dll" DiskId="1" Source="$(var.Source)/modules/LUAScript.dll" Vital="no" />
136                                                        <File Id="ModCheckNSCP.dll" Name="CheckNSCP.dll" DiskId="1" Source="$(var.Source)/modules/CheckNSCP.dll" Vital="no" />
137                                                        <File Id="ModCheckDisk.dll" Name="CheckDisk.dll" DiskId="1" Source="$(var.Source)/modules/CheckDisk.dll" Vital="no" />
138                                                        <File Id="ModCheckTaskSched.dll" Name="CheckTaskSched.dll" DiskId="1" Source="$(var.Source)/modules/CheckTaskSched.dll" Vital="no" />
139                                                        <File Id="ModCheckTaskSched2.dll" Name="CheckTaskSched2.dll" DiskId="1" Source="$(var.Source)/modules/CheckTaskSched2.dll" Vital="no" />
140                                                </Component>
141                                        </Directory>
142                                        <Directory Id="INSTALLLOCATION_SCRIPTS" Name="scripts">
143                                                <Component Id="Scripts" Guid="9B490E67-5472-4268-96DF-$(var.Postfix.GUID)" Win64="$(var.Win64)">
144                                                        <File Id="script001" Name="check_60s.bat" DiskId="1" Source="$(var.Source)/scripts/check_60s.bat" Vital="no" />
145                                                        <File Id="script002" Name="check_battery.vbs" DiskId="1" Source="$(var.Source)/scripts/check_battery.vbs" Vital="no" />
146                                                        <File Id="script003" Name="check_no_rdp.bat" DiskId="1" Source="$(var.Source)/scripts/check_no_rdp.bat" Vital="no" />
147                                                        <File Id="script004" Name="check_printer.vbs" DiskId="1" Source="$(var.Source)/scripts/check_printer.vbs" Vital="no" />
148                                                        <File Id="script005" Name="check_ok.bat" DiskId="1" Source="$(var.Source)/scripts/check_ok.bat" Vital="no" />
149                                                        <File Id="script006" Name="check_files.vbs" DiskId="1" Source="$(var.Source)/scripts/check_files.vbs" Vital="no" />
150                                                        <File Id="script007" Name="check_ping.bat" DiskId="1" Source="$(var.Source)/scripts/check_ping.bat" Vital="no" />
151                                                        <File Id="script008" Name="check_updates.vbs" DiskId="1" Source="$(var.Source)/scripts/check_updates.vbs" Vital="no" />
152                                                        <File Id="sample002" Name="check_test.ps1" DiskId="1" Source="$(var.Source)/scripts/check_test.ps1" Vital="no" />
153                                                        <File Id="sample003" Name="check_test.vbs" DiskId="1" Source="$(var.Source)/scripts/check_test.vbs" Vital="no" />
154                                                        <!--
155                                                                Scripts missing
156                                                        <File Id="lua001" Name="test.lua" LongName="test.lua" DiskId="1" Source="$(var.Source)/scripts/test.lua" Vital="no" />
157                                                        -->
158                                                </Component>
159                                                <Directory Id="INSTALLLOCATION_SCRIPTS_LIB" Name="lib">
160                                                        <Component Id="ScriptLibs" Guid="9B490E67-5472-4267-96DF-$(var.Postfix.GUID)" Win64="$(var.Win64)">
161                                                                <File Id="lib001" Name="NagiosPlugins.vbs" DiskId="1" Source="$(var.Source)/scripts/lib/NagiosPlugins.vbs" Vital="no" />
162                                                                <File Id="lib002" Name="wrapper.vbs" DiskId="1" Source="$(var.Source)/scripts/lib/wrapper.vbs" Vital="no" />
163                                                        </Component>
164                                                </Directory>
165                                        </Directory>
166                                </Directory>
167                        </Directory>
168
169                        <!-- ### Start Menu Items ### -->
170                        <Directory Id="ProgramMenuFolder" Name="Programs">
171                                <Directory Id="ProgramMenuDir" Name="$(var.App.StartMenuPath)" />
172                        </Directory>
173                </Directory>
174
175                <!-- ### FEATURES START ### -->
176                <Feature Id="ProductFeature" Title="NSClient++ $(var.arch)" Description="Binaries for $(var.arch)"
177                                                         Display="expand"  Level="1" ConfigurableDirectory="INSTALLLOCATION" Absent="disallow">
178                        <Feature Id="MainProgram" Title="Program" Description="Main Service" Level="1" Absent="disallow">
179                                <ComponentRef Id="MainClient" />
180                                <ComponentRef Id="Shortcuts" />
181                                <ComponentRef Id="Helpers" />
182                                <ComponentRef Id="RandomFiles" />
183                        </Feature>
184                        <Feature Id="Documentation" Title="Documentation (pdf)" Description="Documentation for NSClient++ and how to use it from Nagios" Level="1">
185                                <ComponentRef Id="NagiosDocumentation" />
186                                <ComponentRef Id="ReferenceDocumentation" />
187                        </Feature>
188                        <Feature Id="Plugins" Title="Plugins" Description="Plugins" Level="1" Absent="disallow">
189                                <Feature Id="CheckPlugins" Title="Check Plugins" Description="Various plugins to check your system. (Includes all check plugins)" Level="1">
190                                        <ComponentRef Id="Plugins" />
191                                </Feature>
192                                <Feature Id="NRPEPlugins" Title="NRPE Support" Description="NRPE Listener Plugin. Support for the more vercitile NRPE protocol (check_nrpe)" Level="1" Absent="disallow">
193                                        <ComponentRef Id="NRPEServer" />
194                                        <ComponentRef Id="NRPEServerCert" />
195                                </Feature>
196                                <Feature Id="NSCPlugins" Title="NSClient support" Description="NSClient Listener Plugin. Support for the old NSClient protocol (check_nt)" Level="1" Absent="disallow">
197                                        <ComponentRef Id="NSCListener" />
198                                </Feature>
199                                <Feature Id="NSCAPlugin" Title="NSCA plugin" Description="Plugin to submit passive results to an NSCA server" Level="1" Absent="disallow">
200                                        <ComponentRef Id="NSCA" />
201                                </Feature>
202                                <Feature Id="SampleScripts" Title="Sample Scripts" Description="Some sample client-side scripts to use with NRPE" Level="1" Absent="disallow">
203                                        <ComponentRef Id="Scripts" />
204                                        <ComponentRef Id="ScriptLibs" />
205                                </Feature>
206                        </Feature>
207                </Feature>
208
209                <CustomAction Id='ImportConfig'                 BinaryKey='InstallerHelper' DllEntry='ImportConfig'                     Impersonate='yes' Execute="immediate" Return="check" />
210                <CustomAction Id='ScheduleWriteConfig'  BinaryKey='InstallerHelper' DllEntry='ScheduleWriteConfig'      Impersonate='yes' Execute="immediate" Return="check" />
211                <CustomAction Id="ExecWriteConfig"              BinaryKey="InstallerHelper" DllEntry="ExecWriteConfig"          Impersonate="no" Execute="deferred" Return="check"  />
212
213                <CustomAction Id='NeedUninstall'                BinaryKey='InstallerHelper' DllEntry='NeedUninstall'            Impersonate='yes' Execute="immediate" Return="check" />
214                <CustomAction Id="PreventDowngrading"   Error="Newer version already installed." />
215
216                <Binary Id='InstallerHelper' SourceFile='$(var.Helpers)/main_dll.dll' />
217
218                <InstallExecuteSequence>
219                        <RemoveExistingProducts After='InstallInitialize'/>
220                        <Custom Action="PreventDowngrading" After="FindRelatedProducts">NEWAPPFOUND</Custom>
221                        <Custom Action="ScheduleWriteConfig" After='InstallFiles' />
222                </InstallExecuteSequence>
223
224                <InstallUISequence>
225                        <Custom Action="PreventDowngrading" After="FindRelatedProducts">NEWAPPFOUND</Custom>
226                        <Custom Action="NeedUninstall" After="FindRelatedProducts" >1</Custom>
227                        <Custom Action="ImportConfig" After="CostFinalize" >1</Custom>
228                </InstallUISequence>
229
230                <Property Id="ALLUSERS">
231                        <![CDATA[2]]>
232                </Property>
233                <?include properties.wxs ?>
234
235                <!-- ### User Interfaces ### -->
236                <UIRef Id="WixUI_MondoNSCP" />
237                <UIRef Id="WixUI_ErrorProgressText" />
238
239                <!-- ### Icons -->
240                <Icon Id="nscp.exe" SourceFile="$(var.Source)/nscp.exe" />
241                <Icon Id="doc.ico" SourceFile="../../../resources/help.ico"/>
242        </Product>
243</Wix>
Note: See TracBrowser for help on using the repository browser.