refactor: rename versions/zstd to versions/zstd-bundle for consistency
Aligns the zstd NSIS wrapper directory with the naming convention used by
all other bundle directories (versions/25.01-bundle, 26.00-bundle, etc.).
Changes:
- git mv versions/zstd -> versions/zstd-bundle (20 project-owned files)
- Fix UI/NSIS/StdAfx.h: use relative include ../../Bundles/Nsis7z/pluginapi.h
instead of absolute-style 7zip/Bundles/Nsis7z/pluginapi.h (portable across
both Linux and Windows builds without extra include path)
Build tool updates:
- tools/legacy/build_plugin_zstd_vs2026.py: updated project_dir path
- tools/linux/build_plugin_linux.py:
* VERSION_LAYOUT zstd: zstd -> zstd-bundle
* VERSION_EXTRA_FLAGS zstd: -Wno-sign-compare -Wno-cast-function-type
(fast-lzma2 C vendor code)
* VERSION_EXTRA_CXXFLAGS zstd: -Wno-unused-parameter (NSIS wrapper)
* EXTRA_SYS_OBJS: inject MyWindows.o for zstd (LocalFileTimeToFileTime2)
* Remove 'zip_version != zstd' exception; auto-recreate symlinks for all
bundle versions including zstd
- tools/linux/setup_bundle_symlinks.py: add VENDOR_DIR mapping so 'zstd'
points to versions/7-zip-zstd (not versions/zstd which no longer exists)
- tools/linux/overlay/makefile.gcc: add EXTRA_SYS_OBJS ?= variable so
callers can inject additional objects without modifying the file
Linux build status after this commit:
python3 build_plugin.py --7zip-version zstd -> Build completed (all 3 configs)
This commit is contained in:
@@ -0,0 +1,98 @@
|
||||
// ExtractCallbackConsole.h
|
||||
// NSIS version adapted for 7-Zip 25.01 API
|
||||
|
||||
#ifndef __EXTRACTCALLBACKCONSOLE_H
|
||||
#define __EXTRACTCALLBACKCONSOLE_H
|
||||
|
||||
#include "Common/MyCom.h"
|
||||
#include "Common/MyString.h"
|
||||
#include "Common/StdOutStream.h"
|
||||
#include "7zip/Common/FileStreams.h"
|
||||
#include "7zip/IPassword.h"
|
||||
#include "7zip/Archive/IArchive.h"
|
||||
#include "7zip/UI/Common/ArchiveExtractCallback.h"
|
||||
#include "7zip/UI/Console/OpenCallbackConsole.h"
|
||||
|
||||
typedef void (*ExtractProgressHandler)(UInt64 completedSize, UInt64 totalSize);
|
||||
typedef void (*ExtractProgressWithFileHandler)(UInt64 completedSize, UInt64 totalSize, const wchar_t *fileName);
|
||||
|
||||
class CExtractCallbackConsole Z7_final:
|
||||
public IFolderArchiveExtractCallback,
|
||||
public IExtractCallbackUI,
|
||||
#ifndef Z7_NO_CRYPTO
|
||||
public ICryptoGetTextPassword,
|
||||
#endif
|
||||
public COpenCallbackConsole,
|
||||
public CMyUnknownImp
|
||||
{
|
||||
Z7_COM_QI_BEGIN2(IFolderArchiveExtractCallback)
|
||||
#ifndef Z7_NO_CRYPTO
|
||||
Z7_COM_QI_ENTRY(ICryptoGetTextPassword)
|
||||
#endif
|
||||
Z7_COM_QI_END
|
||||
Z7_COM_ADDREF_RELEASE
|
||||
|
||||
// IProgress
|
||||
Z7_IFACE_COM7_IMP(IProgress)
|
||||
|
||||
// IFolderArchiveExtractCallback
|
||||
Z7_IFACE_COM7_IMP(IFolderArchiveExtractCallback)
|
||||
|
||||
// IExtractCallbackUI (non-COM interface)
|
||||
Z7_IFACE_IMP(IExtractCallbackUI)
|
||||
|
||||
#ifndef Z7_NO_CRYPTO
|
||||
Z7_IFACE_COM7_IMP(ICryptoGetTextPassword)
|
||||
#endif
|
||||
|
||||
public:
|
||||
#ifndef Z7_NO_CRYPTO
|
||||
bool PasswordIsDefined;
|
||||
UString Password;
|
||||
#endif
|
||||
|
||||
UInt64 NumArchives;
|
||||
UInt64 NumArchiveErrors;
|
||||
UInt64 NumFileErrors;
|
||||
UInt64 NumFileErrorsInCurrentArchive;
|
||||
|
||||
CStdOutStream *OutStream;
|
||||
|
||||
UInt64 totalSize, completedSize, lastVal;
|
||||
|
||||
ExtractProgressHandler ProgressHandler;
|
||||
ExtractProgressWithFileHandler ProgressWithFileHandler;
|
||||
UString CurrentFileName;
|
||||
|
||||
CExtractCallbackConsole():
|
||||
PasswordIsDefined(false),
|
||||
NumArchives(0),
|
||||
NumArchiveErrors(0),
|
||||
NumFileErrors(0),
|
||||
NumFileErrorsInCurrentArchive(0),
|
||||
OutStream(NULL),
|
||||
totalSize((UInt64)(Int64)-1),
|
||||
completedSize(0),
|
||||
lastVal(0),
|
||||
ProgressHandler(NULL),
|
||||
ProgressWithFileHandler(NULL)
|
||||
{}
|
||||
|
||||
void Init()
|
||||
{
|
||||
NumArchives = 0;
|
||||
NumArchiveErrors = 0;
|
||||
NumFileErrors = 0;
|
||||
NumFileErrorsInCurrentArchive = 0;
|
||||
|
||||
totalSize = (UInt64)(Int64)-1;
|
||||
completedSize = 0;
|
||||
lastVal = 0;
|
||||
ProgressHandler = NULL;
|
||||
ProgressWithFileHandler = NULL;
|
||||
}
|
||||
|
||||
void UpdateProgress();
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user