summaryrefslogtreecommitdiff
path: root/win
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@montyprogram.com>2011-02-14 19:36:06 +0100
committerVladislav Vaintroub <wlad@montyprogram.com>2011-02-14 19:36:06 +0100
commit3ec6533ac8e583c7bf6fd1c04ca5aef1a6950e46 (patch)
tree7d756dfaa276036e81587765c61a7e0060f33d84 /win
parent577d02b17d0a9c6df7f9b943c69c246519362d88 (diff)
downloadmariadb-git-3ec6533ac8e583c7bf6fd1c04ca5aef1a6950e46.tar.gz
MWL#55 : address Philip's final review comments :
- rename upgrade_wizard.exe to mysql_upgrade_wizard.exe - have shortcut to upgrade wizard in the menu folder
Diffstat (limited to 'win')
-rw-r--r--win/packaging/CMakeLists.txt2
-rw-r--r--win/packaging/extra.wxs.in43
-rw-r--r--win/upgrade_wizard/CMakeLists.txt10
3 files changed, 36 insertions, 19 deletions
diff --git a/win/packaging/CMakeLists.txt b/win/packaging/CMakeLists.txt
index 8ba436a518e..c004ceaa884 100644
--- a/win/packaging/CMakeLists.txt
+++ b/win/packaging/CMakeLists.txt
@@ -95,7 +95,7 @@ ENDIF()
GET_TARGET_PROPERTY(WIXCA_LOCATION wixca LOCATION)
SET(CPACK_WIX_CONFIG ${CMAKE_CURRENT_SOURCE_DIR}/CPackWixConfig.cmake)
-GET_TARGET_PROPERTY(upgrade_wizard_location upgrade_wizard LOCATION)
+GET_TARGET_PROPERTY(upgrade_wizard_location mysql_upgrade_wizard LOCATION)
IF(NOT upgrade_wizard_location)
SET(EXTRA_WIX_PREPROCESSOR_FLAGS "-dHaveUpgradeWizard=0")
ENDIF()
diff --git a/win/packaging/extra.wxs.in b/win/packaging/extra.wxs.in
index 932108ac50e..cb3c6eb864b 100644
--- a/win/packaging/extra.wxs.in
+++ b/win/packaging/extra.wxs.in
@@ -30,7 +30,15 @@
<Property Id="CLEANUPDATA" Secure="yes" Value="1"/>
<!-- Force per machine installation -->
<Property Id="ALLUSERS" Secure="yes" Value="1"/>
-
+ <!--
+ Check, if upgrade wizard was built
+ It currently requires MFC, which is not in SDK
+ neither in express edítions of VS.
+ -->
+ <?ifndef HaveUpgradeWizard ?>
+ <?define HaveUpgradeWizard="1"?>
+ <?endif?>
+
<!--
User interface dialogs
-->
@@ -435,6 +443,8 @@
Arguments="/k &quot;set MYSQL_HOME=[DATADIR]&amp;&amp; set PATH=[D.bin];%PATH%;&amp;&amp;echo Setting environment for [ProductName] &quot;"
Description="Opens command line in the installation bin directory" />
</Component>
+
+
</Feature>
<Feature Id="SharedClientServerComponents"
@@ -463,6 +473,20 @@
Arguments="/k &quot;set PATH=[D.bin];%PATH%;&amp;&amp;echo Setting environment for [ProductName] &quot;"
Description="Opens command line in the installation bin directory" />
</Component>
+ <?if $(var.HaveUpgradeWizard) != "0" ?>
+ <ComponentRef Id='C.bin.mysql_upgrade_wizard.exe'/>
+ <Component Id="c.shortcuts.upgrade_wizard" Guid="*" Directory="ShortcutFolder" Transitive="yes">
+ <RegistryValue
+ Root="HKCU" Key="Software\@CPACK_WIX_PACKAGE_NAME@\Uninstall"
+ Name="shortcuts.upgrade_wizard"
+ Value="1" Type="string" KeyPath="yes" />
+ <Shortcut Id="shortcut.upgrade_wizard"
+ Name="Upgrade Wizard (@CPACK_WIX_PACKAGE_NAME@)"
+ Target="[INSTALLDIR]bin\mysql_upgrade_wizard.exe"
+ Directory="ShortcutFolder"
+ Description="Upgrades older instances of MariaDB/MySQL services to version @MAJOR_VERSION@.@MINOR_VERSION@" />
+ </Component>
+ <?endif?>
</Feature>
<!-- Custom action, call mysql_install_db -->
@@ -592,14 +616,7 @@
Optionally, start upgrade wizard on exit.
-->
- <!--
- Check, if upgrade wizard was built
- It currently requires MFC, which is not in SDK
- neither in express edítions of VS.
- -->
- <?ifndef HaveUpgradeWizard ?>
- <?define HaveUpgradeWizard="1"?>
- <?endif?>
+
<?if $(var.HaveUpgradeWizard) != "0" ?>
<UI>
@@ -612,7 +629,7 @@
Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT"
Value="Launch wizard to upgrade existing MariaDB or MySQL services." />
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOX" Value="1"/>
- <Property Id="WixShellExecTarget" Value="[#F.bin.upgrade_wizard.exe]" />
+ <Property Id="WixShellExecTarget" Value="[#F.bin.mysql_upgrade_wizard.exe]" />
<CustomAction Id="LaunchApplication"
BinaryKey="WixCA"
DllEntry="WixShellExec"
@@ -623,16 +640,16 @@
Execute="immediate" />
<InstallUISequence>
<Custom Action="CheckServiceUpgrades" After="CostFinalize">
- $C.bin.upgrade_wizard.exe = 3 AND NOT Installed
+ $C.bin.mysql_upgrade_wizard.exe = 3 AND NOT Installed
</Custom>
</InstallUISequence>
<SetProperty Before="ExecuteAction" Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT"
Sequence="ui" Value="[NonExistentProperty]">
- <![CDATA[($C.bin.upgrade_wizard.exe <> 3) AND NOT Installed]]>
+ <![CDATA[($C.bin.mysql_upgrade_wizard.exe <> 3) AND NOT Installed]]>
</SetProperty>
<SetProperty Before="ExecuteAction" Id="WIXUI_EXITDIALOGOPTIONALCHECKBOX"
Sequence="ui" Value="[NonExistentProperty]">
- <![CDATA[($C.bin.upgrade_wizard.exe <> 3) AND NOT Installed]]>
+ <![CDATA[($C.bin.mysql_upgrade_wizard.exe <> 3) AND NOT Installed]]>
</SetProperty>
<?endif ?> <!-- HaveUpgradeWizard -->
diff --git a/win/upgrade_wizard/CMakeLists.txt b/win/upgrade_wizard/CMakeLists.txt
index 2e15087de43..44d6249ea1e 100644
--- a/win/upgrade_wizard/CMakeLists.txt
+++ b/win/upgrade_wizard/CMakeLists.txt
@@ -24,21 +24,21 @@ SET(CMAKE_MFC_FLAG 1)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/sql)
-MYSQL_ADD_EXECUTABLE(upgrade_wizard
+MYSQL_ADD_EXECUTABLE(mysql_upgrade_wizard
upgrade.cpp upgradeDlg.cpp upgrade.rc
COMPONENT Server)
-TARGET_LINK_LIBRARIES(upgrade_wizard winservice)
+TARGET_LINK_LIBRARIES(mysql_upgrade_wizard winservice)
# upgrade_wizard is Windows executable, set WIN32_EXECUTABLE so it does not
# create a console.
-SET_TARGET_PROPERTIES(upgrade_wizard PROPERTIES WIN32_EXECUTABLE 1)
+SET_TARGET_PROPERTIES(mysql_upgrade_wizard PROPERTIES WIN32_EXECUTABLE 1)
# Embed Vista "admin" manifest, since upgrade_wizard needs admin privileges
# to change service configuration. Due to a CMake bug http://www.vtk.org/Bug/view.php?id=11171
# it is not possible currenly to do it with linker flags. Work around is to use
# manifest tool mt.exe and embed the manifest post-build.
-GET_TARGET_PROPERTY(upgrade_wizard_location upgrade_wizard LOCATION)
+GET_TARGET_PROPERTY(upgrade_wizard_location mysql_upgrade_wizard LOCATION)
ADD_CUSTOM_COMMAND(
- TARGET upgrade_wizard POST_BUILD
+ TARGET mysql_upgrade_wizard POST_BUILD
COMMAND mt.exe -manifest ${CMAKE_CURRENT_SOURCE_DIR}/upgrade_wizard.exe.manifest
"-outputresource:${upgrade_wizard_location};#1"
)