summaryrefslogtreecommitdiff
path: root/win
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@montyprogram.com>2013-04-30 00:29:47 +0200
committerVladislav Vaintroub <wlad@montyprogram.com>2013-04-30 00:29:47 +0200
commit8d75f11a67d620727b87ef3a00d61a6f92418817 (patch)
treebb7ab522f7784ad7133c157152dc66aa0517c543 /win
parent2ffc7d73b90b1a1cd9587c8941ed91f1c91a2e78 (diff)
downloadmariadb-git-8d75f11a67d620727b87ef3a00d61a6f92418817.tar.gz
MDEV-4458 - Windows installer does not launch upgrade wizard anymore, even if there are upgradable instances (i.e windows service of lower MariaDB/MySQL version)
The main reason for he error is misplaced ADD_DIRECTORY in top-level CMakeLists.txt. ADD_DIRECTORY(win/packaging) was places before win/upgrade_wizard, and MSI was not able to detect that upgrade wizard was built, and thus excluded upgrade wizard entirely.
Diffstat (limited to 'win')
-rw-r--r--win/packaging/ca/CustomAction.cpp2
-rw-r--r--win/packaging/extra.wxs.in11
2 files changed, 8 insertions, 5 deletions
diff --git a/win/packaging/ca/CustomAction.cpp b/win/packaging/ca/CustomAction.cpp
index 50b39adc0b1..67a17c2cc19 100644
--- a/win/packaging/ca/CustomAction.cpp
+++ b/win/packaging/ca/CustomAction.cpp
@@ -895,7 +895,7 @@ extern "C" UINT __stdcall CheckServiceUpgrades(MSIHANDLE hInstall)
Only look for services that have mysqld.exe outside of the current
installation directory.
*/
- if(strstr(props.mysqld_exe,installDir) == 0)
+ if(installDir[0] == 0 || strstr(props.mysqld_exe,installDir) == 0)
{
WcaLog(LOGMSG_STANDARD, "found service %S, major=%d, minor=%d",
info[i].lpServiceName, props.version_major, props.version_minor);
diff --git a/win/packaging/extra.wxs.in b/win/packaging/extra.wxs.in
index ff1a529a2ee..e0a36ef2e41 100644
--- a/win/packaging/extra.wxs.in
+++ b/win/packaging/extra.wxs.in
@@ -151,6 +151,9 @@
<Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Text="&amp;Next">
<Publish Event="Remove" Value="DBInstance">CreateOrUpgradeChoice = "Upgrade" </Publish>
<Publish Event="AddLocal" Value="DBInstance">CreateOrUpgradeChoice = "Create"</Publish>
+ <Publish Property="WIXUI_EXITDIALOGOPTIONALCHECKBOX" Value="[NonExistentProperty]">CreateOrUpgradeChoice = "Create"</Publish>
+ <Publish Property="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="[NonExistentProperty]">CreateOrUpgradeChoice = "Create"</Publish>
+ <Publish Property="WIXUI_EXITDIALOGOPTIONALCHECKBOX" Value="1">CreateOrUpgradeChoice = "Upgrade"</Publish>
<Publish Event="NewDialog" Value="CustomizeDlg">1</Publish>
</Control>
<Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="Cancel">
@@ -823,7 +826,7 @@
<Property
Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT"
Value="Launch wizard to upgrade existing MariaDB or MySQL services." />
- <Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOX" Value="1"/>
+ <Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOX" Value="0"/>
<Property Id="WixShellExecTarget" Value="[#F.bin.mysql_upgrade_wizard.exe]" />
<CustomAction Id="LaunchApplication"
BinaryKey="WixCA"
@@ -835,16 +838,16 @@
Execute="immediate" />
<InstallUISequence>
<Custom Action="CheckServiceUpgrades" After="CostFinalize">
- $C.bin.mysql_upgrade_wizard.exe = 3 AND NOT Installed
+ $C.bin.mysql_upgrade_wizard.exe = 3 AND NOT Installed AND NOT OLDERVERSIONBEINGUPGRADED
</Custom>
</InstallUISequence>
<SetProperty Before="ExecuteAction" Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT"
Sequence="ui" Value="[NonExistentProperty]">
- <![CDATA[($C.bin.mysql_upgrade_wizard.exe <> 3) AND NOT Installed]]>
+ <![CDATA[($C.bin.mysql_upgrade_wizard.exe <> 3) AND NOT Installed OR OLDERVERSIONBEINGUPGRADED]]>
</SetProperty>
<SetProperty Before="ExecuteAction" Id="WIXUI_EXITDIALOGOPTIONALCHECKBOX"
Sequence="ui" Value="[NonExistentProperty]">
- <![CDATA[($C.bin.mysql_upgrade_wizard.exe <> 3) AND NOT Installed]]>
+ <![CDATA[($C.bin.mysql_upgrade_wizard.exe <> 3) AND NOT Installed OR OLDERVERSIONBEINGUPGRADED]]>
</SetProperty>
<?endif ?> <!-- HaveUpgradeWizard -->