Commit Graph

9 Commits

Author SHA1 Message Date
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 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 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 d80b025219 feat: add Linux MinGW build path and Windows build-script fixes (v2.2.0) 2026-05-02 19:56:28 +02:00