Fix: Version und Drittanbieter-Lizenzen im PyInstaller-Build anzeigen (v1.2.6)

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 <noreply@anthropic.com>
This commit is contained in:
2026-03-28 19:32:03 +01:00
parent 09312dbd66
commit d7282082f4
7 changed files with 59 additions and 48 deletions
+5 -2
View File
@@ -45,11 +45,14 @@ class AboutDialog(QDialog):
try:
return version("DocuMentor")
except PackageNotFoundError:
# Fallback: pyproject.toml parsen (Entwicklungsmodus ohne Installation)
# Fallback: pyproject.toml parsen (PyInstaller-Bundle oder Entwicklungsmodus)
try:
import tomllib
pyproject = Path(__file__).parent.parent.parent / "pyproject.toml"
if hasattr(sys, "_MEIPASS"):
pyproject = Path(sys._MEIPASS) / "pyproject.toml" # type: ignore[attr-defined]
else:
pyproject = Path(__file__).parent.parent.parent / "pyproject.toml"
with open(pyproject, "rb") as f:
return tomllib.load(f)["project"]["version"]
except Exception: