Windows Icons broken again... fixed (hopefully)
This commit is contained in:
parent
806ee45ec2
commit
b16520c555
1 changed files with 8 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
|
import sys
|
||||||
import logging
|
import logging
|
||||||
from logging.handlers import QueueListener
|
from logging.handlers import QueueListener
|
||||||
from multiprocessing import Process, Queue
|
from multiprocessing import Process, Queue
|
||||||
|
@ -838,11 +839,17 @@ class LoggingLabelHandler(logging.Handler):
|
||||||
def run_gui() -> None:
|
def run_gui() -> None:
|
||||||
# initialize cache dir
|
# initialize cache dir
|
||||||
os.makedirs(platformdirs.user_cache_dir("syng"), exist_ok=True)
|
os.makedirs(platformdirs.user_cache_dir("syng"), exist_ok=True)
|
||||||
|
base_dir = os.path.dirname(__file__)
|
||||||
|
if getattr(sys, "frozen", False) and hasattr(sys, "_MEIPASS"):
|
||||||
|
base_dir = getattr(sys, "_MEIPASS")
|
||||||
|
|
||||||
signal.signal(signal.SIGINT, signal.SIG_DFL)
|
signal.signal(signal.SIGINT, signal.SIG_DFL)
|
||||||
|
|
||||||
app = QApplication([])
|
app = QApplication([])
|
||||||
app.setWindowIcon(QIcon(":/icons/syng.ico"))
|
if os.name == "nt":
|
||||||
|
app.setWindowIcon(QIcon(os.path.join(base_dir, "syng.ico")))
|
||||||
|
else:
|
||||||
|
app.setWindowIcon(QIcon(":/icons/syng.ico"))
|
||||||
app.setApplicationName("Syng")
|
app.setApplicationName("Syng")
|
||||||
app.setDesktopFileName("rocks.syng.Syng")
|
app.setDesktopFileName("rocks.syng.Syng")
|
||||||
window = SyngGui()
|
window = SyngGui()
|
||||||
|
|
Loading…
Add table
Reference in a new issue