diff options
| author | Piotr Obrzut <piotr.obrzut@oracle.com> | 2017-06-05 08:09:07 +0200 |
|---|---|---|
| committer | Piotr Obrzut <piotr.obrzut@oracle.com> | 2017-06-05 08:33:48 +0200 |
| commit | 34cd74e52185de2ea3156e8295de3c638cde8c88 (patch) | |
| tree | be09b453a0bd45af7ef19ff28da2c23ace26739d | |
| parent | c3e6a032c3acbfc56fb3cc7b38710a24c416ffd0 (diff) | |
| download | mariadb-git-mysql-5.5.57.tar.gz | |
Bug#26171638 MYSQL 5.5.57 - MSI COMMUNITY PACKAGES NOT GETTING INSTALLEDmysql-5.5.57
Corrected the revert.
(cherry picked from commit f637e524bf9b692c3ed46d856e2beac193b42a3e)
| -rw-r--r-- | packaging/WiX/create_msi.cmake.in | 31 | ||||
| -rw-r--r-- | packaging/WiX/mysql_server.wxs.in | 26 |
2 files changed, 31 insertions, 26 deletions
diff --git a/packaging/WiX/create_msi.cmake.in b/packaging/WiX/create_msi.cmake.in index ae6a5773dce..b306c0c70d3 100644 --- a/packaging/WiX/create_msi.cmake.in +++ b/packaging/WiX/create_msi.cmake.in @@ -218,6 +218,37 @@ MACRO(GENERATE_GUID VarName) OUTPUT_STRIP_TRAILING_WHITESPACE)
ENDMACRO()
+# Make sure that WIX identifier created from a path matches all the rules:
+# - it is shorter than 72 characters
+# - doesn't contain reserver characters ('+', '-' and '/')
+# ID_SET contains a global list of all identifiers which are too long.
+# Every time we use an identifier which is too long we use its index in
+# ID_SET to shorten the name.
+SET_PROPERTY(GLOBAL PROPERTY ID_SET)
+MACRO(MAKE_WIX_IDENTIFIER str varname)
+ STRING(REPLACE "/" "." ${varname} "${str}")
+ STRING(REPLACE "+" "p" ${varname} "${str}")
+ STRING(REPLACE "-" "m" ${varname} "${str}")
+ STRING(REGEX REPLACE "[^a-zA-Z_0-9.]" "_" ${varname} "${${varname}}")
+ STRING(LENGTH "${${varname}}" len)
+ # FIXME: the prefix length has to be controlled better
+ # Identifier should be smaller than 72 character
+ # We have to cut down the length to 40 chars, since we add prefixes
+ # pretty often
+ IF(len GREATER 40)
+ STRING(SUBSTRING "${${varname}}" 0 37 shortstr)
+ GET_PROPERTY(LOCAL_LIST GLOBAL PROPERTY ID_SET)
+ LIST(FIND LOCAL_LIST "${${varname}}" STRING_ID)
+ IF(${STRING_ID} EQUAL -1)
+ LIST(APPEND LOCAL_LIST "${${varname}}")
+ SET_PROPERTY(GLOBAL PROPERTY ID_SET "${LOCAL_LIST}")
+ LIST(LENGTH LOCAL_LIST STRING_ID)
+ MATH(EXPR STRING_ID "${STRING_ID}-1" )
+ ENDIF()
+ SET(${varname} "${shortstr}${STRING_ID}")
+ ENDIF()
+ENDMACRO()
+
FUNCTION(TRAVERSE_FILES dir topdir file file_comp dir_root)
FILE(RELATIVE_PATH dir_rel ${topdir} ${dir})
IF(dir_rel)
diff --git a/packaging/WiX/mysql_server.wxs.in b/packaging/WiX/mysql_server.wxs.in index 2092d0ebe3d..3eb81ec532c 100644 --- a/packaging/WiX/mysql_server.wxs.in +++ b/packaging/WiX/mysql_server.wxs.in @@ -61,32 +61,6 @@ <InstallExecuteSequence>
<RemoveExistingProducts After="InstallInitialize"/>
</InstallExecuteSequence>
-
- <?if "@LINK_STATIC_RUNTIME_LIBRARIES@"="OFF" ?>
- <?if "@Platform@"="x64"?>
- <Property Id="VS08REDISTX64">
- <RegistrySearch Id="FindRedistVS08"
- Root="HKLM"
- Key="SOFTWARE\Classes\Installer\Products\153AA053AF120723B8A73845437E66DA"
- Name="Version"
- Type="raw" />
- </Property>
- <Condition Message="This application requires Visual Studio 2008 x64 Redistributable. Please install the Redistributable then run this installer again.">
- Installed OR VS08REDISTX64
- </Condition>
- <?elseif "@Platform@"="x86" ?>
- <Property Id="VS08REDISTX86">
- <RegistrySearch Id="FindRedistVS08"
- Root="HKLM"
- Key="SOFTWARE\Classes\Installer\Products\6F9E66FF7E38E3A3FA41D89E8A906A4A"
- Name="Version"
- Type="raw" />
- </Property>
- <Condition Message="This application requires Visual Studio 2008 x86 Redistributable. Please install the Redistributable then run this installer again.">
- Installed OR VS08REDISTX86
- </Condition>
- <?endif?>
- <?endif?>
<!-- Save/restore install location -->
<CustomAction Id="SaveTargetDir" Property="ARPINSTALLLOCATION" Value="[INSTALLDIR]" />
|
