Commit f68e8aa8 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

Fix a couple fo things replated to MSI

parent 900317e6
...@@ -264,14 +264,16 @@ CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/sql/sql_builtin.cc.in ...@@ -264,14 +264,16 @@ CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/sql/sql_builtin.cc.in
INSTALL(FILES EXCEPTIONS-CLIENT DESTINATION ${INSTALL_DOCREADMEDIR} COMPONENT INSTALL(FILES EXCEPTIONS-CLIENT DESTINATION ${INSTALL_DOCREADMEDIR} COMPONENT
Development) Development)
INSTALL(FILES COPYING README DESTINATION ${INSTALL_DOCREADMEDIR})
INSTALL(FILES COPYING DESTINATION ${INSTALL_DOCREADMEDIR} COMPONENT Readme OPTIONAL)
INSTALL(FILES README DESTINATION ${INSTALL_DOCREADMEDIR} COMPONENT Readme)
IF(UNIX) IF(UNIX)
INSTALL(FILES Docs/INSTALL-BINARY DESTINATION ${INSTALL_DOCREADMEDIR}) INSTALL(FILES Docs/INSTALL-BINARY DESTINATION ${INSTALL_DOCREADMEDIR} COMPONENT Documentation)
ENDIF() ENDIF()
# MYSQL_DOCS_LOCATON is used in "make dist", points to the documentation directory # MYSQL_DOCS_LOCATON is used in "make dist", points to the documentation directory
SET(MYSQL_DOCS_LOCATION "" CACHE PATH "Location from where documentation is copied") SET(MYSQL_DOCS_LOCATION "" CACHE PATH "Location from where documentation is copied")
MARK_AS_ADVANCED(MYSQL_DOCS_LOCATION) MARK_AS_ADVANCED(MYSQL_DOCS_LOCATION)
INSTALL(DIRECTORY Docs/ DESTINATION ${INSTALL_DOCDIR}) INSTALL(DIRECTORY Docs/ DESTINATION ${INSTALL_DOCDIR} COMPONENT Documentation)
# Packaging # Packaging
IF(WIN32) IF(WIN32)
SET(CPACK_GENERATOR "ZIP") SET(CPACK_GENERATOR "ZIP")
......
...@@ -35,7 +35,12 @@ MACRO (INSTALL_DEBUG_SYMBOLS targets) ...@@ -35,7 +35,12 @@ MACRO (INSTALL_DEBUG_SYMBOLS targets)
IF(CMAKE_GENERATOR MATCHES "Visual Studio") IF(CMAKE_GENERATOR MATCHES "Visual Studio")
STRING(REPLACE "${CMAKE_CFG_INTDIR}" "\${CMAKE_INSTALL_CONFIG_NAME}" pdb_location ${pdb_location}) STRING(REPLACE "${CMAKE_CFG_INTDIR}" "\${CMAKE_INSTALL_CONFIG_NAME}" pdb_location ${pdb_location})
ENDIF() ENDIF()
INSTALL(FILES ${pdb_location} DESTINATION ${INSTALL_LOCATION}) IF(target STREQUAL "mysqld")
SET(comp Server)
ELSE()
SET(comp Debuginfo)
ENDIF()
INSTALL(FILES ${pdb_location} DESTINATION ${INSTALL_LOCATION} COMPONENT ${comp})
ENDFOREACH() ENDFOREACH()
ENDIF() ENDIF()
ENDMACRO() ENDMACRO()
......
...@@ -31,6 +31,12 @@ ENDIF() ...@@ -31,6 +31,12 @@ ENDIF()
ADD_CUSTOM_TARGET( ADD_CUSTOM_TARGET(
MSI MSI
COMMAND set VS_UNICODE_OUTPUT= COMMAND set VS_UNICODE_OUTPUT=
COMMAND ${CMAKE_COMMAND} ${CONFIG_PARAM} -P ${CMAKE_CURRENT_BINARY_DIR}/create_msi.cmake COMMAND ${CMAKE_COMMAND} -DCPACK_WIX_CONFIG=${CMAKE_CURRENT_SOURCE_DIR}/CPackWixConfig.cmake ${CONFIG_PARAM} -P ${CMAKE_CURRENT_BINARY_DIR}/create_msi.cmake
)
ADD_CUSTOM_TARGET(
MSI_ESSENTIALS
COMMAND set VS_UNICODE_OUTPUT=
COMMAND ${CMAKE_COMMAND} -DESSENTIALS=1 -DCPACK_WIX_CONFIG=${CMAKE_CURRENT_SOURCE_DIR}/CPackWixConfig.cmake ${CONFIG_PARAM} -P ${CMAKE_CURRENT_BINARY_DIR}/create_msi.cmake
) )
...@@ -11,9 +11,21 @@ FOREACH(comp ${COMPS}) ...@@ -11,9 +11,21 @@ FOREACH(comp ${COMPS})
) )
ENDFOREACH() ENDFOREACH()
SET(INC 0)
MACRO(MAKE_WIX_IDENTIFIER str varname) MACRO(MAKE_WIX_IDENTIFIER str varname)
STRING(REPLACE "/" "." ${varname} "${str}") STRING(REPLACE "/" "." ret "${str}")
STRING(REPLACE "-" "_" ${varname} "${${varname}}") STRING(REPLACE "-" "_" ret "${ret}}")
STRING(LENGTH l "${ret}")
IF(l GREATER 65)
STRING(SUBSTRING "${ret}" 0 64 ret)
MATH(EXPR INC ${INC}+1)
SET(ret "${ret}${INC})
ENDIF()
SET(${varname} ${ret})
ENDMACRO()
MACRO(GENERATE_GUID VarName)
EXECUTE_PROCESS(COMMAND uuidgen -c OUTPUT_VARIABLE ${VarName} OUTPUT_STRIP_TRAILING_WHITESPACE)
ENDMACRO() ENDMACRO()
FUNCTION(TRAVERSE_FILES dir topdir file file_comp dir_root) FUNCTION(TRAVERSE_FILES dir topdir file file_comp dir_root)
...@@ -24,23 +36,34 @@ FUNCTION(TRAVERSE_FILES dir topdir file file_comp dir_root) ...@@ -24,23 +36,34 @@ FUNCTION(TRAVERSE_FILES dir topdir file file_comp dir_root)
FILE(RELATIVE_PATH dir_rel ${topdir} ${dir}) FILE(RELATIVE_PATH dir_rel ${topdir} ${dir})
IF(dir_rel) IF(dir_rel)
MAKE_DIRECTORY(${dir_root}/${dir_rel}) MAKE_DIRECTORY(${dir_root}/${dir_rel})
MAKE_WIX_IDENTIFIER("${dir_rel}" id) MAKE_WIX_IDENTIFIER("${dir_rel}" dir_id)
FILE(APPEND ${file} "<DirectoryRef Id='directory.${id}'>\n")
ELSE() ELSE()
FILE(APPEND ${file} "<DirectoryRef Id='INSTALLDIR'>\n") FILE(APPEND ${file} "<DirectoryRef Id='INSTALLDIR'>\n")
ENDIF() ENDIF()
FILE(APPEND ${file} "<DirectoryRef Id='D.${dir_id}'>\n")
SET(NONEXEFILES)
FOREACH(f ${all_files}) FOREACH(f ${all_files})
IF(NOT IS_DIRECTORY ${f}) IF(NOT IS_DIRECTORY ${f})
GET_FILENAME_COMPONENT(ext "${f}" EXT)
FILE(TO_NATIVE_PATH ${f} f_native)
FILE(RELATIVE_PATH rel ${topdir} ${f}) FILE(RELATIVE_PATH rel ${topdir} ${f})
MAKE_WIX_IDENTIFIER("${rel}" id) MAKE_WIX_IDENTIFIER("${rel}" id)
FILE(TO_NATIVE_PATH ${f} f_native) IF(ext MATCHES ".dll" OR ext MATCHES ".exe")
FILE(APPEND ${file} " <Component Id='component.${id}' Guid='*'>\n") FILE(APPEND ${file} " <Component Id='C.${id}' Guid='*'>\n")
FILE(APPEND ${file} " <File Id='file.${id}' KeyPath='yes' Source='${f_native}'/>\n") FILE(APPEND ${file} " <File Id='file.${id}' KeyPath='yes' Source='${f_native}'/>\n")
FILE(APPEND ${file} " </Component>\n") FILE(APPEND ${file} " </Component>\n")
FILE(APPEND ${file_comp} " <ComponentRef Id='component.${id}'/>\n") FILE(APPEND ${file_comp} " <ComponentRef Id='C.${id}'/>\n")
ELSE()
# Collect nonexe files into a single component to reduce number of components
SET(NONEXEFILES "${NONEXEFILES} <File Id='file.${id}' Source='${f_native}'/>\n")
ENDIF()
ENDIF() ENDIF()
ENDFOREACH() ENDFOREACH()
IF(NONEXEFILES)
GENERATE_GUID(guid)
FILE(APPEND ${file} " <Component Id='C.${d_name}.${dir_id}.nonexefiles' Id='${guid}>\n${NONEXEFILES}</Component>"
ENDIF()
FILE(APPEND ${file} "</DirectoryRef>\n") FILE(APPEND ${file} "</DirectoryRef>\n")
FOREACH(f ${all_files}) FOREACH(f ${all_files})
IF(IS_DIRECTORY ${f}) IF(IS_DIRECTORY ${f})
...@@ -54,7 +77,7 @@ FUNCTION(TRAVERSE_DIRECTORIES dir topdir file prefix) ...@@ -54,7 +77,7 @@ FUNCTION(TRAVERSE_DIRECTORIES dir topdir file prefix)
IF(rel) IF(rel)
MAKE_WIX_IDENTIFIER("${rel}" id) MAKE_WIX_IDENTIFIER("${rel}" id)
GET_FILENAME_COMPONENT(name ${dir} NAME) GET_FILENAME_COMPONENT(name ${dir} NAME)
FILE(APPEND ${file} "${prefix}<Directory Id='directory.${id}' Name='${name}'>\n") FILE(APPEND ${file} "${prefix}<Directory Id='D.${id}' Name='${name}'>\n")
ENDIF() ENDIF()
FILE(GLOB all_files ${dir}/*) FILE(GLOB all_files ${dir}/*)
FOREACH(f ${all_files}) FOREACH(f ${all_files})
......
...@@ -7,13 +7,144 @@ SET(CMAKE_CFG_INTDIR "@CMAKE_CFG_INTDIR@") ...@@ -7,13 +7,144 @@ SET(CMAKE_CFG_INTDIR "@CMAKE_CFG_INTDIR@")
SET(MAJOR_VERSION "@MAJOR_VERSION@") SET(MAJOR_VERSION "@MAJOR_VERSION@")
SET(MINOR_VERSION "@MINOR_VERSION@") SET(MINOR_VERSION "@MINOR_VERSION@")
SET(PATCH "@PATCH@") SET(PATCH "@PATCH@")
SET(CMAKE_SIZEOF_VOID_P @CMAKE_SIZEOF_VOID_P@)
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
SET(Win64 " Win64='yes'")
SET(Platform x64)
SET(PlatformProgramFilesFolder ProgramFiles64Folder)
ELSE()
SET(Platform x86)
SET(PlatformProgramFilesFolder ProgramFilesFolder)
SET(Win64)
ENDIF()
SET(ENV{VS_UNICODE_OUTPUT}) SET(ENV{VS_UNICODE_OUTPUT})
INCLUDE(${CMAKE_BINARY_DIR}/CPackConfig.cmake) INCLUDE(${CMAKE_BINARY_DIR}/CPackConfig.cmake)
IF(CPACK_WIX_CONFIG)
INCLUDE(${CPACK_WIX_CONFIG})
ENDIF()
IF(NOT CPACK_WIX_UI)
SET(CPACK_WIX_UI "WixUI_Mondo")
ENDIF()
SET(WIX_FEATURES)
FOREACH(comp ${CPACK_COMPONENTS_ALL})
STRING(TOUPPER "${comp}" comp_upper)
IF(NOT CPACK_COMPONENT_${comp_upper}_GROUP)
SET(WIX_FEATURE_${comp_upper}_COMPONENTS "${comp}")
SET(CPACK_COMPONENT_${comp_upper}_HIDDEN 1)
SET(CPACK_COMPONENT_GROUP_${comp_upper}_DISPLAY_NAME ${CPACK_COMPONENT_${comp_upper}_DISPLAY_NAME})
SET(CPACK_COMPONENT_GROUP_${comp_upper}_DESCRIPTION ${CPACK_COMPONENT_${comp_upper}_DESCRIPTION})
SET(CPACK_COMPONENT_GROUP_${comp_upper}_WIX_LEVEL ${CPACK_COMPONENT_${comp_upper}_WIX_LEVEL})
SET(WIX_FEATURES ${WIX_FEATURES} WIX_FEATURE_${comp_upper})
ELSE()
SET(FEATURE_NAME WIX_FEATURE_${CPACK_COMPONENT_${comp_upper}_GROUP})
SET(WIX_FEATURES ${WIX_FEATURES} ${FEATURE_NAME})
LIST(APPEND ${FEATURE_NAME}_COMPONENTS ${comp})
ENDIF()
ENDFOREACH()
LIST(REMOVE_DUPLICATES WIX_FEATURES)
SET(CPACK_WIX_FEATURES)
FOREACH(f ${WIX_FEATURES})
STRING(TOUPPER "${f}" f_upper)
STRING(REPLACE "WIX_FEATURE_" "" f_upper ${f_upper})
IF (CPACK_COMPONENT_GROUP_${f_upper}_DISPLAY_NAME)
SET(TITLE ${CPACK_COMPONENT_GROUP_${f_upper}_DISPLAY_NAME})
ELSE()
SET(TITLE CPACK_COMPONENT_GROUP_${f_upper}_DISPLAY_NAME)
ENDIF()
IF (CPACK_COMPONENT_GROUP_${f_upper}_DESCRIPTION)
SET(DESCRIPTION ${CPACK_COMPONENT_GROUP_${f_upper}_DESCRIPTION})
ELSE()
SET(DESCRIPTION CPACK_COMPONENT_GROUP_${f_upper}_DESCRIPTION)
ENDIF()
IF(CPACK_COMPONENT_${f_upper}_WIX_LEVEL)
SET(Level ${CPACK_COMPONENT_${f_upper}_WIX_LEVEL})
ELSE()
SET(Level 1)
ENDIF()
IF(CPACK_COMPONENT_GROUP_${f_upper}_HIDDEN)
SET(DISPLAY "Display='hidden'")
SET(TITLE ${f_upper})
SET(DESCRIPTION ${f_upper})
ELSE()
SET(DISPLAY)
IF(CPACK_COMPONENT_GROUP_${f_upper}_EXPANDED)
SET(DISPLAY "Display='expand'")
ENDIF()
IF (CPACK_COMPONENT_GROUP_${f_upper}_DISPLAY_NAME)
SET(TITLE ${CPACK_COMPONENT_GROUP_${f_upper}_DISPLAY_NAME})
ELSE()
SET(TITLE CPACK_COMPONENT_GROUP_${f_upper}_DISPLAY_NAME)
ENDIF()
IF (CPACK_COMPONENT_GROUP_${f_upper}_DESCRIPTION)
SET(DESCRIPTION ${CPACK_COMPONENT_GROUP_${f_upper}_DESCRIPTION})
ELSE()
SET(DESCRIPTION CPACK_COMPONENT_GROUP_${f_upper}_DESCRIPTION)
ENDIF()
ENDIF()
SET(CPACK_WIX_FEATURES
"${CPACK_WIX_FEATURES}
<Feature Id='${f_upper}'
Title='${TITLE}'
Description='${DESCRIPTION}'
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})
ELSE()
SET(TITLE CPACK_COMPONENT_${c_upper}_DISPLAY_NAME)
ENDIF()
IF (CPACK_COMPONENT_${c_upper}_DESCRIPTION)
SET(DESCRIPTION ${CPACK_COMPONENT_${c_upper}_DESCRIPTION})
ELSE()
SET(DESCRIPTION CPACK_COMPONENT_${c_upper}_DESCRIPTION)
ENDIF()
IF(CPACK_COMPONENT_${c_upper}_WIX_LEVEL)
SET(Level ${CPACK_COMPONENT_${c_upper}_WIX_LEVEL})
ELSE()
SET(Level 1)
ENDIF()
IF(CPACK_COMPONENT_${c_upper}_HIDDEN)
SET(CPACK_WIX_FEATURES
"${CPACK_WIX_FEATURES}
<ComponentGroupRef Id='componentgroup.${c}'/>")
ELSE()
SET(CPACK_WIX_FEATURES
"${CPACK_WIX_FEATURES}
<Feature Id='${c}'
Title='${TITLE}'
Description='${DESCRIPTION}'
Level='${Level}'>
<ComponentGroupRef Id='componentgroup.${c}'/>
</Feature>")
ENDIF()
ENDFOREACH()
SET(CPACK_WIX_FEATURES
"${CPACK_WIX_FEATURES}
</Feature>
")
ENDFOREACH()
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mysql_server.wxs.in CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mysql_server.wxs.in
${CMAKE_CURRENT_BINARY_DIR}/mysql_server.wxs) ${CMAKE_CURRENT_BINARY_DIR}/mysql_server.wxs)
IF(CMAKE_INSTALL_CONFIG_NAME) IF(CMAKE_INSTALL_CONFIG_NAME)
SET(CONFIG_PARAM "-DCMAKE_INSTALL_CONFIG_NAME=${CMAKE_INSTALL_CONFIG_NAME}") SET(CONFIG_PARAM "-DCMAKE_INSTALL_CONFIG_NAME=${CMAKE_INSTALL_CONFIG_NAME}")
ENDIF() ENDIF()
...@@ -28,6 +159,12 @@ FOREACH(comp ${CPACK_COMPONENTS_ALL}) ...@@ -28,6 +159,12 @@ FOREACH(comp ${CPACK_COMPONENTS_ALL})
) )
ENDFOREACH() ENDFOREACH()
MACRO(GENERATE_GUID VarName)
EXECUTE_PROCESS(COMMAND uuidgen -c
OUTPUT_VARIABLE ${VarName}
OUTPUT_STRIP_TRAILING_WHITESPACE)
ENDMACRO()
SET(INC_VAR 0) SET(INC_VAR 0)
MACRO(MAKE_WIX_IDENTIFIER str varname) MACRO(MAKE_WIX_IDENTIFIER str varname)
STRING(REPLACE "/" "." ${varname} "${str}") STRING(REPLACE "/" "." ${varname} "${str}")
...@@ -43,7 +180,8 @@ MACRO(MAKE_WIX_IDENTIFIER str varname) ...@@ -43,7 +180,8 @@ MACRO(MAKE_WIX_IDENTIFIER str varname)
ENDIF() ENDIF()
ENDMACRO() ENDMACRO()
FUNCTION(TRAVERSE_FILES dir topdir file file_comp dir_root)
FUNCTION(TRAVERSE_FILES dir topdir file file_comp file_default_component dir_root)
FILE(GLOB all_files ${dir}/*) FILE(GLOB all_files ${dir}/*)
IF(NOT all_files) IF(NOT all_files)
RETURN() RETURN()
...@@ -52,26 +190,42 @@ FUNCTION(TRAVERSE_FILES dir topdir file file_comp dir_root) ...@@ -52,26 +190,42 @@ FUNCTION(TRAVERSE_FILES dir topdir file file_comp dir_root)
IF(dir_rel) IF(dir_rel)
MAKE_DIRECTORY(${dir_root}/${dir_rel}) MAKE_DIRECTORY(${dir_root}/${dir_rel})
MAKE_WIX_IDENTIFIER("${dir_rel}" id) MAKE_WIX_IDENTIFIER("${dir_rel}" id)
FILE(APPEND ${file} "<DirectoryRef Id='D.${id}'>\n") SET(DirectoryRefId "D.${id}")
ELSE() ELSE()
FILE(APPEND ${file} "<DirectoryRef Id='INSTALLDIR'>\n") SET(DirectoryRefId "INSTALLDIR")
ENDIF() ENDIF()
FILE(APPEND ${file} "<DirectoryRef Id='${DirectoryRefId}'>\n")
SET(NONEXEFILES)
FOREACH(f ${all_files}) FOREACH(f ${all_files})
IF(NOT IS_DIRECTORY ${f}) IF(NOT IS_DIRECTORY ${f})
FILE(RELATIVE_PATH rel ${topdir} ${f}) FILE(RELATIVE_PATH rel ${topdir} ${f})
MAKE_WIX_IDENTIFIER("${rel}" id) MAKE_WIX_IDENTIFIER("${rel}" id)
FILE(TO_NATIVE_PATH ${f} f_native) FILE(TO_NATIVE_PATH ${f} f_native)
FILE(APPEND ${file} " <Component Id='C.${id}' Guid='*'>\n") GET_FILENAME_COMPONENT(f_ext "${f}" EXT)
# According to MSDN each DLL or EXE should be in the own component
IF(f_ext MATCHES ".exe" OR f_ext MATCHES ".dll")
FILE(APPEND ${file} " <Component Id='C.${id}' Guid='*' ${Win64}>\n")
FILE(APPEND ${file} " <File Id='F.${id}' KeyPath='yes' Source='${f_native}'/>\n") FILE(APPEND ${file} " <File Id='F.${id}' KeyPath='yes' Source='${f_native}'/>\n")
FILE(APPEND ${file} " </Component>\n") FILE(APPEND ${file} " </Component>\n")
FILE(APPEND ${file_comp} " <ComponentRef Id='C.${id}'/>\n") FILE(APPEND ${file_comp} " <ComponentRef Id='C.${id}'/>\n")
ELSE()
SET(NONEXEFILES "${NONEXEFILES}\n<File Id='F.${id}' Source='${f_native}'/>" )
ENDIF()
ENDIF() ENDIF()
ENDFOREACH() ENDFOREACH()
FILE(APPEND ${file} "</DirectoryRef>\n") FILE(APPEND ${file} "</DirectoryRef>\n")
IF(NONEXEFILES)
GENERATE_GUID(guid)
SET(ComponentId "C._files_${COMP_NAME}.${DirectoryRefId}")
FILE(APPEND ${file_default_component}
"<DirectoryRef Id='${DirectoryRefId}'>\n<Component Guid='${guid}' Id='${ComponentId}' ${Win64}>${NONEXEFILES}\n</Component></DirectoryRef>\n")
FILE(APPEND ${file_comp} " <ComponentRef Id='${ComponentId}'/>\n")
ENDIF()
FOREACH(f ${all_files}) FOREACH(f ${all_files})
IF(IS_DIRECTORY ${f}) IF(IS_DIRECTORY ${f})
TRAVERSE_FILES(${f} ${topdir} ${file} ${file_comp} ${dir_root}) TRAVERSE_FILES(${f} ${topdir} ${file} ${file_comp} ${file_default_component} ${dir_root})
ENDIF() ENDIF()
ENDFOREACH() ENDFOREACH()
ENDFUNCTION() ENDFUNCTION()
...@@ -102,8 +256,13 @@ FOREACH(d ${DIRS}) ...@@ -102,8 +256,13 @@ FOREACH(d ${DIRS})
FILE(WRITE FILE(WRITE
${abs}/${d_name}.wxs "<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>\n<Fragment>\n") ${abs}/${d_name}.wxs "<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>\n<Fragment>\n")
FILE(WRITE FILE(WRITE
${abs}/${d_name}_component_group.wxs "<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>\n<Fragment>\n<ComponentGroup Id='componentgroup.${d_name}'>\n") ${abs}/${d_name}_default_component.wxs "<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'><Fragment>")
TRAVERSE_FILES(${d} ${d} ${abs}/${d_name}.wxs ${abs}/${d_name}_component_group.wxs "${abs}/dirs") FILE(WRITE
${abs}/${d_name}_component_group.wxs "<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
<Fragment>\n<ComponentGroup Id='componentgroup.${d_name}'>")
SET(COMP_NAME ${d_name})
TRAVERSE_FILES(${d} ${d} ${abs}/${d_name}.wxs ${abs}/${d_name}_component_group.wxs ${abs}/${d_name}_default_component.wxs "${abs}/dirs")
FILE(APPEND ${abs}/${d_name}_default_component.wxs "\n</Fragment>\n</Wix>")
FILE(APPEND ${abs}/${d_name}.wxs " </Fragment>\n</Wix>") FILE(APPEND ${abs}/${d_name}.wxs " </Fragment>\n</Wix>")
FILE(APPEND ${abs}/${d_name}_component_group.wxs "</ComponentGroup>\n</Fragment>\n</Wix>") FILE(APPEND ${abs}/${d_name}_component_group.wxs "</ComponentGroup>\n</Fragment>\n</Wix>")
ENDFOREACH() ENDFOREACH()
......
...@@ -3,27 +3,22 @@ ...@@ -3,27 +3,22 @@
Name="MySQL Server @MAJOR_VERSION@.@MINOR_VERSION@" Version="@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH@" Language="1033" Manufacturer="MySQL AB"> Name="MySQL Server @MAJOR_VERSION@.@MINOR_VERSION@" Version="@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH@" Language="1033" Manufacturer="MySQL AB">
<Package Id='*' Keywords='Installer' Description="MySQL Database Server" <Package Id='*' Keywords='Installer' Description="MySQL Database Server"
Manufacturer='MySQL AB' Manufacturer='MySQL AB'
InstallerVersion='310' Languages='1033' Compressed='yes' SummaryCodepage='1252' /> InstallerVersion='200' Languages='1033' Compressed='yes' SummaryCodepage='1252'
Platform='@Platform@'/>
<Media Id='1' Cabinet='product.cab' EmbedCab='yes' /> <Media Id='1' Cabinet='product.cab' EmbedCab='yes' />
<Directory Id='TARGETDIR' Name='SourceDir'> <Directory Id='TARGETDIR' Name='SourceDir'>
<Directory Id='ProgramFilesFolder'> <Directory Id='@PlatformProgramFilesFolder@'>
<Directory Id='directory.MySQL' Name='MySQL'> <Directory Id='directory.MySQL' Name='MySQL'>
<Directory Id='INSTALLDIR' Name='MySQL Server @MAJOR_VERSION@.@MINOR_VERSION@'> <Directory Id='INSTALLDIR' Name='MySQL Server @MAJOR_VERSION@.@MINOR_VERSION@'>
</Directory> </Directory>
</Directory> </Directory>
</Directory> </Directory>
</Directory> </Directory>
<Feature Id='Server' Level='1' Title="MySQL Server" Description="Install MySQL server" Display="expand"> <!-- CPACK_WIX_FEATURES -->
<ComponentGroupRef Id='componentgroup.Server'/> @CPACK_WIX_FEATURES@
<Feature Level='1' Id='ClientPrograms' Title="Client Programs" Description="Various helpful (commandline) tools including the mysql command line client" > <!--CPACK_WIX_FEATURES end -->
<ComponentGroupRef Id="componentgroup.Client" /> <Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR"></Property>
</Feature> <UIRef Id="@CPACK_WIX_UI@" />
</Feature>
<Feature Id='Devel' Level='1' Title="Development Components"
Description="Installs C/C++ header files and libraries">
<ComponentGroupRef Id='componentgroup.Development' />
</Feature>
<UIRef Id="WixUI_FeatureTree" />
<UIRef Id="WixUI_ErrorProgressText" /> <UIRef Id="WixUI_ErrorProgressText" />
<WixVariable Id="WixUIBannerBmp" Value="@CMAKE_CURRENT_SOURCE_DIR@/AdminHeader.jpg" /> <WixVariable Id="WixUIBannerBmp" Value="@CMAKE_CURRENT_SOURCE_DIR@/AdminHeader.jpg" />
<WixVariable Id="WixUIDialogBmp" Value="@CMAKE_CURRENT_SOURCE_DIR@/AdminBackground.jpg" /> <WixVariable Id="WixUIDialogBmp" Value="@CMAKE_CURRENT_SOURCE_DIR@/AdminBackground.jpg" />
......
...@@ -244,6 +244,7 @@ IF(MSVC) ...@@ -244,6 +244,7 @@ IF(MSVC)
ENDIF() ENDIF()
SET(NON_THREADED_LIBS ${CLIENT_LIBS}) SET(NON_THREADED_LIBS ${CLIENT_LIBS})
SET(mysql_config_COMPONENT COMPONENT Development)
IF(WIN32) IF(WIN32)
# On Windows, some .sh and some .pl.in files are configured # On Windows, some .sh and some .pl.in files are configured
...@@ -256,15 +257,18 @@ IF(WIN32) ...@@ -256,15 +257,18 @@ IF(WIN32)
SET(SH_FILES mysql_convert_table_format mysqld_multi) SET(SH_FILES mysql_convert_table_format mysqld_multi)
FOREACH(file ${PLIN_FILES}) FOREACH(file ${PLIN_FILES})
IF(NOT ${file}_COMPONENT)
SET(${file}_COMPONENT Server_Scripts)
ENDIF()
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file}.pl.in CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file}.pl.in
${CMAKE_CURRENT_BINARY_DIR}/${file}.pl ESCAPE_QUOTES @ONLY) ${CMAKE_CURRENT_BINARY_DIR}/${file}.pl ESCAPE_QUOTES @ONLY)
INSTALL_SCRIPT(${CMAKE_CURRENT_BINARY_DIR}/${file}.pl) INSTALL_SCRIPT(${CMAKE_CURRENT_BINARY_DIR}/${file}.pl COMPONENT ${${file}_COMPONENT})
ENDFOREACH() ENDFOREACH()
FOREACH(file ${SH_FILES}) FOREACH(file ${SH_FILES})
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file}.sh CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file}.sh
${CMAKE_CURRENT_BINARY_DIR}/${file}.pl ESCAPE_QUOTES @ONLY) ${CMAKE_CURRENT_BINARY_DIR}/${file}.pl ESCAPE_QUOTES @ONLY)
INSTALL_SCRIPT(${CMAKE_CURRENT_BINARY_DIR}/${file}.pl) INSTALL_SCRIPT(${CMAKE_CURRENT_BINARY_DIR}/${file}.pl COMPONENT ${${file}_COMPONENT})
ENDFOREACH() ENDFOREACH()
ELSE() ELSE()
# On Unix, most of the files end up in the bin directory # On Unix, most of the files end up in the bin directory
......
...@@ -241,7 +241,7 @@ IF(INSTALL_LAYOUT STREQUAL "STANDALONE") ...@@ -241,7 +241,7 @@ IF(INSTALL_LAYOUT STREQUAL "STANDALONE")
# Avoid completely empty directories and install dummy file instead. # Avoid completely empty directories and install dummy file instead.
SET(DUMMY_FILE ${CMAKE_CURRENT_BINARY_DIR}/.empty ) SET(DUMMY_FILE ${CMAKE_CURRENT_BINARY_DIR}/.empty )
FILE(WRITE ${DUMMY_FILE} "") FILE(WRITE ${DUMMY_FILE} "")
INSTALL(FILES ${DUMMY_FILE} DESTINATION data/test) INSTALL(FILES ${DUMMY_FILE} DESTINATION data/test COMPONENT DataFiles)
# Install initial database on windows # Install initial database on windows
IF(NOT CMAKE_CROSSCOMPILING) IF(NOT CMAKE_CROSSCOMPILING)
...@@ -269,7 +269,7 @@ IF(WIN32 AND MYSQLD_EXECUTABLE) ...@@ -269,7 +269,7 @@ IF(WIN32 AND MYSQLD_EXECUTABLE)
ALL ALL
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/data/mysql/user.frm DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/data/mysql/user.frm
) )
INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/data/mysql DESTINATION data) INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/data/mysql DESTINATION data COMPONENT DataFiles)
ELSE() ELSE()
# Not windows or cross compiling, just install an empty directory # Not windows or cross compiling, just install an empty directory
INSTALL(FILES ${DUMMY_FILE} DESTINATION data/mysql) INSTALL(FILES ${DUMMY_FILE} DESTINATION data/mysql)
......
...@@ -34,7 +34,8 @@ ENDIF() ...@@ -34,7 +34,8 @@ ENDIF()
FOREACH(inifile my-huge my-innodb-heavy-4G my-large my-medium my-small) FOREACH(inifile my-huge my-innodb-heavy-4G my-large my-medium my-small)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${inifile}.cnf.sh CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${inifile}.cnf.sh
${CMAKE_CURRENT_BINARY_DIR}/${inifile}.${ini_file_extension} @ONLY) ${CMAKE_CURRENT_BINARY_DIR}/${inifile}.${ini_file_extension} @ONLY)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${inifile}.${ini_file_extension} DESTINATION ${INSTALL_DOCREADMEDIR}) INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${inifile}.${ini_file_extension} DESTINATION
${INSTALL_DOCREADMEDIR} COMPONENT IniFiles)
ENDFOREACH() ENDFOREACH()
......
...@@ -27,4 +27,4 @@ IF(WITH_UNIT_TESTS) ...@@ -27,4 +27,4 @@ IF(WITH_UNIT_TESTS)
SET_TARGET_PROPERTIES(bug25714 PROPERTIES LINKER_LANGUAGE CXX) SET_TARGET_PROPERTIES(bug25714 PROPERTIES LINKER_LANGUAGE CXX)
ENDIF() ENDIF()
INSTALL(TARGETS mysql_client_test DESTINATION bin) INSTALL(TARGETS mysql_client_test DESTINATION ${INSTALL_BINDIR} COMPONENT Test)
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