X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=development%2Fcmake%2FLyxPackaging.cmake;h=6d308d06d959286b0310a335b7c81aa7aca320b5;hb=1a800bf3e502a3072bd41aafdb7a74726bdeb880;hp=6983ccc32e248afdccaaa02a87476dfa2f2c3a5c;hpb=c39869cc616c511e7c19910aadd6ad2fadbb0caa;p=lyx.git diff --git a/development/cmake/LyxPackaging.cmake b/development/cmake/LyxPackaging.cmake index 6983ccc32e..6d308d06d9 100644 --- a/development/cmake/LyxPackaging.cmake +++ b/development/cmake/LyxPackaging.cmake @@ -41,37 +41,51 @@ elseif(WIN32) set(CPACK_GENERATOR ZIP) set(CPACK_BINARY_ZIP 1) if(MINGW) - get_filename_component(MINGW_BIN_PATH ${CMAKE_CXX_COMPILER} PATH) + set(runtime) if(LYX_XMINGW) - if(LYX_USE_QT MATCHES "QT4") - get_filename_component(mingw_name ${LYX_XMINGW} NAME) - set(MINGW_BIN_PATH ${MINGW_BIN_PATH}/../${mingw_name}/lib) - set(MINGW_LIB_PATH ${MINGW_BIN_PATH}) - else() - set(MINGW_BIN_PATH /usr/lib/gcc/${LYX_XMINGW}/${GCC_VERSION}) - set(MINGW_LIB_PATH /usr/${LYX_XMINGW}/lib) - endif() - endif() - if(EXISTS ${MINGW_BIN_PATH}/libgcc_s_sjlj-1.dll) - list(APPEND runtime ${MINGW_BIN_PATH}/libgcc_s_sjlj-1.dll) - elseif(EXISTS ${MINGW_BIN_PATH}/libgcc_s_seh-1.dll) - list(APPEND runtime ${MINGW_BIN_PATH}/libgcc_s_seh-1.dll) - elseif(EXISTS ${MINGW_BIN_PATH}/libgcc_s_dw2-1.dll) - list(APPEND runtime ${MINGW_BIN_PATH}/libgcc_s_dw2-1.dll) - endif() - if(EXISTS ${MINGW_BIN_PATH}/libstdc++-6.dll) - list(APPEND runtime ${MINGW_BIN_PATH}/libstdc++-6.dll) - endif() - if(EXISTS ${MINGW_LIB_PATH}/libwinpthread-1.dll) - list(APPEND runtime ${MINGW_LIB_PATH}/libwinpthread-1.dll) + execute_process(COMMAND ${CMAKE_CXX_COMPILER} -print-libgcc-file-name OUTPUT_VARIABLE GCC_LIBGCC OUTPUT_STRIP_TRAILING_WHITESPACE) + else() + set(GCC_LIBGCC ${CMAKE_CXX_COMPILER}) endif() + + # RKH + # get_filename_component(MINGW_RUNTIME_PATH ${GCC_LIBGCC} PATH) + set(MINGW_RUNTIME_PATH "/usr/i686-w64-mingw32/sys-root/mingw/bin") + macro(add_runtime_dll _DLL) + file(GLOB GCC_RUNTIME ${MINGW_RUNTIME_PATH}/${_DLL}) + list(APPEND runtime ${GCC_RUNTIME}) + endmacro() + add_runtime_dll(iconv.dll) + add_runtime_dll(libgcc*.dll) + add_runtime_dll(libstd*.dll) + add_runtime_dll(libwin*.dll) + add_runtime_dll(libbz2-1.dll) + add_runtime_dll(libfreetype-6.dll) + add_runtime_dll(libglib-2.0-0.dll) + add_runtime_dll(libgraphite2.dll) + add_runtime_dll(libharfbuzz-0.dll) + add_runtime_dll(libicudt6*.dll) + add_runtime_dll(libicuin6*.dll) + add_runtime_dll(libicuuc6*.dll) + add_runtime_dll(libintl-8.dll) + add_runtime_dll(libjpeg-62.dll) + add_runtime_dll(libpcre-1.dll) + add_runtime_dll(libpcre2-16-0.dll) + add_runtime_dll(libpng16-16.dll) + add_runtime_dll(libtiff-5.dll) + add_runtime_dll(libwebp-7.dll) + add_runtime_dll(libwebpdemux-2.dll) + add_runtime_dll(zlib1.dll) + if(NOT runtime) - message(FATAL_ERROR "No mingw runtime found in ${MINGW_BIN_PATH}") + message(FATAL_ERROR "No mingw runtime found in ${MINGW_RUNTIME_PATH}") endif() if(LYX_USE_QT MATCHES "QT5") get_target_property(qmakebin Qt5::qmake IMPORTED_LOCATION) - get_filename_component(QT_BINARY_DIR ${qmakebin} PATH) + # RKH + # get_filename_component(QT_BINARY_DIR ${qmakebin} PATH) + set(QT_BINARY_DIR "/usr/i686-w64-mingw32/sys-root/mingw/bin") install(FILES ${runtime} ${QT_BINARY_DIR}/Qt5Core.dll @@ -83,28 +97,31 @@ elseif(WIN32) ${QT_BINARY_DIR}/Qt5PrintSupport.dll ${QT_BINARY_DIR}/Qt5Svg.dll ${QT_BINARY_DIR}/Qt5WinExtras.dll - DESTINATION bin - CONFIGURATIONS Release) + DESTINATION bin) + install(FILES + ${QT_BINARY_DIR}/../lib/qt5/plugins/platforms/qminimal.dll + ${QT_BINARY_DIR}/../lib/qt5/plugins/platforms/qwindows.dll + DESTINATION bin/platforms) install(FILES - ${QT_BINARY_DIR}/../plugins/platforms/qminimal.dll - ${QT_BINARY_DIR}/../plugins/platforms/qwindows.dll - DESTINATION bin/platforms - CONFIGURATIONS Release) + ${QT_BINARY_DIR}/../lib/qt5/plugins/printsupport/windowsprintersupport.dll + DESTINATION bin/printsupport) install(FILES - ${QT_BINARY_DIR}/../plugins/printsupport/windowsprintersupport.dll - DESTINATION bin/printsupport - CONFIGURATIONS Release) + ${QT_BINARY_DIR}/../lib/qt5/plugins/imageformats/qgif.dll + ${QT_BINARY_DIR}/../lib/qt5/plugins/imageformats/qicns.dll + ${QT_BINARY_DIR}/../lib/qt5/plugins/imageformats/qico.dll + ${QT_BINARY_DIR}/../lib/qt5/plugins/imageformats/qjpeg.dll + ${QT_BINARY_DIR}/../lib/qt5/plugins/imageformats/qsvg.dll + ${QT_BINARY_DIR}/../lib/qt5/plugins/imageformats/qtga.dll + ${QT_BINARY_DIR}/../lib/qt5/plugins/imageformats/qtiff.dll + ${QT_BINARY_DIR}/../lib/qt5/plugins/imageformats/qwbmp.dll + ${QT_BINARY_DIR}/../lib/qt5/plugins/imageformats/qwebp.dll + DESTINATION bin/imageformats) install(FILES - ${QT_BINARY_DIR}/../plugins/imageformats/qgif.dll - ${QT_BINARY_DIR}/../plugins/imageformats/qjpeg.dll - ${QT_BINARY_DIR}/../plugins/imageformats/qsvg.dll - ${QT_BINARY_DIR}/../plugins/imageformats/qico.dll - DESTINATION bin/imageformats - CONFIGURATIONS Release) + ${QT_BINARY_DIR}/../lib/qt5/plugins/styles/qwindowsvistastyle.dll + DESTINATION bin/styles) install(FILES - ${QT_BINARY_DIR}/../plugins/iconengines/qsvgicon.dll - DESTINATION bin/iconengines - CONFIGURATIONS Release) + ${QT_BINARY_DIR}/../lib/qt5/plugins/iconengines/qsvgicon.dll + DESTINATION bin/iconengines) else() install(FILES ${runtime} @@ -117,7 +134,7 @@ elseif(WIN32) ${QT_PLUGINS_DIR}/imageformats/qsvg4.dll ${QT_PLUGINS_DIR}/imageformats/qtga4.dll ${QT_PLUGINS_DIR}/imageformats/qtiff4.dll - DESTINATION bin CONFIGURATIONS Release) + DESTINATION bin) endif() endif() else() @@ -134,9 +151,13 @@ set(CPACK_PACKAGE_CONTACT "${PACKAGE_BUGREPORT}") set(CPACK_SOURCE_PACKAGE_FILE_NAME "${LYX_PROJECT}-${LYX_INSTALL_SUFFIX}") # We depend on python scripting -set(CPACK_DEBIAN_PACKAGE_DEPENDS "python (>= 2.6)") +# Currently no need to specify versions for pythonx since they are only +# available in newest distributions. +set(CPACK_DEBIAN_PACKAGE_DEPENDS "python (>= 2.7) | python3 | python2") +set(CPACK_DEBIAN_PACKAGE_SECTION "universe/editors") # use dpkg-shlibdeps to generate additional info for package dependency list. +set(CPACK_DEBIAN_PACKAGE_RELEASE ${LYX_PACKAGE_RELEASE}) set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) set(CPACK_DEBIAN_PACKAGE_DEBUG ON) @@ -172,8 +193,13 @@ SET(CPACK_SOURCE_IGNORE_FILES "/\\\\.project$" "/\\\\.cproject$" "/\\\\.history$" +"/\\\\.gitignore$" +"/\\\\.gitattributes$" "\\\\.#" "\\\\.swp$" +"\\\\.my$" +"\\\\.pyc$" +"\\\\.patch$" "~$" "/#" "/_CPack_Packages/" @@ -197,7 +223,11 @@ SET(CPACK_SOURCE_IGNORE_FILES "/autom4te\\\\.cache/" "/\\\\.deps/" "/build/" +"/attic/" +"/HTML/" "/lyx-2\\\\." +"/expectedTestFailures$" +"/MergedManuals.lyx$" ) if(LYX_CPACK)