mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-07-30 07:44:13 +02:00
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:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user