mirror of
https://github.com/YACReader/yacreader
synced 2025-06-03 00:58:32 -04:00
Load 7z.so from LIBDIR in non macos unix systems
This commit is contained in:
parent
f57fb9f08e
commit
5f35fdcaef
@ -175,7 +175,16 @@ bool CompressedArchive::loadFunctions()
|
|||||||
{
|
{
|
||||||
// LOAD library
|
// LOAD library
|
||||||
if (sevenzLib == 0) {
|
if (sevenzLib == 0) {
|
||||||
|
#if defined Q_OS_UNIX && !defined Q_OS_MACOS
|
||||||
|
QFileInfo sevenzlibrary(QString(LIBDIR) + "/yacreader/7z.so");
|
||||||
|
if (sevenzlibrary.exists()) {
|
||||||
|
sevenzLib = new QLibrary(sevenzlibrary.absoluteFilePath());
|
||||||
|
} else {
|
||||||
|
sevenzLib = new QLibrary(QString(LIBDIR) + "/7zip/7z.so");
|
||||||
|
}
|
||||||
|
#else
|
||||||
sevenzLib = new QLibrary(QCoreApplication::applicationDirPath() + "/utils/7z");
|
sevenzLib = new QLibrary(QCoreApplication::applicationDirPath() + "/utils/7z");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
if (!sevenzLib->load()) {
|
if (!sevenzLib->load()) {
|
||||||
qDebug() << "Error Loading 7z.dll : " + sevenzLib->errorString() << Qt::endl;
|
qDebug() << "Error Loading 7z.dll : " + sevenzLib->errorString() << Qt::endl;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user