diff --git a/README.md b/README.md index 4d415f6..676d304 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ About ----- -M64Py is a Qt4 front-end (GUI) for Mupen64Plus 2.0, a cross-platform +M64Py is a Qt5 front-end (GUI) for Mupen64Plus 2.0, a cross-platform plugin-based Nintendo 64 emulator. Front-end is written in Python and it provides a user-friendly interface over Mupen64Plus shared library. @@ -27,7 +27,7 @@ Features Dependencies ------------ -* PyQt4 +* PyQt5 * SDL-1.2 or SDL-2.0 Install diff --git a/dist/debian/build.sh b/dist/debian/build.sh index e5fda51..c87fbbb 100755 --- a/dist/debian/build.sh +++ b/dist/debian/build.sh @@ -1,5 +1,5 @@ #!/bin/sh -apt-get -y install build-essential debhelper pyqt4-dev-tools dh-python python python-qt4 pyqt4-dev-tools +apt-get -y install build-essential debhelper pyqt5-dev-tools dh-python python python-pyqt5 python-pyqt5.qtopengl rm -rf ../../debian/ cp -fr ../debian/ ../../ cd ../../ diff --git a/dist/debian/control b/dist/debian/control index a73f43b..777758c 100644 --- a/dist/debian/control +++ b/dist/debian/control @@ -8,8 +8,8 @@ Build-Depends: debhelper (>= 9), dh-python, python, - python-qt4, - pyqt4-dev-tools, + python-pyqt5, + pyqt5-dev-tools, X-Python-Version: >= 2.5 Package: m64py @@ -18,8 +18,9 @@ Depends: ${misc:Depends}, python, libsdl1.2-dev, - python-qt4, - python-qt4-gl, + python-pyqt5, + python-pyqt5.qtopengl, + python-pyqt5.qtsvg, Recommends: libmupen64plus2, mupen64plus-audio-all | mupen64plus-audio, diff --git a/dist/redhat/build.sh b/dist/redhat/build.sh index f5b6eee..af61caf 100755 --- a/dist/redhat/build.sh +++ b/dist/redhat/build.sh @@ -1,5 +1,5 @@ #!/bin/sh -yum install rpm-build PyQt4-devel -y +yum install rpm-build PyQt5-devel -y VERSION=`cat ../../src/m64py/core/defs.py | grep FRONTEND_VERSION | awk -F' = ' '{print $2}' | tr -d '"'` sed "s/{VERSION}/$VERSION/g" m64py.spec.in > m64py.spec cd ../../ && python setup.py sdist diff --git a/dist/redhat/m64py.spec.in b/dist/redhat/m64py.spec.in index c7526ad..5f2539c 100644 --- a/dist/redhat/m64py.spec.in +++ b/dist/redhat/m64py.spec.in @@ -15,10 +15,10 @@ Prefix: %{_prefix} BuildArch: noarch Vendor: Milan Nikolic Url: http://m64py.sourceforge.net -Requires: PyQt4 SDL +Requires: PyQt5 SDL %description -M64Py is a Qt4 front-end (GUI) for Mupen64Plus 2.0, a cross-platform plugin-based Nintendo 64 emulator. +M64Py is a Qt5 front-end (GUI) for Mupen64Plus 2.0, a cross-platform plugin-based Nintendo 64 emulator. %prep %setup -n %{name}-%{unmangled_version} diff --git a/dist/windows/m64py.iss.in b/dist/windows/m64py.iss.in index 1038757..b77e1fd 100644 --- a/dist/windows/m64py.iss.in +++ b/dist/windows/m64py.iss.in @@ -34,9 +34,9 @@ Source: "m64py\COPYING"; DestDir: "{app}"; Source: "m64py\README.md"; DestDir: "{app}"; Source: "m64py\ChangeLog"; DestDir: "{app}"; Source: "m64py\*.v64"; DestDir: "{app}\test"; -Source: "m64py\qt4_plugins\codecs\*.dll"; DestDir: "{app}\qt4_plugins\codecs"; -Source: "m64py\qt4_plugins\iconengines\*.dll"; DestDir: "{app}\qt4_plugins\iconengines"; -Source: "m64py\qt4_plugins\imageformats\*.dll"; DestDir: "{app}\qt4_plugins\imageformats"; +Source: "m64py\qt5_plugins\codecs\*.dll"; DestDir: "{app}\qt5_plugins\codecs"; +Source: "m64py\qt5_plugins\iconengines\*.dll"; DestDir: "{app}\qt5_plugins\iconengines"; +Source: "m64py\qt5_plugins\imageformats\*.dll"; DestDir: "{app}\qt5_plugins\imageformats"; Source: "m64py\doc\*"; DestDir: "{app}\doc"; [Icons] diff --git a/m64py b/m64py index 61617d9..fb110e0 100755 --- a/m64py +++ b/m64py @@ -28,10 +28,10 @@ try: import sip sip.setapi('QString', 2) sip.setapi('QVariant', 2) - from PyQt4.QtGui import QApplication - from PyQt4.QtCore import Qt, QLocale, QTranslator + from PyQt5.QtWidgets import QApplication + from PyQt5.QtCore import Qt, QLocale, QTranslator except ImportError as err: - sys.stderr.write("This application needs PyQt4 module%sError:%s%s" % ( + sys.stderr.write("This application needs PyQt5 module%sError:%s%s" % ( os.linesep, str(err), os.linesep)) sys.exit(1) diff --git a/setup.py b/setup.py index 67cff99..2c6cc62 100644 --- a/setup.py +++ b/setup.py @@ -30,7 +30,7 @@ class build_qt(Command): pass def compile_ui(self, ui_file): - from PyQt4 import uic + from PyQt5 import uic py_file = os.path.splitext(ui_file)[0] + "_ui.py" if not newer(ui_file, py_file): return @@ -39,15 +39,15 @@ class build_qt(Command): fp.close() def compile_rc(self, qrc_file): - import PyQt4 + import PyQt5 py_file = os.path.splitext(qrc_file)[0] + "_rc.py" if not newer(qrc_file, py_file): return origpath = os.getenv("PATH") path = origpath.split(os.pathsep) - path.append(dirname(PyQt4.__file__)) + path.append(dirname(PyQt5.__file__)) os.putenv("PATH", os.pathsep.join(path)) - if subprocess.call(["pyrcc4", "-py3", qrc_file, "-o", py_file]) > 0: + if subprocess.call(["pyrcc5", qrc_file, "-o", py_file]) > 0: self.warn("Unable to compile resource file %s" % qrc_file) if not os.path.exists(py_file): sys.exit(1) @@ -65,7 +65,7 @@ class build_qt(Command): class build_exe(Command): - """Needs PyQt4, rarfile, PyLZMA, PyWin32, PyInstaller, Inno Setup 5""" + """Needs PyQt5, rarfile, PyLZMA, PyWin32, PyInstaller, Inno Setup 5""" user_options = [] arch = "i686-w64-mingw32" url = "https://bitbucket.org/ecsv/mupen64plus-mxe-daily/get/master.zip" @@ -243,7 +243,7 @@ def set_rthook(): import PyInstaller hook_file = "" module_dir = dirname(PyInstaller.__file__) - rthook = join(module_dir, "loader", "rthooks", "pyi_rth_qt4plugins.py") + rthook = join(module_dir, "loader", "rthooks", "pyi_rth_qt5plugins.py") with open(rthook, "r") as hook: data = hook.read() if "sip.setapi" not in data: lines = data.split("\n") @@ -306,7 +306,7 @@ setup( name = "m64py", version = FRONTEND_VERSION, description = "M64Py - A frontend for Mupen64Plus", - long_description = "M64Py is a Qt4 front-end (GUI) for Mupen64Plus 2.0, a cross-platform plugin-based Nintendo 64 emulator.", + long_description = "M64Py is a Qt5 front-end (GUI) for Mupen64Plus 2.0, a cross-platform plugin-based Nintendo 64 emulator.", author = "Milan Nikolic", author_email = "gen2brain@gmail.com", license = "GNU GPLv3", @@ -314,7 +314,7 @@ setup( packages = ["m64py", "m64py.core", "m64py.frontend", "m64py.ui", "m64py.SDL", "m64py.SDL2"], package_dir = {"": "src"}, scripts = ["m64py"], - requires = ["PyQt4"], + requires = ["PyQt5"], platforms = ["Linux", "Windows", "Darwin"], cmdclass = cmdclass, data_files = [ diff --git a/src/m64py/core/vidext.py b/src/m64py/core/vidext.py index 02d8a4f..c834960 100644 --- a/src/m64py/core/vidext.py +++ b/src/m64py/core/vidext.py @@ -16,7 +16,7 @@ import ctypes -from PyQt4.QtOpenGL import QGLFormat +from PyQt5.QtOpenGL import QGLFormat try: # nvidia hack diff --git a/src/m64py/frontend/cheat.py b/src/m64py/frontend/cheat.py index b6a5f48..47caf0f 100644 --- a/src/m64py/frontend/cheat.py +++ b/src/m64py/frontend/cheat.py @@ -18,8 +18,9 @@ import os import re from collections import defaultdict -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5.QtGui import * +from PyQt5.QtWidgets import * +from PyQt5.QtCore import * from m64py.core.defs import * from m64py.utils import sl diff --git a/src/m64py/frontend/dialogs.py b/src/m64py/frontend/dialogs.py index 86e2d46..8b435cb 100644 --- a/src/m64py/frontend/dialogs.py +++ b/src/m64py/frontend/dialogs.py @@ -14,8 +14,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from PyQt4.QtCore import * -from PyQt4.QtGui import QDialog, QMessageBox, QListWidgetItem +from PyQt5.QtCore import * +from PyQt5.QtWidgets import QDialog, QMessageBox, QListWidgetItem from m64py.utils import version_split from m64py.core.defs import FRONTEND_VERSION diff --git a/src/m64py/frontend/glwidget.py b/src/m64py/frontend/glwidget.py index b216f27..ff90925 100644 --- a/src/m64py/frontend/glwidget.py +++ b/src/m64py/frontend/glwidget.py @@ -14,8 +14,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from PyQt4.QtCore import * -from PyQt4.QtOpenGL import * +from PyQt5.QtCore import * +from PyQt5.QtOpenGL import * from m64py.core.defs import * from m64py.opts import SDL2 diff --git a/src/m64py/frontend/input.py b/src/m64py/frontend/input.py index 2615fdd..2ad785c 100644 --- a/src/m64py/frontend/input.py +++ b/src/m64py/frontend/input.py @@ -16,8 +16,9 @@ import re -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5.QtGui import * +from PyQt5.QtWidgets import * +from PyQt5.QtCore import * from m64py.opts import SDL2 from m64py.core.defs import * diff --git a/src/m64py/frontend/joystick.py b/src/m64py/frontend/joystick.py index f877125..36880e2 100644 --- a/src/m64py/frontend/joystick.py +++ b/src/m64py/frontend/joystick.py @@ -17,7 +17,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from PyQt4.QtCore import QObject, pyqtSignal, QTime, QTimer +from PyQt5.QtCore import QObject, pyqtSignal, QTime, QTimer from m64py.opts import SDL2 from m64py.frontend.log import log diff --git a/src/m64py/frontend/keymap.py b/src/m64py/frontend/keymap.py index 383696e..0060523 100644 --- a/src/m64py/frontend/keymap.py +++ b/src/m64py/frontend/keymap.py @@ -14,7 +14,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from PyQt4.QtCore import Qt +from PyQt5.QtCore import Qt from m64py.frontend.keycodes import * diff --git a/src/m64py/frontend/log.py b/src/m64py/frontend/log.py index 54ce298..0aa2369 100644 --- a/src/m64py/frontend/log.py +++ b/src/m64py/frontend/log.py @@ -17,8 +17,9 @@ import sys import logging -from PyQt4.QtCore import pyqtSignal -from PyQt4.QtGui import QDialog, QTextCursor +from PyQt5.QtCore import pyqtSignal +from PyQt5.QtWidgets import QDialog +from PyQt5.QtGui import QTextCursor from m64py.ui.logview_ui import Ui_LogView diff --git a/src/m64py/frontend/mainwindow.py b/src/m64py/frontend/mainwindow.py index f5fcc9b..3d09afd 100644 --- a/src/m64py/frontend/mainwindow.py +++ b/src/m64py/frontend/mainwindow.py @@ -17,8 +17,9 @@ import os import sys -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5.QtGui import * +from PyQt5.QtWidgets import * +from PyQt5.QtCore import * from m64py.core.defs import * from m64py.frontend.dialogs import * diff --git a/src/m64py/frontend/plugin.py b/src/m64py/frontend/plugin.py index 26cf052..31695fb 100644 --- a/src/m64py/frontend/plugin.py +++ b/src/m64py/frontend/plugin.py @@ -14,8 +14,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5.QtGui import * +from PyQt5.QtWidgets import * +from PyQt5.QtCore import * from m64py.core.defs import * from m64py.utils import format_label, format_options diff --git a/src/m64py/frontend/recentfiles.py b/src/m64py/frontend/recentfiles.py index 3bc89ac..7901a80 100644 --- a/src/m64py/frontend/recentfiles.py +++ b/src/m64py/frontend/recentfiles.py @@ -14,8 +14,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from PyQt4.QtGui import QAction, QIcon, QPixmap -from PyQt4.QtCore import QFileInfo +from PyQt5.QtGui import QIcon, QPixmap +from PyQt5.QtWidgets import QAction +from PyQt5.QtCore import QFileInfo class RecentFiles(): diff --git a/src/m64py/frontend/rominfo.py b/src/m64py/frontend/rominfo.py index 2599c6b..7f21bf4 100644 --- a/src/m64py/frontend/rominfo.py +++ b/src/m64py/frontend/rominfo.py @@ -16,7 +16,7 @@ import os -from PyQt4.QtGui import QMessageBox +from PyQt5.QtWidgets import QMessageBox from m64py.utils import sl diff --git a/src/m64py/frontend/romlist.py b/src/m64py/frontend/romlist.py index ce757e7..bbc20f4 100644 --- a/src/m64py/frontend/romlist.py +++ b/src/m64py/frontend/romlist.py @@ -18,8 +18,9 @@ import os import ctypes import fnmatch -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5.QtGui import * +from PyQt5.QtWidgets import * +from PyQt5.QtCore import * from m64py.utils import sl from m64py.core.defs import m64p_rom_header diff --git a/src/m64py/frontend/settings.py b/src/m64py/frontend/settings.py index 93a405c..2cbe538 100644 --- a/src/m64py/frontend/settings.py +++ b/src/m64py/frontend/settings.py @@ -17,8 +17,9 @@ import os import sys -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5.QtGui import * +from PyQt5.QtWidgets import * +from PyQt5.QtCore import * from m64py.core.defs import * from m64py.loader import find_library diff --git a/src/m64py/frontend/worker.py b/src/m64py/frontend/worker.py index adaf31b..cb426cd 100644 --- a/src/m64py/frontend/worker.py +++ b/src/m64py/frontend/worker.py @@ -17,8 +17,9 @@ import os import shutil -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5.QtGui import * +from PyQt5.QtWidgets import * +from PyQt5.QtCore import * from m64py.utils import sl from m64py.core.defs import * diff --git a/src/m64py/ui/imageview.py b/src/m64py/ui/imageview.py index fdfd200..8025499 100644 --- a/src/m64py/ui/imageview.py +++ b/src/m64py/ui/imageview.py @@ -14,8 +14,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from PyQt4.QtGui import QGraphicsView, QGraphicsScene -from PyQt4.QtCore import Qt, QRectF +from PyQt5.QtWidgets import QGraphicsView, QGraphicsScene +from PyQt5.QtCore import Qt, QRectF class ImageView(QGraphicsView): diff --git a/src/m64py/ui/inputbutton.py b/src/m64py/ui/inputbutton.py index 3c5905d..e4478df 100644 --- a/src/m64py/ui/inputbutton.py +++ b/src/m64py/ui/inputbutton.py @@ -14,8 +14,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from PyQt4.QtGui import QPushButton -from PyQt4.QtCore import Qt +from PyQt5.QtWidgets import QPushButton +from PyQt5.QtCore import Qt from m64py.opts import SDL2 from m64py.frontend.keymap import QT2SDL, QT2SDL2