diff --git a/packaging/WiX/CPackWixConfig.cmake b/packaging/WiX/CPackWixConfig.cmake index c782b7cd17a49..9caae8375d804 100644 --- a/packaging/WiX/CPackWixConfig.cmake +++ b/packaging/WiX/CPackWixConfig.cmake @@ -1,119 +1,119 @@ -# Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -IF(ESSENTIALS) - SET(CPACK_COMPONENTS_USED "Server;Client;DataFiles") - SET(CPACK_WIX_UI "WixUI_InstallDir") - IF(CMAKE_SIZEOF_VOID_P MATCHES 8) - SET(CPACK_PACKAGE_FILE_NAME "mysql-essential-${VERSION}-winx64") - ELSE() - SET(CPACK_PACKAGE_FILE_NAME "mysql-essential-${VERSION}-win32") - ENDIF() -ELSE() - SET(CPACK_COMPONENTS_USED - "Server;Client;DataFiles;Development;SharedLibraries;Documentation;IniFiles;Readme;Server_Scripts;DebugBinaries") -ENDIF() - - -# Some components like Embedded are optional -# We will build MSI without embedded if it was not selected for build -#(need to modify CPACK_COMPONENTS_ALL for that) -SET(CPACK_ALL) -FOREACH(comp1 ${CPACK_COMPONENTS_USED}) - SET(found) - FOREACH(comp2 ${CPACK_COMPONENTS_ALL}) - IF(comp1 STREQUAL comp2) - SET(found 1) - BREAK() - ENDIF() - ENDFOREACH() - IF(found) - SET(CPACK_ALL ${CPACK_ALL} ${comp1}) - ENDIF() -ENDFOREACH() -SET(CPACK_COMPONENTS_ALL ${CPACK_ALL}) - -# Always install (hidden), includes Readme files -SET(CPACK_COMPONENT_GROUP_ALWAYSINSTALL_HIDDEN 1) -SET(CPACK_COMPONENT_README_GROUP "AlwaysInstall") - -# Feature MySQL Server -SET(CPACK_COMPONENT_GROUP_MYSQLSERVER_DISPLAY_NAME "MySQL Server") -SET(CPACK_COMPONENT_GROUP_MYSQLSERVER_EXPANDED "1") -SET(CPACK_COMPONENT_GROUP_MYSQLSERVER_DESCRIPTION "Install MySQL Server") - # Subfeature "Server" (hidden) - SET(CPACK_COMPONENT_SERVER_GROUP "MySQLServer") - SET(CPACK_COMPONENT_SERVER_HIDDEN 1) - # Subfeature "Client" - SET(CPACK_COMPONENT_CLIENT_GROUP "MySQLServer") - SET(CPACK_COMPONENT_CLIENT_DISPLAY_NAME "Client Programs") - SET(CPACK_COMPONENT_CLIENT_DESCRIPTION - "Various helpful (commandline) tools including the mysql command line client" ) - # Subfeature "Debug binaries" - SET(CPACK_COMPONENT_DEBUGBINARIES_GROUP "MySQLServer") - SET(CPACK_COMPONENT_DEBUGBINARIES_DISPLAY_NAME "Debug binaries") - SET(CPACK_COMPONENT_DEBUGBINARIES_DESCRIPTION - "Debug/trace versions of executables and libraries" ) - #SET(CPACK_COMPONENT_DEBUGBINARIES_WIX_LEVEL 2) - - - #Subfeature "Data Files" - SET(CPACK_COMPONENT_DATAFILES_GROUP "MySQLServer") - SET(CPACK_COMPONENT_DATAFILES_DISPLAY_NAME "Server data files") - SET(CPACK_COMPONENT_DATAFILES_DESCRIPTION "Server data files" ) - SET(CPACK_COMPONENT_DATAFILES_HIDDEN 1) - - -#Feature "Devel" -SET(CPACK_COMPONENT_GROUP_DEVEL_DISPLAY_NAME "Development Components") -SET(CPACK_COMPONENT_GROUP_DEVEL_DESCRIPTION "Installs C/C++ header files and libraries") - #Subfeature "Development" - SET(CPACK_COMPONENT_DEVELOPMENT_GROUP "Devel") - SET(CPACK_COMPONENT_DEVELOPMENT_HIDDEN 1) - - #Subfeature "Shared libraries" - SET(CPACK_COMPONENT_SHAREDLIBRARIES_GROUP "Devel") - SET(CPACK_COMPONENT_SHAREDLIBRARIES_DISPLAY_NAME "Client C API library (shared)") - SET(CPACK_COMPONENT_SHAREDLIBRARIES_DESCRIPTION "Installs shared client library") - - #Subfeature "Embedded" - SET(CPACK_COMPONENT_EMBEDDED_GROUP "Devel") - SET(CPACK_COMPONENT_EMBEDDED_DISPLAY_NAME "Embedded server library") - SET(CPACK_COMPONENT_EMBEDDED_DESCRIPTION "Installs embedded server library") - SET(CPACK_COMPONENT_EMBEDDED_WIX_LEVEL 2) - -#Feature Debug Symbols -SET(CPACK_COMPONENT_GROUP_DEBUGSYMBOLS_DISPLAY_NAME "Debug Symbols") -SET(CPACK_COMPONENT_GROUP_DEBUGSYMBOLS_DESCRIPTION "Installs Debug Symbols") -SET(CPACK_COMPONENT_GROUP_DEBUGSYMBOLS_WIX_LEVEL 2) - SET(CPACK_COMPONENT_DEBUGINFO_GROUP "DebugSymbols") - SET(CPACK_COMPONENT_DEBUGINFO_HIDDEN 1) - -#Feature Documentation -SET(CPACK_COMPONENT_DOCUMENTATION_DISPLAY_NAME "Documentation") -SET(CPACK_COMPONENT_DOCUMENTATION_DESCRIPTION "Installs documentation") -SET(CPACK_COMPONENT_DOCUMENTATION_WIX_LEVEL 2) - -#Feature tests -SET(CPACK_COMPONENT_TEST_DISPLAY_NAME "Tests") -SET(CPACK_COMPONENT_TEST_DESCRIPTION "Installs unittests (requires Perl to run)") -SET(CPACK_COMPONENT_TEST_WIX_LEVEL 2) - - -#Feature Misc (hidden, installs only if everything is installed) -SET(CPACK_COMPONENT_GROUP_MISC_HIDDEN 1) -SET(CPACK_COMPONENT_GROUP_MISC_WIX_LEVEL 100) - SET(CPACK_COMPONENT_INIFILES_GROUP "Misc") - SET(CPACK_COMPONENT_SERVER_SCRIPTS_GROUP "Misc") +# Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +IF(ESSENTIALS) + SET(CPACK_COMPONENTS_USED "Server;Client;DataFiles") + SET(CPACK_WIX_UI "WixUI_InstallDir") + IF(CMAKE_SIZEOF_VOID_P MATCHES 8) + SET(CPACK_PACKAGE_FILE_NAME "mysql-essential-${VERSION}-winx64") + ELSE() + SET(CPACK_PACKAGE_FILE_NAME "mysql-essential-${VERSION}-win32") + ENDIF() +ELSE() + SET(CPACK_COMPONENTS_USED + "Server;Client;DataFiles;Development;SharedLibraries;Documentation;IniFiles;Readme;Server_Scripts;DebugBinaries") +ENDIF() + + +# Some components like Embedded are optional +# We will build MSI without embedded if it was not selected for build +#(need to modify CPACK_COMPONENTS_ALL for that) +SET(CPACK_ALL) +FOREACH(comp1 ${CPACK_COMPONENTS_USED}) + SET(found) + FOREACH(comp2 ${CPACK_COMPONENTS_ALL}) + IF(comp1 STREQUAL comp2) + SET(found 1) + BREAK() + ENDIF() + ENDFOREACH() + IF(found) + SET(CPACK_ALL ${CPACK_ALL} ${comp1}) + ENDIF() +ENDFOREACH() +SET(CPACK_COMPONENTS_ALL ${CPACK_ALL}) + +# Always install (hidden), includes Readme files +SET(CPACK_COMPONENT_GROUP_ALWAYSINSTALL_HIDDEN 1) +SET(CPACK_COMPONENT_README_GROUP "AlwaysInstall") + +# Feature MySQL Server +SET(CPACK_COMPONENT_GROUP_MYSQLSERVER_DISPLAY_NAME "MySQL Server") +SET(CPACK_COMPONENT_GROUP_MYSQLSERVER_EXPANDED "1") +SET(CPACK_COMPONENT_GROUP_MYSQLSERVER_DESCRIPTION "Install MySQL Server") + # Subfeature "Server" (hidden) + SET(CPACK_COMPONENT_SERVER_GROUP "MySQLServer") + SET(CPACK_COMPONENT_SERVER_HIDDEN 1) + # Subfeature "Client" + SET(CPACK_COMPONENT_CLIENT_GROUP "MySQLServer") + SET(CPACK_COMPONENT_CLIENT_DISPLAY_NAME "Client Programs") + SET(CPACK_COMPONENT_CLIENT_DESCRIPTION + "Various helpful (commandline) tools including the mysql command line client" ) + # Subfeature "Debug binaries" + SET(CPACK_COMPONENT_DEBUGBINARIES_GROUP "MySQLServer") + SET(CPACK_COMPONENT_DEBUGBINARIES_DISPLAY_NAME "Debug binaries") + SET(CPACK_COMPONENT_DEBUGBINARIES_DESCRIPTION + "Debug/trace versions of executables and libraries" ) + #SET(CPACK_COMPONENT_DEBUGBINARIES_WIX_LEVEL 2) + + + #Subfeature "Data Files" + SET(CPACK_COMPONENT_DATAFILES_GROUP "MySQLServer") + SET(CPACK_COMPONENT_DATAFILES_DISPLAY_NAME "Server data files") + SET(CPACK_COMPONENT_DATAFILES_DESCRIPTION "Server data files" ) + SET(CPACK_COMPONENT_DATAFILES_HIDDEN 1) + + +#Feature "Devel" +SET(CPACK_COMPONENT_GROUP_DEVEL_DISPLAY_NAME "Development Components") +SET(CPACK_COMPONENT_GROUP_DEVEL_DESCRIPTION "Installs C/C++ header files and libraries") + #Subfeature "Development" + SET(CPACK_COMPONENT_DEVELOPMENT_GROUP "Devel") + SET(CPACK_COMPONENT_DEVELOPMENT_HIDDEN 1) + + #Subfeature "Shared libraries" + SET(CPACK_COMPONENT_SHAREDLIBRARIES_GROUP "Devel") + SET(CPACK_COMPONENT_SHAREDLIBRARIES_DISPLAY_NAME "Client C API library (shared)") + SET(CPACK_COMPONENT_SHAREDLIBRARIES_DESCRIPTION "Installs shared client library") + + #Subfeature "Embedded" + SET(CPACK_COMPONENT_EMBEDDED_GROUP "Devel") + SET(CPACK_COMPONENT_EMBEDDED_DISPLAY_NAME "Embedded server library") + SET(CPACK_COMPONENT_EMBEDDED_DESCRIPTION "Installs embedded server library") + SET(CPACK_COMPONENT_EMBEDDED_WIX_LEVEL 2) + +#Feature Debug Symbols +SET(CPACK_COMPONENT_GROUP_DEBUGSYMBOLS_DISPLAY_NAME "Debug Symbols") +SET(CPACK_COMPONENT_GROUP_DEBUGSYMBOLS_DESCRIPTION "Installs Debug Symbols") +SET(CPACK_COMPONENT_GROUP_DEBUGSYMBOLS_WIX_LEVEL 2) + SET(CPACK_COMPONENT_DEBUGINFO_GROUP "DebugSymbols") + SET(CPACK_COMPONENT_DEBUGINFO_HIDDEN 1) + +#Feature Documentation +SET(CPACK_COMPONENT_DOCUMENTATION_DISPLAY_NAME "Documentation") +SET(CPACK_COMPONENT_DOCUMENTATION_DESCRIPTION "Installs documentation") +SET(CPACK_COMPONENT_DOCUMENTATION_WIX_LEVEL 2) + +#Feature tests +SET(CPACK_COMPONENT_TEST_DISPLAY_NAME "Tests") +SET(CPACK_COMPONENT_TEST_DESCRIPTION "Installs unittests (requires Perl to run)") +SET(CPACK_COMPONENT_TEST_WIX_LEVEL 2) + + +#Feature Misc (hidden, installs only if everything is installed) +SET(CPACK_COMPONENT_GROUP_MISC_HIDDEN 1) +SET(CPACK_COMPONENT_GROUP_MISC_WIX_LEVEL 100) + SET(CPACK_COMPONENT_INIFILES_GROUP "Misc") + SET(CPACK_COMPONENT_SERVER_SCRIPTS_GROUP "Misc") diff --git a/packaging/WiX/create_msi.cmake.in b/packaging/WiX/create_msi.cmake.in index 8de271fc1cff9..d0a8f0046cff2 100644 --- a/packaging/WiX/create_msi.cmake.in +++ b/packaging/WiX/create_msi.cmake.in @@ -1,398 +1,398 @@ -# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -SET(CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@") -SET(CMAKE_CURRENT_SOURCE_DIR "@CMAKE_CURRENT_SOURCE_DIR@") -SET(CANDLE_EXECUTABLE "@CANDLE_EXECUTABLE@") -SET(LIGHT_EXECUTABLE "@LIGHT_EXECUTABLE@") -SET(CMAKE_COMMAND "@CMAKE_COMMAND@") -SET(CMAKE_CFG_INTDIR "@CMAKE_CFG_INTDIR@") -SET(VERSION "@VERSION@") -SET(MAJOR_VERSION "@MAJOR_VERSION@") -SET(MINOR_VERSION "@MINOR_VERSION@") -SET(PATCH_VERSION "@PATCH_VERSION@") -SET(CMAKE_SIZEOF_VOID_P @CMAKE_SIZEOF_VOID_P@) -SET(MANUFACTURER "@MANUFACTURER@") -SET(WIXCA_LOCATION "@WIXCA_LOCATION@") -SET(COPYING_RTF "@COPYING_RTF@") -SET(CPACK_WIX_CONFIG "@CPACK_WIX_CONFIG@") -SET(CPACK_WIX_INCLUDE "@CPACK_WIX_INCLUDE@") - -LIST(APPEND EXCLUDE_DIRS - bin/debug - data/test - lib/plugin/debug - mysql-test - scripts - sql-bench -) - -LIST(APPEND EXCLUDE_FILES - bin/echo.exe - bin/mysql_client_test_embedded.exe - bin/mysqld-debug.exe - bin/mysqltest_embedded.exe - bin/replace.exe - lib/debug/mysqlserver.lib - lib/libmysqld.dll - lib/libmysqld.lib - lib/mysqlserver.lib - lib/mysqlservices.lib -) - -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}) - -# Switch off the monolithic install -EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -DCPACK_MONOLITHIC_INSTALL=0 ${CMAKE_BINARY_DIR} - OUTPUT_QUIET -) - -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_Custom") -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} - " - ) - 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} - ") - ELSE() - SET(CPACK_WIX_FEATURES - "${CPACK_WIX_FEATURES} - - - ") - ENDIF() - - ENDFOREACH() - SET(CPACK_WIX_FEATURES - "${CPACK_WIX_FEATURES} - - ") -ENDFOREACH() - - -IF(CMAKE_INSTALL_CONFIG_NAME) - STRING(REPLACE "${CMAKE_CFG_INTDIR}" "${CMAKE_INSTALL_CONFIG_NAME}" - WIXCA_LOCATION "${WIXCA_LOCATION}") - SET(CONFIG_PARAM "-DCMAKE_INSTALL_CONFIG_NAME=${CMAKE_INSTALL_CONFIG_NAME}") -ENDIF() - -CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mysql_server.wxs.in - ${CMAKE_CURRENT_BINARY_DIR}/mysql_server.wxs) - - -FOREACH(comp ${CPACK_COMPONENTS_ALL}) - SET(ENV{DESTDIR} testinstall/${comp}) - SET(DIRS ${DIRS} testinstall/${comp}) - EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} ${CONFIG_PARAM} -DCMAKE_INSTALL_COMPONENT=${comp} - -DCMAKE_INSTALL_PREFIX= -P ${CMAKE_BINARY_DIR}/cmake_install.cmake - OUTPUT_QUIET - ) -ENDFOREACH() - -MACRO(GENERATE_GUID VarName) - EXECUTE_PROCESS(COMMAND uuidgen -c - OUTPUT_VARIABLE ${VarName} - OUTPUT_STRIP_TRAILING_WHITESPACE) -ENDMACRO() - -SET(INC_VAR 0) -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) - STRING(SUBSTRING "${${varname}}" 0 67 shortstr) - MATH(EXPR INC_VAR ${INC_VAR}+1) - SET(${varname} "${shortstr}${INC_VAR}") - ENDIF() -ENDMACRO() - - -FUNCTION(TRAVERSE_FILES dir topdir file file_comp dir_root) - FILE(RELATIVE_PATH dir_rel ${topdir} ${dir}) - IF(dir_rel) - LIST(FIND EXCLUDE_DIRS ${dir_rel} TO_EXCLUDE) - IF(NOT TO_EXCLUDE EQUAL -1) - MESSAGE(STATUS "excluding directory: ${dir_rel}") - RETURN() - ENDIF() - ENDIF() - FILE(GLOB all_files ${dir}/*) - IF(NOT all_files) - RETURN() - ENDIF() - IF(dir_rel) - MAKE_DIRECTORY(${dir_root}/${dir_rel}) - MAKE_WIX_IDENTIFIER("${dir_rel}" id) - SET(DirectoryRefId "D.${id}") - ELSE() - SET(DirectoryRefId "INSTALLDIR") - ENDIF() - FILE(APPEND ${file} "\n") - - SET(NONEXEFILES) - FOREACH(f ${all_files}) - IF(NOT IS_DIRECTORY ${f}) - FILE(RELATIVE_PATH rel ${topdir} ${f}) - SET(TO_EXCLUDE) - IF(rel MATCHES "\\.pdb$") - SET(TO_EXCLUDE TRUE) - ELSE() - LIST(FIND EXCLUDE_FILES ${rel} RES) - IF(NOT RES EQUAL -1) - SET(TO_EXCLUDE TRUE) - ENDIF() - ENDIF() - IF(TO_EXCLUDE) - MESSAGE(STATUS "excluding file: ${rel}") - ELSE() - MAKE_WIX_IDENTIFIER("${rel}" id) - FILE(TO_NATIVE_PATH ${f} f_native) - 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} " \n") - FILE(APPEND ${file} " \n") - FILE(APPEND ${file} " \n") - FILE(APPEND ${file_comp} " \n") - ELSE() - SET(NONEXEFILES "${NONEXEFILES}\n" ) - ENDIF() - ENDIF() - ENDIF() - ENDFOREACH() - FILE(APPEND ${file} "\n") - IF(NONEXEFILES) - GENERATE_GUID(guid) - SET(ComponentId "C._files_${COMP_NAME}.${DirectoryRefId}") - FILE(APPEND ${file} - "\n${NONEXEFILES}\n\n") - FILE(APPEND ${file_comp} " \n") - ENDIF() - FOREACH(f ${all_files}) - IF(IS_DIRECTORY ${f}) - TRAVERSE_FILES(${f} ${topdir} ${file} ${file_comp} ${dir_root}) - ENDIF() - ENDFOREACH() -ENDFUNCTION() - -FUNCTION(TRAVERSE_DIRECTORIES dir topdir file prefix) - FILE(RELATIVE_PATH rel ${topdir} ${dir}) - IF(rel) - MAKE_WIX_IDENTIFIER("${rel}" id) - GET_FILENAME_COMPONENT(name ${dir} NAME) - FILE(APPEND ${file} "${prefix}\n") - ENDIF() - FILE(GLOB all_files ${dir}/*) - FOREACH(f ${all_files}) - IF(IS_DIRECTORY ${f}) - TRAVERSE_DIRECTORIES(${f} ${topdir} ${file} "${prefix} ") - ENDIF() - ENDFOREACH() - IF(rel) - FILE(APPEND ${file} "${prefix}\n") - ENDIF() -ENDFUNCTION() - -SET(CPACK_WIX_COMPONENTS) -SET(CPACK_WIX_COMPONENT_GROUPS) -GET_FILENAME_COMPONENT(abs . ABSOLUTE) -FOREACH(d ${DIRS}) - GET_FILENAME_COMPONENT(d ${d} ABSOLUTE) - GET_FILENAME_COMPONENT(d_name ${d} NAME) - FILE(WRITE ${abs}/${d_name}_component_group.wxs "") - SET(COMP_NAME ${d_name}) - TRAVERSE_FILES(${d} ${d} ${abs}/${d_name}.wxs ${abs}/${d_name}_component_group.wxs "${abs}/dirs") - FILE(APPEND ${abs}/${d_name}_component_group.wxs "") - IF(EXISTS ${d_name}.wxs) - FILE(READ ${d_name}.wxs WIX_TMP) - SET(CPACK_WIX_COMPONENTS "${CPACK_WIX_COMPONENTS}\n${WIX_TMP}") - FILE(REMOVE ${d_name}.wxs) - ENDIF() - - FILE(READ ${d_name}_component_group.wxs WIX_TMP) - - SET(CPACK_WIX_COMPONENT_GROUPS "${CPACK_WIX_COMPONENT_GROUPS}\n${WIX_TMP}") - FILE(REMOVE ${d_name}_component_group.wxs) -ENDFOREACH() - -FILE(WRITE directories.wxs "\n") -TRAVERSE_DIRECTORIES(${abs}/dirs ${abs}/dirs directories.wxs "") -FILE(APPEND directories.wxs "\n") - -FILE(READ directories.wxs CPACK_WIX_DIRECTORIES) -FILE(REMOVE directories.wxs) - - -FOREACH(src ${CPACK_WIX_INCLUDE}) -SET(CPACK_WIX_INCLUDES -"${CPACK_WIX_INCLUDES} - " -) -ENDFOREACH() - - -CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mysql_server.wxs.in - ${CMAKE_CURRENT_BINARY_DIR}/mysql_server.wxs) - -SET(EXTRA_CANDLE_ARGS) -IF("$ENV{EXTRA_CANDLE_ARGS}") - SET(EXTRA_CANDLE_ARGS "$ENV{EXTRA_CANDLE_ARGS}") -ENDIF() - -SET(EXTRA_LIGHT_ARGS) -IF("$ENV{EXTRA_LIGHT_ARGS}") - SET(EXTRA_LIGHT_ARGS "$ENV{EXTRA_LIGHT_ARGS}") -ENDIF() - -FILE(REMOVE mysql_server.wixobj) -EXECUTE_PROCESS( - COMMAND ${CANDLE_EXECUTABLE} -ext WixUtilExtension mysql_server.wxs ${EXTRA_CANDLE_ARGS} - RESULT_VARIABLE CANDLE_RESULT -) - -IF(CANDLE_RESULT) - MESSAGE(FATAL_ERROR "ERROR: can't run candle") -ENDIF() - -EXECUTE_PROCESS( - COMMAND ${LIGHT_EXECUTABLE} -ext WixUIExtension -ext WixUtilExtension - mysql_server.wixobj -out ${CPACK_PACKAGE_FILE_NAME}.msi - ${EXTRA_LIGHT_ARGS} - RESULT_VARIABLE LIGHT_RESULT -) - -IF(LIGHT_RESULT) - MESSAGE(FATAL_ERROR "ERROR: can't run light") -ENDIF() - -# Switch monolithic install on again -EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -DCPACK_MONOLITHIC_INSTALL=1 ${CMAKE_BINARY_DIR} -) +# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +SET(CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@") +SET(CMAKE_CURRENT_SOURCE_DIR "@CMAKE_CURRENT_SOURCE_DIR@") +SET(CANDLE_EXECUTABLE "@CANDLE_EXECUTABLE@") +SET(LIGHT_EXECUTABLE "@LIGHT_EXECUTABLE@") +SET(CMAKE_COMMAND "@CMAKE_COMMAND@") +SET(CMAKE_CFG_INTDIR "@CMAKE_CFG_INTDIR@") +SET(VERSION "@VERSION@") +SET(MAJOR_VERSION "@MAJOR_VERSION@") +SET(MINOR_VERSION "@MINOR_VERSION@") +SET(PATCH_VERSION "@PATCH_VERSION@") +SET(CMAKE_SIZEOF_VOID_P @CMAKE_SIZEOF_VOID_P@) +SET(MANUFACTURER "@MANUFACTURER@") +SET(WIXCA_LOCATION "@WIXCA_LOCATION@") +SET(COPYING_RTF "@COPYING_RTF@") +SET(CPACK_WIX_CONFIG "@CPACK_WIX_CONFIG@") +SET(CPACK_WIX_INCLUDE "@CPACK_WIX_INCLUDE@") + +LIST(APPEND EXCLUDE_DIRS + bin/debug + data/test + lib/plugin/debug + mysql-test + scripts + sql-bench +) + +LIST(APPEND EXCLUDE_FILES + bin/echo.exe + bin/mysql_client_test_embedded.exe + bin/mysqld-debug.exe + bin/mysqltest_embedded.exe + bin/replace.exe + lib/debug/mysqlserver.lib + lib/libmysqld.dll + lib/libmysqld.lib + lib/mysqlserver.lib + lib/mysqlservices.lib +) + +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}) + +# Switch off the monolithic install +EXECUTE_PROCESS( + COMMAND ${CMAKE_COMMAND} -DCPACK_MONOLITHIC_INSTALL=0 ${CMAKE_BINARY_DIR} + OUTPUT_QUIET +) + +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_Custom") +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} + " + ) + 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} + ") + ELSE() + SET(CPACK_WIX_FEATURES + "${CPACK_WIX_FEATURES} + + + ") + ENDIF() + + ENDFOREACH() + SET(CPACK_WIX_FEATURES + "${CPACK_WIX_FEATURES} + + ") +ENDFOREACH() + + +IF(CMAKE_INSTALL_CONFIG_NAME) + STRING(REPLACE "${CMAKE_CFG_INTDIR}" "${CMAKE_INSTALL_CONFIG_NAME}" + WIXCA_LOCATION "${WIXCA_LOCATION}") + SET(CONFIG_PARAM "-DCMAKE_INSTALL_CONFIG_NAME=${CMAKE_INSTALL_CONFIG_NAME}") +ENDIF() + +CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mysql_server.wxs.in + ${CMAKE_CURRENT_BINARY_DIR}/mysql_server.wxs) + + +FOREACH(comp ${CPACK_COMPONENTS_ALL}) + SET(ENV{DESTDIR} testinstall/${comp}) + SET(DIRS ${DIRS} testinstall/${comp}) + EXECUTE_PROCESS( + COMMAND ${CMAKE_COMMAND} ${CONFIG_PARAM} -DCMAKE_INSTALL_COMPONENT=${comp} + -DCMAKE_INSTALL_PREFIX= -P ${CMAKE_BINARY_DIR}/cmake_install.cmake + OUTPUT_QUIET + ) +ENDFOREACH() + +MACRO(GENERATE_GUID VarName) + EXECUTE_PROCESS(COMMAND uuidgen -c + OUTPUT_VARIABLE ${VarName} + OUTPUT_STRIP_TRAILING_WHITESPACE) +ENDMACRO() + +SET(INC_VAR 0) +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) + STRING(SUBSTRING "${${varname}}" 0 67 shortstr) + MATH(EXPR INC_VAR ${INC_VAR}+1) + SET(${varname} "${shortstr}${INC_VAR}") + ENDIF() +ENDMACRO() + + +FUNCTION(TRAVERSE_FILES dir topdir file file_comp dir_root) + FILE(RELATIVE_PATH dir_rel ${topdir} ${dir}) + IF(dir_rel) + LIST(FIND EXCLUDE_DIRS ${dir_rel} TO_EXCLUDE) + IF(NOT TO_EXCLUDE EQUAL -1) + MESSAGE(STATUS "excluding directory: ${dir_rel}") + RETURN() + ENDIF() + ENDIF() + FILE(GLOB all_files ${dir}/*) + IF(NOT all_files) + RETURN() + ENDIF() + IF(dir_rel) + MAKE_DIRECTORY(${dir_root}/${dir_rel}) + MAKE_WIX_IDENTIFIER("${dir_rel}" id) + SET(DirectoryRefId "D.${id}") + ELSE() + SET(DirectoryRefId "INSTALLDIR") + ENDIF() + FILE(APPEND ${file} "\n") + + SET(NONEXEFILES) + FOREACH(f ${all_files}) + IF(NOT IS_DIRECTORY ${f}) + FILE(RELATIVE_PATH rel ${topdir} ${f}) + SET(TO_EXCLUDE) + IF(rel MATCHES "\\.pdb$") + SET(TO_EXCLUDE TRUE) + ELSE() + LIST(FIND EXCLUDE_FILES ${rel} RES) + IF(NOT RES EQUAL -1) + SET(TO_EXCLUDE TRUE) + ENDIF() + ENDIF() + IF(TO_EXCLUDE) + MESSAGE(STATUS "excluding file: ${rel}") + ELSE() + MAKE_WIX_IDENTIFIER("${rel}" id) + FILE(TO_NATIVE_PATH ${f} f_native) + 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} " \n") + FILE(APPEND ${file} " \n") + FILE(APPEND ${file} " \n") + FILE(APPEND ${file_comp} " \n") + ELSE() + SET(NONEXEFILES "${NONEXEFILES}\n" ) + ENDIF() + ENDIF() + ENDIF() + ENDFOREACH() + FILE(APPEND ${file} "\n") + IF(NONEXEFILES) + GENERATE_GUID(guid) + SET(ComponentId "C._files_${COMP_NAME}.${DirectoryRefId}") + FILE(APPEND ${file} + "\n${NONEXEFILES}\n\n") + FILE(APPEND ${file_comp} " \n") + ENDIF() + FOREACH(f ${all_files}) + IF(IS_DIRECTORY ${f}) + TRAVERSE_FILES(${f} ${topdir} ${file} ${file_comp} ${dir_root}) + ENDIF() + ENDFOREACH() +ENDFUNCTION() + +FUNCTION(TRAVERSE_DIRECTORIES dir topdir file prefix) + FILE(RELATIVE_PATH rel ${topdir} ${dir}) + IF(rel) + MAKE_WIX_IDENTIFIER("${rel}" id) + GET_FILENAME_COMPONENT(name ${dir} NAME) + FILE(APPEND ${file} "${prefix}\n") + ENDIF() + FILE(GLOB all_files ${dir}/*) + FOREACH(f ${all_files}) + IF(IS_DIRECTORY ${f}) + TRAVERSE_DIRECTORIES(${f} ${topdir} ${file} "${prefix} ") + ENDIF() + ENDFOREACH() + IF(rel) + FILE(APPEND ${file} "${prefix}\n") + ENDIF() +ENDFUNCTION() + +SET(CPACK_WIX_COMPONENTS) +SET(CPACK_WIX_COMPONENT_GROUPS) +GET_FILENAME_COMPONENT(abs . ABSOLUTE) +FOREACH(d ${DIRS}) + GET_FILENAME_COMPONENT(d ${d} ABSOLUTE) + GET_FILENAME_COMPONENT(d_name ${d} NAME) + FILE(WRITE ${abs}/${d_name}_component_group.wxs "") + SET(COMP_NAME ${d_name}) + TRAVERSE_FILES(${d} ${d} ${abs}/${d_name}.wxs ${abs}/${d_name}_component_group.wxs "${abs}/dirs") + FILE(APPEND ${abs}/${d_name}_component_group.wxs "") + IF(EXISTS ${d_name}.wxs) + FILE(READ ${d_name}.wxs WIX_TMP) + SET(CPACK_WIX_COMPONENTS "${CPACK_WIX_COMPONENTS}\n${WIX_TMP}") + FILE(REMOVE ${d_name}.wxs) + ENDIF() + + FILE(READ ${d_name}_component_group.wxs WIX_TMP) + + SET(CPACK_WIX_COMPONENT_GROUPS "${CPACK_WIX_COMPONENT_GROUPS}\n${WIX_TMP}") + FILE(REMOVE ${d_name}_component_group.wxs) +ENDFOREACH() + +FILE(WRITE directories.wxs "\n") +TRAVERSE_DIRECTORIES(${abs}/dirs ${abs}/dirs directories.wxs "") +FILE(APPEND directories.wxs "\n") + +FILE(READ directories.wxs CPACK_WIX_DIRECTORIES) +FILE(REMOVE directories.wxs) + + +FOREACH(src ${CPACK_WIX_INCLUDE}) +SET(CPACK_WIX_INCLUDES +"${CPACK_WIX_INCLUDES} + " +) +ENDFOREACH() + + +CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mysql_server.wxs.in + ${CMAKE_CURRENT_BINARY_DIR}/mysql_server.wxs) + +SET(EXTRA_CANDLE_ARGS) +IF("$ENV{EXTRA_CANDLE_ARGS}") + SET(EXTRA_CANDLE_ARGS "$ENV{EXTRA_CANDLE_ARGS}") +ENDIF() + +SET(EXTRA_LIGHT_ARGS) +IF("$ENV{EXTRA_LIGHT_ARGS}") + SET(EXTRA_LIGHT_ARGS "$ENV{EXTRA_LIGHT_ARGS}") +ENDIF() + +FILE(REMOVE mysql_server.wixobj) +EXECUTE_PROCESS( + COMMAND ${CANDLE_EXECUTABLE} -ext WixUtilExtension mysql_server.wxs ${EXTRA_CANDLE_ARGS} + RESULT_VARIABLE CANDLE_RESULT +) + +IF(CANDLE_RESULT) + MESSAGE(FATAL_ERROR "ERROR: can't run candle") +ENDIF() + +EXECUTE_PROCESS( + COMMAND ${LIGHT_EXECUTABLE} -ext WixUIExtension -ext WixUtilExtension + mysql_server.wixobj -out ${CPACK_PACKAGE_FILE_NAME}.msi + ${EXTRA_LIGHT_ARGS} + RESULT_VARIABLE LIGHT_RESULT +) + +IF(LIGHT_RESULT) + MESSAGE(FATAL_ERROR "ERROR: can't run light") +ENDIF() + +# Switch monolithic install on again +EXECUTE_PROCESS( + COMMAND ${CMAKE_COMMAND} -DCPACK_MONOLITHIC_INSTALL=1 ${CMAKE_BINARY_DIR} +) diff --git a/packaging/WiX/custom_ui.wxs b/packaging/WiX/custom_ui.wxs index a28c3c9b8a122..0ccd30f6754ee 100644 --- a/packaging/WiX/custom_ui.wxs +++ b/packaging/WiX/custom_ui.wxs @@ -1,115 +1,115 @@ - - - - - - - - 1 - - - NOT OLDERVERSIONBEINGUPGRADED - OLDERVERSIONBEINGUPGRADED - - - - - - - - - - - - 1]]> - OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND (PROMPTROLLBACKCOST="P" OR NOT PROMPTROLLBACKCOST) - OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D" - OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D" - (OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 1) OR (OutOfDiskSpace = 1 AND PROMPTROLLBACKCOST="F") - - - 1 - - - WixUI_InstallMode = "Remove" - - - - - - - - - - - - - - - - - - - - - - 1 - - 1 - LicenseAccepted = "1" - - 1 - 1 - 1 - 1 - - WixUI_InstallMode = "Change" - WixUI_InstallMode = "InstallCustom" - 1 - - WixUI_InstallMode = "InstallCustom" - WixUI_InstallMode = "InstallTypical" OR WixUI_InstallMode = "InstallComplete" - WixUI_InstallMode = "Change" - WixUI_InstallMode = "Repair" OR WixUI_InstallMode = "Remove" - - 1 - - 1 - 1 - 1 - 1 - - 1 - - - NOT Installed - - - - - + + + + + + + + 1 + + + NOT OLDERVERSIONBEINGUPGRADED + OLDERVERSIONBEINGUPGRADED + + + + + + + + + + + + 1]]> + OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND (PROMPTROLLBACKCOST="P" OR NOT PROMPTROLLBACKCOST) + OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D" + OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D" + (OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 1) OR (OutOfDiskSpace = 1 AND PROMPTROLLBACKCOST="F") + + + 1 + + + WixUI_InstallMode = "Remove" + + + + + + + + + + + + + + + + + + + + + + 1 + + 1 + LicenseAccepted = "1" + + 1 + 1 + 1 + 1 + + WixUI_InstallMode = "Change" + WixUI_InstallMode = "InstallCustom" + 1 + + WixUI_InstallMode = "InstallCustom" + WixUI_InstallMode = "InstallTypical" OR WixUI_InstallMode = "InstallComplete" + WixUI_InstallMode = "Change" + WixUI_InstallMode = "Repair" OR WixUI_InstallMode = "Remove" + + 1 + + 1 + 1 + 1 + 1 + + 1 + + + NOT Installed + + + + + diff --git a/packaging/WiX/extra.wxs.in b/packaging/WiX/extra.wxs.in index 91bf3f64b8ebe..92a79064d54b8 100644 --- a/packaging/WiX/extra.wxs.in +++ b/packaging/WiX/extra.wxs.in @@ -1,81 +1,81 @@ - - - - - - - - - - - - - - - - - - - - - - @DATADIR_MYSQL_FILES@ - - - - - - - - @DATADIR_PERFORMANCE_SCHEMA_FILES@ - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + @DATADIR_MYSQL_FILES@ + + + + + + + + @DATADIR_PERFORMANCE_SCHEMA_FILES@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packaging/WiX/mysql_server.wxs.in b/packaging/WiX/mysql_server.wxs.in index 1802baedf3bfa..1e7c20468ef3a 100644 --- a/packaging/WiX/mysql_server.wxs.in +++ b/packaging/WiX/mysql_server.wxs.in @@ -1,196 +1,196 @@ - - - - - - - - - - - - - - - - - NOT NEWERVERSIONDETECTED OR Installed - - - - - - - - - - NOT - Installed - - - - - - - - - - - - - - - - - - - - - - - - - - - - - INSTALLDIR2 - - - - - - - - - - - - - - - - - - - - - - - Installed And Not UPGRADINGPRODUCTCODE And REMOVE="ALL" - Installed And Not UPGRADINGPRODUCTCODE And REMOVE="ALL" - Installed And Not UPGRADINGPRODUCTCODE And REMOVE="ALL" And UILevel>4 - Installed And Not UPGRADINGPRODUCTCODE And REMOVE="ALL" And UILevel<=4 - - - - - - - - - - - - - - @CPACK_WIX_FEATURES@ - - - @CPACK_WIX_DIRECTORIES@ - - - @CPACK_WIX_COMPONENTS@ - - - @CPACK_WIX_COMPONENT_GROUPS@ - - - @CPACK_WIX_INCLUDES@ - - - + + + + + + + + + + + + + + + + + NOT NEWERVERSIONDETECTED OR Installed + + + + + + + + + + NOT + Installed + + + + + + + + + + + + + + + + + + + + + + + + + + + + + INSTALLDIR2 + + + + + + + + + + + + + + + + + + + + + + + Installed And Not UPGRADINGPRODUCTCODE And REMOVE="ALL" + Installed And Not UPGRADINGPRODUCTCODE And REMOVE="ALL" + Installed And Not UPGRADINGPRODUCTCODE And REMOVE="ALL" And UILevel>4 + Installed And Not UPGRADINGPRODUCTCODE And REMOVE="ALL" And UILevel<=4 + + + + + + + + + + + + + + @CPACK_WIX_FEATURES@ + + + @CPACK_WIX_DIRECTORIES@ + + + @CPACK_WIX_COMPONENTS@ + + + @CPACK_WIX_COMPONENT_GROUPS@ + + + @CPACK_WIX_INCLUDES@ + + + diff --git a/pcre/RunTest.bat b/pcre/RunTest.bat index 35d7f71f9e8cf..8f290f5913041 100644 --- a/pcre/RunTest.bat +++ b/pcre/RunTest.bat @@ -1,616 +1,616 @@ -@echo off -@rem This file must use CRLF linebreaks to function properly -@rem and requires both pcretest and pcregrep -@rem This file was originally contributed by Ralf Junker, and touched up by -@rem Daniel Richard G. Tests 10-12 added by Philip H. -@rem Philip H also changed test 3 to use "wintest" files. -@rem -@rem Updated by Tom Fortmann to support explicit test numbers on the command line. -@rem Added argument validation and added error reporting. -@rem -@rem MS Windows batch file to run pcretest on testfiles with the correct -@rem options. -@rem -@rem Sheri Pierce added logic to skip feature dependent tests -@rem tests 4 5 9 15 and 18 require utf support -@rem tests 6 7 10 16 and 19 require ucp support -@rem 11 requires ucp and link size 2 -@rem 12 requires presence of jit support -@rem 13 requires absence of jit support -@rem Sheri P also added override tests for study and jit testing -@rem Zoltan Herczeg added libpcre16 support -@rem Zoltan Herczeg added libpcre32 support - -setlocal enabledelayedexpansion -if [%srcdir%]==[] ( -if exist testdata\ set srcdir=.) -if [%srcdir%]==[] ( -if exist ..\testdata\ set srcdir=..) -if [%srcdir%]==[] ( -if exist ..\..\testdata\ set srcdir=..\..) -if NOT exist %srcdir%\testdata\ ( -Error: echo distribution testdata folder not found! -call :conferror -exit /b 1 -goto :eof -) - -if [%pcretest%]==[] set pcretest=.\pcretest.exe - -echo source dir is %srcdir% -echo pcretest=%pcretest% - -if NOT exist %pcretest% ( -echo Error: %pcretest% not found! -echo. -call :conferror -exit /b 1 -) - -%pcretest% -C linksize >NUL -set link_size=%ERRORLEVEL% -%pcretest% -C pcre8 >NUL -set support8=%ERRORLEVEL% -%pcretest% -C pcre16 >NUL -set support16=%ERRORLEVEL% -%pcretest% -C pcre32 >NUL -set support32=%ERRORLEVEL% -%pcretest% -C utf >NUL -set utf=%ERRORLEVEL% -%pcretest% -C ucp >NUL -set ucp=%ERRORLEVEL% -%pcretest% -C jit >NUL -set jit=%ERRORLEVEL% - -if %support8% EQU 1 ( -if not exist testout8 md testout8 -if not exist testoutstudy8 md testoutstudy8 -if not exist testoutjit8 md testoutjit8 -) - -if %support16% EQU 1 ( -if not exist testout16 md testout16 -if not exist testoutstudy16 md testoutstudy16 -if not exist testoutjit16 md testoutjit16 -) - -if %support16% EQU 1 ( -if not exist testout32 md testout32 -if not exist testoutstudy32 md testoutstudy32 -if not exist testoutjit32 md testoutjit32 -) - -set do1=no -set do2=no -set do3=no -set do4=no -set do5=no -set do6=no -set do7=no -set do8=no -set do9=no -set do10=no -set do11=no -set do12=no -set do13=no -set do14=no -set do15=no -set do16=no -set do17=no -set do18=no -set do19=no -set do20=no -set do21=no -set do22=no -set do23=no -set do24=no -set do25=no -set do26=no -set all=yes - -for %%a in (%*) do ( - set valid=no - for %%v in (1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26) do if %%v == %%a set valid=yes - if "!valid!" == "yes" ( - set do%%a=yes - set all=no -) else ( - echo Invalid test number - %%a! - echo Usage %0 [ test_number ] ... - echo Where test_number is one or more optional test numbers 1 through 26, default is all tests. - exit /b 1 -) -) -set failed="no" - -if "%all%" == "yes" ( - set do1=yes - set do2=yes - set do3=yes - set do4=yes - set do5=yes - set do6=yes - set do7=yes - set do8=yes - set do9=yes - set do10=yes - set do11=yes - set do12=yes - set do13=yes - set do14=yes - set do15=yes - set do16=yes - set do17=yes - set do18=yes - set do19=yes - set do20=yes - set do21=yes - set do22=yes - set do23=yes - set do24=yes - set do25=yes - set do26=yes -) - -@echo RunTest.bat's pcretest output is written to newly created subfolders named -@echo testout, testoutstudy and testoutjit. -@echo. - -set mode= -set bits=8 - -:nextMode -if "%mode%" == "" ( - if %support8% EQU 0 goto modeSkip - echo. - echo ---- Testing 8-bit library ---- - echo. -) -if "%mode%" == "-16" ( - if %support16% EQU 0 goto modeSkip - echo. - echo ---- Testing 16-bit library ---- - echo. -) -if "%mode%" == "-32" ( - if %support32% EQU 0 goto modeSkip - echo. - echo ---- Testing 32-bit library ---- - echo. -) -if "%do1%" == "yes" call :do1 -if "%do2%" == "yes" call :do2 -if "%do3%" == "yes" call :do3 -if "%do4%" == "yes" call :do4 -if "%do5%" == "yes" call :do5 -if "%do6%" == "yes" call :do6 -if "%do7%" == "yes" call :do7 -if "%do8%" == "yes" call :do8 -if "%do9%" == "yes" call :do9 -if "%do10%" == "yes" call :do10 -if "%do11%" == "yes" call :do11 -if "%do12%" == "yes" call :do12 -if "%do13%" == "yes" call :do13 -if "%do14%" == "yes" call :do14 -if "%do15%" == "yes" call :do15 -if "%do16%" == "yes" call :do16 -if "%do17%" == "yes" call :do17 -if "%do18%" == "yes" call :do18 -if "%do19%" == "yes" call :do19 -if "%do20%" == "yes" call :do20 -if "%do21%" == "yes" call :do21 -if "%do22%" == "yes" call :do22 -if "%do23%" == "yes" call :do23 -if "%do24%" == "yes" call :do24 -if "%do25%" == "yes" call :do25 -if "%do26%" == "yes" call :do26 -:modeSkip -if "%mode%" == "" ( - set mode=-16 - set bits=16 - goto nextMode -) -if "%mode%" == "-16" ( - set mode=-32 - set bits=32 - goto nextMode -) - -@rem If mode is -32, testing is finished -if %failed% == "yes" ( -echo In above output, one or more of the various tests failed! -exit /b 1 -) -echo All OK -goto :eof - -:runsub -@rem Function to execute pcretest and compare the output -@rem Arguments are as follows: -@rem -@rem 1 = test number -@rem 2 = outputdir -@rem 3 = test name use double quotes -@rem 4 - 9 = pcretest options - -if [%1] == [] ( - echo Missing test number argument! - exit /b 1 -) - -if [%2] == [] ( - echo Missing outputdir! - exit /b 1 -) - -if [%3] == [] ( - echo Missing test name argument! - exit /b 1 -) - -set testinput=testinput%1 -set testoutput=testoutput%1 -if exist %srcdir%\testdata\win%testinput% ( - set testinput=wintestinput%1 - set testoutput=wintestoutput%1 -) - -echo Test %1: %3 -%pcretest% %mode% %4 %5 %6 %7 %8 %9 %srcdir%\testdata\%testinput% >%2%bits%\%testoutput% -if errorlevel 1 ( - echo. failed executing command-line: - echo. %pcretest% %mode% %4 %5 %6 %7 %8 %9 %srcdir%\testdata\%testinput% ^>%2%bits%\%testoutput% - set failed="yes" - goto :eof -) - -set type= -if [%1]==[11] ( - set type=-%bits% -) -if [%1]==[18] ( - set type=-%bits% -) -if [%1]==[21] ( - set type=-%bits% -) -if [%1]==[22] ( - set type=-%bits% -) - -fc /n %srcdir%\testdata\%testoutput%%type% %2%bits%\%testoutput% >NUL - -if errorlevel 1 ( - echo. failed comparison: fc /n %srcdir%\testdata\%testoutput% %2%bits%\%testoutput% - if [%1]==[2] ( - echo. - echo ** Test 2 requires a lot of stack. PCRE can be configured to - echo ** use heap for recursion. Otherwise, to pass Test 2 - echo ** you generally need to allocate 8 mb stack to PCRE. - echo ** See the 'pcrestack' page for a discussion of PCRE's - echo ** stack usage. - echo. -) - if [%1]==[3] ( - echo. - echo ** Test 3 failure usually means french locale is not - echo ** available on the system, rather than a bug or problem with PCRE. - echo. - goto :eof -) - - set failed="yes" - goto :eof -) - -echo. Passed. -goto :eof - -:do1 -call :runsub 1 testout "Main functionality (Compatible with Perl >= 5.10)" -q -call :runsub 1 testoutstudy "Test with Study Override" -q -s -if %jit% EQU 1 call :runsub 1 testoutjit "Test with JIT Override" -q -s+ -goto :eof - -:do2 - call :runsub 2 testout "API, errors, internals, and non-Perl stuff" -q - call :runsub 2 testoutstudy "Test with Study Override" -q -s - if %jit% EQU 1 call :runsub 2 testoutjit "Test with JIT Override" -q -s+ -goto :eof - -:do3 - call :runsub 3 testout "Locale-specific features" -q - call :runsub 3 testoutstudy "Test with Study Override" -q -s - if %jit% EQU 1 call :runsub 3 testoutjit "Test with JIT Override" -q -s+ -goto :eof - -:do4 -if %utf% EQU 0 ( - echo Test 4 Skipped due to absence of UTF-%bits% support. - goto :eof -) - call :runsub 4 testout "UTF-%bits% support - (Compatible with Perl >= 5.10)" -q - call :runsub 4 testoutstudy "Test with Study Override" -q -s - if %jit% EQU 1 call :runsub 4 testoutjit "Test with JIT Override" -q -s+ -goto :eof - -:do5 -if %utf% EQU 0 ( - echo Test 5 Skipped due to absence of UTF-%bits% support. - goto :eof -) - call :runsub 5 testout "API, internals, and non-Perl stuff for UTF-%bits%" -q - call :runsub 5 testoutstudy "Test with Study Override" -q -s - if %jit% EQU 1 call :runsub 5 testoutjit "Test with JIT Override" -q -s+ -goto :eof - -:do6 -if %ucp% EQU 0 ( - echo Test 6 Skipped due to absence of Unicode property support. - goto :eof -) - call :runsub 6 testout "Unicode property support (Compatible with Perl >= 5.10)" -q - call :runsub 6 testoutstudy "Test with Study Override" -q -s - if %jit% EQU 1 call :runsub 6 testoutjit "Test with JIT Override" -q -s+ -goto :eof - -:do7 -if %ucp% EQU 0 ( - echo Test 7 Skipped due to absence of Unicode property support. - goto :eof -) - call :runsub 7 testout "API, internals, and non-Perl stuff for Unicode property support" -q - call :runsub 7 testoutstudy "Test with Study Override" -q -s - if %jit% EQU 1 call :runsub 7 testoutjit "Test with JIT Override" -q -s+ -goto :eof - -:do8 - call :runsub 8 testout "DFA matching main functionality" -q -dfa - call :runsub 8 testoutstudy "Test with Study Override" -q -dfa -s -goto :eof - -:do9 -if %utf% EQU 0 ( - echo Test 9 Skipped due to absence of UTF-%bits% support. - goto :eof -) - call :runsub 9 testout "DFA matching with UTF-%bits%" -q -dfa - call :runsub 9 testoutstudy "Test with Study Override" -q -dfa -s - goto :eof - -:do10 -if %ucp% EQU 0 ( - echo Test 10 Skipped due to absence of Unicode property support. - goto :eof -) - call :runsub 10 testout "DFA matching with Unicode properties" -q -dfa - call :runsub 10 testoutstudy "Test with Study Override" -q -dfa -s -goto :eof - -:do11 -if NOT %link_size% EQU 2 ( - echo Test 11 Skipped because link size is not 2. - goto :eof -) -if %ucp% EQU 0 ( - echo Test 11 Skipped due to absence of Unicode property support. - goto :eof -) - call :runsub 11 testout "Internal offsets and code size tests" -q - call :runsub 11 testoutstudy "Test with Study Override" -q -s -goto :eof - -:do12 -if %jit% EQU 0 ( - echo Test 12 Skipped due to absence of JIT support. - goto :eof -) - call :runsub 12 testout "JIT-specific features (JIT available)" -q -goto :eof - -:do13 -if %jit% EQU 1 ( - echo Test 13 Skipped due to presence of JIT support. - goto :eof -) - call :runsub 13 testout "JIT-specific features (JIT not available)" -q -goto :eof - -:do14 -if NOT %bits% EQU 8 ( - echo Test 14 Skipped when running 16/32-bit tests. - goto :eof -) - copy /Y %srcdir%\testdata\saved16 testsaved16 - copy /Y %srcdir%\testdata\saved32 testsaved32 - call :runsub 14 testout "Specials for the basic 8-bit library" -q - call :runsub 14 testoutstudy "Test with Study Override" -q -s - if %jit% EQU 1 call :runsub 14 testoutjit "Test with JIT Override" -q -s+ -goto :eof - -:do15 -if NOT %bits% EQU 8 ( - echo Test 15 Skipped when running 16/32-bit tests. - goto :eof -) -if %utf% EQU 0 ( - echo Test 15 Skipped due to absence of UTF-%bits% support. - goto :eof -) - call :runsub 15 testout "Specials for the 8-bit library with UTF-%bits% support" -q - call :runsub 15 testoutstudy "Test with Study Override" -q -s - if %jit% EQU 1 call :runsub 15 testoutjit "Test with JIT Override" -q -s+ -goto :eof - -:do16 -if NOT %bits% EQU 8 ( - echo Test 16 Skipped when running 16/32-bit tests. - goto :eof -) -if %ucp% EQU 0 ( - echo Test 16 Skipped due to absence of Unicode property support. - goto :eof -) - call :runsub 16 testout "Specials for the 8-bit library with Unicode propery support" -q - call :runsub 16 testoutstudy "Test with Study Override" -q -s - if %jit% EQU 1 call :runsub 16 testoutjit "Test with JIT Override" -q -s+ -goto :eof - -:do17 -if %bits% EQU 8 ( - echo Test 17 Skipped when running 8-bit tests. - goto :eof -) - call :runsub 17 testout "Specials for the basic 16/32-bit library" -q - call :runsub 17 testoutstudy "Test with Study Override" -q -s - if %jit% EQU 1 call :runsub 17 testoutjit "Test with JIT Override" -q -s+ -goto :eof - -:do18 -if %bits% EQU 8 ( - echo Test 18 Skipped when running 8-bit tests. - goto :eof -) -if %utf% EQU 0 ( - echo Test 18 Skipped due to absence of UTF-%bits% support. - goto :eof -) - call :runsub 18 testout "Specials for the 16/32-bit library with UTF-%bits% support" -q - call :runsub 18 testoutstudy "Test with Study Override" -q -s - if %jit% EQU 1 call :runsub 18 testoutjit "Test with JIT Override" -q -s+ -goto :eof - -:do19 -if %bits% EQU 8 ( - echo Test 19 Skipped when running 8-bit tests. - goto :eof -) -if %ucp% EQU 0 ( - echo Test 19 Skipped due to absence of Unicode property support. - goto :eof -) - call :runsub 19 testout "Specials for the 16/32-bit library with Unicode property support" -q - call :runsub 19 testoutstudy "Test with Study Override" -q -s - if %jit% EQU 1 call :runsub 19 testoutjit "Test with JIT Override" -q -s+ -goto :eof - -:do20 -if %bits% EQU 8 ( - echo Test 20 Skipped when running 8-bit tests. - goto :eof -) - call :runsub 20 testout "DFA specials for the basic 16/32-bit library" -q -dfa - call :runsub 20 testoutstudy "Test with Study Override" -q -dfa -s -goto :eof - -:do21 -if %bits% EQU 8 ( - echo Test 21 Skipped when running 8-bit tests. - goto :eof -) -if NOT %link_size% EQU 2 ( - echo Test 21 Skipped because link size is not 2. - goto :eof -) -copy /Y %srcdir%\testdata\saved8 testsaved8 -copy /Y %srcdir%\testdata\saved16LE-1 testsaved16LE-1 -copy /Y %srcdir%\testdata\saved16BE-1 testsaved16BE-1 -copy /Y %srcdir%\testdata\saved32LE-1 testsaved32LE-1 -copy /Y %srcdir%\testdata\saved32BE-1 testsaved32BE-1 -call :runsub 21 testout "Reloads for the basic 16/32-bit library" -q -call :runsub 21 testoutstudy "Test with Study Override" -q -s -if %jit% EQU 1 call :runsub 21 testoutjit "Test with JIT Override" -q -s+ -goto :eof - -:do22 -if %bits% EQU 8 ( - echo Test 22 Skipped when running 8-bit tests. - goto :eof -) -if %utf% EQU 0 ( - echo Test 22 Skipped due to absence of UTF-%bits% support. - goto :eof -) -if NOT %link_size% EQU 2 ( - echo Test 22 Skipped because link size is not 2. - goto :eof -) -copy /Y %srcdir%\testdata\saved16LE-2 testsaved16LE-2 -copy /Y %srcdir%\testdata\saved16BE-2 testsaved16BE-2 -copy /Y %srcdir%\testdata\saved32LE-2 testsaved32LE-2 -copy /Y %srcdir%\testdata\saved32BE-2 testsaved32BE-2 -call :runsub 22 testout "Reloads for the 16/32-bit library with UTF-16/32 support" -q -call :runsub 22 testoutstudy "Test with Study Override" -q -s -if %jit% EQU 1 call :runsub 22 testoutjit "Test with JIT Override" -q -s+ -goto :eof - -:do23 -if NOT %bits% EQU 16 ( - echo Test 23 Skipped when running 8/32-bit tests. - goto :eof -) -call :runsub 23 testout "Specials for the 16-bit library" -q -call :runsub 23 testoutstudy "Test with Study Override" -q -s -if %jit% EQU 1 call :runsub 23 testoutjit "Test with JIT Override" -q -s+ -goto :eof - -:do24 -if NOT %bits% EQU 16 ( - echo Test 24 Skipped when running 8/32-bit tests. - goto :eof -) -if %utf% EQU 0 ( - echo Test 24 Skipped due to absence of UTF-%bits% support. - goto :eof -) -call :runsub 24 testout "Specials for the 16-bit library with UTF-16 support" -q -call :runsub 24 testoutstudy "Test with Study Override" -q -s -if %jit% EQU 1 call :runsub 24 testoutjit "Test with JIT Override" -q -s+ -goto :eof - -:do25 -if NOT %bits% EQU 32 ( - echo Test 25 Skipped when running 8/16-bit tests. - goto :eof -) -call :runsub 25 testout "Specials for the 32-bit library" -q -call :runsub 25 testoutstudy "Test with Study Override" -q -s -if %jit% EQU 1 call :runsub 25 testoutjit "Test with JIT Override" -q -s+ -goto :eof - -:do26 -if NOT %bits% EQU 32 ( - echo Test 26 Skipped when running 8/16-bit tests. - goto :eof -) -if %utf% EQU 0 ( - echo Test 26 Skipped due to absence of UTF-%bits% support. - goto :eof -) -call :runsub 26 testout "Specials for the 32-bit library with UTF-32 support" -q -call :runsub 26 testoutstudy "Test with Study Override" -q -s -if %jit% EQU 1 call :runsub 26 testoutjit "Test with JIT Override" -q -s+ -goto :eof - -:conferror -@echo. -@echo Either your build is incomplete or you have a configuration error. -@echo. -@echo If configured with cmake and executed via "make test" or the MSVC "RUN_TESTS" -@echo project, pcre_test.bat defines variables and automatically calls RunTest.bat. -@echo For manual testing of all available features, after configuring with cmake -@echo and building, you can run the built pcre_test.bat. For best results with -@echo cmake builds and tests avoid directories with full path names that include -@echo spaces for source or build. -@echo. -@echo Otherwise, if the build dir is in a subdir of the source dir, testdata needed -@echo for input and verification should be found automatically when (from the -@echo location of the the built exes) you call RunTest.bat. By default RunTest.bat -@echo runs all tests compatible with the linked pcre library but it can be given -@echo a test number as an argument. -@echo. -@echo If the build dir is not under the source dir you can either copy your exes -@echo to the source folder or copy RunTest.bat and the testdata folder to the -@echo location of your built exes and then run RunTest.bat. -@echo. -goto :eof +@echo off +@rem This file must use CRLF linebreaks to function properly +@rem and requires both pcretest and pcregrep +@rem This file was originally contributed by Ralf Junker, and touched up by +@rem Daniel Richard G. Tests 10-12 added by Philip H. +@rem Philip H also changed test 3 to use "wintest" files. +@rem +@rem Updated by Tom Fortmann to support explicit test numbers on the command line. +@rem Added argument validation and added error reporting. +@rem +@rem MS Windows batch file to run pcretest on testfiles with the correct +@rem options. +@rem +@rem Sheri Pierce added logic to skip feature dependent tests +@rem tests 4 5 9 15 and 18 require utf support +@rem tests 6 7 10 16 and 19 require ucp support +@rem 11 requires ucp and link size 2 +@rem 12 requires presence of jit support +@rem 13 requires absence of jit support +@rem Sheri P also added override tests for study and jit testing +@rem Zoltan Herczeg added libpcre16 support +@rem Zoltan Herczeg added libpcre32 support + +setlocal enabledelayedexpansion +if [%srcdir%]==[] ( +if exist testdata\ set srcdir=.) +if [%srcdir%]==[] ( +if exist ..\testdata\ set srcdir=..) +if [%srcdir%]==[] ( +if exist ..\..\testdata\ set srcdir=..\..) +if NOT exist %srcdir%\testdata\ ( +Error: echo distribution testdata folder not found! +call :conferror +exit /b 1 +goto :eof +) + +if [%pcretest%]==[] set pcretest=.\pcretest.exe + +echo source dir is %srcdir% +echo pcretest=%pcretest% + +if NOT exist %pcretest% ( +echo Error: %pcretest% not found! +echo. +call :conferror +exit /b 1 +) + +%pcretest% -C linksize >NUL +set link_size=%ERRORLEVEL% +%pcretest% -C pcre8 >NUL +set support8=%ERRORLEVEL% +%pcretest% -C pcre16 >NUL +set support16=%ERRORLEVEL% +%pcretest% -C pcre32 >NUL +set support32=%ERRORLEVEL% +%pcretest% -C utf >NUL +set utf=%ERRORLEVEL% +%pcretest% -C ucp >NUL +set ucp=%ERRORLEVEL% +%pcretest% -C jit >NUL +set jit=%ERRORLEVEL% + +if %support8% EQU 1 ( +if not exist testout8 md testout8 +if not exist testoutstudy8 md testoutstudy8 +if not exist testoutjit8 md testoutjit8 +) + +if %support16% EQU 1 ( +if not exist testout16 md testout16 +if not exist testoutstudy16 md testoutstudy16 +if not exist testoutjit16 md testoutjit16 +) + +if %support16% EQU 1 ( +if not exist testout32 md testout32 +if not exist testoutstudy32 md testoutstudy32 +if not exist testoutjit32 md testoutjit32 +) + +set do1=no +set do2=no +set do3=no +set do4=no +set do5=no +set do6=no +set do7=no +set do8=no +set do9=no +set do10=no +set do11=no +set do12=no +set do13=no +set do14=no +set do15=no +set do16=no +set do17=no +set do18=no +set do19=no +set do20=no +set do21=no +set do22=no +set do23=no +set do24=no +set do25=no +set do26=no +set all=yes + +for %%a in (%*) do ( + set valid=no + for %%v in (1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26) do if %%v == %%a set valid=yes + if "!valid!" == "yes" ( + set do%%a=yes + set all=no +) else ( + echo Invalid test number - %%a! + echo Usage %0 [ test_number ] ... + echo Where test_number is one or more optional test numbers 1 through 26, default is all tests. + exit /b 1 +) +) +set failed="no" + +if "%all%" == "yes" ( + set do1=yes + set do2=yes + set do3=yes + set do4=yes + set do5=yes + set do6=yes + set do7=yes + set do8=yes + set do9=yes + set do10=yes + set do11=yes + set do12=yes + set do13=yes + set do14=yes + set do15=yes + set do16=yes + set do17=yes + set do18=yes + set do19=yes + set do20=yes + set do21=yes + set do22=yes + set do23=yes + set do24=yes + set do25=yes + set do26=yes +) + +@echo RunTest.bat's pcretest output is written to newly created subfolders named +@echo testout, testoutstudy and testoutjit. +@echo. + +set mode= +set bits=8 + +:nextMode +if "%mode%" == "" ( + if %support8% EQU 0 goto modeSkip + echo. + echo ---- Testing 8-bit library ---- + echo. +) +if "%mode%" == "-16" ( + if %support16% EQU 0 goto modeSkip + echo. + echo ---- Testing 16-bit library ---- + echo. +) +if "%mode%" == "-32" ( + if %support32% EQU 0 goto modeSkip + echo. + echo ---- Testing 32-bit library ---- + echo. +) +if "%do1%" == "yes" call :do1 +if "%do2%" == "yes" call :do2 +if "%do3%" == "yes" call :do3 +if "%do4%" == "yes" call :do4 +if "%do5%" == "yes" call :do5 +if "%do6%" == "yes" call :do6 +if "%do7%" == "yes" call :do7 +if "%do8%" == "yes" call :do8 +if "%do9%" == "yes" call :do9 +if "%do10%" == "yes" call :do10 +if "%do11%" == "yes" call :do11 +if "%do12%" == "yes" call :do12 +if "%do13%" == "yes" call :do13 +if "%do14%" == "yes" call :do14 +if "%do15%" == "yes" call :do15 +if "%do16%" == "yes" call :do16 +if "%do17%" == "yes" call :do17 +if "%do18%" == "yes" call :do18 +if "%do19%" == "yes" call :do19 +if "%do20%" == "yes" call :do20 +if "%do21%" == "yes" call :do21 +if "%do22%" == "yes" call :do22 +if "%do23%" == "yes" call :do23 +if "%do24%" == "yes" call :do24 +if "%do25%" == "yes" call :do25 +if "%do26%" == "yes" call :do26 +:modeSkip +if "%mode%" == "" ( + set mode=-16 + set bits=16 + goto nextMode +) +if "%mode%" == "-16" ( + set mode=-32 + set bits=32 + goto nextMode +) + +@rem If mode is -32, testing is finished +if %failed% == "yes" ( +echo In above output, one or more of the various tests failed! +exit /b 1 +) +echo All OK +goto :eof + +:runsub +@rem Function to execute pcretest and compare the output +@rem Arguments are as follows: +@rem +@rem 1 = test number +@rem 2 = outputdir +@rem 3 = test name use double quotes +@rem 4 - 9 = pcretest options + +if [%1] == [] ( + echo Missing test number argument! + exit /b 1 +) + +if [%2] == [] ( + echo Missing outputdir! + exit /b 1 +) + +if [%3] == [] ( + echo Missing test name argument! + exit /b 1 +) + +set testinput=testinput%1 +set testoutput=testoutput%1 +if exist %srcdir%\testdata\win%testinput% ( + set testinput=wintestinput%1 + set testoutput=wintestoutput%1 +) + +echo Test %1: %3 +%pcretest% %mode% %4 %5 %6 %7 %8 %9 %srcdir%\testdata\%testinput% >%2%bits%\%testoutput% +if errorlevel 1 ( + echo. failed executing command-line: + echo. %pcretest% %mode% %4 %5 %6 %7 %8 %9 %srcdir%\testdata\%testinput% ^>%2%bits%\%testoutput% + set failed="yes" + goto :eof +) + +set type= +if [%1]==[11] ( + set type=-%bits% +) +if [%1]==[18] ( + set type=-%bits% +) +if [%1]==[21] ( + set type=-%bits% +) +if [%1]==[22] ( + set type=-%bits% +) + +fc /n %srcdir%\testdata\%testoutput%%type% %2%bits%\%testoutput% >NUL + +if errorlevel 1 ( + echo. failed comparison: fc /n %srcdir%\testdata\%testoutput% %2%bits%\%testoutput% + if [%1]==[2] ( + echo. + echo ** Test 2 requires a lot of stack. PCRE can be configured to + echo ** use heap for recursion. Otherwise, to pass Test 2 + echo ** you generally need to allocate 8 mb stack to PCRE. + echo ** See the 'pcrestack' page for a discussion of PCRE's + echo ** stack usage. + echo. +) + if [%1]==[3] ( + echo. + echo ** Test 3 failure usually means french locale is not + echo ** available on the system, rather than a bug or problem with PCRE. + echo. + goto :eof +) + + set failed="yes" + goto :eof +) + +echo. Passed. +goto :eof + +:do1 +call :runsub 1 testout "Main functionality (Compatible with Perl >= 5.10)" -q +call :runsub 1 testoutstudy "Test with Study Override" -q -s +if %jit% EQU 1 call :runsub 1 testoutjit "Test with JIT Override" -q -s+ +goto :eof + +:do2 + call :runsub 2 testout "API, errors, internals, and non-Perl stuff" -q + call :runsub 2 testoutstudy "Test with Study Override" -q -s + if %jit% EQU 1 call :runsub 2 testoutjit "Test with JIT Override" -q -s+ +goto :eof + +:do3 + call :runsub 3 testout "Locale-specific features" -q + call :runsub 3 testoutstudy "Test with Study Override" -q -s + if %jit% EQU 1 call :runsub 3 testoutjit "Test with JIT Override" -q -s+ +goto :eof + +:do4 +if %utf% EQU 0 ( + echo Test 4 Skipped due to absence of UTF-%bits% support. + goto :eof +) + call :runsub 4 testout "UTF-%bits% support - (Compatible with Perl >= 5.10)" -q + call :runsub 4 testoutstudy "Test with Study Override" -q -s + if %jit% EQU 1 call :runsub 4 testoutjit "Test with JIT Override" -q -s+ +goto :eof + +:do5 +if %utf% EQU 0 ( + echo Test 5 Skipped due to absence of UTF-%bits% support. + goto :eof +) + call :runsub 5 testout "API, internals, and non-Perl stuff for UTF-%bits%" -q + call :runsub 5 testoutstudy "Test with Study Override" -q -s + if %jit% EQU 1 call :runsub 5 testoutjit "Test with JIT Override" -q -s+ +goto :eof + +:do6 +if %ucp% EQU 0 ( + echo Test 6 Skipped due to absence of Unicode property support. + goto :eof +) + call :runsub 6 testout "Unicode property support (Compatible with Perl >= 5.10)" -q + call :runsub 6 testoutstudy "Test with Study Override" -q -s + if %jit% EQU 1 call :runsub 6 testoutjit "Test with JIT Override" -q -s+ +goto :eof + +:do7 +if %ucp% EQU 0 ( + echo Test 7 Skipped due to absence of Unicode property support. + goto :eof +) + call :runsub 7 testout "API, internals, and non-Perl stuff for Unicode property support" -q + call :runsub 7 testoutstudy "Test with Study Override" -q -s + if %jit% EQU 1 call :runsub 7 testoutjit "Test with JIT Override" -q -s+ +goto :eof + +:do8 + call :runsub 8 testout "DFA matching main functionality" -q -dfa + call :runsub 8 testoutstudy "Test with Study Override" -q -dfa -s +goto :eof + +:do9 +if %utf% EQU 0 ( + echo Test 9 Skipped due to absence of UTF-%bits% support. + goto :eof +) + call :runsub 9 testout "DFA matching with UTF-%bits%" -q -dfa + call :runsub 9 testoutstudy "Test with Study Override" -q -dfa -s + goto :eof + +:do10 +if %ucp% EQU 0 ( + echo Test 10 Skipped due to absence of Unicode property support. + goto :eof +) + call :runsub 10 testout "DFA matching with Unicode properties" -q -dfa + call :runsub 10 testoutstudy "Test with Study Override" -q -dfa -s +goto :eof + +:do11 +if NOT %link_size% EQU 2 ( + echo Test 11 Skipped because link size is not 2. + goto :eof +) +if %ucp% EQU 0 ( + echo Test 11 Skipped due to absence of Unicode property support. + goto :eof +) + call :runsub 11 testout "Internal offsets and code size tests" -q + call :runsub 11 testoutstudy "Test with Study Override" -q -s +goto :eof + +:do12 +if %jit% EQU 0 ( + echo Test 12 Skipped due to absence of JIT support. + goto :eof +) + call :runsub 12 testout "JIT-specific features (JIT available)" -q +goto :eof + +:do13 +if %jit% EQU 1 ( + echo Test 13 Skipped due to presence of JIT support. + goto :eof +) + call :runsub 13 testout "JIT-specific features (JIT not available)" -q +goto :eof + +:do14 +if NOT %bits% EQU 8 ( + echo Test 14 Skipped when running 16/32-bit tests. + goto :eof +) + copy /Y %srcdir%\testdata\saved16 testsaved16 + copy /Y %srcdir%\testdata\saved32 testsaved32 + call :runsub 14 testout "Specials for the basic 8-bit library" -q + call :runsub 14 testoutstudy "Test with Study Override" -q -s + if %jit% EQU 1 call :runsub 14 testoutjit "Test with JIT Override" -q -s+ +goto :eof + +:do15 +if NOT %bits% EQU 8 ( + echo Test 15 Skipped when running 16/32-bit tests. + goto :eof +) +if %utf% EQU 0 ( + echo Test 15 Skipped due to absence of UTF-%bits% support. + goto :eof +) + call :runsub 15 testout "Specials for the 8-bit library with UTF-%bits% support" -q + call :runsub 15 testoutstudy "Test with Study Override" -q -s + if %jit% EQU 1 call :runsub 15 testoutjit "Test with JIT Override" -q -s+ +goto :eof + +:do16 +if NOT %bits% EQU 8 ( + echo Test 16 Skipped when running 16/32-bit tests. + goto :eof +) +if %ucp% EQU 0 ( + echo Test 16 Skipped due to absence of Unicode property support. + goto :eof +) + call :runsub 16 testout "Specials for the 8-bit library with Unicode propery support" -q + call :runsub 16 testoutstudy "Test with Study Override" -q -s + if %jit% EQU 1 call :runsub 16 testoutjit "Test with JIT Override" -q -s+ +goto :eof + +:do17 +if %bits% EQU 8 ( + echo Test 17 Skipped when running 8-bit tests. + goto :eof +) + call :runsub 17 testout "Specials for the basic 16/32-bit library" -q + call :runsub 17 testoutstudy "Test with Study Override" -q -s + if %jit% EQU 1 call :runsub 17 testoutjit "Test with JIT Override" -q -s+ +goto :eof + +:do18 +if %bits% EQU 8 ( + echo Test 18 Skipped when running 8-bit tests. + goto :eof +) +if %utf% EQU 0 ( + echo Test 18 Skipped due to absence of UTF-%bits% support. + goto :eof +) + call :runsub 18 testout "Specials for the 16/32-bit library with UTF-%bits% support" -q + call :runsub 18 testoutstudy "Test with Study Override" -q -s + if %jit% EQU 1 call :runsub 18 testoutjit "Test with JIT Override" -q -s+ +goto :eof + +:do19 +if %bits% EQU 8 ( + echo Test 19 Skipped when running 8-bit tests. + goto :eof +) +if %ucp% EQU 0 ( + echo Test 19 Skipped due to absence of Unicode property support. + goto :eof +) + call :runsub 19 testout "Specials for the 16/32-bit library with Unicode property support" -q + call :runsub 19 testoutstudy "Test with Study Override" -q -s + if %jit% EQU 1 call :runsub 19 testoutjit "Test with JIT Override" -q -s+ +goto :eof + +:do20 +if %bits% EQU 8 ( + echo Test 20 Skipped when running 8-bit tests. + goto :eof +) + call :runsub 20 testout "DFA specials for the basic 16/32-bit library" -q -dfa + call :runsub 20 testoutstudy "Test with Study Override" -q -dfa -s +goto :eof + +:do21 +if %bits% EQU 8 ( + echo Test 21 Skipped when running 8-bit tests. + goto :eof +) +if NOT %link_size% EQU 2 ( + echo Test 21 Skipped because link size is not 2. + goto :eof +) +copy /Y %srcdir%\testdata\saved8 testsaved8 +copy /Y %srcdir%\testdata\saved16LE-1 testsaved16LE-1 +copy /Y %srcdir%\testdata\saved16BE-1 testsaved16BE-1 +copy /Y %srcdir%\testdata\saved32LE-1 testsaved32LE-1 +copy /Y %srcdir%\testdata\saved32BE-1 testsaved32BE-1 +call :runsub 21 testout "Reloads for the basic 16/32-bit library" -q +call :runsub 21 testoutstudy "Test with Study Override" -q -s +if %jit% EQU 1 call :runsub 21 testoutjit "Test with JIT Override" -q -s+ +goto :eof + +:do22 +if %bits% EQU 8 ( + echo Test 22 Skipped when running 8-bit tests. + goto :eof +) +if %utf% EQU 0 ( + echo Test 22 Skipped due to absence of UTF-%bits% support. + goto :eof +) +if NOT %link_size% EQU 2 ( + echo Test 22 Skipped because link size is not 2. + goto :eof +) +copy /Y %srcdir%\testdata\saved16LE-2 testsaved16LE-2 +copy /Y %srcdir%\testdata\saved16BE-2 testsaved16BE-2 +copy /Y %srcdir%\testdata\saved32LE-2 testsaved32LE-2 +copy /Y %srcdir%\testdata\saved32BE-2 testsaved32BE-2 +call :runsub 22 testout "Reloads for the 16/32-bit library with UTF-16/32 support" -q +call :runsub 22 testoutstudy "Test with Study Override" -q -s +if %jit% EQU 1 call :runsub 22 testoutjit "Test with JIT Override" -q -s+ +goto :eof + +:do23 +if NOT %bits% EQU 16 ( + echo Test 23 Skipped when running 8/32-bit tests. + goto :eof +) +call :runsub 23 testout "Specials for the 16-bit library" -q +call :runsub 23 testoutstudy "Test with Study Override" -q -s +if %jit% EQU 1 call :runsub 23 testoutjit "Test with JIT Override" -q -s+ +goto :eof + +:do24 +if NOT %bits% EQU 16 ( + echo Test 24 Skipped when running 8/32-bit tests. + goto :eof +) +if %utf% EQU 0 ( + echo Test 24 Skipped due to absence of UTF-%bits% support. + goto :eof +) +call :runsub 24 testout "Specials for the 16-bit library with UTF-16 support" -q +call :runsub 24 testoutstudy "Test with Study Override" -q -s +if %jit% EQU 1 call :runsub 24 testoutjit "Test with JIT Override" -q -s+ +goto :eof + +:do25 +if NOT %bits% EQU 32 ( + echo Test 25 Skipped when running 8/16-bit tests. + goto :eof +) +call :runsub 25 testout "Specials for the 32-bit library" -q +call :runsub 25 testoutstudy "Test with Study Override" -q -s +if %jit% EQU 1 call :runsub 25 testoutjit "Test with JIT Override" -q -s+ +goto :eof + +:do26 +if NOT %bits% EQU 32 ( + echo Test 26 Skipped when running 8/16-bit tests. + goto :eof +) +if %utf% EQU 0 ( + echo Test 26 Skipped due to absence of UTF-%bits% support. + goto :eof +) +call :runsub 26 testout "Specials for the 32-bit library with UTF-32 support" -q +call :runsub 26 testoutstudy "Test with Study Override" -q -s +if %jit% EQU 1 call :runsub 26 testoutjit "Test with JIT Override" -q -s+ +goto :eof + +:conferror +@echo. +@echo Either your build is incomplete or you have a configuration error. +@echo. +@echo If configured with cmake and executed via "make test" or the MSVC "RUN_TESTS" +@echo project, pcre_test.bat defines variables and automatically calls RunTest.bat. +@echo For manual testing of all available features, after configuring with cmake +@echo and building, you can run the built pcre_test.bat. For best results with +@echo cmake builds and tests avoid directories with full path names that include +@echo spaces for source or build. +@echo. +@echo Otherwise, if the build dir is in a subdir of the source dir, testdata needed +@echo for input and verification should be found automatically when (from the +@echo location of the the built exes) you call RunTest.bat. By default RunTest.bat +@echo runs all tests compatible with the linked pcre library but it can be given +@echo a test number as an argument. +@echo. +@echo If the build dir is not under the source dir you can either copy your exes +@echo to the source folder or copy RunTest.bat and the testdata folder to the +@echo location of your built exes and then run RunTest.bat. +@echo. +goto :eof diff --git a/pcre/testdata/grepoutputN b/pcre/testdata/grepoutputN index 1f9f8801e3b88..6760314aa28a3 100644 --- a/pcre/testdata/grepoutputN +++ b/pcre/testdata/grepoutputN @@ -1,16 +1,16 @@ ----------------------------- Test N1 ------------------------------ -1:abc 2:def ---------------------------- Test N2 ------------------------------ -1:abc def +---------------------------- Test N1 ------------------------------ +1:abc 2:def ---------------------------- Test N2 ------------------------------ +1:abc def 2:ghi -jkl---------------------------- Test N3 ------------------------------ +jkl---------------------------- Test N3 ------------------------------ 2:def 3: ghi -jkl---------------------------- Test N4 ------------------------------ +jkl---------------------------- Test N4 ------------------------------ 2:ghi -jkl---------------------------- Test N5 ------------------------------ -1:abc 2:def +jkl---------------------------- Test N5 ------------------------------ +1:abc 2:def 3:ghi -4:jkl---------------------------- Test N6 ------------------------------ -1:abc 2:def +4:jkl---------------------------- Test N6 ------------------------------ +1:abc 2:def 3:ghi 4:jkl \ No newline at end of file diff --git a/pcre/testdata/greppatN4 b/pcre/testdata/greppatN4 index ea1bfc78ac4f0..7112d84fa1549 100644 --- a/pcre/testdata/greppatN4 +++ b/pcre/testdata/greppatN4 @@ -1,2 +1,2 @@ -xxx +xxx jkl \ No newline at end of file diff --git a/sql/message.rc b/sql/message.rc index 116522b7d48e2..0885a897e6f8c 100644 --- a/sql/message.rc +++ b/sql/message.rc @@ -1,2 +1,2 @@ -LANGUAGE 0x9,0x1 -1 11 MSG00001.bin +LANGUAGE 0x9,0x1 +1 11 MSG00001.bin diff --git a/sql/winservice.h b/sql/winservice.h index fca7b129de54a..c3e2bfe1b203d 100644 --- a/sql/winservice.h +++ b/sql/winservice.h @@ -1,40 +1,40 @@ -/* - Copyright (c) 2011, 2012, Monty Program Ab - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - Extract properties of a windows service binary path -*/ -#ifdef __cplusplus -extern "C" { -#endif - -#include -typedef struct mysqld_service_properties_st -{ - char mysqld_exe[MAX_PATH]; - char inifile[MAX_PATH]; - char datadir[MAX_PATH]; - int version_major; - int version_minor; - int version_patch; -} mysqld_service_properties; - -extern int get_mysql_service_properties(const wchar_t *bin_path, - mysqld_service_properties *props); - -#ifdef __cplusplus -} -#endif +/* + Copyright (c) 2011, 2012, Monty Program Ab + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +/* + Extract properties of a windows service binary path +*/ +#ifdef __cplusplus +extern "C" { +#endif + +#include +typedef struct mysqld_service_properties_st +{ + char mysqld_exe[MAX_PATH]; + char inifile[MAX_PATH]; + char datadir[MAX_PATH]; + int version_major; + int version_minor; + int version_patch; +} mysqld_service_properties; + +extern int get_mysql_service_properties(const wchar_t *bin_path, + mysqld_service_properties *props); + +#ifdef __cplusplus +} +#endif diff --git a/storage/federatedx/README.windows b/storage/federatedx/README.windows index 3f1f2a3c79a30..74de15c6521b1 100644 --- a/storage/federatedx/README.windows +++ b/storage/federatedx/README.windows @@ -1,23 +1,23 @@ -The following files are changed in order to build a new engine on Windows: - -- Update win\configure.js with -case "WITH_FEDERATEDX_STORAGE_ENGINE": -to make sure it will pass WITH_FEDERATEDX_STORAGE_ENGINE in. - -- Update CMakeFiles.txt under mysql root: - IF(WITH_FEDERATEDX_STORAGE_ENGINE) - ADD_DEFINITIONS(-D WITH_FEDERATEDX_STORAGE_ENGINE) - SET (mysql_plugin_defs - "${mysql_plugin_defs},builtin_skeleton_plugin") - ENDIF(WITH_FEDERATEDX_STORAGE_ENGINE) - - and, - - IF(WITH_FEDERATEDX_STORAGE_ENGINE) - ADD_SUBDIRECTORY(storage/skeleton/src) - ENDIF(WITH_FEDERATEDX_STORAGE_ENGINE) - - - Update CMakeFiles.txt under sql: - IF(WITH_FEDERATEDX_STORAGE_ENGINE) - TARGET_LINK_LIBRARIES(mysqld skeleton) - ENDIF(WITH_FEDERATEDX_STORAGE_ENGINE) +The following files are changed in order to build a new engine on Windows: + +- Update win\configure.js with +case "WITH_FEDERATEDX_STORAGE_ENGINE": +to make sure it will pass WITH_FEDERATEDX_STORAGE_ENGINE in. + +- Update CMakeFiles.txt under mysql root: + IF(WITH_FEDERATEDX_STORAGE_ENGINE) + ADD_DEFINITIONS(-D WITH_FEDERATEDX_STORAGE_ENGINE) + SET (mysql_plugin_defs + "${mysql_plugin_defs},builtin_skeleton_plugin") + ENDIF(WITH_FEDERATEDX_STORAGE_ENGINE) + + and, + + IF(WITH_FEDERATEDX_STORAGE_ENGINE) + ADD_SUBDIRECTORY(storage/skeleton/src) + ENDIF(WITH_FEDERATEDX_STORAGE_ENGINE) + + - Update CMakeFiles.txt under sql: + IF(WITH_FEDERATEDX_STORAGE_ENGINE) + TARGET_LINK_LIBRARIES(mysqld skeleton) + ENDIF(WITH_FEDERATEDX_STORAGE_ENGINE)