Fix: Konsolenfenster bei Subprozessen unter Windows unterdrückt (v1.6.3)

subprocess.CREATE_NO_WINDOW-Flag in transform.py und worker_pool_base.py
gesetzt, damit beim Start aus einer PyInstaller-EXE keine Konsolenfenster
für Saxon, FOP und diff-pdf erscheinen.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-25 15:57:14 +02:00
parent 0f3c0dd878
commit 4ec5125ea2
7 changed files with 18 additions and 6 deletions
+5 -1
View File
@@ -17,6 +17,9 @@ from abc import ABC, abstractmethod
from pathlib import Path
from typing import Optional
# Verhindert Konsolenfenster bei Subprozessen in PyInstaller-EXE (Windows)
_SUBPROCESS_FLAGS = subprocess.CREATE_NO_WINDOW if sys.platform == "win32" else 0
import psutil
from worker_metrics import WorkerPoolMetrics
@@ -133,7 +136,7 @@ class BaseWorkerPool(ABC):
logger.debug(f"Kompiliere {self._java_class_name}: {' '.join(javac_cmd[:3])}...")
result = subprocess.run(javac_cmd, capture_output=True, text=True, timeout=30)
result = subprocess.run(javac_cmd, capture_output=True, text=True, timeout=30, creationflags=_SUBPROCESS_FLAGS)
if result.returncode != 0:
raise RuntimeError(f"Java-Kompilierung fehlgeschlagen: {result.stderr}")
@@ -174,6 +177,7 @@ class BaseWorkerPool(ABC):
stderr=stderr_file,
text=True,
bufsize=1,
creationflags=_SUBPROCESS_FLAGS,
)
self.workers.append(process)