Fix icon path for PyInstaller frozen builds, add icon.ico

This commit is contained in:
2026-05-21 04:15:38 +03:00
parent 9f3a599b79
commit 5d52cc1bec
2 changed files with 5 additions and 1 deletions

BIN
assets/icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

View File

@@ -142,6 +142,10 @@ class StickyCanvasApp:
# ── İkon ────────────────────────────────────────────────────────
def _icon_path(self) -> Optional[str]:
# PyInstaller bundle'da sys._MEIPASS kullan
if getattr(sys, 'frozen', False):
base = sys._MEIPASS
else:
base = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
p = os.path.join(base, "assets", "icon.png")
return p if os.path.exists(p) else None