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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user