From 82b1e9c0e2bc702186fa152d7acca015bc7fd603 Mon Sep 17 00:00:00 2001 From: knotteye Date: Sat, 17 Apr 2021 11:13:26 -0500 Subject: [PATCH] Handle files --- Makefile | 2 +- plchat.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index b07b355..5edbf38 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ fresh: clean default pack systemlibs: systemlibtarget pack default: - nuitka3 --follow-imports --windows-disable-console --windows-icon-from-ico=fedi.ico --windows-company-name=plchat --windows-product-name=plchat --windows-product-version=$(PRODUCTVER) --python-flag=-O -o plchat plchat.py + nuitka3 --follow-imports --enable-plugin=qt-plugins --include-qt-plugins=all --windows-disable-console --windows-icon-from-ico=fedi.ico --windows-company-name=plchat --windows-product-name=plchat --windows-product-version=$(PRODUCTVER) --python-flag=-O -o plchat plchat.py systemlibtarget: nuitka3 --nofollow-imports --follow-import=misc --follow-import=monkeypatch --follow-import=pleroma --follow-import=timeconvert --follow-import=videowidget --follow-import=audiowidget --windows-disable-console --windows-icon-from-ico=fedi.ico --windows-company-name=plchat --windows-product-name=plchat --windows-product-version=$(PRODUCTVER) --python-flag=-O -o plchat plchat.py diff --git a/plchat.py b/plchat.py index b4336a3..27f4930 100644 --- a/plchat.py +++ b/plchat.py @@ -36,7 +36,7 @@ CACHE = appdirs.AppDirs('plchat', 'plchat').user_cache_dir APPDATA = appdirs.AppDirs('plchat', 'plchat').user_data_dir THREADS = {} STATIC_PREF = '' -ICON_PATH = 'fedi.svg' +ICON_PATH = os.path.join(os.path.dirname(__file__), "fedi.svg") class App(QMainWindow): settings = QSettings(APPDATA+"/settings.ini") @@ -410,7 +410,7 @@ class App(QMainWindow): def setUrgent(self, ind): icon = QIcon() - icon.addPixmap(QPixmap('unread.svg')) + icon.addPixmap(QPixmap(os.path.join(os.path.dirname(__file__), "unread.svg"))) self.tabs.setTabIcon(ind, icon) self.tabs.widget(ind).unread = True if self.trayIcon: @@ -951,7 +951,7 @@ class SendArea(QWidget): self.attachButton.clicked.connect(self.newFileDialog) self.attachButton.setSizePolicy(QSizePolicy.Fixed, QSizePolicy.MinimumExpanding) - sendButton = QPushButton(QIcon(QPixmap('send.svg')), '') + sendButton = QPushButton(QIcon(QPixmap(os.path.join(os.path.dirname(__file__), "send.svg"))), '') sendButton.clicked.connect(self.sendMessage) sendButton.setSizePolicy(QSizePolicy.Fixed, QSizePolicy.MinimumExpanding)