Commit df39ac39 authored by Elvis Angelaccio's avatar Elvis Angelaccio
Browse files

Fully switch to JSON metadata for kerfuffle plugins

We don't convert anymore .desktop files to json at build-time.
This also update the metadata to use JSON values instead of always using
string values.

Differential Revision: D1249
parent 81db1101
......@@ -45,7 +45,7 @@ namespace Kerfuffle
bool Archive::comparePlugins(const KPluginMetaData &p1, const KPluginMetaData &p2)
{
return (p1.rawData()[QStringLiteral("X-KDE-Priority")].toVariant().toInt()) > (p2.rawData()[QStringLiteral("X-KDE-Priority")].toVariant().toInt());
return (p1.rawData()[QStringLiteral("X-KDE-Priority")].toInt()) > (p2.rawData()[QStringLiteral("X-KDE-Priority")].toInt());
}
QVector<KPluginMetaData> Archive::findPluginOffers(const QString& filename, const QString& fixedMimeType)
......@@ -105,7 +105,7 @@ Archive *Archive::create(const QString &fileName, const QString &fixedMimeType,
Archive *Archive::create(const QString &fileName, const KPluginMetaData &pluginMetadata, QObject *parent)
{
const bool isReadOnly = !pluginMetadata.rawData()[QStringLiteral("X-KDE-Kerfuffle-ReadWrite")].toVariant().toBool();
const bool isReadOnly = !pluginMetadata.rawData()[QStringLiteral("X-KDE-Kerfuffle-ReadWrite")].toBool();
qCDebug(ARK) << "Loading plugin" << pluginMetadata.pluginId();
KPluginFactory *factory = KPluginLoader(pluginMetadata.fileName()).factory();
......
......@@ -109,7 +109,7 @@ QStringList supportedMimeTypes()
QSet<QString> supported;
foreach (const KPluginMetaData& pluginMetadata, offers) {
const QStringList executables = pluginMetadata.rawData()[QStringLiteral("X-KDE-Kerfuffle-ReadOnlyExecutables")].toString().split(QLatin1Char(';'));
const auto executables = pluginMetadata.rawData()[QStringLiteral("X-KDE-Kerfuffle-ReadOnlyExecutables")].toArray();
if (!findExecutables(executables)) {
qCDebug(ARK) << "Could not find all the read-only executables of" << pluginMetadata.pluginId() << "- ignoring mimetypes:" << pluginMetadata.mimeTypes();
continue;
......@@ -132,13 +132,13 @@ QSet<QString> supportedWriteMimeTypes()
{
const QVector<KPluginMetaData> offers = KPluginLoader::findPlugins(QStringLiteral("kerfuffle"), [](const KPluginMetaData& metaData) {
return metaData.serviceTypes().contains(QStringLiteral("Kerfuffle/Plugin")) &&
metaData.rawData()[QStringLiteral("X-KDE-Kerfuffle-ReadWrite")].toVariant().toBool();
metaData.rawData()[QStringLiteral("X-KDE-Kerfuffle-ReadWrite")].toBool();
});
QSet<QString> supported;
foreach (const KPluginMetaData& pluginMetadata, offers) {
const QStringList executables = pluginMetadata.rawData()[QStringLiteral("X-KDE-Kerfuffle-ReadWriteExecutables")].toString().split(QLatin1Char(';'));
const auto executables = pluginMetadata.rawData()[QStringLiteral("X-KDE-Kerfuffle-ReadWriteExecutables")].toArray();
if (!findExecutables(executables)) {
qCDebug(ARK) << "Could not find all the read-write executables of" << pluginMetadata.pluginId() << "- ignoring mimetypes:" << pluginMetadata.mimeTypes();
continue;
......@@ -166,9 +166,12 @@ QSet<QString> supportedEncryptEntriesMimeTypes()
QSet<QString> supported;
foreach (const KPluginMetaData& pluginMetadata, offers) {
const QStringList mimeTypes = pluginMetadata.rawData()[QStringLiteral("X-KDE-Kerfuffle-EncryptEntries")].toString().split(QLatin1Char(','));
foreach (const QString& mimeType, mimeTypes) {
supported.insert(mimeType);
const auto mimeTypes = pluginMetadata.rawData()[QStringLiteral("X-KDE-Kerfuffle-EncryptEntries")].toArray();
foreach (const auto& mimeType, mimeTypes) {
if (mimeType.toString().isEmpty()) {
continue;
}
supported.insert(mimeType.toString());
}
}
......@@ -186,9 +189,12 @@ QSet<QString> supportedEncryptHeaderMimeTypes()
QSet<QString> supported;
foreach (const KPluginMetaData& pluginMetadata, offers) {
const QStringList mimeTypes = pluginMetadata.rawData()[QStringLiteral("X-KDE-Kerfuffle-EncryptHeader")].toString().split(QLatin1Char(','));
foreach (const QString& mimeType, mimeTypes) {
supported.insert(mimeType);
const auto mimeTypes = pluginMetadata.rawData()[QStringLiteral("X-KDE-Kerfuffle-EncryptHeader")].toArray();
foreach (const auto& mimeType, mimeTypes) {
if (mimeType.toString().isEmpty()) {
continue;
}
supported.insert(mimeType.toString());
}
}
......@@ -216,10 +222,10 @@ QStringList sortByComment(const QSet<QString> &mimeTypeSet)
return mimetypeList;
}
bool findExecutables(const QStringList& executables)
bool findExecutables(const QJsonArray& executables)
{
foreach (const QString& executable, executables) {
foreach (const auto& value, executables) {
const QString executable = value.toString();
if (executable.isEmpty()) {
continue;
}
......
......@@ -28,6 +28,7 @@
#include "kerfuffle_export.h"
#include <QJsonArray>
#include <QMimeType>
#include <QSet>
......@@ -47,7 +48,7 @@ namespace Kerfuffle
/**
* @return Whether all the @p executables are available in the system PATH.
*/
bool findExecutables(const QStringList& executables);
bool findExecutables(const QJsonArray& executables);
} // namespace Kerfuffle
......
......@@ -5,9 +5,9 @@ Here are the steps.
1. First, create a copy of the cliplugin folder
2. Change plugins/CMakeLists.txt to include the new subfolder
3. Rename the kerfuffle_cli.desktop to a unique name, for example
kerfuffle_rar.desktop.
4. Fill in the parts in the desktop marked with TODO
3. Rename the kerfuffle_cli.json to a unique name, for example
kerfuffle_rar.json.
4. Fill in the parts in the json metadata marked with TODO
5. Update the plugins/yourplugin/CMakeLists.txt file, replacing all
instances of kerfuffle_cli with kerfuffle_yourplugin (where yourplugin
must be a unique plugin name)
......@@ -16,6 +16,6 @@ Refer to kerfuffle/cliinterface.h for explanations on the values that
needs to be implemented. The class name does not need to be changed
Then finally, email the plugin to the ark maintainer for a code review before
it is committed to trunk :D
it is committed to master :D
Have fun
########### next target ###############
set(SUPPORTED_CLI7Z_MIMETYPES "application/x-7z-compressed;application/zip;")
set(ENCRYPT_ENTRIES_MIMETYPES "application/x-7z-compressed,application/zip")
set(ENCRYPT_HEADER_MIMETYPES "application/x-7z-compressed")
set(kerfuffle_cli7z_SRCS cliplugin.cpp)
......
......@@ -38,12 +38,20 @@
"Version": "0.0.1",
"Website": "http://www.kde.org"
},
"MimeType": "application/x-7z-compressed;application/zip;",
"X-KDE-Kerfuffle-APIRevision": "1",
"X-KDE-Kerfuffle-EncryptEntries": "application/x-7z-compressed,application/zip",
"X-KDE-Kerfuffle-EncryptHeader": "application/x-7z-compressed",
"X-KDE-Kerfuffle-ReadOnlyExecutables": "7z",
"X-KDE-Kerfuffle-ReadWrite": "true",
"X-KDE-Kerfuffle-ReadWriteExecutables": "7z",
"X-KDE-Priority": "180"
}
\ No newline at end of file
"X-KDE-Kerfuffle-APIRevision": 1,
"X-KDE-Kerfuffle-EncryptEntries": [
"application/x-7z-compressed",
"application/zip"
],
"X-KDE-Kerfuffle-EncryptHeader": [
"application/x-7z-compressed"
],
"X-KDE-Kerfuffle-ReadOnlyExecutables": [
"7z"
],
"X-KDE-Kerfuffle-ReadWrite": true,
"X-KDE-Kerfuffle-ReadWriteExecutables": [
"7z"
],
"X-KDE-Priority": 180
}
......@@ -8,7 +8,5 @@ ecm_qt_declare_logging_category(kerfuffle_cli_SRCS
add_library(kerfuffle_cli ${kerfuffle_cli_SRCS})
target_link_libraries(kerfuffle_cli KF5::KIOCore kerfuffle)
kcoreaddons_desktop_to_json(kerfuffle_cli ${CMAKE_CURRENT_BINARY_DIR}/kerfuffle_clizip.desktop)
install(TARGETS kerfuffle_cli DESTINATION ${KDE_INSTALL_PLUGINDIR}/kerfuffle)
[Desktop Entry]
Type=Service
X-KDE-ServiceTypes=Kerfuffle/Plugin
X-KDE-Library=TODO kerfuffle_cli
X-KDE-PluginInfo-Author=TODO Your name
X-KDE-PluginInfo-Email=TODO Your email
X-KDE-PluginInfo-Name=TODO kerfuffle_cli
X-KDE-PluginInfo-Version=0.0.1
X-KDE-PluginInfo-Website=http://www.kde.org
X-KDE-PluginInfo-License=GPLv2+
X-KDE-Priority=100
X-KDE-Kerfuffle-APIRevision=1
X-KDE-Kerfuffle-ReadWrite=true
Name=TODO archive plugin
Name[ar]=ملحق أرشيف TODO
Name[ast]=Complementu d'archivos TODO
Name[bs]=(URADI) priključak arhiva
Name[ca]=Connector per arxius TODO
Name[ca@valencia]=Connector per arxius TODO
Name[cs]=Modul pro archiv TODO
Name[da]=Plugin til TODO-arkiver
Name[de]=TODO-Archiv-Modul
Name[el]=πρόσθετο αρχειοθήκης προς υλοποίηση
Name[en_GB]=TODO archive plugin
Name[es]=Complemento de archivo comprimido XXX
Name[et]=TODO arhiivi plugin
Name[eu]=TODO artxiboen plugina
Name[fi]=TODO-pakkaustuki
Name[fr]=Module d'archive « À faire »
Name[ga]=Breiseán cartlainne TODO
Name[gl]=Extensión de arquivo TODO
Name[hr]=Arhivni priključak TODO
Name[hu]=TODO modul
Name[ia]=plugin de archivar de Agenda (TODO o de facer)
Name[id]=Pengaya arsip TODO
Name[it]=estensione per archivi TODO
Name[kk]=TODO архив плагині
Name[km]=កម្មវិធី​ជំនួយ​ប័ណ្ណសារ​របស់​ការងារ​ត្រូវ​ធ្វើ
Name[ko]=TODO 압축 플러그인
Name[lt]=PADARYTI archyvų papildinys
Name[lv]=TODO arhīvu spraudnis
Name[mr]=TODO संग्रह प्लगइन
Name[nb]=Programtillegg for gjøremålsarkiv
Name[nds]=TODO-Archievmoduul
Name[nl]=TODO-archiefplug-in
Name[nn]=TODO-arkivtillegg
Name[pl]=Wtyczka archiwów do zrobienia
Name[pt]='Plugin' de pacotes POR FAZER
Name[pt_BR]=Plugin de arquivos A FAZER
Name[ro]=Modul de arhivă TODO
Name[ru]=TODO модуль архивирования
Name[sk]=TODO modul archívu
Name[sl]=Vstavek za arhive NAREDI
Name[sq]=TODO arkiv plugin
Name[sr]=Прикључак TODO архива
Name[sr@ijekavian]=Прикључак TODO архива
Name[sr@ijekavianlatin]=Priključak TODO arhiva
Name[sr@latin]=Priključak TODO arhiva
Name[sv]=Insticksprogram för ATT GÖRA arkiv
Name[th]=ส่วนเสริมการจัดการแฟ้มจัดเก็บแบบ TODO
Name[tr]=TODO arşivi eklentisi
Name[uk]=Ще не створений додаток архівів
Name[x-test]=xxTODO archive pluginxx
Name[zh_CN]=TODO 归档插件
Name[zh_TW]=TODO 歸檔外掛程式
MimeType=TODO;
{
"KPlugin": {
"Authors": [
{
"Email": "TODO Your email",
"Name": "TODO Your name"
}
],
"Id": "TODO kerfuffle_cli",
"License": "GPLv2+",
"MimeTypes": [
"TODO"
],
"Name": "TODO archive plugin",
"Name[ar]": "ملحق أرشيف TODO",
"Name[ast]": "Complementu d'archivos TODO",
"Name[bs]": "(URADI) priključak arhiva",
"Name[ca@valencia]": "Connector per arxius TODO",
"Name[ca]": "Connector per arxius TODO",
"Name[cs]": "Modul pro archiv TODO",
"Name[da]": "Plugin til TODO-arkiver",
"Name[de]": "TODO-Archiv-Modul",
"Name[el]": "πρόσθετο αρχειοθήκης προς υλοποίηση",
"Name[en_GB]": "TODO archive plugin",
"Name[es]": "Complemento de archivo comprimido XXX",
"Name[et]": "TODO arhiivi plugin",
"Name[eu]": "TODO artxiboen plugina",
"Name[fi]": "TODO-pakkaustuki",
"Name[fr]": "Module d'archive « À faire »",
"Name[ga]": "Breiseán cartlainne TODO",
"Name[gl]": "Extensión de arquivo TODO",
"Name[hr]": "Arhivni priključak TODO",
"Name[hu]": "TODO modul",
"Name[ia]": "plugin de archivar de Agenda (TODO o de facer)",
"Name[id]": "Pengaya arsip TODO",
"Name[it]": "estensione per archivi TODO",
"Name[kk]": "TODO архив плагині",
"Name[km]": "កម្មវិធី​ជំនួយ​ប័ណ្ណសារ​របស់​ការងារ​ត្រូវ​ធ្វើ",
"Name[ko]": "TODO 압축 플러그인",
"Name[lt]": "PADARYTI archyvų papildinys",
"Name[lv]": "TODO arhīvu spraudnis",
"Name[mr]": "TODO संग्रह प्लगइन",
"Name[nb]": "Programtillegg for gjøremålsarkiv",
"Name[nds]": "TODO-Archievmoduul",
"Name[nl]": "TODO-archiefplug-in",
"Name[nn]": "TODO-arkivtillegg",
"Name[pl]": "Wtyczka archiwów do zrobienia",
"Name[pt]": "'Plugin' de pacotes POR FAZER",
"Name[pt_BR]": "Plugin de arquivos A FAZER",
"Name[ro]": "Modul de arhivă TODO",
"Name[ru]": "TODO модуль архивирования",
"Name[sk]": "TODO modul archívu",
"Name[sl]": "Vstavek za arhive NAREDI",
"Name[sq]": "TODO arkiv plugin",
"Name[sr@ijekavian]": "Прикључак TODO архива",
"Name[sr@ijekavianlatin]": "Priključak TODO arhiva",
"Name[sr@latin]": "Priključak TODO arhiva",
"Name[sr]": "Прикључак TODO архива",
"Name[sv]": "Insticksprogram för ATT GÖRA arkiv",
"Name[th]": "ส่วนเสริมการจัดการแฟ้มจัดเก็บแบบ TODO",
"Name[tr]": "TODO arşivi eklentisi",
"Name[uk]": "Ще не створений додаток архівів",
"Name[x-test]": "xxTODO archive pluginxx",
"Name[zh_CN]": "TODO 归档插件",
"Name[zh_TW]": "TODO 歸檔外掛程式",
"ServiceTypes": [
"Kerfuffle/Plugin"
],
"Version": "0.0.1",
"Website": "http://www.kde.org"
},
"X-KDE-Kerfuffle-APIRevision": 1,
"X-KDE-Kerfuffle-ReadWrite": true,
"X-KDE-Priority": 100
}
......@@ -48,12 +48,19 @@
"Version": "0.0.1",
"Website": "http://www.kde.org"
},
"MimeType": "application/x-rar;",
"X-KDE-Kerfuffle-APIRevision": "1",
"X-KDE-Kerfuffle-EncryptEntries": "application/x-rar",
"X-KDE-Kerfuffle-EncryptHeader": "application/x-rar",
"X-KDE-Kerfuffle-ReadOnlyExecutables": "unrar",
"X-KDE-Kerfuffle-ReadWrite": "true",
"X-KDE-Kerfuffle-ReadWriteExecutables": "rar",
"X-KDE-Priority": "120"
}
\ No newline at end of file
"X-KDE-Kerfuffle-APIRevision": 1,
"X-KDE-Kerfuffle-EncryptEntries": [
"application/x-rar"
],
"X-KDE-Kerfuffle-EncryptHeader": [
"application/x-rar"
],
"X-KDE-Kerfuffle-ReadOnlyExecutables": [
"unrar"
],
"X-KDE-Kerfuffle-ReadWrite": true,
"X-KDE-Kerfuffle-ReadWriteExecutables": [
"rar"
],
"X-KDE-Priority": 120
}
......@@ -44,9 +44,11 @@
"Version": "0.0.1",
"Website": "http://www.kde.org"
},
"MimeType": "application/x-rar;",
"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
"X-KDE-Kerfuffle-APIRevision": 1,
"X-KDE-Kerfuffle-ReadOnlyExecutables": [
"lsar",
"unar"
],
"X-KDE-Kerfuffle-ReadWrite": false,
"X-KDE-Priority": 100
}
########### next target ###############
set(SUPPORTED_CLIZIP_MIMETYPES "application/x-java-archive;application/zip;")
set(ENCRYPT_ENTRIES_MIMETYPES "application/x-java-archive,application/zip")
set(kerfuffle_clizip_SRCS cliplugin.cpp)
......@@ -14,15 +13,6 @@ add_library(kerfuffle_clizip MODULE ${kerfuffle_clizip_SRCS})
target_link_libraries(kerfuffle_clizip kerfuffle )
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/kerfuffle_clizip.desktop.cmake
${CMAKE_CURRENT_BINARY_DIR}/kerfuffle_clizip.desktop
)
kcoreaddons_desktop_to_json(kerfuffle_clizip ${CMAKE_CURRENT_BINARY_DIR}/kerfuffle_clizip.desktop DEFAULT_SERVICE_TYPE)
########### install files ###############
install(TARGETS kerfuffle_clizip DESTINATION ${KDE_INSTALL_PLUGINDIR}/kerfuffle)
set(SUPPORTED_ARK_MIMETYPES "${SUPPORTED_ARK_MIMETYPES}${SUPPORTED_CLIZIP_MIMETYPES}" PARENT_SCOPE)
[Desktop Entry]
Type=Service
X-KDE-ServiceTypes=Kerfuffle/Plugin
X-KDE-Library=kerfuffle_clizip
X-KDE-PluginInfo-Author=Harald Hvaal
X-KDE-PluginInfo-Email=haraldhv@stud.ntnu.no
X-KDE-PluginInfo-Name=kerfuffle_clizip
X-KDE-PluginInfo-Version=0.0.1
X-KDE-PluginInfo-Website=http://www.kde.org
X-KDE-PluginInfo-License=GPLv2+
X-KDE-Priority=160
X-KDE-Kerfuffle-APIRevision=1
X-KDE-Kerfuffle-ReadWrite=true
X-KDE-Kerfuffle-EncryptEntries=@ENCRYPT_ENTRIES_MIMETYPES@
X-KDE-Kerfuffle-ReadOnlyExecutables=zipinfo;unzip;
X-KDE-Kerfuffle-ReadWriteExecutables=zip
Name=ZIP archive plugin
Name[ar]=ملحق أرشيف ZIP
Name[ast]=Complementu d'archivos ZIP
Name[bg]=Приставка за архиви ZIP
Name[bs]=Priključak ZIP arhiva
Name[ca]=Connector per arxius ZIP
Name[ca@valencia]=Connector per arxius ZIP
Name[cs]=Modul pro archiv ZIP
Name[da]=Plugin til ZIP-arkiver
Name[de]=ZIP-Archiv-Modul
Name[el]=Πρόσθετο αρχειοθήκης ZIP
Name[en_GB]=ZIP archive plugin
Name[es]=Complemento de archivo comprimido ZIP
Name[et]=ZIP-arhiivi plugin
Name[eu]=ZIP artxiboen plugina
Name[fi]=Zip-pakkaustuki
Name[fr]=Module externe d'archive « ZIP »
Name[ga]=Breiseán cartlainne ZIP
Name[gl]=Extensión de arquivo ZIP
Name[hr]=Arhivni priključak ZIP
Name[hu]=ZIP modul
Name[ia]=Plugin de archivar zip
Name[id]=Pengaya arsip ZIP
Name[it]=estensione per archivi ZIP
Name[ja]=ZIP アーカイブ用プラグイン
Name[kk]=ZIP архив плагині
Name[km]=កម្មវិធី​ជំនួយ​ប័ណ្ណសារ ZIP
Name[ko]=ZIP 압축 플러그인
Name[lt]=ZIP archyvo papildinys
Name[lv]=ZIP arhīvu spraudnis
Name[mr]=ZIP संग्रह प्लगइन
Name[nb]=Programtillegg for ZIP-arkiv
Name[nds]=Zip-Archievmoduul
Name[nl]=ZIP-archiefplug-in
Name[nn]=ZIP-arkivtillegg
Name[pa]=ਜ਼ਿੱਪ ਅਕਾਇਵ ਪਲੱਗਇਨ
Name[pl]=Wtyczka archiwów ZIP
Name[pt]='Plugin' de pacotes ZIP
Name[pt_BR]=Plugin de arquivos ZIP
Name[ro]=Modul de arhivă ZIP
Name[ru]=Поддержка архивов ZIP
Name[sk]=Modul ZIP archívu
Name[sl]=Vstavek za arhive ZIP
Name[sq]=ZIP arkiv plugin
Name[sr]=Прикључак ЗИП архива
Name[sr@ijekavian]=Прикључак ЗИП архива
Name[sr@ijekavianlatin]=Priključak ZIP arhiva
Name[sr@latin]=Priključak ZIP arhiva
Name[sv]=Insticksprogram för ZIP-arkiv
Name[th]=ส่วนเสริมการจัดการแฟ้มจัดเก็บบีบอัดแบบ ZIP
Name[tr]=ZIP arşivi eklentisi
Name[uk]=Додаток для архівів ZIP
Name[x-test]=xxZIP archive pluginxx
Name[zh_CN]=ZIP 归档插件
Name[zh_TW]=ZIP 壓縮檔外掛程式
MimeType=@SUPPORTED_CLIZIP_MIMETYPES@
{
"KPlugin": {
"Authors": [
{
"Email": "haraldhv@stud.ntnu.no",
"Name": "Harald Hvaal"
}
],
"Id": "kerfuffle_clizip",
"License": "GPLv2+",
"MimeTypes": [
"application/x-java-archive",
"application/zip"
],
"Name": "ZIP archive plugin",
"Name[ar]": "ملحق أرشيف ZIP",
"Name[ast]": "Complementu d'archivos ZIP",
"Name[bg]": "Приставка за архиви ZIP",
"Name[bs]": "Priključak ZIP arhiva",
"Name[ca@valencia]": "Connector per arxius ZIP",
"Name[ca]": "Connector per arxius ZIP",
"Name[cs]": "Modul pro archiv ZIP",
"Name[da]": "Plugin til ZIP-arkiver",
"Name[de]": "ZIP-Archiv-Modul",
"Name[el]": "Πρόσθετο αρχειοθήκης ZIP",
"Name[en_GB]": "ZIP archive plugin",
"Name[es]": "Complemento de archivo comprimido ZIP",
"Name[et]": "ZIP-arhiivi plugin",
"Name[eu]": "ZIP artxiboen plugina",
"Name[fi]": "Zip-pakkaustuki",
"Name[fr]": "Module externe d'archive « ZIP »",
"Name[ga]": "Breiseán cartlainne ZIP",
"Name[gl]": "Extensión de arquivo ZIP",
"Name[hr]": "Arhivni priključak ZIP",
"Name[hu]": "ZIP modul",
"Name[ia]": "Plugin de archivar zip",
"Name[id]": "Pengaya arsip ZIP",
"Name[it]": "estensione per archivi ZIP",
"Name[ja]": "ZIP アーカイブ用プラグイン",
"Name[kk]": "ZIP архив плагині",
"Name[km]": "កម្មវិធី​ជំនួយ​ប័ណ្ណសារ ZIP",
"Name[ko]": "ZIP 압축 플러그인",
"Name[lt]": "ZIP archyvo papildinys",
"Name[lv]": "ZIP arhīvu spraudnis",
"Name[mr]": "ZIP संग्रह प्लगइन",
"Name[nb]": "Programtillegg for ZIP-arkiv",
"Name[nds]": "Zip-Archievmoduul",
"Name[nl]": "ZIP-archiefplug-in",
"Name[nn]": "ZIP-arkivtillegg",
"Name[pa]": "ਜ਼ਿੱਪ ਅਕਾਇਵ ਪਲੱਗਇਨ",
"Name[pl]": "Wtyczka archiwów ZIP",
"Name[pt]": "'Plugin' de pacotes ZIP",
"Name[pt_BR]": "Plugin de arquivos ZIP",
"Name[ro]": "Modul de arhivă ZIP",
"Name[ru]": "Поддержка архивов ZIP",
"Name[sk]": "Modul ZIP archívu",
"Name[sl]": "Vstavek za arhive ZIP",
"Name[sq]": "ZIP arkiv plugin",
"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[th]": "ส่วนเสริมการจัดการแฟ้มจัดเก็บบีบอัดแบบ ZIP",
"Name[tr]": "ZIP arşivi eklentisi",
"Name[uk]": "Додаток для архівів ZIP",
"Name[x-test]": "xxZIP archive pluginxx",
"Name[zh_CN]": "ZIP 归档插件",
"Name[zh_TW]": "ZIP 壓縮檔外掛程式",
"ServiceTypes": [
"Kerfuffle/Plugin"
],
"Version": "0.0.1",
"Website": "http://www.kde.org"
},
"X-KDE-Kerfuffle-APIRevision": 1,
"X-KDE-Kerfuffle-EncryptEntries": [
"application/x-java-archive",
"application/zip"
],
"X-KDE-Kerfuffle-ReadOnlyExecutables": [
"zipinfo",
"unzip"
],
"X-KDE-Kerfuffle-ReadWrite": true,
"X-KDE-Kerfuffle-ReadWriteExecutables": [
"zip"
],
"X-KDE-Priority": 160
}
......@@ -6,16 +6,6 @@ set(SUPPORTED_LIBARCHIVE_READWRITE_MIMETYPES "${SUPPORTED_LIBARCHIVE_READWRITE_M
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_READONLY_MIMETYPES "${SUPPORTED_LIBARCHIVE_READONLY_MIMETYPES}application/x-rpm;application/x-source-rpm;application/vnd.ms-cab-compressed;")
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_readonly_SRCS libarchiveplugin.cpp readonlylibarchiveplugin.cpp ark_debug.cpp)
set(kerfuffle_libarchive_readwrite_SRCS libarchiveplugin.cpp readwritelibarchiveplugin.cpp ark_debug.cpp)
set(kerfuffle_libarchive_SRCS ${kerfuffle_libarchive_readonly_SRCS} readwritelibarchiveplugin.cpp)
......@@ -31,9 +21,6 @@ add_library(kerfuffle_libarchive MODULE ${kerfuffle_libarchive_readwrite_SRCS})
target_link_libraries(kerfuffle_libarchive_readonly KF5::KIOCore ${LibArchive_LIBRARIES} kerfuffle)
target_link_libraries(kerfuffle_libarchive KF5::KIOCore ${LibArchive_LIBRARIES} kerfuffle)
kcoreaddons_desktop_to_json(kerfuffle_libarchive_readonly ${CMAKE_CURRENT_BINARY_DIR}/kerfuffle_libarchive_readonly.desktop DEFAULT_SERVICE_TYPE)
kcoreaddons_desktop_to_json(kerfuffle_libarchive ${CMAKE_CURRENT_BINARY_DIR}/kerfuffle_libarchive.desktop DEFAULT_SERVICE_TYPE)
install(TARGETS kerfuffle_libarchive_readonly DESTINATION ${KDE_INSTALL_PLUGINDIR}/kerfuffle)
install(TARGETS kerfuffle_libarchive DESTINATION ${KDE_INSTALL_PLUGINDIR}/kerfuffle)
......
[Desktop Entry]
Type=Service
X-KDE-ServiceTypes=Kerfuffle/Plugin
X-KDE-Library=kerfuffle_libarchive
X-KDE-PluginInfo-Author=Henrique Pinto
X-KDE-PluginInfo-Email=henrique.pinto@kdemail.net
X-KDE-PluginInfo-Name=kerfuffle_libarchive
X-KDE-PluginInfo-Version=0.0.1
X-KDE-PluginInfo-Website=http://www.kde.org
X-KDE-PluginInfo-License=BSD
X-KDE-Priority=100
X-KDE-Kerfuffle-APIRevision=1
X-KDE-Kerfuffle-ReadWrite=true
Name=kerfuffle_libarchive
Name[ar]=kerfuffle_libarchive
Name[ast]=kerfuffle_libarchive
Name[bg]=kerfuffle_libarchive
Name[bs]=kerfuffle_libarchive