mirror of
https://github.com/MariaDB/server.git
synced 2025-01-15 19:42:28 +01:00
Fix to handle CMake component names with dash in the name, when producing MSI package.
Rename connect_engine component back to connect-engine.
This commit is contained in:
parent
9df2057cfa
commit
0b034c1b2c
3 changed files with 30 additions and 26 deletions
|
@ -252,7 +252,7 @@ ENDIF(CONNECT_WITH_ODBC)
|
|||
MYSQL_ADD_PLUGIN(connect ${CONNECT_SOURCES}
|
||||
STORAGE_ENGINE
|
||||
MODULE_OUTPUT_NAME "ha_connect"
|
||||
COMPONENT connect_engine
|
||||
COMPONENT connect-engine
|
||||
LINK_LIBRARIES ${ZLIB_LIBRARY} ${XML_LIBRARY} ${ICONV_LIBRARY}
|
||||
${ODBC_LIBRARY} ${IPHLPAPI_LIBRARY})
|
||||
|
||||
|
@ -263,12 +263,12 @@ MYSQL_ADD_PLUGIN(connect ${CONNECT_SOURCES}
|
|||
|
||||
IF (INSTALL_SYSCONFDIR)
|
||||
INSTALL(FILES connect.cnf DESTINATION ${INSTALL_SYSCONFDIR}/my.cnf.d
|
||||
COMPONENT connect_engine)
|
||||
COMPONENT connect-engine)
|
||||
ENDIF(INSTALL_SYSCONFDIR)
|
||||
|
||||
IF(RPM)
|
||||
SET(CPACK_COMPONENT_CASSANDRASELIBRARIES_GROUP "connect_engine" PARENT_SCOPE)
|
||||
SET(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} connect_engine PARENT_SCOPE)
|
||||
SET(CPACK_COMPONENT_CASSANDRASELIBRARIES_GROUP "connect-engine" PARENT_SCOPE)
|
||||
SET(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} connect-engine PARENT_SCOPE)
|
||||
SET(CPACK_RPM_connect_engine_PACKAGE_REQUIRES "MariaDB-server" PARENT_SCOPE)
|
||||
|
||||
# workarounds for cmake issues #13248 and #12864:
|
||||
|
|
|
@ -9,7 +9,7 @@ IF(ESSENTIALS)
|
|||
ENDIF()
|
||||
ELSE()
|
||||
SET(CPACK_COMPONENTS_USED
|
||||
"Server;Client;Development;SharedLibraries;Embedded;Documentation;IniFiles;Readme;Debuginfo;Common;connect_engine")
|
||||
"Server;Client;Development;SharedLibraries;Embedded;Documentation;IniFiles;Readme;Debuginfo;Common;connect-engine")
|
||||
ENDIF()
|
||||
|
||||
SET( WIX_FEATURE_MySQLServer_EXTRA_FEATURES "DBInstance;SharedClientServerComponents")
|
||||
|
@ -63,10 +63,10 @@ SET(CPACK_COMPONENT_GROUP_MYSQLSERVER_DESCRIPTION "Install server")
|
|||
SET(CPACK_COMPONENT_DATAFILES_HIDDEN 1)
|
||||
|
||||
#Subfeature "Connect Engine"
|
||||
SET(CPACK_COMPONENT_CONNECT_ENGINE_GROUP "MySQLServer")
|
||||
SET(CPACK_COMPONENT_CONNECT_ENGINE_DISPLAY_NAME "Server data files")
|
||||
SET(CPACK_COMPONENT_CONNECT_ENGINE_DESCRIPTION "Server data files" )
|
||||
SET(CPACK_COMPONENT_CONNECT_ENGINE_HIDDEN 1)
|
||||
SET(CPACK_COMPONENT_CONNECT-ENGINE_GROUP "MySQLServer")
|
||||
SET(CPACK_COMPONENT_CONNECT-ENGINE_DISPLAY_NAME "Server data files")
|
||||
SET(CPACK_COMPONENT_CONNECT-ENGINE_DESCRIPTION "Server data files" )
|
||||
SET(CPACK_COMPONENT_CONNECT-ENGINE_HIDDEN 1)
|
||||
|
||||
|
||||
#Feature "Devel"
|
||||
|
|
|
@ -29,6 +29,21 @@ SET(THIRD_PARTY_DOWNLOAD_LOCATION "@THIRD_PARTY_DOWNLOAD_LOCATION@")
|
|||
SET(THIRD_PARTY_FEATURE_CONDITION "@THIRD_PARTY_FEATURE_CONDITION@")
|
||||
SET(LIBMYSQL_LOCATION "@LIBMYSQL_LOCATION@")
|
||||
|
||||
|
||||
MACRO(MAKE_WIX_IDENTIFIER str varname)
|
||||
STRING(REPLACE "/" "." ${varname} "${str}")
|
||||
STRING(REGEX REPLACE "[^a-zA-Z_0-9.]" "_" ${varname} "${${varname}}")
|
||||
STRING(LENGTH "${${varname}}" len)
|
||||
# Identifier should be smaller than 72 character
|
||||
# We have to cut down the length to 70 chars, since we add 2 char prefix
|
||||
# pretty often
|
||||
IF(len GREATER 70)
|
||||
MATH(EXPR diff "${len}-67")
|
||||
STRING(SUBSTRING "${${varname}}" ${diff} 67 shortstr)
|
||||
SET(${varname} "___${shortstr}")
|
||||
ENDIF()
|
||||
ENDMACRO()
|
||||
|
||||
SET($ENV{VS_UNICODE_OUTPUT} "")
|
||||
IF(LIBMYSQL_LOCATION AND CMAKE_CFG_INTDIR)
|
||||
# resolve libmysql full path
|
||||
|
@ -191,6 +206,7 @@ FOREACH(f ${WIX_FEATURES})
|
|||
Level='${Level}' ${DISPLAY} >"
|
||||
)
|
||||
FOREACH(c ${${f}_COMPONENTS})
|
||||
|
||||
STRING(TOUPPER "${c}" c_upper)
|
||||
IF (CPACK_COMPONENT_${c_upper}_DISPLAY_NAME)
|
||||
SET(TITLE ${CPACK_COMPONENT_${c_upper}_DISPLAY_NAME})
|
||||
|
@ -208,10 +224,12 @@ FOREACH(f ${WIX_FEATURES})
|
|||
ELSE()
|
||||
SET(Level 1)
|
||||
ENDIF()
|
||||
MAKE_WIX_IDENTIFIER("${c}" cg)
|
||||
|
||||
IF(CPACK_COMPONENT_${c_upper}_HIDDEN)
|
||||
SET(CPACK_WIX_FEATURES
|
||||
"${CPACK_WIX_FEATURES}
|
||||
<ComponentGroupRef Id='componentgroup.${c}'/>")
|
||||
<ComponentGroupRef Id='componentgroup.${cg}'/>")
|
||||
ELSE()
|
||||
SET(CPACK_WIX_FEATURES
|
||||
"${CPACK_WIX_FEATURES}
|
||||
|
@ -221,7 +239,7 @@ FOREACH(f ${WIX_FEATURES})
|
|||
ConfigurableDirectory='INSTALLDIR'
|
||||
AllowAdvertise='no'
|
||||
Level='${Level}'>
|
||||
<ComponentGroupRef Id='componentgroup.${c}'/>
|
||||
<ComponentGroupRef Id='componentgroup.${cg}'/>
|
||||
</Feature>")
|
||||
ENDIF()
|
||||
|
||||
|
@ -248,21 +266,6 @@ MACRO(GENERATE_GUID VarName)
|
|||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
ENDMACRO()
|
||||
|
||||
MACRO(MAKE_WIX_IDENTIFIER str varname)
|
||||
STRING(REPLACE "/" "." ${varname} "${str}")
|
||||
STRING(REGEX REPLACE "[^a-zA-Z_0-9.]" "_" ${varname} "${${varname}}")
|
||||
STRING(LENGTH "${${varname}}" len)
|
||||
# Identifier should be smaller than 72 character
|
||||
# We have to cut down the length to 70 chars, since we add 2 char prefix
|
||||
# pretty often
|
||||
IF(len GREATER 70)
|
||||
MATH(EXPR diff "${len}-67")
|
||||
STRING(SUBSTRING "${${varname}}" ${diff} 67 shortstr)
|
||||
SET(${varname} "___${shortstr}")
|
||||
ENDIF()
|
||||
ENDMACRO()
|
||||
|
||||
|
||||
|
||||
FUNCTION(TRAVERSE_FILES dir topdir file file_comp dir_root)
|
||||
FILE(GLOB all_files ${dir}/*)
|
||||
|
@ -354,6 +357,7 @@ 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}'>")
|
||||
SET(COMP_NAME ${d_name})
|
||||
|
|
Loading…
Reference in a new issue