summaryrefslogtreecommitdiff
path: root/win
diff options
context:
space:
mode:
Diffstat (limited to 'win')
-rw-r--r--win/packaging/CMakeLists.txt41
-rw-r--r--win/packaging/CPackWixConfig.cmake2
-rw-r--r--win/packaging/ca/CMakeLists.txt13
-rw-r--r--win/packaging/ca/CustomAction.cpp271
-rw-r--r--win/packaging/ca/CustomAction.def3
-rw-r--r--win/packaging/ca/symlinks.cc.in6
-rw-r--r--win/packaging/ca/symlinks.h8
-rw-r--r--win/packaging/create_msi.cmake8
-rw-r--r--win/packaging/extra.wxs.in101
-rw-r--r--win/upgrade_wizard/CMakeLists.txt29
10 files changed, 22 insertions, 460 deletions
diff --git a/win/packaging/CMakeLists.txt b/win/packaging/CMakeLists.txt
index 66ac6300728..ba4a631f5fd 100644
--- a/win/packaging/CMakeLists.txt
+++ b/win/packaging/CMakeLists.txt
@@ -123,7 +123,7 @@ ELSE()
ENDIF()
SET(CPACK_WIX_CONFIG ${CMAKE_CURRENT_SOURCE_DIR}/CPackWixConfig.cmake)
-IF(NOT TARGET mysql_upgrade_wizard)
+IF(NOT TARGET mariadb-upgrade-wizard)
SET(EXTRA_WIX_PREPROCESSOR_FLAGS "-dHaveUpgradeWizard=0")
ENDIF()
IF(WITH_INNOBASE_STORAGE_ENGINE)
@@ -176,43 +176,6 @@ IF(CMAKE_GENERATOR MATCHES "Visual Studio")
SET(CONFIG_PARAM "-DCMAKE_INSTALL_CONFIG_NAME=${CMAKE_CFG_INTDIR}")
ENDIF()
-IF(MSVC_CRT_TYPE MATCHES "/MD")
- # Find out CRT merge module path, we're going to use it in installer
- # The path and name depends on VS version
- IF(MSVC_VERSION LESS 1900)
- # VS2015
- SET(VCREDIST_MSM_FILENAME Microsoft_VC140_CRT_${WIX_ARCH_SUFFIX}.msm)
- SET(ProgramFilesX86 "ProgramFiles(x86)")
- FIND_FILE(${VCREDIST_MSM_FILENAME}
- NO_DEFAULT_PATH
- PATHS
- "$ENV{${ProgramFilesX86}}/Common Files/Merge Modules"
- "$ENV{ProgramFiles}/Common Files/Merge Modules"
- )
- ELSEIF(MSVC_VERSION LESS 1920)
- # VS2017
- SET(VCREDIST_MSM_FILENAME Microsoft_VC141_CRT_${WIX_ARCH_SUFFIX}.msm)
- FILE(GLOB MSM_LIST "C:/Program Files*/Microsoft Visual Studio/2017/*/VC/Redist/MSVC/*/MergeModules/${VCREDIST_MSM_FILENAME}")
- LIST(LENGTH MSM_LIST LEN)
- IF(LEN GREATER 0)
- LIST(GET MSM_LIST 0 VCRedist_MSM)
- ENDIF()
- ELSE()
- # VS2019
- SET(VCREDIST_MSM_FILENAME Microsoft_VC142_CRT_${WIX_ARCH_SUFFIX}.msm)
- FILE(GLOB MSM_LIST "C:/Program Files*/Microsoft Visual Studio/2019/*/VC/Redist/MSVC/*/MergeModules/${VCREDIST_MSM_FILENAME}")
- LIST(LENGTH MSM_LIST LEN)
- IF(LEN GREATER 0)
- LIST(GET MSM_LIST 0 VCRedist_MSM)
- ENDIF()
- ENDIF()
- IF (NOT VCRedist_MSM)
- MESSAGE(WARNING "Can't find merge module ${VCREDIST_MSM_FILENAME}")
- ELSE()
- FILE(TO_NATIVE_PATH ${VCRedist_MSM} VCRedist_MSM)
- # MESSAGE("VCRedist_MSM=${VCRedist_MSM}")
- ENDIF()
-ENDIF()
ADD_CUSTOM_TARGET(
MSI
@@ -245,7 +208,7 @@ ADD_CUSTOM_TARGET(
-DWITH_THIRD_PARTY="${WITH_THIRD_PARTY}"
-DWIXCA_LOCATION="$<TARGET_FILE:wixca>"
-DMSVC_CRT_TYPE="${MSVC_CRT_TYPE}"
- -DVCRedist_MSM="${VCRedist_MSM}"
+ -DDYNAMIC_UCRT_LINK="${DYNAMIC_UCRT_LINK}"
-P ${CMAKE_CURRENT_SOURCE_DIR}/create_msi.cmake
)
ADD_DEPENDENCIES(MSI wixca)
diff --git a/win/packaging/CPackWixConfig.cmake b/win/packaging/CPackWixConfig.cmake
index 74329e79247..4ac4d38471e 100644
--- a/win/packaging/CPackWixConfig.cmake
+++ b/win/packaging/CPackWixConfig.cmake
@@ -9,7 +9,7 @@ IF(ESSENTIALS)
ENDIF()
ELSE()
SET(CPACK_COMPONENTS_USED
- "Server;Client;Development;SharedLibraries;Documentation;Readme;Common;connect-engine;ClientPlugins;gssapi-server;gssapi-client;aws-key-management;rocksdb-engine;backup")
+ "Server;Client;Development;SharedLibraries;Documentation;Readme;Common;connect-engine;ClientPlugins;gssapi-server;gssapi-client;aws-key-management;rocksdb-engine;backup;VCCRT")
ENDIF()
SET( WIX_FEATURE_MySQLServer_EXTRA_FEATURES "DBInstance;SharedClientServerComponents")
diff --git a/win/packaging/ca/CMakeLists.txt b/win/packaging/ca/CMakeLists.txt
index 99dc7da01fb..326bab47de4 100644
--- a/win/packaging/ca/CMakeLists.txt
+++ b/win/packaging/ca/CMakeLists.txt
@@ -14,21 +14,10 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA
INCLUDE_DIRECTORIES(${WIX_DIR}/../SDK/${WIX_MSVC_SUFFIX}/inc)
-SET(WIXCA_SOURCES CustomAction.cpp CustomAction.def ${CMAKE_CURRENT_BINARY_DIR}/symlinks.cc)
+SET(WIXCA_SOURCES CustomAction.cpp CustomAction.def)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/sql ${CMAKE_CURRENT_SOURCE_DIR})
-INCLUDE(symlinks)
-LIST(LENGTH MARIADB_SYMLINK_FROMS LEN)
-MATH(EXPR max_index "${LEN}-1")
-SET(ALL_SYMLINKS "")
-FOREACH(i RANGE 0 ${max_index})
- LIST(GET MARIADB_SYMLINK_FROMS ${i} src)
- LIST(GET MARIADB_SYMLINK_TOS ${i} dst)
- STRING(APPEND ALL_SYMLINKS "{L\"${src}\",L\"${dst}\"},\n")
-ENDFOREACH()
-CONFIGURE_FILE(symlinks.cc.in symlinks.cc)
-
# Custom action should not depend on C runtime, since we do not know if CRT is installed.
FORCE_STATIC_CRT()
ADD_VERSION_INFO(wixca SHARED WIXCA_SOURCES)
diff --git a/win/packaging/ca/CustomAction.cpp b/win/packaging/ca/CustomAction.cpp
index 5acbca1e186..ccb83c7b0c6 100644
--- a/win/packaging/ca/CustomAction.cpp
+++ b/win/packaging/ca/CustomAction.cpp
@@ -781,12 +781,12 @@ LExit:
/*
Sets Innodb buffer pool size (1/8 of RAM by default), if not already specified
via command line.
- Calculates innodb log file size as min(50, innodb buffer pool size/8)
+ Calculates innodb log file size as min(100, innodb buffer pool size/4)
*/
extern "C" UINT __stdcall PresetDatabaseProperties(MSIHANDLE hInstall)
{
unsigned long long InnodbBufferPoolSize= 256;
- unsigned long long InnodbLogFileSize= 50;
+ unsigned long long InnodbLogFileSize= 100;
wchar_t buff[MAX_PATH];
UINT er = ERROR_SUCCESS;
HRESULT hr= S_OK;
@@ -829,7 +829,7 @@ extern "C" UINT __stdcall PresetDatabaseProperties(MSIHANDLE hInstall)
swprintf_s(buff, L"%llu",InnodbBufferPoolSize);
MsiSetPropertyW(hInstall, L"BUFFERPOOLSIZE", buff);
}
- InnodbLogFileSize = min(50, InnodbBufferPoolSize);
+ InnodbLogFileSize = min(100, 2 * InnodbBufferPoolSize);
swprintf_s(buff, L"%llu",InnodbLogFileSize);
MsiSetPropertyW(hInstall, L"LOGFILESIZE", buff);
@@ -1068,268 +1068,3 @@ extern "C" BOOL WINAPI DllMain(
return TRUE;
}
-
-static wstring MakeExePath(const wchar_t *installDir, const wchar_t *basename)
-{
- wstring path(installDir);
- if (path.back() != L'\\')
- path.append(L"\\");
- path.append(L"bin\\");
- path.append(basename);
- path.append(L".exe");
- return path;
-}
-
-static wstring MakeExePath(const wchar_t *installDir, string basename)
-{
- wstring path(installDir);
- if (path.back() != L'\\')
- path.append(L"\\");
- path.append(L"bin\\");
- for (auto c : basename)
- path+= c;
- path.append(L".exe");
- return path;
-}
-static wstring MakeFixSymlinksLogPath()
-{
- wchar_t buf[MAX_PATH];
- if (GetTempPathW(MAX_PATH, buf))
- return wstring(buf) + L"\\mariadb_msi_fix_symlinks.log";
- return L"";
-}
-
-static string w2s(wstring w)
-{
- string s;
- for (auto wc : w)
- s += (char)wc;
- return s;
-}
-
-/*
- Remove symlinks if target file does not exist.
- Create symlink if target exists, but symlink is not.
-*/
-static void fix_symlink(const wchar_t *file, const wchar_t *link,
- const wchar_t *installdir,
- vector<string> &rollback_actions)
-{
- WcaLog(LOGMSG_STANDARD, "fix_symlink %S=>%S", link, file);
-
- auto tgt= MakeExePath(installdir, file);
- auto lnk= MakeExePath(installdir, link);
- auto target_path= tgt.c_str();
- auto link_path= lnk.c_str();
-
- auto target_attr= GetFileAttributesW(target_path);
- auto link_attr= GetFileAttributesW(link_path);
- WcaLog(LOGMSG_STANDARD, "%S %s", target_path,
- target_attr == INVALID_FILE_ATTRIBUTES ? "does not exist" : "exists");
- WcaLog(LOGMSG_STANDARD, "%S %s", link_path,
- link_attr == INVALID_FILE_ATTRIBUTES ? "does not exist" : "exists");
-
- if (link_attr != INVALID_FILE_ATTRIBUTES &&
- ((link_attr & FILE_ATTRIBUTE_REPARSE_POINT) == 0))
- {
- WcaLog(LOGMSG_STANDARD, "%S is not a symlink!", link_path);
- return;
- }
-
- if (target_attr == INVALID_FILE_ATTRIBUTES)
- {
- if (link_attr == INVALID_FILE_ATTRIBUTES)
- {
- return;
- }
- auto ok= DeleteFileW(link_path);
- WcaLog(LOGMSG_STANDARD, "DeleteFileW(L\"%S\") returned %s, last error %lu",
- link_path, ok ? "success" : "error", GetLastError());
- if (ok)
- {
- rollback_actions.push_back(string("create_symlink ") + w2s(link) + " " +
- w2s(file));
- }
- return;
- }
-
- if (link_attr != INVALID_FILE_ATTRIBUTES)
- return;
-
- auto ok= CreateSymbolicLinkW(link_path, target_path, 0);
- WcaLog(LOGMSG_STANDARD,
- "CreateSymbolicLinkW(\"%S\",\"%S\", 0) returned %s, last error %d",
- link_path, target_path, ok ? "success" : "error",
- (int) GetLastError());
- if (ok)
- rollback_actions.push_back(string("delete ") + w2s(link));
-}
-
-static string rollback_info_path()
-{
- char tmppath[MAX_PATH];
- if (!GetTempPathA(MAX_PATH, tmppath))
- return "";
- string filepath(tmppath);
- filepath.append("\\mariadb_symlink_rollback_info.tmp");
- return filepath;
-}
-
-
-static void save_symlink_rollback_info(vector<string> rollback_info)
-{
- std::ofstream ofs;
- string path = rollback_info_path();
- ofs.open(path, std::ofstream::out | std::ofstream::trunc);
- if (!ofs.good())
- return;
- WcaLog(LOGMSG_STANDARD,
- "Storing this rollback script for custom action in %s, in case installation rolls back",
- path.c_str());
- for (auto line : rollback_info)
- {
- WcaLog(LOGMSG_STANDARD, "%s", line.c_str());
- ofs << line << "\n";
- }
- WcaLog(LOGMSG_STANDARD, "End of rollback script");
-}
-
-
-#include <symlinks.h>
-/* MDEV-19781 MariaDB symlinks on Windows */
-extern "C" UINT __stdcall FixSymlinksRollback(MSIHANDLE hInstall)
-{
- HRESULT hr= S_OK;
- UINT er= ERROR_SUCCESS;
- wchar_t targetdir[MAX_PATH];
- DWORD len= MAX_PATH;
- hr= WcaInitialize(hInstall, __FUNCTION__);
- WcaLog(LOGMSG_STANDARD, "Initialized.");
- std::ifstream ifs;
- std::string command;
-
- if (MsiGetPropertyW(hInstall, L"CustomActionData", targetdir, &len) !=
- ERROR_SUCCESS)
- {
- hr= HRESULT_FROM_WIN32(GetLastError());
- ExitOnFailure(hr, "MsiGetPropertyW failed");
- }
-
- ifs.open(rollback_info_path(), std::ofstream::in);
- if (!ifs.good())
- goto LExit;
-
- while (ifs >> command)
- {
- if (command == "create_symlink")
- {
- string link;
- ifs >> link;
- auto link_path= MakeExePath(targetdir, link);
- string file;
- ifs >> file;
- auto target_path= MakeExePath(targetdir, file);
- bool ok= CreateSymbolicLinkW(link_path.c_str(), target_path.c_str(), 0);
- WcaLog(LOGMSG_STANDARD, "CreateSymbolicLinkW(%S,%S) %s, last error %lu",
- link_path.c_str(), target_path.c_str(), ok ? "success" : "error",
- GetLastError());
- }
- else if (command == "delete")
- {
- string link;
- ifs >> link;
- auto link_path= MakeExePath(targetdir, link);
- auto link_attr= GetFileAttributesW(link_path.c_str());
- if (link_attr != INVALID_FILE_ATTRIBUTES &&
- (link_attr & FILE_ATTRIBUTE_REPARSE_POINT))
- {
- auto ok= DeleteFileW(link_path.c_str());
- WcaLog(LOGMSG_STANDARD, "DeleteFile(%S) %s, last error %lu",
- link_path.c_str(), ok ? "success" : "error", GetLastError());
- }
- }
- else
- {
- WcaLog(LOGMSG_STANDARD, "Unknown command '%s' in rollback script ",
- command.c_str());
- goto LExit;
- }
- }
-
-LExit:
- return WcaFinalize(er);
-}
-
-
-extern "C" UINT __stdcall SymlinksUninstall(MSIHANDLE hInstall)
-{
- HRESULT hr = S_OK;
- UINT er = ERROR_SUCCESS;
- wchar_t targetdir[MAX_PATH];
- DWORD len = MAX_PATH;
- int i;
- hr = WcaInitialize(hInstall, __FUNCTION__);
- WcaLog(LOGMSG_STANDARD, "Initialized.");
-
- if (MsiGetPropertyW(hInstall, L"CustomActionData", targetdir, &len) !=
- ERROR_SUCCESS)
- {
- hr = HRESULT_FROM_WIN32(GetLastError());
- ExitOnFailure(hr, "MsiGetPropertyW failed");
- }
-
- for (i = 0; all_symlinks[i].file; i++)
- {
- auto link_path = MakeExePath(targetdir, all_symlinks[i].link);
- auto link_attr = GetFileAttributesW(link_path.c_str());
- auto filepath = link_path.c_str();
-
- if (link_attr == INVALID_FILE_ATTRIBUTES)
- {
- WcaLog(LOGMSG_STANDARD, " %S does not exist",filepath);
- continue;
- }
-
- if(!(link_attr & FILE_ATTRIBUTE_REPARSE_POINT))
- {
- WcaLog(LOGMSG_STANDARD, " %S is not a symbolic link!",filepath);
- continue;
- }
- BOOL ok = DeleteFileW(filepath);
- WcaLog(LOGMSG_STANDARD, "DeleteFile(%S) %s, last error %lu",
- filepath, ok? "succeeded":"failed", GetLastError());
- }
-
-LExit:
- return WcaFinalize(er);
-}
-
-/* MDEV-19781 MariaDB symlinks on Windows */
-extern "C" UINT __stdcall FixSymlinks(MSIHANDLE hInstall)
-{
- HRESULT hr= S_OK;
- UINT er= ERROR_SUCCESS;
- wchar_t targetdir[MAX_PATH];
- vector<string> rollback_actions;
- DWORD len= MAX_PATH;
- int i;
- hr= WcaInitialize(hInstall, __FUNCTION__);
- WcaLog(LOGMSG_STANDARD, "Initialized.");
-
- if (MsiGetPropertyW(hInstall, L"CustomActionData", targetdir, &len) !=
- ERROR_SUCCESS)
- {
- hr= HRESULT_FROM_WIN32(GetLastError());
- ExitOnFailure(hr, "MsiGetPropertyW failed");
- }
-
- for (i= 0; all_symlinks[i].file; i++)
- fix_symlink(all_symlinks[i].file, all_symlinks[i].link, targetdir,
- rollback_actions);
-
- save_symlink_rollback_info(rollback_actions);
-
-LExit:
- return WcaFinalize(er);
-}
-
diff --git a/win/packaging/ca/CustomAction.def b/win/packaging/ca/CustomAction.def
index 8169968e26b..0be77a97a08 100644
--- a/win/packaging/ca/CustomAction.def
+++ b/win/packaging/ca/CustomAction.def
@@ -8,6 +8,3 @@ CheckDatabaseProperties
CheckDataDirectoryEmpty
CheckDBInUse
CheckServiceUpgrades
-FixSymlinks
-FixSymlinksRollback
-SymlinksUninstall
diff --git a/win/packaging/ca/symlinks.cc.in b/win/packaging/ca/symlinks.cc.in
deleted file mode 100644
index 62ca9884af8..00000000000
--- a/win/packaging/ca/symlinks.cc.in
+++ /dev/null
@@ -1,6 +0,0 @@
-#include "symlinks.h"
-symlink all_symlinks[]=
-{
-@ALL_SYMLINKS@
-{nullptr, nullptr}
-};
diff --git a/win/packaging/ca/symlinks.h b/win/packaging/ca/symlinks.h
deleted file mode 100644
index 4fc1f2cb685..00000000000
--- a/win/packaging/ca/symlinks.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#pragma once
-struct symlink
-{
- const wchar_t *file;
- const wchar_t *link;
-};
-
-extern symlink all_symlinks[];
diff --git a/win/packaging/create_msi.cmake b/win/packaging/create_msi.cmake
index f992915cd22..cb1a9654987 100644
--- a/win/packaging/create_msi.cmake
+++ b/win/packaging/create_msi.cmake
@@ -62,12 +62,6 @@ IF(CMAKE_INSTALL_CONFIG_NAME)
SET(CONFIG_PARAM "-DCMAKE_INSTALL_CONFIG_NAME=${CMAKE_INSTALL_CONFIG_NAME}")
ENDIF()
-IF((MSVC_CRT_TYPE MATCHES "/MD") AND (NOT VCRedist_MSM))
- # Something was wrong, we package VC runtime merge modules
- # when compiled with dynamic C runtime.
- MESSAGE(FATAL_ERROR "Redistributable merge module was not found")
-ENDIF()
-
SET(COMPONENTS_ALL "${CPACK_COMPONENTS_ALL}")
FOREACH(comp ${COMPONENTS_ALL})
SET(ENV{DESTDIR} testinstall/${comp})
@@ -319,9 +313,11 @@ ENDFUNCTION()
SET(CPACK_WIX_COMPONENTS)
SET(CPACK_WIX_COMPONENT_GROUPS)
GET_FILENAME_COMPONENT(abs . ABSOLUTE)
+
FOREACH(d ${DIRS})
GET_FILENAME_COMPONENT(d ${d} ABSOLUTE)
GET_FILENAME_COMPONENT(d_name ${d} NAME)
+
MAKE_WIX_IDENTIFIER("${d_name}" d_name)
FILE(WRITE ${abs}/${d_name}_component_group.wxs
"<ComponentGroup Id='componentgroup.${d_name}'>")
diff --git a/win/packaging/extra.wxs.in b/win/packaging/extra.wxs.in
index d4fcce17445..11fe60719ec 100644
--- a/win/packaging/extra.wxs.in
+++ b/win/packaging/extra.wxs.in
@@ -52,10 +52,6 @@
<!-- Disable advertised shortcuts weirdness -->
<Property Id="DISABLEADVTSHORTCUTS" Secure="yes" Value="1"/>
- <!-- Activate feedback plugin-->
- <Property Id="FEEDBACK" Secure="yes"/>
-
-
<!-- Quick configuration : set default storage engine to innodb, use strict sql_mode -->
<Property Id="STDCONFIG" Secure="yes" Value="1"/>
@@ -171,43 +167,6 @@
</Control>
<Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" />
</Dialog>
-
- <!-- Feedback dialog -->
- <Dialog Id="Feedback" Width="370" Height="270" Title="[ProductName] Setup" NoMinimize="yes">
-
- <Control Id="CheckBoxFeedback" Type="CheckBox" X="8" Y="61" Width="360" Height="12" Property="FEEDBACK" CheckBoxValue="1" TabSkip="no">
- <Text>{\Font1}Enable the Feedback plugin and submit anonymous usage information</Text>
- </Control>
-
- <Control Id="Text" Type="Text" X="23" Y="82" Width="290" Height="55">
- <Text>Monty Program has created a Feedback plugin for MariaDB which, if enabled, collects basic anonymous statistical information. This information is used by the developers to improve MariaDB. Enabling this plugin is an easy way to help with MariaDB development. Collected statistics, and more information on the plugin, can be viewed at http://mariadb.org/feedback_plugin </Text>
- </Control>
-
- <Control Id="MoreInfo" Type="PushButton" X="23" Y="140" Width="56" Height="17" Text="More Info" ToolTip="http://mariadb.org/feedback_plugin" >
- <Publish Property="WixShellExecTarget" Value="http://mariadb.org/feedback_plugin" Order="1">1</Publish>
- <Publish Event="DoAction" Value="LaunchUrl" Order="2">1</Publish>
- </Control>
-
-
- <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="&amp;Back">
- <Publish Event="NewDialog" Value="ServicePortDlg">1</Publish>
- </Control>
- <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Text="&amp;Next">
- <Publish Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
- </Control>
- <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="Cancel">
- <Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
- </Control>
- <Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="WixUI_Bmp_Banner" />
- <Control Id="Description" Type="Text" X="25" Y="23" Width="280" Height="15" Transparent="yes" NoPrefix="yes">
- <Text>Submit usage information</Text>
- </Control>
- <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
- <Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes">
- <Text>{\WixUI_Font_Title}[ProductName] setup</Text>
- </Control>
- <Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" />
- </Dialog>
<!-- Error popup dialog -->
<Dialog Id="WarningDlg" Width="320" Height="85" Title="[ProductName] Setup" NoMinimize="yes">
@@ -358,7 +317,7 @@
</Publish>
<Publish Event="DoAction" Value="CheckDatabaseProperties">NOT WarningText</Publish>
<Publish Event="SpawnDialog" Value="WarningDlg">WarningText</Publish>
- <Publish Event="NewDialog" Value="Feedback">Not WarningText</Publish>
+ <Publish Event="NewDialog" Value="VerifyReadyDlg">Not WarningText</Publish>
</Control>
<Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="no" Text="Cancel">
<Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
@@ -388,7 +347,7 @@
NOT Installed AND UpgradableServiceFound
</Publish>
- <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="Feedback" Order="3" ><![CDATA[&DBInstance=3 AND NOT !DBInstance=3]]></Publish>
+ <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="ServicePortDlg" Order="3" ><![CDATA[&DBInstance=3 AND NOT !DBInstance=3]]></Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="3"> <![CDATA[OLDERVERSIONBEINGUPGRADED <>""]]></Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="ConfirmDataCleanupDlg" Order="1" ><![CDATA[(&DBInstance=2) AND (!DBInstance=3)]]></Publish>
@@ -490,19 +449,6 @@
Key="innodb_buffer_pool_size"
Value="[BUFFERPOOLSIZE]M" />
</Component>
- <Component Id="C.feedback" Guid="*" Directory="DATADIR">
- <Condition>FEEDBACK</Condition>
- <RegistryValue Root='HKLM'
- Key='SOFTWARE\@CPACK_WIX_PACKAGE_NAME@'
- Name='FEEDBACK' Value='1' Type='string' KeyPath='yes'/>
- <IniFile Id="Ini5"
- Action="createLine"
- Directory="DATADIR"
- Section="mysqld"
- Name="my.ini"
- Key="feedback"
- Value="ON" />
- </Component>
<Component Id="C.utf8" Guid="*" Directory="DATADIR">
<Condition>UTF8</Condition>
@@ -651,31 +597,6 @@
<?endif ?>
- <?if "@VCRedist_MSM@" != "" ?>
- <!-- VC runtime merge module -->
- <DirectoryRef Id="TARGETDIR">
- <Merge Id="VCRedist" SourceFile="@VCRedist_MSM@" DiskId="1" Language="0"/>
- </DirectoryRef>
- <Feature Id="VCRedist" Title="Visual C++ Runtime" AllowAdvertise="no" Display="hidden" Level="1">
- <MergeRef Id="VCRedist"/>
- </Feature>
- <?endif?>
-
- <!-- Custom action, create symlinks -->
- <CustomAction Id="Symlinks.SetProperty" Return="check" Property="Symlinks" Value="[INSTALLDIR]" />
- <CustomAction Id="Symlinks" BinaryKey="wixca.dll" DllEntry="FixSymlinks" Execute="deferred" Impersonate="no" Return="ignore"/>
- <CustomAction Id="SymlinksRollback.SetProperty" Return="check" Property="SymlinksRollback" Value="[INSTALLDIR]" />
- <CustomAction Id="SymlinksRollback" BinaryKey="wixca.dll" DllEntry="FixSymlinksRollback" Execute="rollback" Impersonate="no" Return="ignore"/>
- <CustomAction Id="SymlinksUninstall.SetProperty" Return="check" Property="SymlinksUninstall" Value="[INSTALLDIR]" />
- <CustomAction Id="SymlinksUninstall" BinaryKey="wixca.dll" DllEntry="SymlinksUninstall" Execute="deferred" Impersonate="no" Return="ignore"/>
- <InstallExecuteSequence>
- <Custom Action="Symlinks.SetProperty" Before="Symlinks">NOT Installed OR UPGRADINGPRODUCTCODE</Custom>
- <Custom Action="Symlinks" After="SymlinksRollback">NOT Installed OR UPGRADINGPRODUCTCODE</Custom>
- <Custom Action="SymlinksRollback.SetProperty" Before="SymlinksRollback">NOT Installed OR UPGRADINGPRODUCTCODE</Custom>
- <Custom Action="SymlinksRollback" After="InstallFiles">NOT Installed OR UPGRADINGPRODUCTCODE</Custom>
- <Custom Action="SymlinksUninstall.SetProperty" Before="SymlinksUninstall">Installed AND NOT UPGRADINGPRODUCTCODE</Custom>
- <Custom Action="SymlinksUninstall" Before="RemoveFiles">Installed AND NOT UPGRADINGPRODUCTCODE</Custom>
- </InstallExecuteSequence>
<!-- Custom action, call mysql_install_db -->
<SetProperty Sequence='execute' Before='CreateDatabaseCommand' Id="SKIPNETWORKING" Value="--skip-networking" >SKIPNETWORKING</SetProperty>
@@ -697,7 +618,7 @@
<CustomAction Id="CreateDatabaseRollback" BinaryKey="wixca.dll" DllEntry="CreateDatabaseRollback"
Execute="rollback" Return="check" Impersonate="no"/>
<UI>
- <ProgressText Action="CreateDatabase">Running mysql_install_db.exe</ProgressText>
+ <ProgressText Action="CreateDatabase">Running mariadb-install-db.exe</ProgressText>
</UI>
<!-- Error injection script activated by TEST_FAIL=1 passed to msiexec (to see how good custom action rollback works) -->
@@ -885,24 +806,12 @@
Name='MinorVersion' Value='@MINOR_VERSION@' Type='string'/>
</Component>
</Feature>
-
- <!-- Extra condition to block the installer if NSIS based installation is detected-->
- <Property Id="NSISINSTALLKEY">
- <RegistrySearch Id='NSISKey' Type='raw'
- Root='HKLM' Key='Software\Microsoft\Windows\CurrentVersion\Uninstall\MariaDB' Name='DisplayName' />
- </Property>
- <Condition
- Message=
- 'Previous version of MariaDB was found, that used incompatible installer.&#xD;&#xA;Please remove &quot;[NSISINSTALLKEY]&quot; before you proceed with this installation.'
- >
- <![CDATA[ NOT(NSISINSTALLKEY << "MariaDB @MAJOR_VERSION@.@MINOR_VERSION@.") OR Installed]]>
- </Condition>
<Condition Message=
'Setting the ALLUSERS property is not allowed because [ProductName] is a per-machine application. Setup will now exit.'>
<![CDATA[ALLUSERS = "1"]]>
</Condition>
- <Condition Message='This application is only supported on Windows Vista, Windows Server 2008, or higher.'>
- <![CDATA[Installed OR (VersionNT >= 600)]]>
+ <Condition Message='This application is only supported on Windows 10, Windows Server 2016, or higher.'>
+ <![CDATA[Installed OR (VersionNT >= 603)]]>
</Condition>
</Fragment>
</Wix>
diff --git a/win/upgrade_wizard/CMakeLists.txt b/win/upgrade_wizard/CMakeLists.txt
index 7d0e774b968..20a06a41215 100644
--- a/win/upgrade_wizard/CMakeLists.txt
+++ b/win/upgrade_wizard/CMakeLists.txt
@@ -1,12 +1,4 @@
-IF(NOT MSVC)
- RETURN()
-ENDIF()
-IF(CMAKE_C_COMPILER_ID MATCHES Clang)
- # MFC stuff does not compile with clang
- RETURN()
-ENDIF()
-IF(CMAKE_USING_VC_FREE_TOOLS)
- # No MFC, so it cannot be built
+IF((NOT MSVC) OR CLANG_CL OR WITH_ASAN)
RETURN()
ENDIF()
@@ -40,20 +32,15 @@ SET(CMAKE_MFC_FLAG 1)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc -DNO_WARN_MBCS_MFC_DEPRECATION")
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/sql)
-MYSQL_ADD_EXECUTABLE(mysql_upgrade_wizard
+MYSQL_ADD_EXECUTABLE(mariadb-upgrade-wizard
upgrade.cpp upgradeDlg.cpp upgrade.rc ${UPGRADE_WIZARD_SOURCES}
COMPONENT Server)
-TARGET_LINK_LIBRARIES(mysql_upgrade_wizard ${UPGRADE_WIZARD_LINK_LIBRARIES})
+
+
+TARGET_LINK_LIBRARIES(mariadb-upgrade-wizard ${UPGRADE_WIZARD_LINK_LIBRARIES})
# upgrade_wizard is Windows executable, set WIN32_EXECUTABLE so it does not
# create a console.
-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.
-ADD_CUSTOM_COMMAND(
- TARGET mysql_upgrade_wizard POST_BUILD
- COMMAND mt.exe -manifest ${CMAKE_CURRENT_SOURCE_DIR}/upgrade_wizard.exe.manifest
- "-outputresource:$<TARGET_FILE:mysql_upgrade_wizard>;#1"
+SET_TARGET_PROPERTIES(mariadb-upgrade-wizard PROPERTIES
+ WIN32_EXECUTABLE 1
+ LINK_FLAGS "/MANIFESTUAC:level='requireAdministrator'"
)