mirror of
https://github.com/alhan/noteki.git
synced 2026-11-14 03:37:46 +00:00
Fix icon path for PyInstaller frozen builds, add icon.ico
This commit is contained in:
1 parent
9f3a599b79
commit
5d52cc1bec
2 files changed
+5
-1
No files matched your search
Binary file not shown.
|
After Width: | Height: | Size: 64 KiB |
+5
-1
@@ -142,7 +142,11 @@ class StickyCanvasApp:
|
|||||||
# ── İkon ────────────────────────────────────────────────────────
|
# ── İkon ────────────────────────────────────────────────────────
|
||||||
|
|
||||||
def _icon_path(self) -> Optional[str]:
|
def _icon_path(self) -> Optional[str]:
|
||||||
base = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
# 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")
|
p = os.path.join(base, "assets", "icon.png")
|
||||||
return p if os.path.exists(p) else None
|
return p if os.path.exists(p) else None
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user