[checkmk-commits] Check_MK Git: check_mk: added check_mk_agent_vanilla msi template

Andreas Boesl ab at mathias-kettner.de
Wed Feb 25 10:03:32 CET 2015


Module: check_mk
Branch: master
Commit: b7d6c838cf412c90e15bdb1614299cc9ade431f2
URL:    http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b7d6c838cf412c90e15bdb1614299cc9ade431f2

Author: Andreas Boesl <ab at mathias-kettner.de>
Date:   Wed Feb 25 10:03:26 2015 +0100

added check_mk_agent_vanilla msi template

---

 .../windows_msi/check_mk_agent_vanilla.wxs         |  144 ++++++++++++++++++++
 1 file changed, 144 insertions(+)

diff --git a/doc/treasures/windows_msi/check_mk_agent_vanilla.wxs b/doc/treasures/windows_msi/check_mk_agent_vanilla.wxs
new file mode 100644
index 0000000..bde619a
--- /dev/null
+++ b/doc/treasures/windows_msi/check_mk_agent_vanilla.wxs
@@ -0,0 +1,144 @@
+<?xml version="1.0"?>
+<?define CompanyName = "Mathias Kettner GmbH"?>
+<?define ProductVersion = "1.2.5"?>
+<?define ProductUpgradeCode = "854bb2c1-f4aa-4c5c-89e4-8fb0bdfb9ee4"?>
+<?define PackageCode = "08012468-53DE-42A3-BAA9-FE4C2A129135"?>
+
+
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
+     xmlns:util='http://schemas.microsoft.com/wix/UtilExtension'>
+   <Product Id="*" UpgradeCode="$(var.ProductUpgradeCode)"
+            Name="Check_MK Agent MSI" Version="$(var.ProductVersion)" Manufacturer="Mathias Kettner GmbH" Language="1033">
+        <Package Id="$(var.PackageCode)" InstallerVersion="200" Platform="x86" Compressed="yes" Description="Check_MK 32/64 bit MSI installer"/>
+        <Media Id="1" Cabinet="product.cab" CompressionLevel="none" EmbedCab="yes"/>
+
+        <Property Id="REINSTALLMODE" Value="amus" />
+        <MajorUpgrade AllowDowngrades="yes" />
+
+        <Upgrade Id="$(var.ProductUpgradeCode)">
+            <UpgradeVersion Minimum="$(var.ProductVersion)"
+                            Property="NEWERVERSIONDETECTED"/>
+            <UpgradeVersion Minimum="0.0.0"
+                            Maximum="$(var.ProductVersion)"
+                            IncludeMinimum="yes"
+                            IncludeMaximum="no"
+                            Property="OLDERVERSIONBEINGUPGRADED"/>
+        </Upgrade>
+
+
+        <Directory Id="TARGETDIR" Name="SourceDir">
+            <Directory Id="ProgramFilesFolder">
+                <Directory Id="APPLICATIONROOTDIRECTORY" Name="check_mk">
+                    <Directory Id="INSTALLDIR"/>
+                </Directory>
+            </Directory>
+        </Directory>
+
+
+        <!-- Existing install path -->
+        <Property Id="EXISTINGINSTALLDIR" Secure="yes">
+            <RegistrySearch Id="Locate_EXISTINGINSTALLDIR" Root="HKLM"
+                            Key="Software\check_mk_agent" Name="Install_Dir" Type="directory" />
+        </Property>
+
+        <!-- custom action specification -->
+        <CustomAction Id="Set_INSTALLDIR"   Execute="firstSequence" Property="INSTALLDIR" Value="[EXISTINGINSTALLDIR]" />
+
+
+        <InstallExecuteSequence>
+            <Custom Action="Set_INSTALLDIR" Before="CostFinalize"><![CDATA[NOT Installed AND (NOT INSTALLDIR) AND EXISTINGINSTALLDIR]]></Custom>
+        </InstallExecuteSequence>
+
+        <InstallUISequence>
+            <Custom Action="Set_INSTALLDIR" Before="CostFinalize"><![CDATA[NOT Installed AND (NOT INSTALLDIR) AND EXISTINGINSTALLDIR]]></Custom>
+        </InstallUISequence>
+
+        <Property Id="INSTALLSERVICE" Value="1" />
+
+        <Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR"/>
+        <WixVariable Id="WixUILicenseRtf" Value="sources\GPL-V2.rtf" />
+        <UIRef Id="CmkWixUI_InstallDir"/>
+
+        <CustomAction Id="install_service"
+              Directory ="INSTALLDIR"
+              ExeCommand='[INSTALLDIR]check_mk_agent.exe install'
+              Execute   ="immediate"
+              Return    ="ignore"/>
+
+        <CustomAction Id="uninstall_service"
+              Directory ="INSTALLDIR"
+              ExeCommand='[INSTALLDIR]check_mk_agent.exe remove'
+              Execute   ="immediate"
+              Return    ="ignore"/>
+
+        <CustomAction Id="uninstall_plugins"
+              Directory ="INSTALLDIR"
+              ExeCommand='[INSTALLDIR]uninstall_plugins.bat'
+              Execute   ="immediate"
+              Return    ="ignore"/>
+
+        <CustomAction Id="start_service"
+              Directory ="INSTALLDIR"
+              ExeCommand='net start check_mk_agent'
+              Execute   ="immediate"
+              Return    ="ignore"/>
+
+        <CustomAction Id="stop_service"
+              Directory ="INSTALLDIR"
+              ExeCommand='net stop check_mk_agent'
+              Execute   ="immediate"
+              Return    ="ignore"/>
+
+        <InstallExecuteSequence>
+            <Custom Action="install_service" After="InstallFinalize">NOT REMOVE="ALL" AND INSTALLSERVICE</Custom>
+            <Custom Action="start_service"   After="InstallFinalize">NOT REMOVE="ALL" AND INSTALLSERVICE</Custom>
+        </InstallExecuteSequence>
+
+        <InstallExecuteSequence>
+           <Custom Action="stop_service"      After="InstallInitialize">REMOVE="ALL"</Custom>
+           <Custom Action='uninstall_service' After='InstallInitialize'>REMOVE="ALL"</Custom>
+           <Custom Action='uninstall_plugins' After='InstallInitialize'>REMOVE="ALL"</Custom>
+        </InstallExecuteSequence>
+
+        <DirectoryRef Id="INSTALLDIR">
+            <Component Id="agent32" Guid="60d6ba87-1f56-4d24-817f-a5966eb8b116">
+                <File Id="check_mk_agent.exe" Source="sources\check_mk_agent.exe"
+                      Name="check_mk_agent.exe" KeyPath="yes" Checksum="yes"/>
+                <Condition>NOT VersionNT64</Condition>
+            </Component>
+            <Component Id="agent64" Guid="7c2e82ec-c80e-436e-9a29-fe7d0e8f3589">
+                <File Id="check_mk_agent64.exe" Source="sources\check_mk_agent-64.exe"
+                      Name="check_mk_agent.exe" KeyPath="yes" Checksum="yes"/>
+                <Condition>VersionNT64</Condition>
+            </Component>
+            <Component Id="check_mk.example.ini" Guid="1383472d-d59e-4c7d-beca-02574758212a">
+                <File Id="check_mk.example.ini" Source="sources\check_mk.example.ini"/>
+            </Component>
+	        <Directory Id="LocalName" Name="local">
+  		        <Component Id="localFolder" Guid="f0cdd975-2dad-45c5-b089-d566d7418ae7">
+    			    <CreateFolder Directory="LocalName"/>
+  		        </Component>
+	        </Directory>
+	        <Directory Id="PluginName" Name="plugins">
+  		        <Component Id="pluginFolder" Guid="2384da34-a212-4eda-ac1b-365d2f2686ab">
+    			    <CreateFolder Directory="PluginName"/>
+  		        </Component>
+	        </Directory>
+            <Component Id="RegistryEntries" Guid="c1feaa52-851d-4c68-bd3e-6725bbdf6370">
+                <RegistryKey Root="HKLM" Key="Software\check_mk_agent">
+                    <RegistryValue Type="string"  Name="Install_Dir" Value="[INSTALLDIR]"/>
+                </RegistryKey>
+            </Component>
+        </DirectoryRef>
+
+
+        <Feature Id="Agent" Level="1">
+            <ComponentRef Id="agent32"/>
+            <ComponentRef Id="agent64"/>
+            <ComponentRef Id="check_mk.example.ini"/>
+            <ComponentRef Id="localFolder"/>
+            <ComponentRef Id="pluginFolder"/>
+            <ComponentRef Id="RegistryEntries"/>
+        </Feature>
+    </Product>
+</Wix>



More information about the checkmk-commits mailing list