From d7282082f46df45a1a7719c4230e7e19769abaf1 Mon Sep 17 00:00:00 2001 From: Vitali Graf Date: Sat, 28 Mar 2026 19:32:03 +0100 Subject: [PATCH] Fix: Version und Drittanbieter-Lizenzen im PyInstaller-Build anzeigen (v1.2.6) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit pyproject.toml und THIRD_PARTY_LICENSES.txt werden nun ins PyInstaller-Bundle eingebunden. Pfadauflösung nutzt sys._MEIPASS im Bundle-Kontext. Co-Authored-By: Claude Opus 4.6 --- DocuMentor.spec | 83 +++++++++++++++++++++------------------- DocuMentor.wxs | 2 +- THIRD_PARTY_LICENSES.txt | 2 +- installer.iss | 2 +- pyproject.toml | 2 +- src/license_parser.py | 9 ++++- src/ui/AboutDialog.py | 7 +++- 7 files changed, 59 insertions(+), 48 deletions(-) diff --git a/DocuMentor.spec b/DocuMentor.spec index 1aad251..71ad47e 100644 --- a/DocuMentor.spec +++ b/DocuMentor.spec @@ -4,46 +4,49 @@ PyInstaller Konfiguration für DocuMentor Erstellt eine eigenständige Windows-Executable ohne Python-Installation """ -import sys -from pathlib import Path -from PyInstaller.utils.hooks import collect_all - -block_cipher = None - -# Projektpfad -project_root = Path(SPECPATH) -src_path = project_root / 'src' - -# connectorx komplett sammeln (Python-Code, native .pyd und Metadaten) -# PyInstaller erkennt connectorx nicht automatisch, da es zur Laufzeit -# von polars per importlib.import_module() geladen wird -cx_datas, cx_binaries, cx_hiddenimports = collect_all('connectorx') - -# Alle UI-Dateien sammeln -ui_files = [] -for ui_file in (src_path / 'ui').glob('*.ui'): - ui_files.append((str(ui_file), 'ui')) - -# Ressource-Dateien (SQL, CSV) einbinden -res_files = [] -for res_file in (src_path / 'res').glob('*'): - res_files.append((str(res_file), 'res')) - -a = Analysis( - [str(src_path / 'main.py')], - pathex=[str(src_path)], - binaries=cx_binaries, - datas=ui_files + res_files + cx_datas, - hiddenimports=[ - 'PySide6.QtCore', - 'PySide6.QtGui', - 'PySide6.QtWidgets', - 'pydantic', - 'pydantic_settings', - 'pydantic_yaml', - 'polars', - 'pyarrow', - ] + cx_hiddenimports, +import sys +from pathlib import Path +from PyInstaller.utils.hooks import collect_all + +block_cipher = None + +# Projektpfad +project_root = Path(SPECPATH) +src_path = project_root / 'src' + +# connectorx komplett sammeln (Python-Code, native .pyd und Metadaten) +# PyInstaller erkennt connectorx nicht automatisch, da es zur Laufzeit +# von polars per importlib.import_module() geladen wird +cx_datas, cx_binaries, cx_hiddenimports = collect_all('connectorx') + +# Alle UI-Dateien sammeln +ui_files = [] +for ui_file in (src_path / 'ui').glob('*.ui'): + ui_files.append((str(ui_file), 'ui')) + +# Ressource-Dateien (SQL, CSV) einbinden +res_files = [] +for res_file in (src_path / 'res').glob('*'): + res_files.append((str(res_file), 'res')) + +a = Analysis( + [str(src_path / 'main.py')], + pathex=[str(src_path)], + binaries=cx_binaries, + datas=ui_files + res_files + cx_datas + [ + (str(project_root / 'pyproject.toml'), '.'), + (str(project_root / 'THIRD_PARTY_LICENSES.txt'), '.'), + ], + hiddenimports=[ + 'PySide6.QtCore', + 'PySide6.QtGui', + 'PySide6.QtWidgets', + 'pydantic', + 'pydantic_settings', + 'pydantic_yaml', + 'polars', + 'pyarrow', + ] + cx_hiddenimports, hookspath=[], hooksconfig={}, runtime_hooks=[], diff --git a/DocuMentor.wxs b/DocuMentor.wxs index 042c83d..690de9d 100644 --- a/DocuMentor.wxs +++ b/DocuMentor.wxs @@ -4,7 +4,7 @@