mirror of
https://github.com/YACReader/yacreader
synced 2025-07-14 02:54:46 -04:00
Extract 7z loading to it's own function
This will unify 7z loading in all scenarios and it also fixes the search path in Linux, now the apps will always try to load 7z.so from LIBDIR/yacreader/7z.so, if it fails they'll try 7zip/7z.so
This commit is contained in:
@ -141,12 +141,7 @@ void LibraryCreator::run()
|
||||
stopRunning = false;
|
||||
canceled = false;
|
||||
#if !defined use_unarr && !defined use_libarchive
|
||||
// check for 7z lib
|
||||
#if defined Q_OS_UNIX && !defined Q_OS_MACOS
|
||||
QLibrary *sevenzLib = new QLibrary(QString(LIBDIR) + "/7zip/7z.so");
|
||||
#else
|
||||
QLibrary *sevenzLib = new QLibrary(QCoreApplication::applicationDirPath() + "/utils/7z");
|
||||
#endif
|
||||
auto sevenzLib = YACReader::load7zLibrary();
|
||||
|
||||
if (!sevenzLib->load()) {
|
||||
QLOG_ERROR() << "Loading 7z.dll : " + sevenzLib->errorString() << Qt::endl;
|
||||
|
Reference in New Issue
Block a user