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

This commit is contained in:
git_alhan committed 2026-05-21 04:15:38 +03:00
1 parent 9f3a599b79
commit 5d52cc1bec
2 files changed
+4

No files matched your search

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

+4
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