From 8dad22a700104fd8a051926745502cbd79077b64 Mon Sep 17 00:00:00 2001 From: Alastor Tenebris Date: Fri, 31 Jul 2026 17:11:48 -0700 Subject: [PATCH] Change default backend on linux to libarchive and update documentation to reflect this. --- AGENTS.md | 2 +- CMakeLists.txt | 2 +- INSTALL.md | 18 +++++++++++------- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 49b56878e..894bf8776 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -12,7 +12,7 @@ cmake --build build --parallel ``` Build options: -- `DECOMPRESSION_BACKEND`: `unarr` | `7zip` | `libarchive` (default: 7zip on Windows/macOS/Linux) +- `DECOMPRESSION_BACKEND`: `unarr` | `7zip` | `libarchive` (default: 7zip on Windows/macOS, libarchive on Linux) - `PDF_BACKEND`: `pdfium` | `poppler` | `pdfkit` | `no_pdf` (default: pdfium on Windows, pdfkit on macOS, poppler on Linux) - `BUILD_SERVER_STANDALONE=ON`: builds only `YACReaderLibraryServer` (headless), requires only Qt 6.4+ - `BUILD_TESTS=ON` (default): enables the test suite diff --git a/CMakeLists.txt b/CMakeLists.txt index 3bdfe0fd6..06c9dd077 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,7 +55,7 @@ set(YACREADER_PDF_BACKENDS pdfium poppler pdfkit no_pdf) # --- Platform defaults --- if(UNIX AND NOT APPLE) - set(_default_decompression_backend "7zip") + set(_default_decompression_backend "libarchive") set(_default_pdf_backend "poppler") elseif(APPLE) set(_default_decompression_backend "7zip") diff --git a/INSTALL.md b/INSTALL.md index b2a20b408..7592b24c6 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -41,7 +41,7 @@ required qml modules (Quick, QuickControls2) are missing. ### Decompression YACReader currently supports three decompression backends: 7zip, (lib)unarr, and libarchive. YACReader -defaults to 7zip for Windows, macOS, Linux, and other OSes, but you can +defaults to 7zip for Windows and macOS, and libarchive for Linux and other OSes, but you can override this using the `DECOMPRESSION_BACKEND` option: ``` @@ -52,7 +52,7 @@ cmake -B build -DDECOMPRESSION_BACKEND=libarchive #### 7zip -[7zip](https://www.7-zip.org/) is the default decompression backend. +[7zip](https://www.7-zip.org/) is the default decompression backend for Windows and macOS. It is recommended for most builds, as it currently has better support for 7z files and supports the RAR5 format. @@ -63,16 +63,20 @@ FetchContent. No manual setup is needed. As this backend is not 100% GPL compatible (unrar license restriction), it is not recommended for installations where the license is an issue. +#### libarchive + +[libarchive](https://github.com/libarchive/libarchive) is a portable, efficient decompression backend, and the default decompression backend for Linux. + +libarchive supports a wide variaty of archive formats, and supports the RAR5 format (with some limitations) without using non-free software. + +The libarchive backend is recommended for packaging, and installations where GPL compatability is required. + #### unarr [(lib)unarr](https://github.com/selmf/unarr) is a lightweight decompression backend. As of version 1.0.1, it supports less formats than 7zip, notably missing RAR5 support and only having -limited support for 7z on git versions. However, this is rarely an issue in practice as the vast majority -of comic books use either zip or RAR4 compression, which is handled nicely by this backend. - -The unarr backend is recommended for packaging, lightweight installations and generally for all users requiring -more stability than the 7zip backend can offer. +limited support for 7z on git versions. It is recommended that packagers switch to the libarchive backend. The recommended way to use this on Linux or other *NIX is to install it as a package, but you can also do an embedded build. For more information, please consult the [README](compressed_archive/unarr/README.txt)