diff -r -u 5.1/CMakeLists.txt 5.1-nsis-installer/CMakeLists.txt --- 5.1/CMakeLists.txt 2010-06-29 11:44:42.526000000 +0200 +++ 5.1-nsis-installer/CMakeLists.txt 2010-06-29 11:09:54.073242800 +0200 @@ -355,15 +355,26 @@ SET(CPACK_COMPONENT_HEADERS_DEPENDS runtime) SET(CPACK_COMPONENT_HEADERS_GROUP "Development") SET(CPACK_COMPONENT_HEADERS_INSTALL_TYPES Development) -SET(CPACK_COMPONENT_PERLSCRIPTS_DISPLAY_NAME "Server perl scripts") -SET(CPACK_COMPONENT_PERLSCRIPTS_DESCRIPTION "Scripts to controll and modify the server. You need a perl installation for these to work.") -SET(CPACK_COMPONENT_PERLSCRIPTS_DEPENDS runtime) -SET(CPACK_COMPONENT_PERLSCRIPTS_GROUP "Server") -SET(CPACK_COMPONENT_PERLSCRIPTS_INSTALL_TYPES Normal Development) -# TODO: Add debug files -# TODO: Add embedded server files -# TODO: Add test files -# TODO: Add sql-bench +SET(CPACK_COMPONENT_EMBEDDED_DISPLAY_NAME "Embedded") +SET(CPACK_COMPONENT_EMBEDDED_DESCRIPTION "Files for embedding MariaDB in other projects.") +SET(CPACK_COMPONENT_EMBEDDED_DEPENDS headers) +SET(CPACK_COMPONENT_EMBEDDED_GROUP "Development") +SET(CPACK_COMPONENT_EMBEDDED_INSTALL_TYPES Development) +SET(CPACK_COMPONENT_SCRIPTS_DISPLAY_NAME "Server scripts") +SET(CPACK_COMPONENT_SCRIPTS_DESCRIPTION "SQL and Perl scripts to control and modify the server. You need a perl installation for some of these to work.") +SET(CPACK_COMPONENT_SCRIPTS_DEPENDS runtime) +SET(CPACK_COMPONENT_SCRIPTS_GROUP "Server") +SET(CPACK_COMPONENT_SCRIPTS_INSTALL_TYPES Normal Development) +SET(CPACK_COMPONENT_MYSQLTEST_DISPLAY_NAME "MariaDB test suite") +SET(CPACK_COMPONENT_MYSQLTEST_DESCRIPTION "The MariaDB regression test suite.") +SET(CPACK_COMPONENT_MYSQLTEST_DEPENDS runtime) +SET(CPACK_COMPONENT_MYSQLTEST_GROUP "Testing") +SET(CPACK_COMPONENT_MYSQLTEST_INSTALL_TYPES Normal Development) +SET(CPACK_COMPONENT_SQLBENCH_DISPLAY_NAME "SQL Bench") +SET(CPACK_COMPONENT_SQLBENCH_DESCRIPTION "The MariaDB benchmark suite.") +SET(CPACK_COMPONENT_SQLBENCH_DEPENDS runtime) +SET(CPACK_COMPONENT_SQLBENCH_GROUP "Testing") +SET(CPACK_COMPONENT_SQLBENCH_INSTALL_TYPES Normal Development) # Add files to the installer INSTALL(FILES COPYING EXCEPTIONS-CLIENT DESTINATION .) @@ -396,13 +407,47 @@ INSTALL(FILES sql/share/errmsg.txt DESTINATION share COMPONENT runtime) FILE(GLOB charsets sql/share/charsets/*) INSTALL(FILES ${charsets} DESTINATION share/charsets COMPONENT runtime) -FILE(GLOB share_dirs sql/share/*) -FOREACH(SUBDIR ${share_dirs}) - FILE(RELATIVE_PATH DIRNAME ${PROJECT_SOURCE_DIR}/sql/share ${SUBDIR}) - IF (EXISTS ${SUBDIR}/errmsg.sys) - INSTALL(FILES ${SUBDIR}/errmsg.sys DESTINATION share/${DIRNAME} COMPONENT runtime) - ENDIF(EXISTS ${SUBDIR}/errmsg.sys) -ENDFOREACH(SUBDIR ${share_dirs}) +FILE(GLOB share_dirs sql/share/*/errmsg.sys) +FOREACH(ERRMSGFILE ${share_dirs}) + STRING(REPLACE "//" "/" ERRMSGFILE ${ERRMSGFILE}) # Work around a cmake bug + FILE(RELATIVE_PATH DIRNAME ${PROJECT_SOURCE_DIR}/sql/share ${ERRMSGFILE}) + STRING(REPLACE "/errmsg.sys" "" DIRNAME ${DIRNAME}) + INSTALL(FILES ${ERRMSGFILE} DESTINATION share/${DIRNAME} COMPONENT runtime) +ENDFOREACH(ERRMSGFILE ${share_dirs}) + +# MTR files +FILE(GLOB_RECURSE testfiles mysql-test/*) +FOREACH(testfile ${testfiles}) + FILE(RELATIVE_PATH dirname ${PROJECT_SOURCE_DIR} ${testfile}) + GET_FILENAME_COMPONENT(dirname ${dirname} PATH) + GET_FILENAME_COMPONENT(filename ${testfile} NAME) + GET_FILENAME_COMPONENT(ext ${testfile} EXT) + SET(ok "yes") + IF (NOT "x_${ext}" STREQUAL "x_") + # Test if this is one of the extensions we don't want to install + STRING(TOLOWER ${ext} ext) + IF(${ext} STREQUAL ".dir" OR ${ext} STREQUAL ".vcproj" OR ${ext} STREQUAL ".user" OR ${ext} STREQUAL ".ilk" + OR ${ext} STREQUAL ".idb" OR ${ext} STREQUAL ".map" OR ${ext} STREQUAL ".gcov" + OR ${ext} STREQUAL ".supp" OR ${ext} STREQUAL ".am" OR ${ext} STREQUAL ".stress") + SET(ok "no") + ENDIF() + ENDIF(NOT "x_${ext}" STREQUAL "x_") + IF (${ok} STREQUAL "yes") + # Message("Dir: ${dirname}. File: ${filename}. Ext: ${ext}") + INSTALL(FILES ${testfile} DESTINATION ${dirname} COMPONENT mysqltest) + ENDIF(${ok} STREQUAL "yes") +ENDFOREACH(testfile ${testfiles}) + +# SQL Bench +FILE(GLOB_RECURSE benchfiles sql-bench/*) +FOREACH(testfile ${testfiles}) + FILE(RELATIVE_PATH dirname ${PROJECT_SOURCE_DIR} ${testfile}) + GET_FILENAME_COMPONENT(dirname ${dirname} PATH) + GET_FILENAME_COMPONENT(filename ${testfile} NAME) + IF(NOT ${dirname} STREQUAL "sql-bench" OR ${filename} STREQUAL "README") + INSTALL(FILES ${testfile} DESTINATION ${dirname} COMPONENT sqlbench) + ENDIF() +ENDFOREACH(testfile ${testfiles}) INCLUDE(InstallRequiredSystemLibraries) diff -r -u 5.1/libmysqld/CMakeLists.txt 5.1-nsis-installer/libmysqld/CMakeLists.txt --- 5.1/libmysqld/CMakeLists.txt 2010-06-29 11:44:42.526000000 +0200 +++ 5.1-nsis-installer/libmysqld/CMakeLists.txt 2010-06-28 16:39:52.386736300 +0200 @@ -166,3 +166,8 @@ ADD_LIBRARY(libmysqld SHARED cmake_dummy.c libmysqld.def) ADD_DEPENDENCIES(libmysqld mysqlserver) TARGET_LINK_LIBRARIES(libmysqld mysqlserver wsock32) + +INSTALL(TARGETS mysqlserver DESTINATION Embedded/static COMPONENT embedded) + +INSTALL(TARGETS libmysqld DESTINATION Embedded/DLL COMPONENT embedded) +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/Release/libmysqld.exp DESTINATION Embedded/DLL COMPONENT embedded) diff -r -u 5.1/scripts/CMakeLists.txt 5.1-nsis-installer/scripts/CMakeLists.txt --- 5.1/scripts/CMakeLists.txt 2010-06-29 11:44:42.526000000 +0200 +++ 5.1-nsis-installer/scripts/CMakeLists.txt 2010-06-28 15:28:04.317328900 +0200 @@ -79,4 +79,8 @@ INSTALL(FILES mysqldumpslow.pl mysqlhotcopy.pl mysql_config.pl mysql_convert_table_format.pl mysql_install_db.pl mysql_secure_installation.pl mysqld_multi.pl - DESTINATION scripts COMPONENT perlscripts) + DESTINATION scripts COMPONENT scripts) + +INSTALL(FILES fill_help_tables.sql mysql_fix_privilege_tables.sql mysql_system_tables.sql + mysql_system_tables_data.sql mysql_system_tables_fix.sql mysql_test_data_timezone.sql + DESTINATION share COMPONENT scripts) diff -r -u 5.1/storage/mysql_storage_engine.cmake 5.1-nsis-installer/storage/mysql_storage_engine.cmake --- 5.1/storage/mysql_storage_engine.cmake 2010-06-29 11:44:42.526000000 +0200 +++ 5.1-nsis-installer/storage/mysql_storage_engine.cmake 2010-06-28 15:57:20.723789600 +0200 @@ -38,6 +38,8 @@ IF(${engine}_LIBS) TARGET_LINK_LIBRARIES(${dyn_libname} ${${engine}_LIBS}) ENDIF(${engine}_LIBS) + # Install the plugin + INSTALL(TARGETS ${dyn_libname} DESTINATION lib/plugin COMPONENT runtime) MESSAGE("build ${engine} as DLL") ENDIF(${ENGINE_BUILD_TYPE} STREQUAL "STATIC") ENDIF(NOT SOURCE_SUBLIBS)