mirror of
https://github.com/YACReader/yacreader
synced 2025-07-18 21:14:33 -04:00
Add libarchive decompression backend
This commit is contained in:
committed by
Luis Ángel San Martín
parent
a0dfa4e447
commit
862c220069
@ -250,6 +250,8 @@ CONFIG(7zip){
|
||||
include(../compressed_archive/wrapper.pri)
|
||||
} else:CONFIG(unarr) {
|
||||
include(../compressed_archive/unarr/unarr-wrapper.pri)
|
||||
} else:CONFIG(libarchive) {
|
||||
include(../compressed_archive/libarchive/libarchive-wrapper.pri)
|
||||
} else {
|
||||
error(No compression backend specified. Did you mess with the build system?)
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ void LibraryCreator::processLibrary(const QString &source, const QString &target
|
||||
void LibraryCreator::run()
|
||||
{
|
||||
stopRunning = false;
|
||||
#ifndef use_unarr
|
||||
#if !defined use_unarr && !defined use_libarchive
|
||||
// check for 7z lib
|
||||
#if defined Q_OS_UNIX && !defined Q_OS_MAC
|
||||
QLibrary *sevenzLib = new QLibrary(QString(LIBDIR) + "/p7zip/7z.so");
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include <QDir>
|
||||
#include <QSysInfo>
|
||||
#include <QFileInfo>
|
||||
#ifndef use_unarr
|
||||
#if !defined use_unarr && !defined use_libarchive
|
||||
#include <QLibrary>
|
||||
#endif
|
||||
#include <QCommandLineParser>
|
||||
@ -40,7 +40,7 @@ void logSystemAndConfig()
|
||||
QLOG_INFO() << "OS:" << QSysInfo::prettyProductName() << "Version: " << QSysInfo::productVersion();
|
||||
QLOG_INFO() << "Kernel:" << QSysInfo::kernelType() << QSysInfo::kernelVersion() << "Architecture:" << QSysInfo::currentCpuArchitecture();
|
||||
|
||||
#ifndef use_unarr
|
||||
#if !defined use_unarr && !defined use_libarchive
|
||||
#ifdef Q_OS_WIN
|
||||
if (QLibrary::isLibrary(QApplication::applicationDirPath() + "/utils/7z.dll"))
|
||||
#elif defined Q_OS_UNIX && !defined Q_OS_MAC
|
||||
@ -51,6 +51,8 @@ void logSystemAndConfig()
|
||||
QLOG_INFO() << "7z : found";
|
||||
else
|
||||
QLOG_ERROR() << "7z : not found";
|
||||
#elif defined use_libarchive
|
||||
QLOG_INFO() << "using libarchive decompression backend";
|
||||
#else // use_unarr
|
||||
QLOG_INFO() << "using unarr decompression backend";
|
||||
#endif // use_unarr
|
||||
|
@ -28,7 +28,7 @@ void XMLInfoLibraryScanner::scanLibrary(const QString &source, const QString &ta
|
||||
|
||||
void XMLInfoLibraryScanner::run()
|
||||
{
|
||||
#ifndef use_unarr
|
||||
#if !defined use_unarr && !defined use_libarchive
|
||||
// check for 7z lib
|
||||
#if defined Q_OS_UNIX && !defined Q_OS_MAC
|
||||
QLibrary *sevenzLib = new QLibrary(QString(LIBDIR) + "/p7zip/7z.so");
|
||||
|
Reference in New Issue
Block a user