68f5101c64
- 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.
49 lines
1.7 KiB
Python
49 lines
1.7 KiB
Python
#!/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_root = ROOT / "versions/26.01-bundle"
|
|
vendor_root = ROOT / "versions/26.01"
|
|
bundle_7zip = bundle_root / "CPP/7zip"
|
|
vendor_7zip = vendor_root / "CPP/7zip"
|
|
bundle_cpp = bundle_root / "CPP"
|
|
vendor_cpp = vendor_root / "CPP"
|
|
|
|
# Root-level symlinks: C and Asm
|
|
for name in ("C", "Asm"):
|
|
target = bundle_root / name
|
|
if not target.exists() and not target.is_symlink():
|
|
rel = os.path.relpath(vendor_root / name, bundle_root)
|
|
os.symlink(rel, target)
|
|
print(f" symlink: {target.relative_to(ROOT)} -> {rel}")
|
|
|
|
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")
|