05/23 Phase 8
This commit is contained in:
@@ -17,6 +17,7 @@ from apscheduler.schedulers.background import BackgroundScheduler
|
||||
from db.database import init_db
|
||||
from core.fetcher import fetch_all
|
||||
from core.exporter import create_icon_png
|
||||
from core.paths import bundled_asset, user_data_dir
|
||||
from ui.statusbar import StatusBar
|
||||
from ui.history import HistoryScreen
|
||||
from ui.analysis import AnalysisScreen
|
||||
@@ -38,7 +39,7 @@ class LottoSightApp(tk.Tk):
|
||||
self.minsize(900, 600)
|
||||
|
||||
try:
|
||||
self.iconphoto(True, tk.PhotoImage(file="assets/icon.png"))
|
||||
self.iconphoto(True, tk.PhotoImage(file=bundled_asset("assets/icon.png")))
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
@@ -172,9 +173,10 @@ class LottoSightApp(tk.Tk):
|
||||
|
||||
def main():
|
||||
init_db()
|
||||
if not os.path.exists("assets/icon.png"):
|
||||
os.makedirs("assets", exist_ok=True)
|
||||
create_icon_png("assets/icon.png")
|
||||
icon_path = bundled_asset("assets/icon.png")
|
||||
if not os.path.exists(icon_path):
|
||||
os.makedirs(os.path.dirname(icon_path), exist_ok=True)
|
||||
create_icon_png(icon_path)
|
||||
app = LottoSightApp()
|
||||
app.protocol("WM_DELETE_WINDOW", app.on_close)
|
||||
app.mainloop()
|
||||
|
||||
Reference in New Issue
Block a user