mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
Add use_unarr define macro to prevent checks for 7z on unarr enabled builds
This commit is contained in:
parent
9dc0d85c2d
commit
1beb1beb75
@ -285,6 +285,7 @@ exists (../compressed_archive/libp7zip) {
|
|||||||
Please check the compressed_archive folder for further instructions.)
|
Please check the compressed_archive folder for further instructions.)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
unix:!macx {
|
unix:!macx {
|
||||||
#set install prefix if it's empty
|
#set install prefix if it's empty
|
||||||
|
@ -122,8 +122,8 @@ void LibraryCreator::processLibrary(const QString & source, const QString & targ
|
|||||||
void LibraryCreator::run()
|
void LibraryCreator::run()
|
||||||
{
|
{
|
||||||
stopRunning = false;
|
stopRunning = false;
|
||||||
|
#ifndef use_unarr
|
||||||
//check for 7z lib
|
//check for 7z lib
|
||||||
#if defined Q_OS_UNIX && !defined Q_OS_MAC
|
#if defined Q_OS_UNIX && !defined Q_OS_MAC
|
||||||
QLibrary *sevenzLib = new QLibrary(QString(LIBDIR)+"/p7zip/7z.so");
|
QLibrary *sevenzLib = new QLibrary(QString(LIBDIR)+"/p7zip/7z.so");
|
||||||
#else
|
#else
|
||||||
@ -137,7 +137,7 @@ void LibraryCreator::run()
|
|||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
sevenzLib->deleteLater();
|
sevenzLib->deleteLater();
|
||||||
|
#endif
|
||||||
if(_mode == CREATOR)
|
if(_mode == CREATOR)
|
||||||
{
|
{
|
||||||
QLOG_INFO() << "Starting to create new library ( " << _source << "," << _target << ")";
|
QLOG_INFO() << "Starting to create new library ( " << _source << "," << _target << ")";
|
||||||
|
@ -92,6 +92,7 @@ void logSystemAndConfig()
|
|||||||
QLOG_INFO() << "SO : Unknown";
|
QLOG_INFO() << "SO : Unknown";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef use_unarr
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
if(QLibrary::isLibrary(QApplication::applicationDirPath()+"/utils/7z.dll"))
|
if(QLibrary::isLibrary(QApplication::applicationDirPath()+"/utils/7z.dll"))
|
||||||
#elif defined Q_OS_UNIX && !defined Q_OS_MAC
|
#elif defined Q_OS_UNIX && !defined Q_OS_MAC
|
||||||
@ -102,6 +103,9 @@ void logSystemAndConfig()
|
|||||||
QLOG_INFO() << "7z : found";
|
QLOG_INFO() << "7z : found";
|
||||||
else
|
else
|
||||||
QLOG_ERROR() << "7z : not found";
|
QLOG_ERROR() << "7z : not found";
|
||||||
|
#else
|
||||||
|
QLOG_INFO() << "using unarr decompression backend";
|
||||||
|
#endif
|
||||||
#if defined Q_OS_UNIX && !defined Q_OS_MAC
|
#if defined Q_OS_UNIX && !defined Q_OS_MAC
|
||||||
if(QFileInfo(QString(BINDIR)+"/qrencode").exists())
|
if(QFileInfo(QString(BINDIR)+"/qrencode").exists())
|
||||||
#else
|
#else
|
||||||
|
@ -9,13 +9,16 @@ SOURCES += $$PWD/compressed_archive.cpp \
|
|||||||
unix:!macx:exists (/usr/include/unarr.h) {
|
unix:!macx:exists (/usr/include/unarr.h) {
|
||||||
message(Using system provided unarr installation)
|
message(Using system provided unarr installation)
|
||||||
LIBS+=-lunarr
|
LIBS+=-lunarr
|
||||||
|
DEFINES+=use_unarr
|
||||||
}
|
}
|
||||||
else:macx:exists (../../dependencies/unarr/libunarr.dynlib) {
|
else:macx:exists (../../dependencies/unarr/libunarr.dynlib) {
|
||||||
LIBS += -L../../dependencies/unarr/ -lunarr
|
LIBS += -L../../dependencies/unarr/ -lunarr
|
||||||
|
DEFINES+=use_unarr
|
||||||
}
|
}
|
||||||
|
|
||||||
else:win32:exists (../../dependencies/unarr/unarr.dll) {
|
else:win32:exists (../../dependencies/unarr/unarr.dll) {
|
||||||
LIBS += -L../../dependencies/unarr/ -lunarr
|
LIBS += -L../../dependencies/unarr/ -lunarr
|
||||||
|
DEFINES+=use_unarr
|
||||||
}
|
}
|
||||||
|
|
||||||
else:exists ($$PWD/unarr-master) {
|
else:exists ($$PWD/unarr-master) {
|
||||||
@ -25,6 +28,7 @@ else:exists ($$PWD/unarr-master) {
|
|||||||
#qmake based unarr build system
|
#qmake based unarr build system
|
||||||
#this should only be used for testing or as a last resort
|
#this should only be used for testing or as a last resort
|
||||||
include(unarr.pro)
|
include(unarr.pro)
|
||||||
|
DEFINES+=use_unarr
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
error(Missing dependency: unarr decrompression backend. Please install libunarr on your system\
|
error(Missing dependency: unarr decrompression backend. Please install libunarr on your system\
|
||||||
|
Loading…
x
Reference in New Issue
Block a user