diff --git a/YACReaderLibrary/YACReaderLibrary.pro b/YACReaderLibrary/YACReaderLibrary.pro index b30f5d57..b33896f7 100644 --- a/YACReaderLibrary/YACReaderLibrary.pro +++ b/YACReaderLibrary/YACReaderLibrary.pro @@ -285,6 +285,7 @@ exists (../compressed_archive/libp7zip) { Please check the compressed_archive folder for further instructions.) } } +} unix:!macx { #set install prefix if it's empty diff --git a/YACReaderLibrary/library_creator.cpp b/YACReaderLibrary/library_creator.cpp index 42e43271..8b5662f4 100644 --- a/YACReaderLibrary/library_creator.cpp +++ b/YACReaderLibrary/library_creator.cpp @@ -122,8 +122,8 @@ void LibraryCreator::processLibrary(const QString & source, const QString & targ void LibraryCreator::run() { stopRunning = false; - - //check for 7z lib +#ifndef use_unarr +//check for 7z lib #if defined Q_OS_UNIX && !defined Q_OS_MAC QLibrary *sevenzLib = new QLibrary(QString(LIBDIR)+"/p7zip/7z.so"); #else @@ -137,7 +137,7 @@ void LibraryCreator::run() exit(); } sevenzLib->deleteLater(); - +#endif if(_mode == CREATOR) { QLOG_INFO() << "Starting to create new library ( " << _source << "," << _target << ")"; diff --git a/YACReaderLibrary/main.cpp b/YACReaderLibrary/main.cpp index a883151f..1233ffac 100644 --- a/YACReaderLibrary/main.cpp +++ b/YACReaderLibrary/main.cpp @@ -92,6 +92,7 @@ void logSystemAndConfig() QLOG_INFO() << "SO : Unknown"; #endif +#ifndef use_unarr #ifdef Q_OS_WIN if(QLibrary::isLibrary(QApplication::applicationDirPath()+"/utils/7z.dll")) #elif defined Q_OS_UNIX && !defined Q_OS_MAC @@ -102,6 +103,9 @@ void logSystemAndConfig() QLOG_INFO() << "7z : found"; else QLOG_ERROR() << "7z : not found"; +#else + QLOG_INFO() << "using unarr decompression backend"; +#endif #if defined Q_OS_UNIX && !defined Q_OS_MAC if(QFileInfo(QString(BINDIR)+"/qrencode").exists()) #else diff --git a/compressed_archive/unarr/unarr-wrapper.pri b/compressed_archive/unarr/unarr-wrapper.pri index 4008abb7..2ba188c6 100644 --- a/compressed_archive/unarr/unarr-wrapper.pri +++ b/compressed_archive/unarr/unarr-wrapper.pri @@ -9,13 +9,16 @@ SOURCES += $$PWD/compressed_archive.cpp \ unix:!macx:exists (/usr/include/unarr.h) { message(Using system provided unarr installation) LIBS+=-lunarr + DEFINES+=use_unarr } else:macx:exists (../../dependencies/unarr/libunarr.dynlib) { LIBS += -L../../dependencies/unarr/ -lunarr + DEFINES+=use_unarr } else:win32:exists (../../dependencies/unarr/unarr.dll) { LIBS += -L../../dependencies/unarr/ -lunarr + DEFINES+=use_unarr } else:exists ($$PWD/unarr-master) { @@ -25,6 +28,7 @@ else:exists ($$PWD/unarr-master) { #qmake based unarr build system #this should only be used for testing or as a last resort include(unarr.pro) + DEFINES+=use_unarr } else { error(Missing dependency: unarr decrompression backend. Please install libunarr on your system\