Commit d4755582 authored by Elvis Angelaccio's avatar Elvis Angelaccio

Stop hardcoding the mimetypes in the json metadata

This will allow us to configure the supported mimetypes at build time (e.g.
depending on the libarchive version we are building against). We also don't
need anymore the check for mimetypes in two different places.

Differential Revision: D1822
parent c347405a
......@@ -2,7 +2,7 @@ set(RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
include_directories(${CMAKE_SOURCE_DIR}/plugins/cli7zplugin/)
file(COPY ${CMAKE_SOURCE_DIR}/plugins/cli7zplugin/kerfuffle_cli7z.json
file(COPY ${CMAKE_BINARY_DIR}/plugins/cli7zplugin/kerfuffle_cli7z.json
DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
ecm_add_test(
......
......@@ -2,7 +2,7 @@ set(RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
include_directories(${CMAKE_SOURCE_DIR}/plugins/clirarplugin/)
file(COPY ${CMAKE_SOURCE_DIR}/plugins/clirarplugin/kerfuffle_clirar.json
file(COPY ${CMAKE_BINARY_DIR}/plugins/clirarplugin/kerfuffle_clirar.json
DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
ecm_add_test(
......
......@@ -2,7 +2,7 @@ set(RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
include_directories(${CMAKE_SOURCE_DIR}/plugins/cliunarchiverplugin/)
file(COPY ${CMAKE_SOURCE_DIR}/plugins/cliunarchiverplugin/kerfuffle_cliunarchiver.json
file(COPY ${CMAKE_BINARY_DIR}/plugins/cliunarchiverplugin/kerfuffle_cliunarchiver.json
DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
ecm_add_test(
......
......@@ -2,7 +2,7 @@ set(RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
include_directories(${CMAKE_SOURCE_DIR}/plugins/clizipplugin/)
file(COPY ${CMAKE_SOURCE_DIR}/plugins/clizipplugin/kerfuffle_clizip.json
file(COPY ${CMAKE_BINARY_DIR}/plugins/clizipplugin/kerfuffle_clizip.json
DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
ecm_add_test(
......
......@@ -9,6 +9,17 @@ ecm_qt_declare_logging_category(kerfuffle_cli7z_SRCS
IDENTIFIER ARK
CATEGORY_NAME ark.cli7z)
# NOTE: the first double-quotes of the first mime and the last
# double-quotes of the last mime must NOT be escaped.
set(SUPPORTED_MIMETYPES
"application/x-7z-compressed\",
\"application/zip")
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/kerfuffle_cli7z.json.cmake
${CMAKE_CURRENT_BINARY_DIR}/kerfuffle_cli7z.json)
add_library(kerfuffle_cli7z MODULE ${kerfuffle_cli7z_SRCS})
target_link_libraries(kerfuffle_cli7z kerfuffle)
......
{
"KPlugin": {
"Authors": [
{
"Email": "haraldhv@stud.ntnu.no",
"Name": "Harald Hvaal",
"Name[sr@ijekavian]": "Харалд Вол",
"Name[sr@ijekavianlatin]": "Harald Vol",
"Name[sr@latin]": "Harald Vol",
"Name[sr]": "Харалд Вол",
"Name[x-test]": "xxHarald Hvaalxx"
}
],
"Id": "kerfuffle_cli7z",
"License": "GPLv2+",
"MimeTypes": [
"application/x-7z-compressed",
"application/zip"
],
"Name": "7zip archive plugin",
"Name[ca@valencia]": "Connector per arxius 7zip",
"Name[ca]": "Connector per arxius 7zip",
"Name[cs]": "Modul pro archiv 7zip",
"Name[de]": "7zip-Archiv-Modul",
"Name[es]": "Complemento de archivo 7zip",
"Name[fi]": "7zip-pakkaustuki",
"Name[it]": "Estensione per archivi 7zip",
"Name[nb]": "Programtillegg for 7zip-arkiv",
"Name[nl]": "7zip-archiefplug-in",
"Name[nn]": "7zip-arkivtillegg",
"Name[pl]": "Wtyczka archiwów 7zip",
"Name[pt]": "'Plugin' de pacotes 7zip",
"Name[pt_BR]": "Plugin de arquivos 7zip",
"Name[ru]": "Поддержка архивов 7zip",
"Name[sk]": "Modul 7zip archívu",
"Name[sl]": "Vstavek za arhive 7zip",
"Name[sr@ijekavian]": "Прикључак 7зип архива",
"Name[sr@ijekavianlatin]": "Priključak 7zip arhiva",
"Name[sr@latin]": "Priključak 7zip arhiva",
"Name[sr]": "Прикључак 7зип архива",
"Name[sv]": "Insticksprogram för 7zip-arkiv",
"Name[uk]": "Додаток для архівів 7zip",
"Name[x-test]": "xx7zip archive pluginxx",
"Name[zh_CN]": "7zip 归档插件",
"ServiceTypes": [
"Kerfuffle/Plugin"
],
"Version": "0.0.1",
"Website": "http://www.kde.org"
},
"X-KDE-Kerfuffle-APIRevision": 1,
"X-KDE-Kerfuffle-ReadOnlyExecutables": [
"7z"
],
"X-KDE-Kerfuffle-ReadWrite": true,
"X-KDE-Kerfuffle-ReadWriteExecutables": [
"7z"
],
"X-KDE-Priority": 180,
"application/x-7z-compressed": {
"CompressionLevelDefault": 5,
"CompressionLevelMax": 9,
"CompressionLevelMin": 0,
"SupportsTesting": true,
"HeaderEncryption": true
},
"application/zip": {
"CompressionLevelDefault": 5,
"CompressionLevelMax": 9,
"CompressionLevelMin": 0,
"SupportsTesting": true,
"Encryption": true
}
}
{
"KPlugin": {
"Authors": [
{
"Email": "haraldhv@stud.ntnu.no",
"Name": "Harald Hvaal",
"Name[sr@ijekavian]": "Харалд Вол",
"Name[sr@ijekavianlatin]": "Harald Vol",
"Name[sr@latin]": "Harald Vol",
"Name[sr]": "Харалд Вол",
"Name[x-test]": "xxHarald Hvaalxx"
}
],
"Id": "kerfuffle_cli7z",
"License": "GPLv2+",
"MimeTypes": [
"@SUPPORTED_MIMETYPES@"
],
"Name": "7zip archive plugin",
"Name[ca@valencia]": "Connector per arxius 7zip",
"Name[ca]": "Connector per arxius 7zip",
"Name[cs]": "Modul pro archiv 7zip",
"Name[de]": "7zip-Archiv-Modul",
"Name[es]": "Complemento de archivo 7zip",
"Name[fi]": "7zip-pakkaustuki",
"Name[it]": "Estensione per archivi 7zip",
"Name[nb]": "Programtillegg for 7zip-arkiv",
"Name[nl]": "7zip-archiefplug-in",
"Name[nn]": "7zip-arkivtillegg",
"Name[pl]": "Wtyczka archiwów 7zip",
"Name[pt]": "'Plugin' de pacotes 7zip",
"Name[pt_BR]": "Plugin de arquivos 7zip",
"Name[ru]": "Поддержка архивов 7zip",
"Name[sk]": "Modul 7zip archívu",
"Name[sl]": "Vstavek za arhive 7zip",
"Name[sr@ijekavian]": "Прикључак 7зип архива",
"Name[sr@ijekavianlatin]": "Priključak 7zip arhiva",
"Name[sr@latin]": "Priključak 7zip arhiva",
"Name[sr]": "Прикључак 7зип архива",
"Name[sv]": "Insticksprogram för 7zip-arkiv",
"Name[uk]": "Додаток для архівів 7zip",
"Name[x-test]": "xx7zip archive pluginxx",
"Name[zh_CN]": "7zip 归档插件",
"ServiceTypes": [
"Kerfuffle/Plugin"
],
"Version": "0.0.1",
"Website": "http://www.kde.org"
},
"X-KDE-Kerfuffle-APIRevision": 1,
"X-KDE-Kerfuffle-ReadOnlyExecutables": [
"7z"
],
"X-KDE-Kerfuffle-ReadWrite": true,
"X-KDE-Kerfuffle-ReadWriteExecutables": [
"7z"
],
"X-KDE-Priority": 180,
"application/x-7z-compressed": {
"CompressionLevelDefault": 5,
"CompressionLevelMax": 9,
"CompressionLevelMin": 0,
"SupportsTesting": true,
"HeaderEncryption": true
},
"application/zip": {
"CompressionLevelDefault": 5,
"CompressionLevelMax": 9,
"CompressionLevelMin": 0,
"SupportsTesting": true,
"Encryption": true
}
}
......@@ -9,6 +9,13 @@ ecm_qt_declare_logging_category(kerfuffle_clirar_SRCS
IDENTIFIER ARK
CATEGORY_NAME ark.clirar)
set(SUPPORTED_MIMETYPES "application/x-rar")
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/kerfuffle_clirar.json.cmake
${CMAKE_CURRENT_BINARY_DIR}/kerfuffle_clirar.json)
add_library(kerfuffle_clirar MODULE ${kerfuffle_clirar_SRCS})
target_link_libraries(kerfuffle_clirar kerfuffle)
......
{
"KPlugin": {
"Authors": [
{
"Email": "haraldhv@stud.ntnu.no",
"Name": "Harald Hvaal",
"Name[sr@ijekavian]": "Харалд Вол",
"Name[sr@ijekavianlatin]": "Harald Vol",
"Name[sr@latin]": "Harald Vol",
"Name[sr]": "Харалд Вол",
"Name[x-test]": "xxHarald Hvaalxx"
}
],
"Id": "kerfuffle_clirar",
"License": "GPLv2+",
"MimeTypes": [
"application/x-rar"
],
"Name": "RAR archive plugin",
"Name[ca@valencia]": "Connector per arxius RAR",
"Name[ca]": "Connector per arxius RAR",
"Name[cs]": "Modul pro archiv RAR",
"Name[de]": "RAR-Archiv-Modul",
"Name[en_GB]": "RAR archive plugin",
"Name[es]": "Complemento de archivo RAR",
"Name[fi]": "RAR-pakkaustuki",
"Name[fr]": "Module externe d'archive « RAR »",
"Name[it]": "Estensione per archivi RAR",
"Name[nb]": "Programtillegg for RAR-arkiv",
"Name[nl]": "RAR-archiefplug-in",
"Name[nn]": "RAR-arkivtillegg",
"Name[pl]": "Wtyczka archiwów RAR",
"Name[pt]": "'Plugin' de pacotes RAR",
"Name[pt_BR]": "Plugin de arquivos RAR",
"Name[ru]": "Поддержка архивов RAR",
"Name[sk]": "Modul RAR archívu",
"Name[sl]": "Vstavek za arhive RAR",
"Name[sr@ijekavian]": "Прикључак РАР архива",
"Name[sr@ijekavianlatin]": "Priključak RAR arhiva",
"Name[sr@latin]": "Priključak RAR arhiva",
"Name[sr]": "Прикључак РАР архива",
"Name[sv]": "Insticksprogram för RAR-arkiv",
"Name[uk]": "Додаток для архівів RAR",
"Name[x-test]": "xxRAR archive pluginxx",
"Name[zh_CN]": "RAR 归档插件",
"Name[zh_TW]": "RAR 壓縮檔外掛程式",
"ServiceTypes": [
"Kerfuffle/Plugin"
],
"Version": "0.0.1",
"Website": "http://www.kde.org"
},
"X-KDE-Kerfuffle-APIRevision": 1,
"X-KDE-Kerfuffle-ReadOnlyExecutables": [
"unrar"
],
"X-KDE-Kerfuffle-ReadWrite": true,
"X-KDE-Kerfuffle-ReadWriteExecutables": [
"rar"
],
"X-KDE-Priority": 120,
"application/x-rar": {
"CompressionLevelDefault": 3,
"CompressionLevelMax": 5,
"CompressionLevelMin": 0,
"SupportsWriteComment": true,
"SupportsTesting": true,
"HeaderEncryption": true
}
}
{
"KPlugin": {
"Authors": [
{
"Email": "haraldhv@stud.ntnu.no",
"Name": "Harald Hvaal",
"Name[sr@ijekavian]": "Харалд Вол",
"Name[sr@ijekavianlatin]": "Harald Vol",
"Name[sr@latin]": "Harald Vol",
"Name[sr]": "Харалд Вол",
"Name[x-test]": "xxHarald Hvaalxx"
}
],
"Id": "kerfuffle_clirar",
"License": "GPLv2+",
"MimeTypes": [
"@SUPPORTED_MIMETYPES@"
],
"Name": "RAR archive plugin",
"Name[ca@valencia]": "Connector per arxius RAR",
"Name[ca]": "Connector per arxius RAR",
"Name[cs]": "Modul pro archiv RAR",
"Name[de]": "RAR-Archiv-Modul",
"Name[en_GB]": "RAR archive plugin",
"Name[es]": "Complemento de archivo RAR",
"Name[fi]": "RAR-pakkaustuki",
"Name[fr]": "Module externe d'archive « RAR »",
"Name[it]": "Estensione per archivi RAR",
"Name[nb]": "Programtillegg for RAR-arkiv",
"Name[nl]": "RAR-archiefplug-in",
"Name[nn]": "RAR-arkivtillegg",
"Name[pl]": "Wtyczka archiwów RAR",
"Name[pt]": "'Plugin' de pacotes RAR",
"Name[pt_BR]": "Plugin de arquivos RAR",
"Name[ru]": "Поддержка архивов RAR",
"Name[sk]": "Modul RAR archívu",
"Name[sl]": "Vstavek za arhive RAR",
"Name[sr@ijekavian]": "Прикључак РАР архива",
"Name[sr@ijekavianlatin]": "Priključak RAR arhiva",
"Name[sr@latin]": "Priključak RAR arhiva",
"Name[sr]": "Прикључак РАР архива",
"Name[sv]": "Insticksprogram för RAR-arkiv",
"Name[uk]": "Додаток для архівів RAR",
"Name[x-test]": "xxRAR archive pluginxx",
"Name[zh_CN]": "RAR 归档插件",
"Name[zh_TW]": "RAR 壓縮檔外掛程式",
"ServiceTypes": [
"Kerfuffle/Plugin"
],
"Version": "0.0.1",
"Website": "http://www.kde.org"
},
"X-KDE-Kerfuffle-APIRevision": 1,
"X-KDE-Kerfuffle-ReadOnlyExecutables": [
"unrar"
],
"X-KDE-Kerfuffle-ReadWrite": true,
"X-KDE-Kerfuffle-ReadWriteExecutables": [
"rar"
],
"X-KDE-Priority": 120,
"application/x-rar": {
"CompressionLevelDefault": 3,
"CompressionLevelMax": 5,
"CompressionLevelMin": 0,
"SupportsWriteComment": true,
"SupportsTesting": true,
"HeaderEncryption": true
}
}
......@@ -9,6 +9,13 @@ ecm_qt_declare_logging_category(kerfuffle_cliunarchiver_SRCS
IDENTIFIER ARK
CATEGORY_NAME ark.cliunarchiver)
set(SUPPORTED_MIMETYPES "application/x-rar")
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/kerfuffle_cliunarchiver.json.cmake
${CMAKE_CURRENT_BINARY_DIR}/kerfuffle_cliunarchiver.json)
add_library(kerfuffle_cliunarchiver MODULE ${kerfuffle_cliunarchiver_SRCS})
target_link_libraries(kerfuffle_cliunarchiver kerfuffle)
......
{
"KPlugin": {
"Authors": [
{
"Email": "elvis.angelaccio@kdemail.net",
"Name": "Elvis Angelaccio",
"Name[sr@ijekavian]": "Елвис Ангелачо",
"Name[sr@ijekavianlatin]": "Elvis Angelačo",
"Name[sr@latin]": "Elvis Angelačo",
"Name[sr]": "Елвис Ангелачо",
"Name[x-test]": "xxElvis Angelaccioxx"
}
],
"Id": "kerfuffle_cliunarchiver",
"License": "GPLv2+",
"MimeTypes": [
"application/x-rar"
],
"Name": "The Unarchiver plugin",
"Name[ca@valencia]": "Connector de l'Unarchiver",
"Name[ca]": "Connector de l'Unarchiver",
"Name[cs]": "Modul pro Unarchiver",
"Name[de]": "Unarchiver-Modul",
"Name[en_GB]": "The Unarchiver plugin",
"Name[es]": "El complemento de Unarchiver",
"Name[fi]": "Unarchiver-tuki",
"Name[it]": "Estensione The Unarchiver",
"Name[nl]": "De plug-in voor uit archief halen",
"Name[pl]": "Wtyczka wypakowywacza",
"Name[pt]": "O 'plugin' do Unarchiver",
"Name[pt_BR]": "Plugin Unarchiver",
"Name[sk]": "Plugin Unarchiver",
"Name[sl]": "Vstavek Unarchiver",
"Name[sr@ijekavian]": "Прикључак Унархивера",
"Name[sr@ijekavianlatin]": "Priključak Unarchivera",
"Name[sr@latin]": "Priključak Unarchivera",
"Name[sr]": "Прикључак Унархивера",
"Name[sv]": "Insticksprogram för Unarchiver",
"Name[uk]": "Додаток Unarchiver",
"Name[x-test]": "xxThe Unarchiver pluginxx",
"Name[zh_CN]": "Unarchiver 插件",
"Name[zh_TW]": "解壓縮外掛程式",
"ServiceTypes": [
"Kerfuffle/Plugin"
],
"Version": "0.0.1",
"Website": "http://www.kde.org"
},
"X-KDE-Kerfuffle-APIRevision": 1,
"X-KDE-Kerfuffle-ReadOnlyExecutables": [
"lsar",
"unar"
],
"X-KDE-Kerfuffle-ReadWrite": false,
"X-KDE-Priority": 100
}
\ No newline at end of file
{
"KPlugin": {
"Authors": [
{
"Email": "elvis.angelaccio@kdemail.net",
"Name": "Elvis Angelaccio",
"Name[sr@ijekavian]": "Елвис Ангелачо",
"Name[sr@ijekavianlatin]": "Elvis Angelačo",
"Name[sr@latin]": "Elvis Angelačo",
"Name[sr]": "Елвис Ангелачо",
"Name[x-test]": "xxElvis Angelaccioxx"
}
],
"Id": "kerfuffle_cliunarchiver",
"License": "GPLv2+",
"MimeTypes": [
"@SUPPORTED_MIMETYPES@"
],
"Name": "The Unarchiver plugin",
"Name[ca@valencia]": "Connector de l'Unarchiver",
"Name[ca]": "Connector de l'Unarchiver",
"Name[cs]": "Modul pro Unarchiver",
"Name[de]": "Unarchiver-Modul",
"Name[en_GB]": "The Unarchiver plugin",
"Name[es]": "El complemento de Unarchiver",
"Name[fi]": "Unarchiver-tuki",
"Name[it]": "Estensione The Unarchiver",
"Name[nl]": "De plug-in voor uit archief halen",
"Name[pl]": "Wtyczka wypakowywacza",
"Name[pt]": "O 'plugin' do Unarchiver",
"Name[pt_BR]": "Plugin Unarchiver",
"Name[sk]": "Plugin Unarchiver",
"Name[sl]": "Vstavek Unarchiver",
"Name[sr@ijekavian]": "Прикључак Унархивера",
"Name[sr@ijekavianlatin]": "Priključak Unarchivera",
"Name[sr@latin]": "Priključak Unarchivera",
"Name[sr]": "Прикључак Унархивера",
"Name[sv]": "Insticksprogram för Unarchiver",
"Name[uk]": "Додаток Unarchiver",
"Name[x-test]": "xxThe Unarchiver pluginxx",
"Name[zh_CN]": "Unarchiver 插件",
"Name[zh_TW]": "解壓縮外掛程式",
"ServiceTypes": [
"Kerfuffle/Plugin"
],
"Version": "0.0.1",
"Website": "http://www.kde.org"
},
"X-KDE-Kerfuffle-APIRevision": 1,
"X-KDE-Kerfuffle-ReadOnlyExecutables": [
"lsar",
"unar"
],
"X-KDE-Kerfuffle-ReadWrite": false,
"X-KDE-Priority": 100
}
......@@ -9,6 +9,16 @@ ecm_qt_declare_logging_category(kerfuffle_clizip_SRCS
IDENTIFIER ARK
CATEGORY_NAME ark.clizip)
# NOTE: the first double-quotes of the first mime and the last
# double-quotes of the last mime must NOT be escaped.
set(SUPPORTED_MIMETYPES
"application/x-java-archive\",
\"application/zip")
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/kerfuffle_clizip.json.cmake
${CMAKE_CURRENT_BINARY_DIR}/kerfuffle_clizip.json)
add_library(kerfuffle_clizip MODULE ${kerfuffle_clizip_SRCS})
target_link_libraries(kerfuffle_clizip kerfuffle )
......
{
"KPlugin": {
"Authors": [
{
"Email": "haraldhv@stud.ntnu.no",
"Name": "Harald Hvaal",
"Name[sr@ijekavian]": "Харалд Вол",
"Name[sr@ijekavianlatin]": "Harald Vol",
"Name[sr@latin]": "Harald Vol",
"Name[sr]": "Харалд Вол",
"Name[x-test]": "xxHarald Hvaalxx"
}
],
"Id": "kerfuffle_clizip",
"License": "GPLv2+",
"MimeTypes": [
"application/x-java-archive",
"application/zip"
],
"Name": "ZIP archive plugin",
"Name[ca@valencia]": "Connector per arxius ZIP",
"Name[ca]": "Connector per arxius ZIP",
"Name[cs]": "Modul pro archiv ZIP",
"Name[de]": "ZIP-Archiv-Modul",
"Name[es]": "Complemento de archivo ZIP",
"Name[fi]": "ZIP-pakkaustuki",
"Name[it]": "Estensione per archivi ZIP",
"Name[nb]": "Programtillegg for ZIP-arkiv",
"Name[nl]": "ZIP-archiefplug-in",
"Name[nn]": "ZIP-arkivtillegg",
"Name[pl]": "Wtyczka archiwów ZIP",
"Name[pt]": "'Plugin' de pacotes ZIP",
"Name[pt_BR]": "Plugin de arquivos ZIP",
"Name[ru]": "Поддержка архивов ZIP",
"Name[sk]": "Modul ZIP archívu",
"Name[sl]": "Vstavek za arhive ZIP",
"Name[sr@ijekavian]": "Прикључак ЗИП архива",
"Name[sr@ijekavianlatin]": "Priključak ZIP arhiva",
"Name[sr@latin]": "Priključak ZIP arhiva",
"Name[sr]": "Прикључак ЗИП архива",
"Name[sv]": "Insticksprogram för ZIP-arkiv",
"Name[uk]": "Додаток для архівів ZIP",
"Name[x-test]": "xxZIP archive pluginxx",
"Name[zh_CN]": "ZIP 归档插件",
"ServiceTypes": [
"Kerfuffle/Plugin"
],
"Version": "0.0.1",
"Website": "http://www.kde.org"
},
"X-KDE-Kerfuffle-APIRevision": 1,
"X-KDE-Kerfuffle-ReadOnlyExecutables": [
"zipinfo",
"unzip"
],
"X-KDE-Kerfuffle-ReadWrite": true,
"X-KDE-Kerfuffle-ReadWriteExecutables": [
"zip"
],
"X-KDE-Priority": 160,
"application/x-java-archive": {
"CompressionLevelDefault": 6,
"CompressionLevelMax": 9,
"CompressionLevelMin": 0,
"SupportsTesting": true,
"Encryption": true
},
"application/zip": {
"CompressionLevelDefault": 6,
"CompressionLevelMax": 9,
"CompressionLevelMin": 0,
"SupportsTesting": true,
"Encryption": true
}
}
{
"KPlugin": {
"Authors": [
{
"Email": "haraldhv@stud.ntnu.no",
"Name": "Harald Hvaal",