Add app icon and update build process
Build Linux / Build Linux (push) Successful in 1m13s
Build Windows / Build Windows (push) Has been cancelled

This commit is contained in:
daniel committed 2026-01-13 18:23:00 +01:00
1 parent 334d25c3ba
commit 9fc75b7e39
5 files changed
+43 -1

No files matched your search

+18
View File
@@ -1,10 +1,28 @@
import sys
import os
from PyQt6.QtWidgets import QApplication
from PyQt6.QtGui import QIcon
from teletext.ui import MainWindow
def resource_path(relative_path):
""" Get absolute path to resource, works for dev and for PyInstaller """
try:
# PyInstaller creates a temp folder and stores path in _MEIPASS
base_path = sys._MEIPASS
except Exception:
base_path = os.path.abspath(".")
return os.path.join(base_path, relative_path)
def main():
app = QApplication(sys.argv)
# Set App Icon
icon_path = resource_path("app_icon.png")
if os.path.exists(icon_path):
app.setWindowIcon(QIcon(icon_path))
window = MainWindow()
window.show()
sys.exit(app.exec())