feat: add safe native Mentor PDF exporter and tested portable UI
This commit is contained in:
1 parent
10a87d2cee
commit
d4928af5b6
33 files changed
+2267
-13
No files matched your search
@@ -0,0 +1,26 @@
|
||||
# Portable onedir bundle: no Mentor binaries, licenses or private projects.
|
||||
from pathlib import Path
|
||||
import sys
|
||||
sys.path.insert(0, SPECPATH)
|
||||
from bundle_policy import filter_binaries
|
||||
root = Path(SPECPATH).parent
|
||||
analysis = Analysis(
|
||||
[str(root / "packaging" / "entrypoint.py")],
|
||||
pathex=[str(root / "src")],
|
||||
binaries=[],
|
||||
datas=[],
|
||||
hiddenimports=["win32job", "win32api", "win32con"],
|
||||
hookspath=[],
|
||||
hooksconfig={},
|
||||
runtime_hooks=[],
|
||||
excludes=["PyQt5","PyQt6","PySide2","matplotlib","numpy","scipy","pandas","torch","tensorflow","IPython","pytest","pymupdf","fitz","tkinter"],
|
||||
noarchive=False,
|
||||
optimize=0,
|
||||
)
|
||||
analysis.binaries = filter_binaries(analysis.binaries)
|
||||
pyz = PYZ(analysis.pure)
|
||||
exe = EXE(pyz, analysis.scripts, [], exclude_binaries=True,
|
||||
name="MentorPDFExporter", debug=False, bootloader_ignore_signals=False,
|
||||
strip=False, upx=False, console=False, disable_windowed_traceback=False)
|
||||
coll = COLLECT(exe, analysis.binaries, analysis.datas, strip=False, upx=False,
|
||||
name="MentorPDFExporter")
|
||||
@@ -0,0 +1,15 @@
|
||||
"""Build-time DLL policy for the Windows PySide6 6.11 wheel.
|
||||
|
||||
Qt imports unversioned ICU symbols from the Windows OS ICU implementation.
|
||||
A version-suffixed ICU accidentally picked from Poppler on the build PATH
|
||||
causes WinError 127 even though every Qt DLL has the correct version.
|
||||
Do not bundle an unrelated ICU provider; use the Windows OS dependency.
|
||||
"""
|
||||
from pathlib import PureWindowsPath
|
||||
|
||||
|
||||
def filter_binaries(entries):
|
||||
def allowed(entry):
|
||||
name = PureWindowsPath(entry[0]).name.casefold()
|
||||
return name not in {"icuuc.dll", "icuin.dll"} and not (name.startswith("icudt") and name.endswith(".dll"))
|
||||
return [entry for entry in entries if allowed(entry)]
|
||||
@@ -0,0 +1,3 @@
|
||||
from mentor_pdf_export.cli import main
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
@@ -0,0 +1,5 @@
|
||||
# Exact runtime/build versions used for the 2026-10-09 Windows release.
|
||||
PySide6==6.11.2
|
||||
pypdf==6.20.0
|
||||
pywin32==312
|
||||
PyInstaller==6.22.3
|
||||
Reference in new issue
Block a user