mirror of
https://github.com/alhan/noteki.git
synced 2026-08-23 05:30:19 +00:00
Fix icon path for PyInstaller frozen builds, add icon.ico
This commit is contained in:
BIN
assets/icon.ico
Normal file
BIN
assets/icon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 64 KiB |
@@ -142,7 +142,11 @@ class StickyCanvasApp:
|
||||
# ── İkon ────────────────────────────────────────────────────────
|
||||
|
||||
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")
|
||||
return p if os.path.exists(p) else None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user