EXE
This commit is contained in:
@@ -12,6 +12,12 @@ import sys
|
||||
import subprocess
|
||||
|
||||
|
||||
def _icon_path():
|
||||
if getattr(sys, "frozen", False) and getattr(sys, "_MEIPASS", None):
|
||||
return os.path.join(sys._MEIPASS, "asets", "icon.png")
|
||||
return os.path.join(os.path.dirname(os.path.dirname(__file__)), "asets", "icon.png")
|
||||
|
||||
|
||||
class MainWindow:
|
||||
def __init__(self, root):
|
||||
self.root = root
|
||||
@@ -19,6 +25,12 @@ class MainWindow:
|
||||
self.root.geometry("1000x780")
|
||||
self.root.minsize(800, 600)
|
||||
self.root.configure(bg=COLORS["bg"])
|
||||
try:
|
||||
_path = _icon_path()
|
||||
if os.path.isfile(_path):
|
||||
self.root.iconphoto(True, tk.PhotoImage(file=_path))
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
setup_theme(root)
|
||||
self.video_items = []
|
||||
|
||||
Reference in New Issue
Block a user