Commit b5258c71 authored by Piotr Obrzut's avatar Piotr Obrzut

Bug#26171638 MYSQL 5.5.57 - MSI COMMUNITY PACKAGES NOT GETTING INSTALLED

Corrected the revert.
parent 1bb43334
......@@ -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)
......
......@@ -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]" />
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment