Füge Unterstützung für benutzerdefinierte Icons in der Build-Konfiguration hinzu.

This commit is contained in:
Akamaru
2025-05-05 20:37:25 +02:00
parent b006cff991
commit e9a8e4cc4e

View File

@@ -125,6 +125,15 @@ def build_exe(onedir=False, console=False):
cmd.append("--onefile")
if not console:
cmd.append("--windowed")
# Icon-Pfad festlegen und zur Befehlszeile hinzufügen
icon_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "icon.ico")
if os.path.exists(icon_path):
cmd.extend(["--icon", icon_path])
print(f"Icon wird verwendet: {icon_path}")
else:
print("Warnung: icon.ico wurde nicht gefunden.")
if os.path.exists(bin_dir) and os.listdir(bin_dir):
cmd.extend(["--add-data", f"{bin_dir}{os.pathsep}bin"])
if os.path.exists(presets_dir):