summaryrefslogtreecommitdiff
path: root/win
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2021-09-10 02:20:16 +0200
committerVladislav Vaintroub <wlad@mariadb.com>2021-09-10 02:20:16 +0200
commitca4bc3e3a94aec2ebb541d15c356bf39de4037f1 (patch)
tree447e46138230d57324dbb5ab1370979f32166d17 /win
parentd089b51d66c5d213c5522972a5ba2f540b344f73 (diff)
downloadmariadb-git-ca4bc3e3a94aec2ebb541d15c356bf39de4037f1.tar.gz
MDEV-26579 Support minor MSI in Windows installer.
With this patch, 4-component MSI version can be used, e.g by setting TINY_VERSION variable in CMake, or by adding a string, e.g MYSQL_VERSION_EXTRA=-2 which sets TINY_VERSION to 2, and also changes the package name. The 4-component MSI versions do not support MSI major upgrades, only minor ones, i.e do not reinstall components, just update existing ones based on versioning rules. To support these rules, add DefaultVersion for the files that won't otherwise be versioned - headers, static and import libraries, pdbs, text - xml, python and perl scripts Also silence WiX warning that MSI won't store hashes for those files anymore.
Diffstat (limited to 'win')
-rw-r--r--win/packaging/create_msi.cmake10
1 files changed, 9 insertions, 1 deletions
diff --git a/win/packaging/create_msi.cmake b/win/packaging/create_msi.cmake
index ab88c7fbc50..becc46ef5dd 100644
--- a/win/packaging/create_msi.cmake
+++ b/win/packaging/create_msi.cmake
@@ -239,6 +239,13 @@ FUNCTION(TRAVERSE_FILES dir topdir file file_comp dir_root)
FILE(APPEND ${file} "<DirectoryRef Id='${DirectoryRefId}'>\n")
SET(NONEXEFILES)
+ FOREACH(v MAJOR_VERSION MINOR_VERSION PATCH_VERSION TINY_VERSION)
+ IF(NOT ${v})
+ MESSAGE(FATAL_ERROR "${v} is not set")
+ ENDIF()
+ ENDFOREACH()
+ SET(default_version "${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}.${TINY_VERSION}")
+
FOREACH(f ${all_files})
IF(NOT IS_DIRECTORY ${f})
FILE(RELATIVE_PATH rel ${topdir} ${f})
@@ -258,6 +265,7 @@ FUNCTION(TRAVERSE_FILES dir topdir file file_comp dir_root)
FILE(APPEND ${file} " <Condition>${${id}.COMPONENT_CONDITION}</Condition>\n")
ENDIF()
FILE(APPEND ${file} " <File Id='F.${id}' KeyPath='yes' Source='${f_native}'")
+ FILE(APPEND ${file} " DefaultVersion='${default_version}' DefaultLanguage='1033'")
IF(${id}.FILE_EXTRA)
FILE(APPEND ${file} ">\n${${id}.FILE_EXTRA}</File>")
ELSE()
@@ -389,7 +397,7 @@ ENDIF()
EXECUTE_PROCESS(
COMMAND ${LIGHT_EXECUTABLE} -v -ext WixUIExtension -ext WixUtilExtension
- -ext WixFirewallExtension -sice:ICE61 ${SILENCE_VCREDIST_MSM_WARNINGS}
+ -ext WixFirewallExtension -sice:ICE61 -sw1103 ${SILENCE_VCREDIST_MSM_WARNINGS}
mysql_server.wixobj extra.wixobj -out ${CPACK_PACKAGE_FILE_NAME}.msi
${EXTRA_LIGHT_ARGS}
)