Bundle LZMA SDK for .edz extraction; drop 7z CLI dependency (M3)

Replaces the QProcess->7z shim with the public-domain LZMA SDK (23.01) 7-Zip
reader, vendored under sources/import/edz/lzma/ (decode-only subset). New
edzsevenzip.cpp wraps SzArEx_Open/SzArEx_Extract and writes entries via Qt, so
EdzArchive no longer needs an external 7-Zip at runtime. Enables the C language
in CMake for the vendored sources.

Verified: the bundled decoder extracts all three ifm sample .edz and the
generated elements still match the Python oracle exactly (byte-correct decode),
with no 7z on the path.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Shane Ringrose
2026-06-20 07:49:14 +12:00
parent f4ff6c81f9
commit e4b4ba875b
64 changed files with 14706 additions and 83 deletions
+2 -8
View File
@@ -30,10 +30,8 @@ class QTemporaryDir;
macro, a product image and metadata. EdzArchive unpacks it so the rest of the
import pipeline can read the (portable) part.xml.
The extraction backend sits behind a single private method so it can be
swapped without touching callers: this M0 spike shells out to a 7-Zip CLI via
QProcess; a later milestone replaces that with a bundled decompressor so no
external tool is required at runtime.
Extraction uses the bundled (public-domain) LZMA SDK 7-Zip reader, so no
external 7-Zip is required at runtime (see edzsevenzip).
The extracted tree lives in a QTemporaryDir owned by this object and is
removed when the EdzArchive is destroyed.
@@ -51,10 +49,6 @@ class EdzArchive
QString errorString() const;
private:
bool extractWithSevenZipCli(const QString &edz_path,
const QString &dest);
static QString findSevenZip();
QScopedPointer<QTemporaryDir> m_dir;
QString m_error;
};