Module: check_mk
Branch: master
Commit: 6427ae13a1010a062feae9cb0960ae3c62f79d37
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6427ae13a1010a…
Author: Sergey Kipnis <sk(a)mathias-kettner.de>
Date: Mon Apr 15 12:45:04 2019 +0200
[CMK-1970] - MSI installation fix, removed non-compatible options and forced upgrading
- version number is more realistic
- changed name of component to meaningful
Change-Id: I1af06e7497985b4850a581ba9be740d11b36cdb0
---
agents/wnx/install/Product.wxs | 11 ++++++++---
agents/wnx/src/engine/install_api.cpp | 7 +++++--
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/agents/wnx/install/Product.wxs b/agents/wnx/install/Product.wxs
index 2188b6a..811c906 100644
--- a/agents/wnx/install/Product.wxs
+++ b/agents/wnx/install/Product.wxs
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?define CompanyName = "Mathias Kettner GmbH"?>
<?define ProductName = "Check MK Service"?>
-<?define ProductVersion = "0.9.1"?>
+<?define ProductVersion = "1.6.0"?>
<?define ProductId = "{C3BDE55B-4C42-48D0-8792-B1DE5174C202}"?>
<?define ProductUpgradeCode = "83F434E9-EA96-4881-AA93-E21B27285C05"?>
<?define PackageCode = "BAEBF560-7308-4D53-B426-903EA74B1D7E"?>
@@ -38,7 +38,12 @@
<!-- Property Id="ALLUSERS" Value="1" /<- This option
already set -->
<Property Id="REINSTALLMODE" Value="amus" />
- <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is
already installed." />
+
+ <!--
+ <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is
already installed. Stopping installation" />
+ this code is disabled, because bakery/msi-update is not able to upgrade versions
correctly
+ -->
+ <MajorUpgrade AllowDowngrades="yes" />
<Upgrade Id="$(var.ProductUpgradeCode)">
<UpgradeVersion Minimum="$(var.ProductVersion)"
@@ -275,7 +280,7 @@
</DirectoryRef>
<!-- Step 3: Tell WiX to install the files -->
- <Feature Id="plugin_player_binaries" Title="Binaries of Plugin
Player" Level="1">
+ <Feature Id="installable_binaries" Title="Binaries to be
Installed" Level="1">
<!--
<ComponentRef Id="plugin_player32_" />
diff --git a/agents/wnx/src/engine/install_api.cpp
b/agents/wnx/src/engine/install_api.cpp
index d8c5e4d..cd478b2 100644
--- a/agents/wnx/src/engine/install_api.cpp
+++ b/agents/wnx/src/engine/install_api.cpp
@@ -177,8 +177,11 @@ bool CheckForUpdateFile(const std::wstring& Name,
// Prepare Command
std::wstring command = exe + L" ";
- command = command + L" /i " + msi_to_install.wstring() +
- L" REINSTALL=ALL REINSTALLMODE=amus ";
+ // original line includes also command REINSTALL=ALL
+ // this doesn't work well when you have more than one FEATURE(new agent)
+ // and no defined REINSTALL in the MSI
+ command =
+ command + L" /i " + msi_to_install.wstring() + L"
REINSTALLMODE=amus ";
if (Update == kMsiExecQuiet) // this is only normal method
command += L" /quiet"; // but MS doesn't care at all :)