From e9a8e4cc4ee6848f9934ae5558cb28973e6869bb Mon Sep 17 00:00:00 2001 From: Akamaru Date: Mon, 5 May 2025 20:37:25 +0200 Subject: [PATCH] =?UTF-8?q?F=C3=BCge=20Unterst=C3=BCtzung=20f=C3=BCr=20ben?= =?UTF-8?q?utzerdefinierte=20Icons=20in=20der=20Build-Konfiguration=20hinz?= =?UTF-8?q?u.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/build.py b/build.py index da2a92a..0f91a1a 100644 --- a/build.py +++ b/build.py @@ -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):