From 3f267898d4ca1b194190dc3f0571f52550dc69a6 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 19 Aug 2022 16:52:43 +0200 Subject: [PATCH] Missing folder warning --- CHANGELOG.md | 1 + pesterchum.py | 18 ++++++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b3d40eb..bf38154 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - Show S3RV3R NOT R3SPOND1NG if the server hasn't responded in 45 seconds. (15 seconds after ping) - Close connection and try to reconnect if the server hasn't responded in 90 seconds. (60 seconds after ping) - Fallback to PyQt5. (for Windows 7 users mainly) + - Warning for people who forgot to extract the zipfile. ### Fixed - Error when manually moving group. diff --git a/pesterchum.py b/pesterchum.py index 8dacc5a..f9f0148 100644 --- a/pesterchum.py +++ b/pesterchum.py @@ -1244,7 +1244,7 @@ class PesterWindow(MovingWindow): msgBox.setWindowTitle(":(") msgBox.setTextFormat(QtCore.Qt.TextFormat.RichText) # Clickable html links self.filename = _datadir+"pesterchum.js" - msgBox.setText("

A profile error occured," + msgBox.setText("

A profile error occured, " "trying to switch to default pesterClient profile." "

%s<\h3><\html>" % e) PchumLog.critical(e) @@ -3772,7 +3772,21 @@ class MainProgram(QtCore.QObject): #self.app.setQuitOnLastWindowClosed(False) options = self.oppts(sys.argv[1:]) - + + # Check if the user is a silly little guy + for folder in ['smilies', 'themes']: + if not os.path.isdir(folder): + msgbox = QtWidgets.QMessageBox() + msg = ("'%s' folder not found, Pesterchum will " + "probably not function correctly." + "\nIf this is an excecutable build, " + "verify you extracted the zipfile." % folder) + msgbox.setWindowTitle("SK1LL 1SSU3 >:[") + msgbox.setInformativeText(msg) + msgbox.setIcon(QtWidgets.QMessageBox.Icon.Critical) + msgbox.exec() + + # If we're using pygame for sound we need to init if 'pygame' in sys.modules: # we could set the frequency higher but i love how cheesy it sounds