Commit Graph

29 Commits

Author SHA1 Message Date
Simone 57133b71ee feat(build): add --dist to redirect output to dist/ instead of plugins/
When --dist is passed (forwarded by build_plugin.py to the per-version
script), built nsis7z.dll files are copied to <repo>/dist/<config>
instead of <repo>/plugins/<config>. Lets CI collect a clean dist/
tree without touching the committed plugins/ dir. Windows
(2601_vs2026) and Linux build paths both supported.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-17 20:33:37 +02:00
Simone e0dc59bb7d chore: release v2.3.1 2026-05-05 00:12:28 +02:00
Simone d3ab0cf488 chore: update release notes for version 2.3.0 and add GitHub release synchronization script
Co-authored-by: Copilot <copilot@github.com>
2026-05-05 00:08:59 +02:00
Simone c2c91b9e48 fix: use #include_next in Linux overlay shims to prevent infinite recursion
All 6 case-sensitivity shim headers in tools/linux/overlay/include/
now use #include_next instead of #include to forward to the real
MinGW system header, avoiding infinite preprocessor recursion on
Linux (Debian/WSL) where overlay/include is first in the search path.

Fixes build failures on Debian WSL (GCC 12) for all configurations.
Also update nsis7z.dll binaries built with the fixed overlay.
2026-05-03 04:04:20 +02:00
Simone 89beca4409 fix: avoid nested quotes in f-strings for Python <3.12 compat (Rebuild/Build target) 2026-05-03 02:49:56 +02:00
Simone 7295140210 fix: replace remaining nested double-quote f-strings for Python <3.12 compatibility 2026-05-03 02:47:43 +02:00
Simone bc96b491d6 fix: replace nested double-quote f-strings for Python <3.12 compatibility 2026-05-03 02:45:45 +02:00
Simone d620989a6c chore: change default 7-zip version from 26.00 to 26.01 2026-05-03 02:34:26 +02:00
Simone 3e5bd02fe0 chore: remove one-shot fix_bundle_vcxproj_paths.py
The script was used once (commit 2207fbf) to rewrite vcxproj paths from
symlink-dependent relative paths to direct vendor submodule paths.
All bundle vcxproj files are already updated; the script has no further use.
2026-05-03 02:33:36 +02:00
Simone 6f37d34920 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)
2026-05-03 02:25:50 +02:00
Simone 8a76f8cc70 fix: auto-recreate bundle symlinks on Linux if missing after clone
After the previous commit removed symlinks from git (they break Windows
clones), a fresh Linux clone or git checkout would leave the bundle
directories without the POSIX symlinks that the GNU make build needs.

Add _ensure_bundle_symlinks() to build_plugin_linux.py: before the first
make invocation for a bundle-based version it checks whether the bundle
root symlink (bundle/C -> ../VER/C) exists and, if not, runs
setup_bundle_symlinks.py automatically so the developer never has to
run the setup script manually.
2026-05-03 02:07:25 +02:00
Simone 2207fbf217 refactor: replace bundle symlinks with direct vendor paths in vcxproj
Windows builds now use direct relative paths to the vendor submodules
(same pattern as versions/zstd bundle) instead of relying on POSIX
symlinks that git cannot materialise correctly on Windows without
Developer Mode / core.symlinks=true.

Changes:
- Remove all 66 symlinks from each of 25.01-bundle, 26.00-bundle,
  26.01-bundle (198 total).  POSIX symlinks are still created on Linux
  by setup_bundle_symlinks.py for the GNU make builds.
- Update Nsis7z.vcxproj / Nsis7z_vs2026.vcxproj in all three bundles:
    depth-4  ..\..\..\..\C\  ->  ..\..\..\..\..\VER\C    depth-3  ..\..\..\{Common,Windows}\  ->  ..\..\..\..\..\VER\CPP\{...}    depth-2  (non-NSIS)  ->  ..\..\..\..\..\VER\CPP\7zip\...
    UI\NSIS paths unchanged (real bundle files)
    AdditionalIncludeDirectories patched to point at vendor CPP/
- Add tools/fix_bundle_vcxproj_paths.py (idempotent helper used to
  perform the rewrite; kept for future reference / re-runs)
2026-05-03 02:02:01 +02:00
Simone 8e8f26ae95 refactor: unify bundle-symlink scripts into setup_bundle_symlinks.py
The three per-version setup_*_bundle_symlinks.py scripts were logically
identical, differing only in the version string.  Replace the duplicated
logic with a single parameterised script:

  tools/linux/setup_bundle_symlinks.py <version>

The three named scripts are kept as one-liner thin wrappers that forward
to the unified script, preserving backwards compatibility.
2026-05-03 01:43:48 +02:00
Simone 56f831017e build: redirect 25.01 builds to bundle directory
- tools/linux/build_plugin_linux.py: point VERSION_LAYOUT['25.01'].bundle_dir
  to versions/25.01-bundle/; update comment (all versions now use bundle dirs).
- tools/legacy/build_plugin_2501_vs2026.py: point project_dir to 25.01-bundle/.
- tools/legacy/build_plugin_2501_vs2022.py: point project_dir to 25.01-bundle/.
2026-05-03 01:38:45 +02:00
Simone 8968d0fd0c feat(25.01): add bundle wrapper directory with NSIS sources and vendor symlinks
Mirror the 26.00-bundle / 26.01-bundle approach for 25.01:

- versions/25.01-bundle/CPP/7zip/Bundles/Nsis7z/: project-owned NSIS plugin
  wrapper sources (api.h, nsis7z.cpp, pluginapi.*, resource.*, StdAfx*,
  Nsis7z.sln, Nsis7z.vcxproj, Nsis7z.vcxproj.filters, Nsis7z_vs2026.vcxproj).
- versions/25.01-bundle/CPP/7zip/UI/NSIS/: NSIS UI sources; StdAfx.h patched
  to use relative include path and MinGW-compatible Windows.h guard (the
  upstream 25.01 file used an absolute path incompatible with the bundle layout).
- versions/25.01-bundle/CPP/7zip/LzmaDec_gcc.mak: forwarding stub.
- versions/25.01-bundle/{C,Asm} and CPP sub-trees: symlinks into versions/25.01/.
- tools/linux/setup_25_01_bundle_symlinks.py: idempotent symlink-recreation script.
2026-05-03 01:38:45 +02:00
Simone 68f5101c64 build: redirect 26.00 builds to bundle directory
- tools/linux/build_plugin_linux.py: point VERSION_LAYOUT['26.00'].bundle_dir
  to versions/26.00-bundle/ (was versions/26.00/); update module docstring.
- tools/legacy/build_plugin_2600_vs2026.py: point project_dir to
  versions/26.00-bundle/ (was versions/26.00/).
- tools/linux/setup_26_01_bundle_symlinks.py: refactor to use bundle_root /
  vendor_root variables and add C/Asm root-level symlink creation, matching
  the new setup_26_00_bundle_symlinks.py convention.
2026-05-03 01:31:30 +02:00
Simone eec05089cf feat(26.00): add bundle wrapper directory with NSIS sources and vendor symlinks
Mirror the 26.01-bundle approach for 26.00:

- versions/26.00-bundle/CPP/7zip/Bundles/Nsis7z/: project-owned NSIS plugin
  wrapper sources (api.h, nsis7z.cpp, pluginapi.*, resource.*, StdAfx*,
  Nsis7z.sln, Nsis7z.vcxproj, Nsis7z.vcxproj.filters, Nsis7z_vs2026.vcxproj).
- versions/26.00-bundle/CPP/7zip/UI/NSIS/: NSIS UI sources (Main.cpp,
  ExtractCallbackConsole.*, NSISBreak.*, UserInputUtils2.*, StdAfx.h).
- versions/26.00-bundle/CPP/7zip/LzmaDec_gcc.mak: forwarding stub so that
  the CWD-relative `include ../../LzmaDec_gcc.mak` in Arc_gcc.mak resolves
  correctly when make runs from the Nsis7z bundle dir.
- versions/26.00-bundle/{C,Asm} and CPP sub-trees: symlinks into versions/26.00/
  so the vendor headers and sources are visible without modifying the submodule.
- tools/linux/setup_26_00_bundle_symlinks.py: idempotent script to recreate
  all symlinks after a fresh clone + submodule initialisation.
2026-05-03 01:31:19 +02:00
Simone e92e48d7bc build: add 26.01 Windows build script and register in dispatcher
- Add tools/legacy/build_plugin_2601_vs2026.py: Windows build script for
  7-zip 26.01 using VS2026 toolset (v145), adapted from the zstd equivalent.
  Points to versions/26.01-bundle/ as the project root.
- Update build_plugin.py:
  - Add LINUX_SCRIPT reference to tools/linux/build_plugin_linux.py.
  - Add '26.01' to WINDOWS_SCRIPTS with v2026 entry pointing to the new
    script (v2022 remains None; 26.01 requires v145 minimum).
  - Add '26.01' to LINUX_SUPPORTED_7ZIP set.
  - Add '26.01' to argparse choices.
2026-05-03 01:20:07 +02:00
Simone e125ea5f9c feat(26.01): add bundle wrapper directory with NSIS sources and vendor symlinks
7-Zip 26.01 (ip7z/7zip) never shipped NSIS plugin sources, so they live in
a separate bundle directory (versions/26.01-bundle/) that mirrors the layout
expected by the shared overlay makefile and by MSBuild.

Bundle contents:
- CPP/7zip/Bundles/Nsis7z/: NSIS plugin wrapper sources (nsis7z.cpp,
  pluginapi.cpp, api.h, resource.rc, StdAfx.h, …) and the Windows build
  project file (Nsis7z_vs2026.vcxproj, adapted from versions/26.00/).
  The vcxproj references the vendor submodule tree via relative paths
  (../../../../../26.01/…), keeping the submodule pristine.
- CPP/7zip/UI/NSIS/: NSIS UI adapter sources (Main.cpp, MainAr.cpp,
  NSISBreak.cpp, ExtractCallbackConsole.cpp, UserInputUtils2.cpp and
  corresponding headers), copied from versions/26.00/.
- CPP/7zip/LzmaDec_gcc.mak: forwarding stub; GNU make resolves relative
  `include` paths against the CWD, so when make runs from Bundles/Nsis7z
  the upstream Arc_gcc.mak's `include ../../LzmaDec_gcc.mak` lands here.
  The stub re-includes the real file via $(VENDOR_7ZIP).
- Symlinks (C, Asm, CPP/7zip/*, CPP/Common, CPP/Windows, …) pointing into
  the versions/26.01 submodule.  These are required because the vendor
  makefile uses CWD-relative source paths (../../../../C/…, ../../Common/…).
  tools/linux/setup_26_01_bundle_symlinks.py recreates them if needed.
2026-05-03 01:19:44 +02:00
Simone 6a961306c9 build(linux): introduce overlay makefile infrastructure
Replaces the per-version in-tree build files with a shared overlay that
keeps all project-owned build infrastructure outside the vendor source trees,
making it safe to use vendor directories as pristine git submodules.

Changes:
- Add tools/linux/overlay/makefile.gcc: parameterised makefile that drives
  MinGW cross-compilation; VENDOR_7ZIP, DEF_FILE and NSIS_DIR are all
  overridable from the command line so no files are written into the vendor
  tree at build time.
- Add tools/linux/overlay/include/: case-sensitivity shim headers
  (Windows.h, CommCtrl.h, MAPI.h, NTSecAPI.h, Psapi.h, ShlObj.h) that
  redirect to the lowercase MinGW system headers; also adds
  z7_idecl_noexcept_strip.h which resolves the noexcept-specifier mismatch
  in 7-zip 25.01 NSIS UI code.
- Move Nsis7z.def from versions/26.00/…/Bundles/Nsis7z/ to overlay/ (git
  rename; content unchanged).
- Delete versions/26.00/…/Bundles/Nsis7z/makefile.gcc (superseded by the
  overlay).
- Rewrite tools/linux/build_plugin_linux.py to drive the overlay makefile,
  support multiple 7-zip versions (25.01, 26.00, 26.01, zstd) with a
  VERSION_LAYOUT table, and add NSIS_DIR auto-detection for bundle-based
  builds.
- Add _linux_build/ to .gitignore.
2026-05-03 01:19:13 +02:00
Simone 6e91c0ac31 tools: add update_gitea_releases.py and release-notes snippets
One-shot script to backfill Gitea release bodies for existing releases
using the Gitea API. Reads per-version Markdown files from
tools/release-notes/ and PATCHes each release body.
Includes README.md in tools/release-notes/ explaining usage.
2026-05-02 21:54:01 +02:00
Simone 9be53c7e22 fix: correct remaining Windows build script f-strings 2026-05-02 20:01:01 +02:00
Simone d80b025219 feat: add Linux MinGW build path and Windows build-script fixes (v2.2.0) 2026-05-02 19:56:28 +02:00
Simone 91fe17cda2 feat: add color and spinner to legacy build scripts 2026-04-30 23:12:42 +02:00
Simone e402720a12 Add NSIS plugin support and extraction functionality
- Implemented plugin API in `pluginapi.cpp` and `pluginapi.h` for NSIS integration.
- Added resource files `resource.h` and `resource.rc` for versioning and resource management.
- Created `ExtractCallbackConsole` class to handle extraction progress and user input.
- Developed main extraction logic in `Main.cpp` and `MainAr.cpp` for handling archives.
- Introduced user input utilities in `UserInputUtils2.cpp` and `UserInputUtils2.h` for password handling and user prompts.
- Added break signal handling in `NSISBreak.cpp` and `NSISBreak.h` for graceful interruption of extraction processes.
- Included standard header `StdAfx.h` for precompiled headers and common includes.
2026-04-30 17:27:38 +02:00
Simone 5cfade0df1 fix: use detected VS toolset in build_plugin_2600 (v143 fallback for VS2022 CI) 2026-04-29 21:51:16 +02:00
Simone 505d5cf158 fix UnicodeEncodeError in build summary (replace checkmarks with ASCII) 2026-04-29 21:45:10 +02:00
Simone 3298293474 restore tools/legacy build scripts and fix CI workflow 2026-04-29 21:42:26 +02:00
Simone d074cc7c07 chore: initial commit (extracted from Launchers monorepo)
Plugin: ns7zip v2.0.0
Architectures: x86-ansi, x86-unicode, amd64-unicode
License: LGPL-2.1-or-later
2026-04-29 14:07:51 +02:00