diff --git a/kerfuffle/archive_kerfuffle.cpp b/kerfuffle/archive_kerfuffle.cpp index 0e51afd9..a83f0c9a 100644 --- a/kerfuffle/archive_kerfuffle.cpp +++ b/kerfuffle/archive_kerfuffle.cpp @@ -1,426 +1,426 @@ /* * Copyright (c) 2007 Henrique Pinto * Copyright (c) 2008 Harald Hvaal * Copyright (c) 2009-2011 Raphael Kubo da Costa * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ( INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION ) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * ( INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "archive_kerfuffle.h" #include "ark_debug.h" #include "archiveinterface.h" #include "jobs.h" #include "mimetypes.h" #include #include #include #include #include #include #include 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 Archive::findPluginOffers(const QString& filename, const QString& fixedMimeType) { qCDebug(ARK) << "Find plugin offers for" << filename << "with mime" << fixedMimeType; const QString mimeType = fixedMimeType.isEmpty() ? determineMimeType(filename).name() : fixedMimeType; qCDebug(ARK) << "Detected mime" << mimeType; QVector offers = KPluginLoader::findPlugins(QStringLiteral("kerfuffle"), [mimeType](const KPluginMetaData& metaData) { return metaData.serviceTypes().contains(QStringLiteral("Kerfuffle/Plugin")) && metaData.mimeTypes().contains(mimeType); }); qSort(offers.begin(), offers.end(), comparePlugins); qCDebug(ARK) << "Have" << offers.size() << "offers"; return offers; } QDebug operator<<(QDebug d, const fileRootNodePair &pair) { d.nospace() << "fileRootNodePair(" << pair.file << "," << pair.rootNode << ")"; return d.space(); } Archive *Archive::create(const QString &fileName, QObject *parent) { return create(fileName, QString(), parent); } Archive *Archive::create(const QString &fileName, const QString &fixedMimeType, QObject *parent) { qCDebug(ARK) << "Going to create archive" << fileName; qRegisterMetaType("ArchiveEntry"); const QVector offers = findPluginOffers(fileName, fixedMimeType); if (offers.isEmpty()) { qCCritical(ARK) << "Could not find a plugin to handle" << fileName; return new Archive(NoPlugin, parent); } Archive *archive; foreach (const KPluginMetaData& pluginMetadata, offers) { archive = create(fileName, pluginMetadata, parent); // Use the first valid plugin, according to the priority sorting. if (archive->isValid()) { return archive; } } qCCritical(ARK) << "Failed to find a usable plugin for" << fileName; return archive; } 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(); if (!factory) { qCWarning(ARK) << "Invalid plugin factory for" << pluginMetadata.pluginId(); return new Archive(FailedPlugin, parent); } const QVariantList args = {QVariant(QFileInfo(fileName).absoluteFilePath())}; ReadOnlyArchiveInterface *iface = factory->create(Q_NULLPTR, args); if (!iface) { qCWarning(ARK) << "Could not create plugin instance" << pluginMetadata.pluginId(); return new Archive(FailedPlugin, parent); } // Not CliBased plugin, don't search for executables. if (!iface->isCliBased()) { return new Archive(iface, isReadOnly, parent); } qCDebug(ARK) << "Finding executables for plugin" << pluginMetadata.pluginId(); if (iface->findExecutables(!isReadOnly)) { return new Archive(iface, isReadOnly, parent); } if (!isReadOnly && iface->findExecutables(false)) { qCWarning(ARK) << "Failed to find read-write executables: falling back to read-only mode for read-write plugin" << pluginMetadata.pluginId(); return new Archive(iface, true, parent); } qCWarning(ARK) << "Failed to find needed executables for plugin" << pluginMetadata.pluginId(); return new Archive(FailedPlugin, parent); } Archive::Archive(ArchiveError errorCode, QObject *parent) : QObject(parent) , m_iface(Q_NULLPTR) , m_error(errorCode) { qCDebug(ARK) << "Created archive instance with error"; } Archive::Archive(ReadOnlyArchiveInterface *archiveInterface, bool isReadOnly, QObject *parent) : QObject(parent) , m_iface(archiveInterface) , m_hasBeenListed(false) , m_isReadOnly(isReadOnly) , m_isSingleFolderArchive(false) , m_extractedFilesSize(0) , m_error(NoError) , m_encryptionType(Unencrypted) , m_numberOfFiles(0) { qCDebug(ARK) << "Created archive instance"; Q_ASSERT(archiveInterface); archiveInterface->setParent(this); QMetaType::registerComparators(); QMetaType::registerDebugStreamOperator(); connect(m_iface, &ReadOnlyArchiveInterface::entry, this, &Archive::onNewEntry); } Archive::~Archive() { } QString Archive::completeBaseName() const { QString base = QFileInfo(fileName()).completeBaseName(); // Special case for compressed tar archives. if (base.right(4).toUpper() == QLatin1String(".TAR")) { base.chop(4); } return base; } QString Archive::fileName() const { return isValid() ? m_iface->filename() : QString(); } QString Archive::comment() const { return isValid() ? m_iface->comment() : QString(); } QMimeType Archive::mimeType() const { return isValid() ? determineMimeType(fileName()) : QMimeType(); } bool Archive::isReadOnly() const { return isValid() ? (m_iface->isReadOnly() || m_isReadOnly) : false; } bool Archive::isSingleFolderArchive() { if (!isValid()) { return false; } listIfNotListed(); return m_isSingleFolderArchive; } bool Archive::hasComment() const { return isValid() ? !comment().isEmpty() : false; } Archive::EncryptionType Archive::encryptionType() { if (!isValid()) { return Unencrypted; } listIfNotListed(); return m_encryptionType; } qulonglong Archive::numberOfFiles() { if (!isValid()) { return 0; } listIfNotListed(); return m_numberOfFiles; } qulonglong Archive::unpackedSize() { if (!isValid()) { return 0; } listIfNotListed(); return m_extractedFilesSize; } qulonglong Archive::packedSize() const { return isValid() ? QFileInfo(fileName()).size() : 0; } QString Archive::subfolderName() { if (!isValid()) { return QString(); } listIfNotListed(); return m_subfolderName; } void Archive::onNewEntry(const ArchiveEntry &entry) { if (!entry[IsDirectory].toBool()) { m_numberOfFiles++; } } bool Archive::isValid() const { return m_iface && (m_error == NoError); } ArchiveError Archive::error() const { return m_error; } KJob* Archive::open() { return 0; } KJob* Archive::create() { return 0; } ListJob* Archive::list() { if (!isValid() || !QFileInfo::exists(fileName())) { return Q_NULLPTR; } qCDebug(ARK) << "Going to list files"; ListJob *job = new ListJob(m_iface, this); job->setAutoDelete(false); //if this job has not been listed before, we grab the opportunity to //collect some information about the archive if (!m_hasBeenListed) { connect(job, &ListJob::result, this, &Archive::onListFinished); } return job; } DeleteJob* Archive::deleteFiles(const QList & files) { if (!isValid()) { return Q_NULLPTR; } qCDebug(ARK) << "Going to delete files" << files; if (m_iface->isReadOnly()) { return 0; } DeleteJob *newJob = new DeleteJob(files, static_cast(m_iface), this); return newJob; } AddJob* Archive::addFiles(const QStringList & files, const CompressionOptions& options) { if (!isValid()) { return Q_NULLPTR; } qCDebug(ARK) << "Going to add files" << files << "with options" << options; Q_ASSERT(!m_iface->isReadOnly()); AddJob *newJob = new AddJob(files, options, static_cast(m_iface), this); connect(newJob, &AddJob::result, this, &Archive::onAddFinished); return newJob; } ExtractJob* Archive::copyFiles(const QList& files, const QString& destinationDir, const ExtractionOptions& options) { if (!isValid()) { return Q_NULLPTR; } ExtractionOptions newOptions = options; if (encryptionType() != Unencrypted) { newOptions[QStringLiteral( "PasswordProtectedHint" )] = true; } ExtractJob *newJob = new ExtractJob(files, destinationDir, newOptions, m_iface, this); return newJob; } void Archive::encrypt(const QString &password, bool encryptHeader) { if (!isValid()) { return; } m_iface->setPassword(password); m_iface->setHeaderEncryptionEnabled(encryptHeader); m_encryptionType = encryptHeader ? HeaderEncrypted : Encrypted; } void Archive::onAddFinished(KJob* job) { //if the archive was previously a single folder archive and an add job //has successfully finished, then it is no longer a single folder //archive (for the current implementation, which does not allow adding //folders/files other places than the root. //TODO: handle the case of creating a new file and singlefolderarchive //then. if (m_isSingleFolderArchive && !job->error()) { m_isSingleFolderArchive = false; } } void Archive::onListFinished(KJob* job) { ListJob *ljob = qobject_cast(job); m_extractedFilesSize = ljob->extractedFilesSize(); m_isSingleFolderArchive = ljob->isSingleFolderArchive(); m_subfolderName = ljob->subfolderName(); if (m_subfolderName.isEmpty()) { m_subfolderName = completeBaseName(); } if (ljob->isPasswordProtected()) { // If we already know the password, it means that the archive is header-encrypted. m_encryptionType = m_iface->password().isEmpty() ? Encrypted : HeaderEncrypted; } m_hasBeenListed = true; } void Archive::listIfNotListed() { if (!m_hasBeenListed) { ListJob *job = list(); if (!job) { return; } connect(job, &ListJob::userQuery, this, &Archive::onUserQuery); QEventLoop loop(this); connect(job, &KJob::result, &loop, &QEventLoop::quit); job->start(); loop.exec(); // krazy:exclude=crashy } } void Archive::onUserQuery(Query* query) { query->execute(); } } // namespace Kerfuffle diff --git a/kerfuffle/mimetypes.cpp b/kerfuffle/mimetypes.cpp index 0a599af2..76b736a6 100644 --- a/kerfuffle/mimetypes.cpp +++ b/kerfuffle/mimetypes.cpp @@ -1,236 +1,242 @@ /* * Copyright (c) 2016 Ragnar Thomsen * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ( INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION ) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * ( INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "mimetypes.h" #include "ark_debug.h" #include #include #include #include #include #include namespace Kerfuffle { QMimeType determineMimeType(const QString& filename) { QMimeDatabase db; QFileInfo fileinfo(filename); QString inputFile = filename; // #328815: since detection-by-content does not work for compressed tar archives (see below why) // we cannot rely on it when the archive extension is wrong; we need to validate by hand. if (fileinfo.completeSuffix().toLower().remove(QRegularExpression(QStringLiteral("[^a-z\\.]"))).contains(QStringLiteral("tar."))) { inputFile.chop(fileinfo.completeSuffix().length()); inputFile += fileinfo.completeSuffix().remove(QRegularExpression(QStringLiteral("[^a-zA-Z\\.]"))); qCDebug(ARK) << "Validated filename of compressed tar" << filename << "into filename" << inputFile; } QMimeType mimeFromExtension = db.mimeTypeForFile(inputFile, QMimeDatabase::MatchExtension); QMimeType mimeFromContent = db.mimeTypeForFile(filename, QMimeDatabase::MatchContent); // mimeFromContent will be "application/octet-stream" when file is // unreadable, so use extension. if (!fileinfo.isReadable()) { return mimeFromExtension; } // Compressed tar-archives are detected as single compressed files when // detecting by content. The following code fixes detection of tar.gz, tar.bz2, tar.xz, // tar.lzo and tar.lrz. if ((mimeFromExtension == db.mimeTypeForName(QStringLiteral("application/x-compressed-tar")) && mimeFromContent == db.mimeTypeForName(QStringLiteral("application/gzip"))) || (mimeFromExtension == db.mimeTypeForName(QStringLiteral("application/x-bzip-compressed-tar")) && mimeFromContent == db.mimeTypeForName(QStringLiteral("application/x-bzip"))) || (mimeFromExtension == db.mimeTypeForName(QStringLiteral("application/x-xz-compressed-tar")) && mimeFromContent == db.mimeTypeForName(QStringLiteral("application/x-xz"))) || (mimeFromExtension == db.mimeTypeForName(QStringLiteral("application/x-tarz")) && mimeFromContent == db.mimeTypeForName(QStringLiteral("application/x-compress"))) || (mimeFromExtension == db.mimeTypeForName(QStringLiteral("application/x-tzo")) && mimeFromContent == db.mimeTypeForName(QStringLiteral("application/x-lzop"))) || (mimeFromExtension == db.mimeTypeForName(QStringLiteral("application/x-lrzip-compressed-tar")) && mimeFromContent == db.mimeTypeForName(QStringLiteral("application/x-lrzip")))) { return mimeFromExtension; } if (mimeFromExtension != mimeFromContent) { if (mimeFromContent.isDefault()) { qCWarning(ARK) << "Could not detect mimetype from content." << "Using extension-based mimetype:" << mimeFromExtension.name(); return mimeFromExtension; } // #354344: ISO files are currently wrongly detected-by-content. if (mimeFromExtension.inherits(QStringLiteral("application/x-cd-image"))) { return mimeFromExtension; } qCWarning(ARK) << "Mimetype for filename extension (" << mimeFromExtension.name() << ") did not match mimetype for content (" << mimeFromContent.name() << "). Using content-based mimetype."; } return mimeFromContent; } QStringList supportedMimeTypes() { const QVector offers = KPluginLoader::findPlugins(QStringLiteral("kerfuffle"), [](const KPluginMetaData& metaData) { return metaData.serviceTypes().contains(QStringLiteral("Kerfuffle/Plugin")); }); QSet 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; } supported += pluginMetadata.mimeTypes().toSet(); } // Remove entry for lrzipped tar if lrzip executable not found in path. if (QStandardPaths::findExecutable(QStringLiteral("lrzip")).isEmpty()) { supported.remove(QStringLiteral("application/x-lrzip-compressed-tar")); } qCDebug(ARK) << "Returning supported mimetypes" << supported; return sortByComment(supported); } QSet supportedWriteMimeTypes() { const QVector 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 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; } supported += pluginMetadata.mimeTypes().toSet(); } // Remove entry for lrzipped tar if lrzip executable not found in path. if (QStandardPaths::findExecutable(QStringLiteral("lrzip")).isEmpty()) { supported.remove(QStringLiteral("application/x-lrzip-compressed-tar")); } qCDebug(ARK) << "Returning supported write mimetypes" << supported; return supported; } QSet supportedEncryptEntriesMimeTypes() { const QVector offers = KPluginLoader::findPlugins(QStringLiteral("kerfuffle"), [](const KPluginMetaData& metaData) { return metaData.serviceTypes().contains(QStringLiteral("Kerfuffle/Plugin")); }); QSet 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()); } } qCDebug(ARK) << "Entry encryption supported for mimetypes" << supported; return supported; } QSet supportedEncryptHeaderMimeTypes() { const QVector offers = KPluginLoader::findPlugins(QStringLiteral("kerfuffle"), [](const KPluginMetaData& metaData) { return metaData.serviceTypes().contains(QStringLiteral("Kerfuffle/Plugin")); }); QSet 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()); } } qCDebug(ARK) << "Header encryption supported for mimetypes" << supported; return supported; } QStringList sortByComment(const QSet &mimeTypeSet) { QMap map; // Convert QStringList to QMap to sort by comment. foreach (const QString &mimeType, mimeTypeSet) { QMimeType mime(QMimeDatabase().mimeTypeForName(mimeType)); map[mime.comment().toLower()] = mime.name(); } // Convert back to QStringList. QStringList mimetypeList; foreach (const QString &value, map) { mimetypeList.append(value); } 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; } if (QStandardPaths::findExecutable(executable).isEmpty()) { qCDebug(ARK) << "Could not find executable" << executable; return false; } } return true; } } // namespace Kerfuffle diff --git a/kerfuffle/mimetypes.h b/kerfuffle/mimetypes.h index 4c530e6e..f4342a19 100644 --- a/kerfuffle/mimetypes.h +++ b/kerfuffle/mimetypes.h @@ -1,54 +1,55 @@ /* * Copyright (c) 2016 Ragnar Thomsen * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ( INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION ) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * ( INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef MIMETYPES_H #define MIMETYPES_H #include "kerfuffle_export.h" +#include #include #include namespace Kerfuffle { KERFUFFLE_EXPORT QMimeType determineMimeType(const QString& filename); KERFUFFLE_EXPORT QStringList supportedMimeTypes(); KERFUFFLE_EXPORT QSet supportedWriteMimeTypes(); KERFUFFLE_EXPORT QSet supportedEncryptEntriesMimeTypes(); KERFUFFLE_EXPORT QSet supportedEncryptHeaderMimeTypes(); /** * @return A list with the supported read-only mimetypes, alphabetically sorted according to their comment. */ QStringList sortByComment(const QSet &mimeTypeSet); /** * @return Whether all the @p executables are available in the system PATH. */ - bool findExecutables(const QStringList& executables); + bool findExecutables(const QJsonArray& executables); } // namespace Kerfuffle #endif // MIMETYPES_H diff --git a/plugins/CLI-README b/plugins/CLI-README index 0c21d49e..747ce146 100644 --- a/plugins/CLI-README +++ b/plugins/CLI-README @@ -1,21 +1,21 @@ In this folder is a general template of what one needs to implement support for a plugin using the cli interface in ark. 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) 6. Implement/modify cliplugin.cpp to fit your archive type. 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 diff --git a/plugins/cli7zplugin/CMakeLists.txt b/plugins/cli7zplugin/CMakeLists.txt index 29fa035b..f707d8c3 100644 --- a/plugins/cli7zplugin/CMakeLists.txt +++ b/plugins/cli7zplugin/CMakeLists.txt @@ -1,22 +1,20 @@ ########### 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) ecm_qt_declare_logging_category(kerfuffle_cli7z_SRCS HEADER ark_debug.h IDENTIFIER ARK CATEGORY_NAME ark.cli7z) add_library(kerfuffle_cli7z MODULE ${kerfuffle_cli7z_SRCS}) target_link_libraries(kerfuffle_cli7z kerfuffle) ########### install files ############### install(TARGETS kerfuffle_cli7z DESTINATION ${KDE_INSTALL_PLUGINDIR}/kerfuffle) set(SUPPORTED_ARK_MIMETYPES "${SUPPORTED_ARK_MIMETYPES}${SUPPORTED_CLI7Z_MIMETYPES}" PARENT_SCOPE) diff --git a/plugins/cli7zplugin/kerfuffle_cli7z.json b/plugins/cli7zplugin/kerfuffle_cli7z.json index cd1e3cc2..99c31175 100644 --- a/plugins/cli7zplugin/kerfuffle_cli7z.json +++ b/plugins/cli7zplugin/kerfuffle_cli7z.json @@ -1,49 +1,57 @@ { "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]": "Connector per arxius 7zip", "Name[de]": "7zip-Archiv-Modul", "Name[es]": "Complemento de archivo 7zip", "Name[nb]": "Programtillegg for 7zip-arkiv", "Name[nl]": "7zip-archiefplug-in", "Name[nn]": "7zip-arkivtillegg", "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[sv]": "Insticksprogram för 7zip-arkiv", "Name[uk]": "Додаток для архівів 7zip", "Name[x-test]": "xx7zip archive pluginxx", "ServiceTypes": [ "Kerfuffle/Plugin" ], "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 +} diff --git a/plugins/cliplugin-example/CMakeLists.txt b/plugins/cliplugin-example/CMakeLists.txt index f418295e..0175ddf3 100644 --- a/plugins/cliplugin-example/CMakeLists.txt +++ b/plugins/cliplugin-example/CMakeLists.txt @@ -1,14 +1,12 @@ set(kerfuffle_cli_SRCS cliplugin.cpp) ecm_qt_declare_logging_category(kerfuffle_cli_SRCS HEADER ark_debug.h IDENTIFIER ARK CATEGORY_NAME ark.cliexample) 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) diff --git a/plugins/cliplugin-example/kerfuffle_cli.desktop b/plugins/cliplugin-example/kerfuffle_cli.desktop deleted file mode 100644 index bc686bdf..00000000 --- a/plugins/cliplugin-example/kerfuffle_cli.desktop +++ /dev/null @@ -1,66 +0,0 @@ -[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; diff --git a/plugins/cliplugin-example/kerfuffle_cli.json b/plugins/cliplugin-example/kerfuffle_cli.json new file mode 100644 index 00000000..90561a3a --- /dev/null +++ b/plugins/cliplugin-example/kerfuffle_cli.json @@ -0,0 +1,75 @@ +{ + "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 +} diff --git a/plugins/clirarplugin/kerfuffle_clirar.json b/plugins/clirarplugin/kerfuffle_clirar.json index 9bd5bc27..bb5477af 100644 --- a/plugins/clirarplugin/kerfuffle_clirar.json +++ b/plugins/clirarplugin/kerfuffle_clirar.json @@ -1,59 +1,66 @@ { "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[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 归档插件", "ServiceTypes": [ "Kerfuffle/Plugin" ], "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 +} diff --git a/plugins/cliunarchiverplugin/kerfuffle_cliunarchiver.json b/plugins/cliunarchiverplugin/kerfuffle_cliunarchiver.json index 4bcfe7ca..2f432de5 100644 --- a/plugins/cliunarchiverplugin/kerfuffle_cliunarchiver.json +++ b/plugins/cliunarchiverplugin/kerfuffle_cliunarchiver.json @@ -1,52 +1,54 @@ { "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 del Unarchiver", "Name[ca]": "Connector de l'Unarchiver", "Name[cs]": "Modul pro Unarchiver", "Name[de]": "Unarchiver-Modul", "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 插件", "ServiceTypes": [ "Kerfuffle/Plugin" ], "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 +} diff --git a/plugins/clizipplugin/CMakeLists.txt b/plugins/clizipplugin/CMakeLists.txt index eaf3c804..a73e4faf 100644 --- a/plugins/clizipplugin/CMakeLists.txt +++ b/plugins/clizipplugin/CMakeLists.txt @@ -1,28 +1,18 @@ ########### 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) ecm_qt_declare_logging_category(kerfuffle_clizip_SRCS HEADER ark_debug.h IDENTIFIER ARK CATEGORY_NAME ark.clizip) 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) diff --git a/plugins/clizipplugin/kerfuffle_clizip.desktop.cmake b/plugins/clizipplugin/kerfuffle_clizip.desktop.cmake deleted file mode 100644 index 9f42f0f6..00000000 --- a/plugins/clizipplugin/kerfuffle_clizip.desktop.cmake +++ /dev/null @@ -1,72 +0,0 @@ -[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@ diff --git a/plugins/clizipplugin/kerfuffle_clizip.json b/plugins/clizipplugin/kerfuffle_clizip.json new file mode 100644 index 00000000..e805a79f --- /dev/null +++ b/plugins/clizipplugin/kerfuffle_clizip.json @@ -0,0 +1,90 @@ +{ + "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 +} diff --git a/plugins/libarchive/CMakeLists.txt b/plugins/libarchive/CMakeLists.txt index be3181dd..4f7c66f5 100644 --- a/plugins/libarchive/CMakeLists.txt +++ b/plugins/libarchive/CMakeLists.txt @@ -1,40 +1,27 @@ include_directories(${LibArchive_INCLUDE_DIRS}) ########### next target ############### set(SUPPORTED_LIBARCHIVE_READWRITE_MIMETYPES "application/x-tar;application/x-compressed-tar;application/x-bzip-compressed-tar;application/x-tarz;application/x-xz-compressed-tar;") set(SUPPORTED_LIBARCHIVE_READWRITE_MIMETYPES "${SUPPORTED_LIBARCHIVE_READWRITE_MIMETYPES}application/x-lzma-compressed-tar;application/x-lzip;application/x-tzo;application/x-lrzip-compressed-tar;") 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) ecm_qt_declare_logging_category(kerfuffle_libarchive_SRCS HEADER ark_debug.h IDENTIFIER ARK CATEGORY_NAME ark.libarchive) add_library(kerfuffle_libarchive_readonly MODULE ${kerfuffle_libarchive_readonly_SRCS}) 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) set(SUPPORTED_ARK_MIMETYPES "${SUPPORTED_ARK_MIMETYPES}${SUPPORTED_LIBARCHIVE_READWRITE_MIMETYPES}${SUPPORTED_LIBARCHIVE_READONLY_MIMETYPES}" PARENT_SCOPE) diff --git a/plugins/libarchive/kerfuffle_libarchive.desktop.cmake b/plugins/libarchive/kerfuffle_libarchive.desktop.cmake deleted file mode 100644 index e84c246c..00000000 --- a/plugins/libarchive/kerfuffle_libarchive.desktop.cmake +++ /dev/null @@ -1,130 +0,0 @@ -[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 -Name[ca]=kerfuffle_libarchive -Name[ca@valencia]=kerfuffle_libarchive -Name[cs]=kerfuffle_libarchive -Name[da]=kerfuffle_libarchive -Name[de]=kerfuffle_libarchive -Name[el]=kerfuffle_libarchive -Name[en_GB]=kerfuffle_libarchive -Name[es]=kerfuffle_libarchive -Name[et]=kerfuffle_libarchive -Name[eu]=kerfuffle_libarchive -Name[fi]=kerfuffle_libarchive -Name[fr]=kerfuffle_libarchive -Name[ga]=kerfuffle_libarchive -Name[gl]=kerfuffle_libarchive -Name[he]=kerfuffle_libarchive -Name[hne]=करफुफल_लिबआर्काइव -Name[hr]=kerfuffle_libarchive -Name[hu]=kerfuffle_libarchive -Name[ia]=kerfuffle_libarchive -Name[id]=kerfuffle_libarchive -Name[it]=kerfuffle_libarchive -Name[ja]=kerfuffle_libarchive -Name[kk]=kerfuffle_libarchive -Name[km]=kerfuffle_libarchive -Name[ko]=kerfuffle_libarchive -Name[lt]=kerfuffle_libarchive -Name[lv]=kerfuffle_libarchive -Name[mr]=कर्फफल_लिब-संग्रह -Name[nb]=kerfuffle_libarchive -Name[nds]=kerfuffle_libarchive -Name[nl]=kerfuffle_libarchive -Name[nn]=kerfuffle_libarchive -Name[pa]=kerfuffle_libarchive -Name[pl]=kerfuffle_libarchive -Name[pt]=kerfuffle_libarchive -Name[pt_BR]=kerfuffle_libarchive -Name[ro]=kerfuffle_libarchive -Name[ru]=kerfuffle_libarchive -Name[sk]=kerfuffle_libarchive -Name[sl]=kerfuffle_libarchive -Name[sq]=kerfuffle_libarchive -Name[sr]=kerfuffle_libarchive -Name[sr@ijekavian]=kerfuffle_libarchive -Name[sr@ijekavianlatin]=kerfuffle_libarchive -Name[sr@latin]=kerfuffle_libarchive -Name[sv]=Kerfuffle Libarchive -Name[ta]=கெர்ஃபஃபில் லிப்ஆர்கைவ் -Name[th]=kerfuffle_libarchive -Name[tr]=kerfuffle_libarchive -Name[uk]=kerfuffle_libarchive -Name[wa]=kerfuffle_libarchive -Name[x-test]=xxkerfuffle_libarchivexx -Name[zh_CN]=kerfuffle_libarchive -Name[zh_TW]=kerfuffle_libarchive -Comment=LibArchive Plugin for Kerfuffle -Comment[ar]=LibArchive ملحق لـ Kerfuffle -Comment[ast]=Complementu LibArchive pa Kerfuffle -Comment[bg]=Приставка LibArchive за Kerfuffle -Comment[bs]=Priključak libarchive za Kerfafl -Comment[ca]=Connector del LibArchive pel Kerfuffle -Comment[ca@valencia]=Connector del LibArchive pel Kerfuffle -Comment[cs]=LibArchive modul pro Kerfuffle -Comment[da]=LibArchive-plugin til Kerfuffle -Comment[de]=LibArchive-Modul für Kerfuffle -Comment[el]=πρόσθετο LibArchive για τη Kerfuffle -Comment[en_GB]=LibArchive Plugin for Kerfuffle -Comment[es]=Complemento LibArchive para Kerfuffle -Comment[et]=Kerfuffle'i LibArchive plugin -Comment[eu]=Kerfuffle-rentzako LibArchive plugina -Comment[fi]=LibArchive-pakkaustuki -Comment[fr]=Module externe « LibArchive » pour Kerfuffle -Comment[ga]=Breiseán LibArchive le haghaidh Kerfuffle -Comment[gl]=Extensión de libarchive para Kerfuffle -Comment[he]=תוסף LibArchive עבור Kerfuffle -Comment[hne]=करफुफल बर लिबआर्काइव प्लगइन -Comment[hr]=Priključak LibArchive za Kerfuffle -Comment[hu]=LibArchive Kerfuffle-modul -Comment[ia]=Plugin de Libarchive per Kerfuffle -Comment[id]=Pengaya LibArchive untuk Kerfuffle -Comment[it]=Estensione LibArchive per Kerfuffle -Comment[ja]=Kerfuffle のための LibArchive プラグイン -Comment[kk]=Kerfuffle-ге арналған LibArchive плагині -Comment[km]=កម្មវិធី​ជំនួយ LibArchive សម្រាប់ Kerfuffle -Comment[ko]=Kerfuffle을 위한 LibArchive 플러그인 -Comment[lt]=LibArchive Kerfuffle papildinys -Comment[lv]=Kerfuffle LibArchive spraudnis -Comment[mr]=कर्फफल करिता लिब-संग्रह प्लगइन -Comment[nb]=LibArchive programtillegg for Kerfuffle -Comment[nds]=LibArchive-Moduul för Kerfuffle -Comment[nl]=LibArchive-plug-in voor Kerfuffle -Comment[nn]=LibArchive-programtillegg til Kerfuffle -Comment[pl]=Wtyczka LibArchive dla Kerfuffle -Comment[pt]='Plugin' de LibArchive para o Kerfuffle -Comment[pt_BR]=Plugin LibArchive para a Kerfuffle -Comment[ro]=Modul LibArchive pentru Kerfuffle -Comment[ru]=Модуль LibArchive для Kerfuffle -Comment[sk]=LibArchive modul pre Kerfuffle -Comment[sl]=Vstavek LibArchive za Kerfuffle -Comment[sq]=LibArchive Plugin për Kerfuffle -Comment[sr]=Прикључак libarchive за Керфафл -Comment[sr@ijekavian]=Прикључак libarchive за Керфафл -Comment[sr@ijekavianlatin]=Priključak libarchive za Kerfuffle -Comment[sr@latin]=Priključak libarchive za Kerfuffle -Comment[sv]=Libarchive-insticksprogram för Kerfuffle -Comment[ta]=கெர்ஃபஃபில் க்கு லிப்ஆர்கைவ் சொருகி -Comment[th]=ส่วนเสริมของ Kerfuffle สำหรับใช้งานไลบรารี LibArchive -Comment[tr]=Kerfuffle için LibArchive eklentisi -Comment[uk]=Додаток LibArchive для Kerfuffle -Comment[x-test]=xxLibArchive Plugin for Kerfufflexx -Comment[zh_CN]=Kerfuffle 的 LibArchive 插件 -Comment[zh_TW]=Kerfuffle 的 LibArchive 外掛程式 -MimeType=@SUPPORTED_LIBARCHIVE_READWRITE_MIMETYPES@ diff --git a/plugins/libarchive/kerfuffle_libarchive.json b/plugins/libarchive/kerfuffle_libarchive.json new file mode 100644 index 00000000..7c0e5953 --- /dev/null +++ b/plugins/libarchive/kerfuffle_libarchive.json @@ -0,0 +1,147 @@ +{ + "KPlugin": { + "Authors": [ + { + "Email": "henrique.pinto@kdemail.net", + "Name": "Henrique Pinto" + } + ], + "Description": "LibArchive Plugin for Kerfuffle", + "Description[ar]": "LibArchive ملحق لـ Kerfuffle", + "Description[ast]": "Complementu LibArchive pa Kerfuffle", + "Description[bg]": "Приставка LibArchive за Kerfuffle", + "Description[bs]": "Priključak libarchive za Kerfafl", + "Description[ca@valencia]": "Connector del LibArchive pel Kerfuffle", + "Description[ca]": "Connector del LibArchive pel Kerfuffle", + "Description[cs]": "LibArchive modul pro Kerfuffle", + "Description[da]": "LibArchive-plugin til Kerfuffle", + "Description[de]": "LibArchive-Modul für Kerfuffle", + "Description[el]": "πρόσθετο LibArchive για τη Kerfuffle", + "Description[en_GB]": "LibArchive Plugin for Kerfuffle", + "Description[es]": "Complemento LibArchive para Kerfuffle", + "Description[et]": "Kerfuffle'i LibArchive plugin", + "Description[eu]": "Kerfuffle-rentzako LibArchive plugina", + "Description[fi]": "LibArchive-pakkaustuki", + "Description[fr]": "Module externe « LibArchive » pour Kerfuffle", + "Description[ga]": "Breiseán LibArchive le haghaidh Kerfuffle", + "Description[gl]": "Extensión de libarchive para Kerfuffle", + "Description[he]": "תוסף LibArchive עבור Kerfuffle", + "Description[hne]": "करफुफल बर लिबआर्काइव प्लगइन", + "Description[hr]": "Priključak LibArchive za Kerfuffle", + "Description[hu]": "LibArchive Kerfuffle-modul", + "Description[ia]": "Plugin de Libarchive per Kerfuffle", + "Description[id]": "Pengaya LibArchive untuk Kerfuffle", + "Description[it]": "Estensione LibArchive per Kerfuffle", + "Description[ja]": "Kerfuffle のための LibArchive プラグイン", + "Description[kk]": "Kerfuffle-ге арналған LibArchive плагині", + "Description[km]": "កម្មវិធី​ជំនួយ LibArchive សម្រាប់ Kerfuffle", + "Description[ko]": "Kerfuffle을 위한 LibArchive 플러그인", + "Description[lt]": "LibArchive Kerfuffle papildinys", + "Description[lv]": "Kerfuffle LibArchive spraudnis", + "Description[mr]": "कर्फफल करिता लिब-संग्रह प्लगइन", + "Description[nb]": "LibArchive programtillegg for Kerfuffle", + "Description[nds]": "LibArchive-Moduul för Kerfuffle", + "Description[nl]": "LibArchive-plug-in voor Kerfuffle", + "Description[nn]": "LibArchive-programtillegg til Kerfuffle", + "Description[pl]": "Wtyczka LibArchive dla Kerfuffle", + "Description[pt]": "'Plugin' de LibArchive para o Kerfuffle", + "Description[pt_BR]": "Plugin LibArchive para a Kerfuffle", + "Description[ro]": "Modul LibArchive pentru Kerfuffle", + "Description[ru]": "Модуль LibArchive для Kerfuffle", + "Description[sk]": "LibArchive modul pre Kerfuffle", + "Description[sl]": "Vstavek LibArchive za Kerfuffle", + "Description[sq]": "LibArchive Plugin për Kerfuffle", + "Description[sr@ijekavian]": "Прикључак libarchive за Керфафл", + "Description[sr@ijekavianlatin]": "Priključak libarchive za Kerfuffle", + "Description[sr@latin]": "Priključak libarchive za Kerfuffle", + "Description[sr]": "Прикључак libarchive за Керфафл", + "Description[sv]": "Libarchive-insticksprogram för Kerfuffle", + "Description[ta]": "கெர்ஃபஃபில் க்கு லிப்ஆர்கைவ் சொருகி", + "Description[th]": "ส่วนเสริมของ Kerfuffle สำหรับใช้งานไลบรารี LibArchive", + "Description[tr]": "Kerfuffle için LibArchive eklentisi", + "Description[uk]": "Додаток LibArchive для Kerfuffle", + "Description[x-test]": "xxLibArchive Plugin for Kerfufflexx", + "Description[zh_CN]": "Kerfuffle 的 LibArchive 插件", + "Description[zh_TW]": "Kerfuffle 的 LibArchive 外掛程式", + "Id": "kerfuffle_libarchive", + "License": "BSD", + "MimeTypes": [ + "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", + "application/x-lzip", + "application/x-tzo", + "application/x-lrzip-compressed-tar" + ], + "Name": "kerfuffle_libarchive", + "Name[ar]": "kerfuffle_libarchive", + "Name[ast]": "kerfuffle_libarchive", + "Name[bg]": "kerfuffle_libarchive", + "Name[bs]": "kerfuffle_libarchive", + "Name[ca@valencia]": "kerfuffle_libarchive", + "Name[ca]": "kerfuffle_libarchive", + "Name[cs]": "kerfuffle_libarchive", + "Name[da]": "kerfuffle_libarchive", + "Name[de]": "kerfuffle_libarchive", + "Name[el]": "kerfuffle_libarchive", + "Name[en_GB]": "kerfuffle_libarchive", + "Name[es]": "kerfuffle_libarchive", + "Name[et]": "kerfuffle_libarchive", + "Name[eu]": "kerfuffle_libarchive", + "Name[fi]": "kerfuffle_libarchive", + "Name[fr]": "kerfuffle_libarchive", + "Name[ga]": "kerfuffle_libarchive", + "Name[gl]": "kerfuffle_libarchive", + "Name[he]": "kerfuffle_libarchive", + "Name[hne]": "करफुफल_लिबआर्काइव", + "Name[hr]": "kerfuffle_libarchive", + "Name[hu]": "kerfuffle_libarchive", + "Name[ia]": "kerfuffle_libarchive", + "Name[id]": "kerfuffle_libarchive", + "Name[it]": "kerfuffle_libarchive", + "Name[ja]": "kerfuffle_libarchive", + "Name[kk]": "kerfuffle_libarchive", + "Name[km]": "kerfuffle_libarchive", + "Name[ko]": "kerfuffle_libarchive", + "Name[lt]": "kerfuffle_libarchive", + "Name[lv]": "kerfuffle_libarchive", + "Name[mr]": "कर्फफल_लिब-संग्रह", + "Name[nb]": "kerfuffle_libarchive", + "Name[nds]": "kerfuffle_libarchive", + "Name[nl]": "kerfuffle_libarchive", + "Name[nn]": "kerfuffle_libarchive", + "Name[pa]": "kerfuffle_libarchive", + "Name[pl]": "kerfuffle_libarchive", + "Name[pt]": "kerfuffle_libarchive", + "Name[pt_BR]": "kerfuffle_libarchive", + "Name[ro]": "kerfuffle_libarchive", + "Name[ru]": "kerfuffle_libarchive", + "Name[sk]": "kerfuffle_libarchive", + "Name[sl]": "kerfuffle_libarchive", + "Name[sq]": "kerfuffle_libarchive", + "Name[sr@ijekavian]": "kerfuffle_libarchive", + "Name[sr@ijekavianlatin]": "kerfuffle_libarchive", + "Name[sr@latin]": "kerfuffle_libarchive", + "Name[sr]": "kerfuffle_libarchive", + "Name[sv]": "Kerfuffle Libarchive", + "Name[ta]": "கெர்ஃபஃபில் லிப்ஆர்கைவ்", + "Name[th]": "kerfuffle_libarchive", + "Name[tr]": "kerfuffle_libarchive", + "Name[uk]": "kerfuffle_libarchive", + "Name[wa]": "kerfuffle_libarchive", + "Name[x-test]": "xxkerfuffle_libarchivexx", + "Name[zh_CN]": "kerfuffle_libarchive", + "Name[zh_TW]": "kerfuffle_libarchive", + "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 +} diff --git a/plugins/libarchive/kerfuffle_libarchive_readonly.desktop.cmake b/plugins/libarchive/kerfuffle_libarchive_readonly.desktop.cmake deleted file mode 100644 index 73d0335e..00000000 --- a/plugins/libarchive/kerfuffle_libarchive_readonly.desktop.cmake +++ /dev/null @@ -1,67 +0,0 @@ -[Desktop Entry] -Type=Service -X-KDE-ServiceTypes=Kerfuffle/Plugin -X-KDE-Library=kerfuffle_libarchive_readonly -X-KDE-PluginInfo-Author=Henrique Pinto -X-KDE-PluginInfo-Email=henrique.pinto@kdemail.net -X-KDE-PluginInfo-Name=kerfuffle_libarchive_readonly -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=false -Name=kerfuffle_libarchive_readonly -Name[ar]=kerfuffle_libarchive_readonly -Name[ast]=kerfuffle_libarchive_readonly -Name[bg]=kerfuffle_libarchive_readonly -Name[bs]=kerfuffle_libarchive_readonly -Name[ca]=kerfuffle_libarchive_readonly -Name[ca@valencia]=kerfuffle_libarchive_readonly -Name[cs]=kerfuffle_libarchive_readonly -Name[da]=kerfuffle_libarchive_readonly -Name[de]=kerfuffle_libarchive_readonly -Name[el]=kerfuffle_libarchive_readonly -Name[en_GB]=kerfuffle_libarchive_readonly -Name[es]=kerfuffle_libarchive_readonly -Name[et]=kerfuffle_libarchive_readonly -Name[eu]=kerfuffle_libarchive_readonly -Name[fi]=kerfuffle_libarchive_readonly -Name[fr]=kerfuffle_libarchive_readonly -Name[ga]=kerfuffle_libarchive_readonly -Name[gl]=kerfuffle_libarchive_readonly -Name[hr]=kerfuffle_libarchive_readonly -Name[hu]=kerfuffle_libarchive_readonly -Name[ia]=kerfuffle_libarchive_de_sol_lectura -Name[it]=kerfuffle_libarchive_readonly -Name[ja]=kerfuffle_libarchive_readonly -Name[kk]=kerfuffle_libarchive_readonly -Name[km]=kerfuffle_libarchive_readonly -Name[ko]=kerfuffle_libarchive_readonly -Name[lt]=kerfuffle_libarchive_readonly -Name[lv]=kerfuffle_libarchive_readonly -Name[mr]=कर्फफल_लिब-संग्रह_फक्त वाचण्यासाठी -Name[nb]=kerfuffle_libarchive_readonly -Name[nds]=kerfuffle_libarchive_readonly -Name[nl]=kerfuffle_libarchive_readonly -Name[pa]=kerfuffle_libarchive_readonly -Name[pl]=kerfuffle_libarchive_readonly -Name[pt]=kerfuffle_libarchive_readonly -Name[pt_BR]=kerfuffle_libarchive_readonly -Name[ro]=kerfuffle_libarchive_readonly -Name[ru]=kerfuffle_libarchive_readonly -Name[sk]=kerfuffle_libarchive_readonly -Name[sl]=kerfuffle_libarchive_readonly -Name[sr]=kerfuffle_libarchive_readonly -Name[sr@ijekavian]=kerfuffle_libarchive_readonly -Name[sr@ijekavianlatin]=kerfuffle_libarchive_readonly -Name[sr@latin]=kerfuffle_libarchive_readonly -Name[sv]=Kerfuffle Libarchive skrivskyddat -Name[th]=kerfuffle_libarchive_readonly -Name[tr]=kerfuffle_libarchive_readonly -Name[uk]=kerfuffle_libarchive_readonly -Name[wa]=kerfuffle_libarchive_readonly -Name[x-test]=xxkerfuffle_libarchive_readonlyxx -Name[zh_CN]=kerfuffle_libarchive_readonly -Name[zh_TW]=kerfuffle_libarchive_readonly -MimeType=@SUPPORTED_LIBARCHIVE_READONLY_MIMETYPES@ diff --git a/plugins/libarchive/kerfuffle_libarchive_readonly.json b/plugins/libarchive/kerfuffle_libarchive_readonly.json new file mode 100644 index 00000000..71224c5f --- /dev/null +++ b/plugins/libarchive/kerfuffle_libarchive_readonly.json @@ -0,0 +1,85 @@ +{ + "KPlugin": { + "Authors": [ + { + "Email": "henrique.pinto@kdemail.net", + "Name": "Henrique Pinto" + } + ], + "Id": "kerfuffle_libarchive_readonly", + "License": "BSD", + "MimeTypes": [ + "application/x-deb", + "application/x-cd-image", + "application/x-bcpio", + "application/x-cpio", + "application/x-cpio-compressed", + "application/x-sv4cpio", + "application/x-sv4crc", + "application/x-rpm", + "application/x-source-rpm", + "application/vnd.ms-cab-compressed" + ], + "Name": "kerfuffle_libarchive_readonly", + "Name[ar]": "kerfuffle_libarchive_readonly", + "Name[ast]": "kerfuffle_libarchive_readonly", + "Name[bg]": "kerfuffle_libarchive_readonly", + "Name[bs]": "kerfuffle_libarchive_readonly", + "Name[ca@valencia]": "kerfuffle_libarchive_readonly", + "Name[ca]": "kerfuffle_libarchive_readonly", + "Name[cs]": "kerfuffle_libarchive_readonly", + "Name[da]": "kerfuffle_libarchive_readonly", + "Name[de]": "kerfuffle_libarchive_readonly", + "Name[el]": "kerfuffle_libarchive_readonly", + "Name[en_GB]": "kerfuffle_libarchive_readonly", + "Name[es]": "kerfuffle_libarchive_readonly", + "Name[et]": "kerfuffle_libarchive_readonly", + "Name[eu]": "kerfuffle_libarchive_readonly", + "Name[fi]": "kerfuffle_libarchive_readonly", + "Name[fr]": "kerfuffle_libarchive_readonly", + "Name[ga]": "kerfuffle_libarchive_readonly", + "Name[gl]": "kerfuffle_libarchive_readonly", + "Name[hr]": "kerfuffle_libarchive_readonly", + "Name[hu]": "kerfuffle_libarchive_readonly", + "Name[ia]": "kerfuffle_libarchive_de_sol_lectura", + "Name[it]": "kerfuffle_libarchive_readonly", + "Name[ja]": "kerfuffle_libarchive_readonly", + "Name[kk]": "kerfuffle_libarchive_readonly", + "Name[km]": "kerfuffle_libarchive_readonly", + "Name[ko]": "kerfuffle_libarchive_readonly", + "Name[lt]": "kerfuffle_libarchive_readonly", + "Name[lv]": "kerfuffle_libarchive_readonly", + "Name[mr]": "कर्फफल_लिब-संग्रह_फक्त वाचण्यासाठी", + "Name[nb]": "kerfuffle_libarchive_readonly", + "Name[nds]": "kerfuffle_libarchive_readonly", + "Name[nl]": "kerfuffle_libarchive_readonly", + "Name[pa]": "kerfuffle_libarchive_readonly", + "Name[pl]": "kerfuffle_libarchive_readonly", + "Name[pt]": "kerfuffle_libarchive_readonly", + "Name[pt_BR]": "kerfuffle_libarchive_readonly", + "Name[ro]": "kerfuffle_libarchive_readonly", + "Name[ru]": "kerfuffle_libarchive_readonly", + "Name[sk]": "kerfuffle_libarchive_readonly", + "Name[sl]": "kerfuffle_libarchive_readonly", + "Name[sr@ijekavian]": "kerfuffle_libarchive_readonly", + "Name[sr@ijekavianlatin]": "kerfuffle_libarchive_readonly", + "Name[sr@latin]": "kerfuffle_libarchive_readonly", + "Name[sr]": "kerfuffle_libarchive_readonly", + "Name[sv]": "Kerfuffle Libarchive skrivskyddat", + "Name[th]": "kerfuffle_libarchive_readonly", + "Name[tr]": "kerfuffle_libarchive_readonly", + "Name[uk]": "kerfuffle_libarchive_readonly", + "Name[wa]": "kerfuffle_libarchive_readonly", + "Name[x-test]": "xxkerfuffle_libarchive_readonlyxx", + "Name[zh_CN]": "kerfuffle_libarchive_readonly", + "Name[zh_TW]": "kerfuffle_libarchive_readonly", + "ServiceTypes": [ + "Kerfuffle/Plugin" + ], + "Version": "0.0.1", + "Website": "http://www.kde.org" + }, + "X-KDE-Kerfuffle-APIRevision": 1, + "X-KDE-Kerfuffle-ReadWrite": false, + "X-KDE-Priority": 100 +} diff --git a/plugins/libsinglefileplugin/kerfuffle_libbz2.json b/plugins/libsinglefileplugin/kerfuffle_libbz2.json index 4a17483c..a24e1d17 100644 --- a/plugins/libsinglefileplugin/kerfuffle_libbz2.json +++ b/plugins/libsinglefileplugin/kerfuffle_libbz2.json @@ -1,52 +1,51 @@ { "KPlugin": { "Authors": [ { "Email": "rakuco@FreeBSD.org", "Name": "Raphael Kubo da Costa", "Name[sr@ijekavian]": "Рафаел Куба да Коста", "Name[sr@ijekavianlatin]": "Rafael Kuba da Kosta", "Name[sr@latin]": "Rafael Kuba da Kosta", "Name[sr]": "Рафаел Куба да Коста", "Name[x-test]": "xxRaphael Kubo da Costaxx" } ], "Description": "libbz2 plugin for Kerfuffle", "Description[ca@valencia]": "Connector del libbz2 pel Kerfuffle", "Description[ca]": "Connector del libbz2 pel Kerfuffle", "Description[de]": "libgz2-Modul für Kerfuffle", "Description[es]": "Complemento libbz2 para Kerfuffle", "Description[fi]": "libbz2-pakkaustuki", "Description[nl]": "libbz2 plug-in voor Kerfuffle", "Description[pl]": "wtyczka libbz2 dla Kerfuffle", "Description[pt]": "'Plugin' de libbz2 para o Kerfuffle", "Description[pt_BR]": "Plugin libbz2 para o Kerfuffle", "Description[ru]": "Модуль libbz2 для Kerfuffle", "Description[sk]": "libbz2 modul pre Kerfuffle", "Description[sl]": "Vstavek libbz2 za Kerfuffle", "Description[sr@ijekavian]": "Прикључак libbz2 за Керфафл", "Description[sr@ijekavianlatin]": "Priključak libbz2 za Kerfuffle", "Description[sr@latin]": "Priključak libbz2 za Kerfuffle", "Description[sr]": "Прикључак libbz2 за Керфафл", "Description[sv]": "Libbz2-insticksprogram för Kerfuffle", "Description[uk]": "Додаток libbz2 для Kerfuffle", "Description[x-test]": "xxlibbz2 plugin for Kerfufflexx", "Description[zh_CN]": "Kerfuffle 的 libbz2 插件", "Id": "kerfuffle_libbz2", "License": "BSD", "MimeTypes": [ "application/x-bzip" ], "Name": "kerfuffle_libbz2", "Name[sv]": "Kerfuffle Libbz2", "Name[x-test]": "xxkerfuffle_libbz2xx", "ServiceTypes": [ "Kerfuffle/Plugin" ], "Version": "0.0.1", "Website": "http://www.kde.org" }, - "MimeType": "application/x-bzip;", - "X-KDE-Kerfuffle-APIRevision": "1", - "X-KDE-Priority": "100" -} \ No newline at end of file + "X-KDE-Kerfuffle-APIRevision": 1, + "X-KDE-Priority": 100 +} diff --git a/plugins/libsinglefileplugin/kerfuffle_libgz.json b/plugins/libsinglefileplugin/kerfuffle_libgz.json index 03e0776f..6125da44 100644 --- a/plugins/libsinglefileplugin/kerfuffle_libgz.json +++ b/plugins/libsinglefileplugin/kerfuffle_libgz.json @@ -1,52 +1,51 @@ { "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" } ], "Description": "libgz plugin for Kerfuffle", "Description[ca@valencia]": "Connector del libgz pel Kerfuffle", "Description[ca]": "Connector del libgz pel Kerfuffle", "Description[de]": "libgz-Modul für Kerfuffle", "Description[es]": "Complemento libgz para Kerfuffle", "Description[fi]": "libgz-pakkaustuki", "Description[nl]": "libgz-plug-in voor Kerfuffle", "Description[pl]": "wtyczka libgz dla Kerfuffle", "Description[pt]": "'Plugin' de libgz para o Kerfuffle", "Description[pt_BR]": "Plugin libgz para a Kerfuffle", "Description[ru]": "Модуль libgz для Kerfuffle", "Description[sk]": "libgz modul pre Kerfuffle", "Description[sl]": "Vstavek libgz za Kerfuffle", "Description[sr@ijekavian]": "Прикључак libgz за Керфафл", "Description[sr@ijekavianlatin]": "Priključak libgz za Kerfuffle", "Description[sr@latin]": "Priključak libgz za Kerfuffle", "Description[sr]": "Прикључак libgz за Керфафл", "Description[sv]": "Libgz-insticksprogram för Kerfuffle", "Description[uk]": "Додаток libgz для Kerfuffle", "Description[x-test]": "xxlibgz plugin for Kerfufflexx", "Description[zh_CN]": "Kerfuffle 的 libgz 插件", "Id": "kerfuffle_libgz", "License": "BSD", "MimeTypes": [ "application/gzip" ], "Name": "kerfuffle_libgz", "Name[sv]": "Kerfuffle Libgz", "Name[x-test]": "xxkerfuffle_libgzxx", "ServiceTypes": [ "Kerfuffle/Plugin" ], "Version": "0.0.1", "Website": "http://www.kde.org" }, - "MimeType": "application/x-gzip;", - "X-KDE-Kerfuffle-APIRevision": "1", - "X-KDE-Priority": "100" -} \ No newline at end of file + "X-KDE-Kerfuffle-APIRevision": 1, + "X-KDE-Priority": 100 +} diff --git a/plugins/libsinglefileplugin/kerfuffle_libxz.json b/plugins/libsinglefileplugin/kerfuffle_libxz.json index 24306801..34b7f777 100644 --- a/plugins/libsinglefileplugin/kerfuffle_libxz.json +++ b/plugins/libsinglefileplugin/kerfuffle_libxz.json @@ -1,53 +1,52 @@ { "KPlugin": { "Authors": [ { "Email": "rakuco@FreeBSD.org", "Name": "Raphael Kubo da Costa", "Name[sr@ijekavian]": "Рафаел Куба да Коста", "Name[sr@ijekavianlatin]": "Rafael Kuba da Kosta", "Name[sr@latin]": "Rafael Kuba da Kosta", "Name[sr]": "Рафаел Куба да Коста", "Name[x-test]": "xxRaphael Kubo da Costaxx" } ], "Description": "libxz plugin for Kerfuffle", "Description[ca@valencia]": "Connector del libxz pel Kerfuffle", "Description[ca]": "Connector del libxz pel Kerfuffle", "Description[de]": "libxz-Modul für Kerfuffle", "Description[es]": "Complemento libxz para Kerfuffle", "Description[fi]": "libxz-pakkaustuki", "Description[nl]": "libxz plug-in voor Kerfuffle", "Description[pl]": "wtyczka libxz dla Kerfuffle", "Description[pt]": "'Plugin' de libxz para o Kerfuffle", "Description[pt_BR]": "Plugin libxz para o Kerfuffle", "Description[ru]": "Модуль libxz для Kerfuffle", "Description[sk]": "libxz modul pre Kerfuffle", "Description[sl]": "Vstavek libxz za Kerfuffle", "Description[sr@ijekavian]": "Прикључак libxz за Керфафл", "Description[sr@ijekavianlatin]": "Priključak libxz za Kerfuffle", "Description[sr@latin]": "Priključak libxz za Kerfuffle", "Description[sr]": "Прикључак libxz за Керфафл", "Description[sv]": "Libxz-insticksprogram för Kerfuffle", "Description[uk]": "Додаток libxz для Kerfuffle", "Description[x-test]": "xxlibxz plugin for Kerfufflexx", "Description[zh_CN]": "Kerfuffle 的 libxz 插件", "Id": "kerfuffle_libxz", "License": "BSD", "MimeTypes": [ "application/x-lzma", "application/x-xz" ], "Name": "kerfuffle_libxz", "Name[sv]": "Kerfuffle Libxz", "Name[x-test]": "xxkerfuffle_libxzxx", "ServiceTypes": [ "Kerfuffle/Plugin" ], "Version": "0.0.1", "Website": "http://www.kde.org" }, - "MimeType": "application/x-lzma;application/x-xz;", - "X-KDE-Kerfuffle-APIRevision": "1", - "X-KDE-Priority": "100" -} \ No newline at end of file + "X-KDE-Kerfuffle-APIRevision": 1, + "X-KDE-Priority": 100 +}