fix: bundle FFmpeg offline, fix NoneType write crash in windowed apps, fallback to system PATH
This commit is contained in:
@@ -70,6 +70,21 @@ def build():
|
||||
except ImportError:
|
||||
print("WARNUNG: customtkinter nicht installiert. Bitte 'pip install -r requirements.txt' ausführen.")
|
||||
|
||||
# static_ffmpeg-Binaries einbinden (FFmpeg komplett offline bündeln)
|
||||
try:
|
||||
import static_ffmpeg
|
||||
print("Lade FFmpeg-Binaries herunter (falls noch nicht vorhanden)...")
|
||||
# Zwingt static_ffmpeg dazu, FFmpeg herunterzuladen, falls es noch nicht im venv/bin ist
|
||||
static_ffmpeg.run.get_or_fetch_platform_executables_else_raise()
|
||||
|
||||
sf_path = Path(static_ffmpeg.__file__).parent
|
||||
if system == "Windows":
|
||||
args.extend(["--add-data", f"{sf_path};static_ffmpeg"])
|
||||
else:
|
||||
args.extend(["--add-data", f"{sf_path}:static_ffmpeg"])
|
||||
except Exception as e:
|
||||
print(f"WARNUNG: static_ffmpeg konnte nicht gebündelt werden: {e}")
|
||||
|
||||
# Hauptdatei
|
||||
args.append(str(project_dir / "main.py"))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user