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.
This commit is contained in:
2026-05-03 01:19:44 +02:00
parent 6a961306c9
commit e125ea5f9c
88 changed files with 2919 additions and 0 deletions
@@ -0,0 +1,38 @@
#!/usr/bin/env python3
"""Creates symlinks in versions/26.01-bundle to mirror vendor directory structure."""
import os
from pathlib import Path
ROOT = Path(__file__).resolve().parents[2]
bundle_7zip = ROOT / "versions/26.01-bundle/CPP/7zip"
vendor_7zip = ROOT / "versions/26.01/CPP/7zip"
bundle_cpp = ROOT / "versions/26.01-bundle/CPP"
vendor_cpp = ROOT / "versions/26.01/CPP"
for item in vendor_7zip.iterdir():
target = bundle_7zip / item.name
if not target.exists() and not target.is_symlink():
rel = os.path.relpath(item, bundle_7zip)
os.symlink(rel, target)
print(f" symlink: {target.relative_to(ROOT)} -> {rel}")
bundle_ui = bundle_7zip / "UI"
vendor_ui = vendor_7zip / "UI"
bundle_ui.mkdir(exist_ok=True)
for item in vendor_ui.iterdir():
target = bundle_ui / item.name
if not target.exists() and not target.is_symlink():
rel = os.path.relpath(item, bundle_ui)
os.symlink(rel, target)
print(f" symlink: {target.relative_to(ROOT)} -> {rel}")
for item in vendor_cpp.iterdir():
if item.name == "7zip":
continue
target = bundle_cpp / item.name
if not target.exists() and not target.is_symlink():
rel = os.path.relpath(item, bundle_cpp)
os.symlink(rel, target)
print(f" symlink: {target.relative_to(ROOT)} -> {rel}")
print("Done")