Commit f8a2d09e authored by Jonathan Marten's avatar Jonathan Marten
Browse files

Restore the ability to use Ark as an embedded KPart

To support that, automatically generate the MIME type list
in the application, part and Konqueror plugin desktop files.
This keeps the long list of MIME types consistent and up-to-date.

Each plugin declares the MIME types that it supports in its
CMakeLists.txt file, either fixed, or depending on configuration.
This is inserted into the plugin's own desktop file, and the overall
list for all plugins is inserted into the top level desktop files.

Explicitly check for libarchive RPM support, rather than looking
for a specific library version.  The test that we really want is
for a library version greater or equal, but CMake doesn't support
that directly (and CMake 2.6 not easily).

REVIEW:102803

Original review at http://svn.reviewboard.kde.org/r/5405/
parent a4bcd55f
......@@ -21,12 +21,16 @@ macro_log_feature(LIBARCHIVE_FOUND "LibArchive" "A library for dealing with a wi
configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
add_subdirectory(part)
add_subdirectory(app)
set(SUPPORTED_ARK_MIMETYPES "")
add_subdirectory(plugins)
add_subdirectory(kerfuffle)
add_subdirectory(part)
add_subdirectory(app)
add_subdirectory(doc)
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
message(STATUS "Supported MIME types: ${SUPPORTED_ARK_MIMETYPES}")
macro_display_feature_log()
endif(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
......@@ -11,9 +11,24 @@ kde4_add_executable( ark ${ark_SRCS} )
target_link_libraries( ark kerfuffle ${KDE4_KFILE_LIBS} ${KDE4_KPARTS_LIBS} )
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/ark.desktop.cmake
${CMAKE_CURRENT_BINARY_DIR}/ark.desktop
)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/ark_dndextract.desktop.cmake
${CMAKE_CURRENT_BINARY_DIR}/ark_dndextract.desktop
)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/ark_servicemenu.desktop.cmake
${CMAKE_CURRENT_BINARY_DIR}/ark_servicemenu.desktop
)
install( TARGETS ark ${INSTALL_TARGETS_DEFAULT_ARGS} )
install(FILES ark_addtoservicemenu.desktop ark_servicemenu.desktop DESTINATION ${SERVICES_INSTALL_DIR}/ServiceMenus)
install( PROGRAMS ark.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )
install(FILES ark_addtoservicemenu.desktop ${CMAKE_CURRENT_BINARY_DIR}/ark_servicemenu.desktop DESTINATION ${SERVICES_INSTALL_DIR}/ServiceMenus)
install( PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/ark.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )
install( FILES arkui.rc DESTINATION ${DATA_INSTALL_DIR}/ark )
########### konqueror ark_extract_here plugin ###############
......@@ -27,6 +42,6 @@ if (LIBKONQ_FOUND)
target_link_libraries(extracthere kerfuffle ${KDE4_KDECORE_LIBS} ${KDE4_KPARTS_LIBS} ${KDE4_KFILE_LIBS} ${LIBKONQ_LIBRARY} )
include_directories(${LIBKONQ_INCLUDE_DIR})
install( TARGETS extracthere DESTINATION ${PLUGIN_INSTALL_DIR} )
install( FILES ark_dndextract.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/ark_dndextract.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
endif (LIBKONQ_FOUND)
[Desktop Entry]
MimeType=application/x-gzip;application/x-tar;application/x-compressed-tar;application/x-bzip-compressed-tar;application/zip;application/x-bzip;application/x-rar;application/x-tarz;application/x-bzip2;application/x-java-archive;application/x-deb;application/x-7z-compressed;application/x-compress;application/x-zip-compressed;application/x-lzma;application/x-servicepack;application/x-xz-compressed-tar;application/x-lzma-compressed-tar;application/x-cd-image;application/lha;application/x-lha;application/maclha;
MimeType=@SUPPORTED_ARK_MIMETYPES@
GenericName=Archiving Tool
GenericName[af]=Argiveer Program
GenericName[ar]=أداة أرشفة
......
......@@ -54,4 +54,4 @@ Name[wa]=Saetchî foû avou Ark cial
Name[x-test]=xxArk Extract Herexx
Name[zh_CN]=Ark 在此解压缩
Name[zh_TW]=在此解壓縮
MimeType=application/x-gzip;application/x-tar;application/x-compressed-tar;application/x-bzip-compressed-tar;application/zip;application/x-bzip;application/x-rar;application/x-tarz;application/x-bzip2;application/x-java-archive;application/x-deb;application/x-7z-compressed;application/x-compress;application/x-zip-compressed;application/x-lzma;application/x-xz-compressed-tar;application/x-lzma-compressed-tar;application/x-cd-image;application/lha;application/x-lha;application/maclha;
MimeType=@SUPPORTED_ARK_MIMETYPES@
[Desktop Entry]
Type=Service
ServiceTypes=KonqPopupMenu/Plugin
MimeType=application/x-gzip;application/x-tar;application/x-compressed-tar;application/x-bzip-compressed-tar;application/zip;application/x-bzip;application/x-rar;application/x-tarz;application/x-bzip2;application/x-java-archive;application/x-deb;application/x-7z-compressed;application/x-compress;application/x-zip-compressed;application/x-lzma;application/x-servicepack;application/x-xz-compressed-tar;application/x-lzma-compressed-tar;application/x-cd-image;application/lha;application/x-lha;application/maclha;
MimeType=@SUPPORTED_ARK_MIMETYPES@
Actions=arkAutoExtractHere;arkExtractTo;arkExtractHere;
X-KDE-Priority=TopLevel
X-KDE-StartupNotify=false
......
......@@ -7,6 +7,7 @@
# HAVE_LIBARCHIVE_GZIP_SUPPORT - whether libarchive has been compiled with gzip support
# HAVE_LIBARCHIVE_LZMA_SUPPORT - whether libarchive has been compiled with lzma support
# HAVE_LIBARCHIVE_XZ_SUPPORT - whether libarchive has been compiled with xz support
# HAVE_LIBARCHIVE_RPM_SUPPORT - whether libarchive has been compiled with rpm support
#
# Copyright (c) 2006, Pino Toscano, <toscano.pino@tiscali.it>
#
......@@ -29,14 +30,15 @@ else (LIBARCHIVE_LIBRARY AND LIBARCHIVE_INCLUDE_DIR)
)
if (LIBARCHIVE_LIBRARY)
check_library_exists(${LIBARCHIVE_LIBRARY} archive_write_set_compression_gzip "" HAVE_LIBARCHIVE_GZIP_SUPPORT)
check_library_exists(${LIBARCHIVE_LIBRARY} archive_write_set_compression_lzma "" HAVE_LIBARCHIVE_LZMA_SUPPORT)
check_library_exists(${LIBARCHIVE_LIBRARY} archive_write_set_compression_xz "" HAVE_LIBARCHIVE_XZ_SUPPORT)
check_library_exists(${LIBARCHIVE_LIBRARY} archive_read_disk_entry_from_file "" HAVE_LIBARCHIVE_READ_DISK_API)
check_library_exists(${LIBARCHIVE_LIBRARY} archive_write_set_compression_gzip "" HAVE_LIBARCHIVE_GZIP_SUPPORT)
check_library_exists(${LIBARCHIVE_LIBRARY} archive_write_set_compression_lzma "" HAVE_LIBARCHIVE_LZMA_SUPPORT)
check_library_exists(${LIBARCHIVE_LIBRARY} archive_write_set_compression_xz "" HAVE_LIBARCHIVE_XZ_SUPPORT)
check_library_exists(${LIBARCHIVE_LIBRARY} archive_read_support_compression_rpm "" HAVE_LIBARCHIVE_RPM_SUPPORT)
check_library_exists(${LIBARCHIVE_LIBRARY} archive_read_disk_entry_from_file "" HAVE_LIBARCHIVE_READ_DISK_API)
endif (LIBARCHIVE_LIBRARY)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LibArchive DEFAULT_MSG LIBARCHIVE_INCLUDE_DIR LIBARCHIVE_LIBRARY HAVE_LIBARCHIVE_GZIP_SUPPORT)
mark_as_advanced(LIBARCHIVE_INCLUDE_DIR LIBARCHIVE_LIBRARY HAVE_LIBARCHIVE_GZIP_SUPPORT HAVE_LIBARCHIVE_LZMA_SUPPORT)
mark_as_advanced(LIBARCHIVE_INCLUDE_DIR LIBARCHIVE_LIBRARY HAVE_LIBARCHIVE_GZIP_SUPPORT HAVE_LIBARCHIVE_LZMA_SUPPORT HAVE_LIBARCHIVE_RPM_SUPPORT)
endif (LIBARCHIVE_LIBRARY AND LIBARCHIVE_INCLUDE_DIR)
......@@ -20,10 +20,15 @@ kde4_add_plugin(arkpart ${arkpart_PART_SRCS})
target_link_libraries(arkpart kerfuffle ${KDE4_KFILE_LIBS} ${KDE4_KPARTS_LIBS} ${KDE4_KHTML_LIBS} ${KDE4_KDEUI_LIBS})
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/ark_part.desktop.cmake
${CMAKE_CURRENT_BINARY_DIR}/ark_part.desktop
)
install(TARGETS arkpart DESTINATION ${PLUGIN_INSTALL_DIR})
########### install files ###############
install( FILES ark_part.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/ark_part.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
install( FILES ark_part.rc DESTINATION ${DATA_INSTALL_DIR}/ark )
......@@ -142,6 +142,7 @@ Comment[xh]=Isixhobo sokuphatha i Archive
Comment[x-test]=xxArchive Handling Toolxx
Comment[zh_CN]=压缩归档处理工具
Comment[zh_TW]=壓縮檔處理工具
X-KDE-ServiceTypes=Browser/View
X-KDE-ServiceTypes=KParts/ReadOnlyPart,Browser/View
X-KDE-Library=arkpart
Type=Service
MimeType=@SUPPORTED_ARK_MIMETYPES@
......@@ -3,6 +3,9 @@ if (LIBARCHIVE_FOUND)
if( NOT HAVE_LIBARCHIVE_LZMA_SUPPORT OR NOT HAVE_LIBARCHIVE_XZ_SUPPORT )
message(STATUS "Your libarchive does not have support for lzma and/or xz archives. libarchive >= 2.7.0 is recommended.")
endif( NOT HAVE_LIBARCHIVE_LZMA_SUPPORT OR NOT HAVE_LIBARCHIVE_XZ_SUPPORT )
if( NOT HAVE_LIBARCHIVE_RPM_SUPPORT )
message(STATUS "Your libarchive does not have support for rpm archives. libarchive >= 2.8.0 is required for this.")
endif( NOT HAVE_LIBARCHIVE_RPM_SUPPORT )
add_subdirectory( libarchive )
else( HAVE_LIBARCHIVE_READ_DISK_API )
# Remove the cached variables from FindLibArchive.cmake
......@@ -11,10 +14,15 @@ if (LIBARCHIVE_FOUND)
unset( LIBARCHIVE_LIBRARY )
message(STATUS "Your libarchive does not have support for archive_read_disk api. libarchive >= 2.6.0 is needed.")
endif( HAVE_LIBARCHIVE_READ_DISK_API )
endif (LIBARCHIVE_FOUND)
add_subdirectory( clirarplugin )
add_subdirectory( cli7zplugin )
add_subdirectory( clizipplugin )
add_subdirectory( libsinglefileplugin )
add_subdirectory( clilhaplugin )
\ No newline at end of file
add_subdirectory( clilhaplugin )
set(SUPPORTED_ARK_MIMETYPES "${SUPPORTED_ARK_MIMETYPES}" PARENT_SCOPE)
......@@ -6,16 +6,22 @@ include_directories(
########### next target ###############
set(SUPPORTED_CLI7Z_MIMETYPES "application/x-7z-compressed;")
set(kerfuffle_cli7z_SRCS cliplugin.cpp)
kde4_add_plugin(kerfuffle_cli7z ${kerfuffle_cli7z_SRCS})
target_link_libraries(kerfuffle_cli7z ${KDE4_KDECORE_LIBS} ${KDE4_KIO_LIBS} kerfuffle )
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/kerfuffle_cli7z.desktop.cmake
${CMAKE_CURRENT_BINARY_DIR}/kerfuffle_cli7z.desktop
)
########### install files ###############
install(TARGETS kerfuffle_cli7z DESTINATION ${PLUGIN_INSTALL_DIR} )
install( FILES kerfuffle_cli7z.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/kerfuffle_cli7z.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
set(SUPPORTED_ARK_MIMETYPES "${SUPPORTED_ARK_MIMETYPES}${SUPPORTED_CLI7Z_MIMETYPES}" PARENT_SCOPE)
......@@ -63,4 +63,4 @@ Name[uk]=Додаток для архівів 7zip
Name[x-test]=xx7zip archive pluginxx
Name[zh_CN]=7zip 归档插件
Name[zh_TW]=7zip 壓縮檔外掛程式
MimeType=application/x-7z-compressed;
MimeType=@SUPPORTED_CLI7Z_MIMETYPES@
......@@ -6,16 +6,22 @@ include_directories(
########### next target ###############
set(SUPPORTED_CLILHA_MIMETYPES "application/lha;application/x-lha;application/maclha;")
set(kerfuffle_cli_SRCS cliplugin.cpp)
kde4_add_plugin(kerfuffle_clilha ${kerfuffle_cli_SRCS})
target_link_libraries(kerfuffle_clilha ${KDE4_KDECORE_LIBS} ${KDE4_KIO_LIBS} kerfuffle )
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/kerfuffle_clilha.desktop.cmake
${CMAKE_CURRENT_BINARY_DIR}/kerfuffle_clilha.desktop
)
########### install files ###############
install(TARGETS kerfuffle_clilha DESTINATION ${PLUGIN_INSTALL_DIR} )
install( FILES kerfuffle_clilha.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/kerfuffle_clilha.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
set(SUPPORTED_ARK_MIMETYPES "${SUPPORTED_ARK_MIMETYPES}${SUPPORTED_CLILHA_MIMETYPES}" PARENT_SCOPE)
......@@ -29,4 +29,4 @@ Name[tr]=lha arşiv eklentisi
Name[uk]=Додаток для архівів LHA
Name[x-test]=xxlha archive pluginxx
Name[zh_TW]=lha 壓縮檔外掛程式
MimeType=application/lha;application/x-lha;application/maclha;
MimeType=@SUPPORTED_CLILHA_MIMETYPES@
......@@ -6,15 +6,24 @@ include_directories(
########### next target ###############
set(SUPPORTED_CLIRAR_MIMETYPES "application/x-rar;")
set(kerfuffle_clirar_SRCS cliplugin.cpp)
kde4_add_plugin(kerfuffle_clirar ${kerfuffle_clirar_SRCS})
target_link_libraries(kerfuffle_clirar ${KDE4_KDECORE_LIBS} ${KDE4_KIO_LIBS} kerfuffle )
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/kerfuffle_clirar.desktop.cmake
${CMAKE_CURRENT_BINARY_DIR}/kerfuffle_clirar.desktop
)
########### install files ###############
install(TARGETS kerfuffle_clirar DESTINATION ${PLUGIN_INSTALL_DIR} )
install( FILES kerfuffle_clirar.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/kerfuffle_clirar.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
add_subdirectory(tests)
set(SUPPORTED_ARK_MIMETYPES "${SUPPORTED_ARK_MIMETYPES}${SUPPORTED_CLIRAR_MIMETYPES}" PARENT_SCOPE)
......@@ -63,4 +63,4 @@ Name[uk]=Додаток для архівів RAR
Name[x-test]=xxRAR archive pluginxx
Name[zh_CN]=RAR 归档插件
Name[zh_TW]=RAR 壓縮檔外掛程式
MimeType=application/x-rar;
MimeType=@SUPPORTED_CLIRAR_MIMETYPES@
......@@ -6,16 +6,22 @@ include_directories(
########### next target ###############
set(SUPPORTED_CLIZIP_MIMETYPES "application/x-java-archive;application/zip;")
set(kerfuffle_clizip_SRCS cliplugin.cpp)
kde4_add_plugin(kerfuffle_clizip ${kerfuffle_clizip_SRCS})
target_link_libraries(kerfuffle_clizip ${KDE4_KDECORE_LIBS} ${KDE4_KIO_LIBS} kerfuffle )
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/kerfuffle_clizip.desktop.cmake
${CMAKE_CURRENT_BINARY_DIR}/kerfuffle_clizip.desktop
)
########### install files ###############
install(TARGETS kerfuffle_clizip DESTINATION ${PLUGIN_INSTALL_DIR} )
install( FILES kerfuffle_clizip.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/kerfuffle_clizip.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
set(SUPPORTED_ARK_MIMETYPES "${SUPPORTED_ARK_MIMETYPES}${SUPPORTED_CLIZIP_MIMETYPES}" PARENT_SCOPE)
......@@ -63,4 +63,4 @@ Name[uk]=Додаток для архівів ZIP
Name[x-test]=xxZIP archive pluginxx
Name[zh_CN]=ZIP 归档插件
Name[zh_TW]=ZIP 壓縮檔外掛程式
MimeType=application/x-java-archive;application/zip;
MimeType=@SUPPORTED_CLIZIP_MIMETYPES@
......@@ -5,16 +5,22 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../..
########### next target ###############
set(SUPPORTED_KARCHIVE_MIMETYPES "application/zip;application/x-zip-compressed;application/x-tar;application/x-compressed-tar;application/x-bzip-compressed-tar;")
set(kerfuffle_karchive_SRCS karchiveplugin.cpp)
kde4_add_plugin(kerfuffle_karchive ${kerfuffle_karchive_SRCS})
target_link_libraries(kerfuffle_karchive ${KDE4_KDECORE_LIBS} ${KDE4_KIO_LIBS} kerfuffle )
install(TARGETS kerfuffle_karchive DESTINATION ${PLUGIN_INSTALL_DIR} )
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/kerfuffle_karchive.desktop.cmake
${CMAKE_CURRENT_BINARY_DIR}/kerfuffle_karchive.desktop
)
########### install files ###############
install(TARGETS kerfuffle_karchive DESTINATION ${PLUGIN_INSTALL_DIR} )
install( FILES kerfuffle_karchive.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
set(SUPPORTED_ARK_MIMETYPES "${SUPPORTED_ARK_MIMETYPES}${SUPPORTED_KARCHIVE_MIMETYPES}" PARENT_SCOPE)
......@@ -122,4 +122,4 @@ Comment[uk]=Додаток KArchive для Kerfuffle
Comment[x-test]=xxKArchive plugin for Kerfufflexx
Comment[zh_CN]=Kerfuffle 的 KArchive 插件
Comment[zh_TW]=Kerfuffle 的 KArchive 外掛程式
MimeType=application/zip;application/x-zip-compressed;application/x-tar;application/x-compressed-tar;application/x-bzip-compressed-tar;
MimeType=@SUPPORTED_KARCHIVE_MIMETYPES@
......@@ -6,18 +6,26 @@ include_directories( ${LIBARCHIVE_INCLUDE_DIR}
########### next target ###############
set(LIBARCHIVE_RPM_SUPPORT_MIN_VERSION "2.8.0")
if(LIBARCHIVE_VERSION VERSION_LESS ${LIBARCHIVE_RPM_SUPPORT_MIN_VERSION})
set(LIBARCHIVE_RPM_SUPPORT "")
else(LIBARCHIVE_VERSION VERSION_LESS ${LIBARCHIVE_RPM_SUPPORT_MIN_VERSION})
set(LIBARCHIVE_RPM_SUPPORT "application/x-rpm;")
endif(LIBARCHIVE_VERSION VERSION_LESS ${LIBARCHIVE_RPM_SUPPORT_MIN_VERSION})
set(SUPPORTED_LIBARCHIVE_READONLY_MIMETYPES "application/x-deb;application/x-cd-image;application/x-bcpio;application/x-cpio;application/x-cpio-compressed;application/x-sv4cpio;application/x-sv4crc;")
set(SUPPORTED_LIBARCHIVE_READWRITE_MIMETYPES "application/x-tar;application/x-compresssed-tar;application/x-bzip-compressed-tar;application/x-tarz;application/x-xz-compressed-tar;application/x-lzma-compressed-tar;")
if(HAVE_LIBARCHIVE_RPM_SUPPORT)
set(SUPPORTED_LIBARCHIVE_READONLY_MIMETYPES "${SUPPORTED_LIBARCHIVE_READONLY_MIMETYPES}application/x-rpm;")
endif(HAVE_LIBARCHIVE_RPM_SUPPORT)
# This MIME type was originally set in ark.desktop but is not mentioned anywhere else.
# Assuming that, if it were supported, it would be here.
set(SUPPORTED_LIBARCHIVE_READONLY_MIMETYPES "${SUPPORTED_LIBARCHIVE_READONLY_MIMETYPES}application/x-servicepack;")
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/kerfuffle_libarchive_readonly.desktop.cmake
${CMAKE_CURRENT_BINARY_DIR}/kerfuffle_libarchive_readonly.desktop
)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/kerfuffle_libarchive.desktop.cmake
${CMAKE_CURRENT_BINARY_DIR}/kerfuffle_libarchive.desktop
)
set(kerfuffle_libarchive_SRCS libarchivehandler.cpp)
kde4_add_plugin(kerfuffle_libarchive ${kerfuffle_libarchive_SRCS})
......@@ -29,5 +37,7 @@ install(TARGETS kerfuffle_libarchive DESTINATION ${PLUGIN_INSTALL_DIR} )
########### install files ###############
install( FILES kerfuffle_libarchive.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/kerfuffle_libarchive.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/kerfuffle_libarchive_readonly.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
set(SUPPORTED_ARK_MIMETYPES "${SUPPORTED_ARK_MIMETYPES}${SUPPORTED_LIBARCHIVE_READWRITE_MIMETYPES}${SUPPORTED_LIBARCHIVE_READONLY_MIMETYPES}" PARENT_SCOPE)
......@@ -123,4 +123,4 @@ Comment[uk]=Додаток LibArchive для Kerfuffle
Comment[x-test]=xxLibArchive Plugin for Kerfufflexx
Comment[zh_CN]=Kerfuffle 的 LibArchive 插件
Comment[zh_TW]=Kerfuffle 的 LibArchive 外掛程式
MimeType=application/x-tar;application/x-compressed-tar;application/x-bzip-compressed-tar;application/x-tarz;application/x-xz-compressed-tar;application/x-lzma-compressed-tar;
MimeType=@SUPPORTED_LIBARCHIVE_READWRITE_MIMETYPES@
......@@ -54,4 +54,4 @@ Name[wa]=kerfuffle_libarchive_readonly
Name[x-test]=xxkerfuffle_libarchive_readonlyxx
Name[zh_CN]=kerfuffle_libarchive_readonly
Name[zh_TW]=kerfuffle_libarchive_readonly
MimeType=application/x-deb;application/x-cd-image;application/x-bcpio;application/x-cpio;application/x-cpio-compressed;application/x-sv4cpio;application/x-sv4crc;@LIBARCHIVE_RPM_SUPPORT@
MimeType=@SUPPORTED_LIBARCHIVE_READONLY_MIMETYPES@
......@@ -4,6 +4,12 @@ include_directories(
)
set(kerfuffle_singlefile_SRCS singlefileplugin.cpp)
set(SUPPORTED_LIBSINGLEFILE_MIMETYPES "")
# This MIME type was originally set in ark.desktop but is does not
# seem to be supported anywhere. Assuming that, if it were supported,
# it would be here.
set(SUPPORTED_LIBSINGLEFILE_MIMETYPES "${SUPPORTED_LIBSINGLEFILE_MIMETYPES}application/x-compress;")
#
# GZip files
......@@ -14,6 +20,7 @@ macro_log_feature(ZLIB_FOUND "ZLib" "The Zlib compression library" "http://www.z
if (ZLIB_FOUND)
set(kerfuffle_libgz_SRCS gzplugin.cpp ${kerfuffle_singlefile_SRCS})
set(SUPPORTED_LIBSINGLEFILE_MIMETYPES "${SUPPORTED_LIBSINGLEFILE_MIMETYPES}application/x-gzip;")
kde4_add_plugin(kerfuffle_libgz ${kerfuffle_libgz_SRCS})
......@@ -33,6 +40,7 @@ macro_log_feature(BZIP2_FOUND "BZip2" "A high-quality data compressor" "http://w
if (BZIP2_FOUND)
set(kerfuffle_libbz2_SRCS bz2plugin.cpp ${kerfuffle_singlefile_SRCS})
set(SUPPORTED_LIBSINGLEFILE_MIMETYPES "${SUPPORTED_LIBSINGLEFILE_MIMETYPES}application/x-bzip;application/x-bzip2;")
kde4_add_plugin(kerfuffle_libbz2 ${kerfuffle_libbz2_SRCS})
......@@ -52,6 +60,7 @@ macro_log_feature(LIBLZMA_FOUND "LibLZMA" "Liblzma is used for the .xz and .lzma
if (LIBLZMA_FOUND)
set(kerfuffle_libxz_SRCS xzplugin.cpp ${kerfuffle_singlefile_SRCS})
set(SUPPORTED_LIBSINGLEFILE_MIMETYPES "${SUPPORTED_LIBSINGLEFILE_MIMETYPES}application/x-lzma;application/x-xz;")
kde4_add_plugin(kerfuffle_libxz ${kerfuffle_libxz_SRCS})
......@@ -61,3 +70,5 @@ if (LIBLZMA_FOUND)
install( FILES kerfuffle_libxz.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
endif (LIBLZMA_FOUND)
set(SUPPORTED_ARK_MIMETYPES "${SUPPORTED_ARK_MIMETYPES}${SUPPORTED_LIBSINGLEFILE_MIMETYPES}" PARENT_SCOPE)
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