Build and install 7z.so, loading Codecs/Rar.so is broken

Also use multistage builds to have smaller images
This commit is contained in:
Luis Ángel San Martín
2024-09-22 15:20:30 +02:00
parent fc853630d8
commit f0c142b300
3 changed files with 59 additions and 38 deletions

View File

@ -129,22 +129,8 @@ QLibrary *YACReader::load7zLibrary()
auto yacreader7zPath = QString(LIBDIR) + "/yacreader/7z.so";
QFileInfo sevenzlibrary(yacreader7zPath);
if (sevenzlibrary.exists()) {
auto rarPath = QString(LIBDIR) + "/yacreader/Codecs/Rar.so";
QFileInfo rarCodec(rarPath);
if (rarCodec.exists()) {
QLibrary *rarLibrary = new QLibrary(rarPath);
rarLibrary->load();
}
return new QLibrary(yacreader7zPath);
} else {
auto rarPath = QString(LIBDIR) + "/7zip/Codecs/Rar.so";
QFileInfo rarCodec(rarPath);
if (rarCodec.exists()) {
QLibrary *rarLibrary = new QLibrary(rarPath);
rarLibrary->load();
}
return new QLibrary(QString(LIBDIR) + "/7zip/7z.so");
}
#else