mirror of
https://github.com/mupen64plus/mupen64plus-ui-python.git
synced 2025-04-02 10:51:53 -04:00
pyqt5
Signed-off-by: Milan Nikolic <gen2brain@gmail.com>
This commit is contained in:
parent
6ea9a7a8e7
commit
0751e24e35
25 changed files with 64 additions and 54 deletions
|
@ -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
|
||||
|
|
2
dist/debian/build.sh
vendored
2
dist/debian/build.sh
vendored
|
@ -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 ../../
|
||||
|
|
9
dist/debian/control
vendored
9
dist/debian/control
vendored
|
@ -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,
|
||||
|
|
2
dist/redhat/build.sh
vendored
2
dist/redhat/build.sh
vendored
|
@ -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
|
||||
|
|
4
dist/redhat/m64py.spec.in
vendored
4
dist/redhat/m64py.spec.in
vendored
|
@ -15,10 +15,10 @@ Prefix: %{_prefix}
|
|||
BuildArch: noarch
|
||||
Vendor: Milan Nikolic <gen2brain@gmail.com>
|
||||
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}
|
||||
|
|
6
dist/windows/m64py.iss.in
vendored
6
dist/windows/m64py.iss.in
vendored
|
@ -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]
|
||||
|
|
6
m64py
6
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)
|
||||
|
||||
|
|
16
setup.py
16
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 = [
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
import ctypes
|
||||
|
||||
from PyQt4.QtOpenGL import QGLFormat
|
||||
from PyQt5.QtOpenGL import QGLFormat
|
||||
|
||||
try:
|
||||
# nvidia hack
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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
|
||||
|
|
|
@ -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 *
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from PyQt4.QtCore import Qt
|
||||
from PyQt5.QtCore import Qt
|
||||
|
||||
from m64py.frontend.keycodes import *
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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 *
|
||||
|
|
|
@ -14,8 +14,9 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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
|
||||
|
|
|
@ -14,8 +14,9 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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():
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
import os
|
||||
|
||||
from PyQt4.QtGui import QMessageBox
|
||||
from PyQt5.QtWidgets import QMessageBox
|
||||
|
||||
from m64py.utils import sl
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 *
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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):
|
||||
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue