Skip to content

Commit 34cd74e

Browse files
author
Piotr Obrzut
committed
Bug#26171638 MYSQL 5.5.57 - MSI COMMUNITY PACKAGES NOT GETTING INSTALLED
Corrected the revert. (cherry picked from commit f637e524bf9b692c3ed46d856e2beac193b42a3e)
1 parent c3e6a03 commit 34cd74e

File tree

2 files changed

+31
-26
lines changed

2 files changed

+31
-26
lines changed

packaging/WiX/create_msi.cmake.in

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,37 @@ MACRO(GENERATE_GUID VarName)
218218
OUTPUT_STRIP_TRAILING_WHITESPACE)
219219
ENDMACRO()
220220

221+
# Make sure that WIX identifier created from a path matches all the rules:
222+
# - it is shorter than 72 characters
223+
# - doesn't contain reserver characters ('+', '-' and '/')
224+
# ID_SET contains a global list of all identifiers which are too long.
225+
# Every time we use an identifier which is too long we use its index in
226+
# ID_SET to shorten the name.
227+
SET_PROPERTY(GLOBAL PROPERTY ID_SET)
228+
MACRO(MAKE_WIX_IDENTIFIER str varname)
229+
STRING(REPLACE "/" "." ${varname} "${str}")
230+
STRING(REPLACE "+" "p" ${varname} "${str}")
231+
STRING(REPLACE "-" "m" ${varname} "${str}")
232+
STRING(REGEX REPLACE "[^a-zA-Z_0-9.]" "_" ${varname} "${${varname}}")
233+
STRING(LENGTH "${${varname}}" len)
234+
# FIXME: the prefix length has to be controlled better
235+
# Identifier should be smaller than 72 character
236+
# We have to cut down the length to 40 chars, since we add prefixes
237+
# pretty often
238+
IF(len GREATER 40)
239+
STRING(SUBSTRING "${${varname}}" 0 37 shortstr)
240+
GET_PROPERTY(LOCAL_LIST GLOBAL PROPERTY ID_SET)
241+
LIST(FIND LOCAL_LIST "${${varname}}" STRING_ID)
242+
IF(${STRING_ID} EQUAL -1)
243+
LIST(APPEND LOCAL_LIST "${${varname}}")
244+
SET_PROPERTY(GLOBAL PROPERTY ID_SET "${LOCAL_LIST}")
245+
LIST(LENGTH LOCAL_LIST STRING_ID)
246+
MATH(EXPR STRING_ID "${STRING_ID}-1" )
247+
ENDIF()
248+
SET(${varname} "${shortstr}${STRING_ID}")
249+
ENDIF()
250+
ENDMACRO()
251+
221252
FUNCTION(TRAVERSE_FILES dir topdir file file_comp dir_root)
222253
FILE(RELATIVE_PATH dir_rel ${topdir} ${dir})
223254
IF(dir_rel)

packaging/WiX/mysql_server.wxs.in

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -61,32 +61,6 @@
6161
<InstallExecuteSequence>
6262
<RemoveExistingProducts After="InstallInitialize"/>
6363
</InstallExecuteSequence>
64-
65-
<?if "@LINK_STATIC_RUNTIME_LIBRARIES@"="OFF" ?>
66-
<?if "@Platform@"="x64"?>
67-
<Property Id="VS08REDISTX64">
68-
<RegistrySearch Id="FindRedistVS08"
69-
Root="HKLM"
70-
Key="SOFTWARE\Classes\Installer\Products\153AA053AF120723B8A73845437E66DA"
71-
Name="Version"
72-
Type="raw" />
73-
</Property>
74-
<Condition Message="This application requires Visual Studio 2008 x64 Redistributable. Please install the Redistributable then run this installer again.">
75-
Installed OR VS08REDISTX64
76-
</Condition>
77-
<?elseif "@Platform@"="x86" ?>
78-
<Property Id="VS08REDISTX86">
79-
<RegistrySearch Id="FindRedistVS08"
80-
Root="HKLM"
81-
Key="SOFTWARE\Classes\Installer\Products\6F9E66FF7E38E3A3FA41D89E8A906A4A"
82-
Name="Version"
83-
Type="raw" />
84-
</Property>
85-
<Condition Message="This application requires Visual Studio 2008 x86 Redistributable. Please install the Redistributable then run this installer again.">
86-
Installed OR VS08REDISTX86
87-
</Condition>
88-
<?endif?>
89-
<?endif?>
9064

9165
<!-- Save/restore install location -->
9266
<CustomAction Id="SaveTargetDir" Property="ARPINSTALLLOCATION" Value="[INSTALLDIR]" />

0 commit comments

Comments
 (0)