6f37d349208d4673ea19131c4ca2e5827287a5d9
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)
Nsis7z NSIS Plugin
NSIS plugin for extracting 7z, ZIP and NSIS archives.
Available Versions
| Version | 7-Zip | Formats | Notes |
|---|---|---|---|
| 19.00 | 7-Zip 19.00 | 7z, LZMA, XZ, Split | Original updated version |
| 25.01 | 7-Zip 25.01 | 7z, ZIP, LZMA, XZ, Split, NSIS | With NSIS archive support |
| 26.00 | 7-Zip 26.00 | 7z, ZIP, LZMA, XZ, Split, NSIS | Recommended |
Supported Architectures
| Architecture | Description |
|---|---|
| x86-ansi | 32-bit ANSI (legacy) |
| x86-unicode | 32-bit Unicode |
| amd64-unicode | 64-bit Unicode |
Quick Start
!addplugindir "plugins\x86-unicode"
Section
; Simple extraction (7z, ZIP, NSIS)
Nsis7z::Extract "$EXEDIR\data.7z"
; With progress text in label
Nsis7z::ExtractWithDetails "$EXEDIR\data.7z" "Installing %s..."
; With callback to show files in listbox
GetFunctionAddress $0 MyExtractCallback
Nsis7z::ExtractWithFileCallback "$EXEDIR\data.7z" $0
SectionEnd
Function MyExtractCallback
Pop $0 ; completedSize
Pop $1 ; totalSize
Pop $2 ; fileName
DetailPrint "$2"
FunctionEnd
Build Scripts
The repo includes a single unified build_plugin.py script that replaces the previous per-version scripts.
Build
# Recommended: 7-Zip 26.00 with auto-detected toolset
python build_plugin.py
# Select 7-Zip version (19.00 | 25.01 | 26.00)
python build_plugin.py --7zip-version 25.01
# Specific toolset (2022|2026|auto)
python build_plugin.py --toolset 2022
# Linux host path (cross-build with MinGW-w64, 26.00)
python build_plugin.py --host linux
# Print version and exit
python build_plugin.py --version
Linux notes:
- Local Linux path currently supports
--7zip-version 26.00. - Requires MinGW-w64 toolchains (
x86_64-w64-mingw32-*andi686-w64-mingw32-*) andmake.
Repository Structure
nsis-plugin-ns7zip/
├── build_plugin.py # Unified build script (all versions)
├── build_zstd.cmd # Build script for 7-zip-zstd variant
├── rebuild_nsis7z1900-src.ps1 # Rebuilds 19.00 sources
├── versions/
│ ├── 19.00/ # 7-Zip 19.00 modified
│ ├── 25.01/ # 7-Zip 25.01 modified (ZIP + NSIS handler)
│ ├── 26.00/ # 7-Zip 26.00 modified (ZIP + NSIS handler)
│ └── 7-zip-zstd/ # 7-Zip zstd fork (submodule)
├── plugins/ # Compiled DLLs output
├── tools/
│ ├── fix_vcxproj.py # Project file patcher
│ ├── update_gitea_releases.py # Backfill Gitea release bodies (one-shot)
│ ├── release-notes/ # Per-version Markdown snippets
│ ├── linux/ # Linux-specific build helpers
│ └── legacy/ # Old per-version build scripts
└── .github/workflows/
├── build.yml # CI: Windows + Linux matrix build
└── release.yml # Release: build artifacts + publish to GitHub & Gitea
CI / Release Workflow
- build.yml — runs on every push/PR; builds all three configs on Windows (MSBuild) and Linux (MinGW-w64) in parallel.
- release.yml — triggered by a
v*tag push; builds and packages artifacts, creates a GitHub Release with the relevant CHANGELOG section as body, and updates the corresponding Gitea release body via API (GITEA_TOKENsecret required).
Changes from Original
NSIS Archive Handler (25.01, 26.00)
Added support for extracting .exe archives created with NSIS (not present in the original plugin):
Archive\Nsis\NsisHandler.cpp/hArchive\Nsis\NsisIn.cpp/hArchive\Nsis\NsisDecode.cpp/hArchive\Nsis\NsisRegister.cppCompress\BZip2Decoder.cpp/h(required by NsisDecode)Compress\BZip2Crc.cpp
Bug Fixes (25.01, 26.00)
- Divide-by-zero: added guard
if (totalSize == 0) return 0inGetPercentComplete - ExtractWithFileCallback: NSIS callback triggered only on filename change (avoids crash with
totalSize = UINT64_MAXon firstSetTotalcall)
License
- 7-Zip: LGPL 2.1 + BSD 3-clause
- NSIS Plugin: Afrow UK
Credits
- Igor Pavlov (7-Zip)
- Afrow UK (Original plugin)
- Simone (x64 support, VS2022/VS2026, ZIP, NSIS handler, ExtractWithFileCallback)
See README_IT.md for the Italian version.