Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mupen64plus/mupen64plus-ui-python
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.2.1
Choose a base ref
...
head repository: mupen64plus/mupen64plus-ui-python
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0.2.2
Choose a head ref
Loading
3 changes: 2 additions & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
@@ -3,4 +3,5 @@ Milan Nikolic <gen2brain@gmail.com>

Contributors:
Nathan Caldwell <saintdev> - freedesktop screensaver for Linux
Sven Eckelmann <sven@narfation.org> - patches, bug fixes and debian integration
Sven Eckelmann <sven@narfation.org> - patches, bug fixes and debian integration http://git.io/ynmzug
Fayvel Victor <fayvel> - improvements, patches, bug fixes http://git.io/ynmzug
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
v0.2.2 Oct 18, 2014:
* Initial Python3 support
* Add special SDL2 joystick event system for input config
* Add support for non-native rom files in romlist
* Many bug fixes, full log http://git.io/yRePKw

v0.2.1 Mar 09, 2014:
* Greatly speed up reading ROM list
* Check if core supports DelaySI/CountPerOp options
7 changes: 4 additions & 3 deletions dist/debian/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/sh
apt-get -y install build-essential debhelper pyqt4-dev-tools
apt-get -y install build-essential debhelper pyqt4-dev-tools dh-python python python-qt4 pyqt4-dev-tools
rm -rf ../../debian/
cp -fr ../debian/ ../../
cd ../../
dpkg-buildpackage -rfakeroot
rm -rf build/ debian/
dpkg-buildpackage -rfakeroot -tc -b
rm -rf debian/
69 changes: 3 additions & 66 deletions dist/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,68 +1,5 @@
m64py (0.2.1-1) unstable; urgency=low
* Greatly speed up reading ROM list
* Check if core supports DelaySI/CountPerOp options
* Add support for OpenBSD plugin paths
* Fix search for cheats in mupencheats.txt
m64py (0-0) unstable; urgency=low

-- Milan Nikolic <gen2brain@gmail.com> Sun, 09 Mar 2014 18:27:48 +0100
See changelog.gz for changelog

m64py (0.2.0-1) unstable; urgency=low

* New DelaySI and CountPerOp core settings
* Input settings are now disabled if mode is not fully manual
* Aspect ratio is not preserved when window is maximized
* Added more in-game preview images
* Code refactoring and bug fixes

-- Milan Nikolic <gen2brain@gmail.com> Mon, 27 Jan 2014 15:15:18 +0100

m64py (0.1.9-1) unstable; urgency=low

* bug fixes

-- Milan Nikolic <gen2brain@gmail.com> Sun, 12 Jan 2014 02:18:17 +0100

m64py (0.1.8-1) unstable; urgency=low

* translations support
* enable configuration for rsp plugins
* bug fixes

-- Milan Nikolic <gen2brain@gmail.com> Thu, 09 Jan 2014 04:33:42 +0100

m64py (0.1.7-1) unstable; urgency=low

* log viewer dialog
* bug fixes

-- Milan Nikolic <gen2brain@gmail.com> Sun, 15 Dec 2013 18:14:09 +0100

m64py (0.1.6-1) unstable; urgency=low

* SDL2 support
* option to disable screensaver when emulator is running
* option to keep aspect when resizing window
* LoadFrom/SaveAs actions for state files, PJ64 states are supported

-- Milan Nikolic <gen2brain@gmail.com> Sat, 28 Sep 2013 20:55:21 +0200

m64py (0.1.4-1) unstable; urgency=low

* window resizing (needs Mupen64Plus v2.0-rc2)
* switched to PyQt API ver2
* support multiple files in archives
* icons used are now from Tango! project

-- Milan Nikolic <gen2brain@gmail.com> Wed, 05 Jun 2013 10:37:37 +0200

m64py (0.1.0-2) unstable; urgency=low

* Add python-qt4-gl dependency

-- Milan Nikolic <gen2brain@gmail.com> Sun, 24 Jun 2012 12:49:57 +0200

m64py (0.1.0-1) unstable; urgency=low

* Initial release

-- Milan Nikolic <gen2brain@gmail.com> Tue, 12 Jun 2012 15:04:13 +0200
-- Milan Nikolic <gen2brain@gmail.com> Thu, 01 Jan 1970 01:00:00 +0100
2 changes: 1 addition & 1 deletion dist/debian/compat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7
9
27 changes: 23 additions & 4 deletions dist/debian/control
Original file line number Diff line number Diff line change
@@ -2,12 +2,31 @@ Source: m64py
Section: games
Priority: optional
Maintainer: Milan Nikolic <gen2brain@gmail.com>
Build-Depends: debhelper
Standards-Version: 3.8.4
Standards-Version: 3.9.5
Homepage: http://m64py.sourceforge.net/
Build-Depends:
debhelper (>= 9),
dh-python,
python,
python-qt4,
pyqt4-dev-tools,
X-Python-Version: >= 2.5

Package: m64py
Architecture: all
Depends: python-qt4, python-qt4-gl, libsdl1.2-dev
Suggests: p7zip, unrar
Depends:
${misc:Depends},
python,
libsdl1.2-dev,
python-qt4,
python-qt4-gl,
Recommends:
libmupen64plus2,
mupen64plus-audio-all | mupen64plus-audio,
mupen64plus-input-all | mupen64plus-input,
mupen64plus-rsp-all | mupen64plus-rsp,
mupen64plus-video-all | mupen64plus-video,
python-lzma | p7zip,
python-opengl,
unrar,
Description: A frontend for Mupen64Plus
2 changes: 1 addition & 1 deletion dist/debian/docs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
README.md
AUTHORS README.md
1 change: 1 addition & 0 deletions dist/debian/links
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
usr/share/m64py/m64py_run /usr/bin/m64py
4 changes: 2 additions & 2 deletions dist/debian/m64py.menu
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
?package(volti):needs="X11" section="Games"\
?package(m64py):needs="X11" section="Games"\
title="m64py" command="/usr/bin/m64py"\
longtitle="A frontend for Mupen64Plus" \
icon="m64py.png"
icon="/usr/share/pixmaps/m64py.png"
38 changes: 29 additions & 9 deletions dist/debian/rules
Original file line number Diff line number Diff line change
@@ -1,13 +1,33 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export PYBUILD_DESTDIR=debian/m64py
export PYBUILD_CONFIGURE_ARGS=config
export PYBUILD_BUILD_ARGS_python2=build_ext
export PYBUILD_INSTALL_ARGS=--install-layout=deb \
--install-scripts=/usr/share/m64py \
--install-lib=/usr/share/m64py

%:
dh $@
DESTDIR = $(CURDIR)/debian/m64py

VERSION = $(shell cat src/m64py/core/defs.py | grep FRONTEND_VERSION | awk -F' = ' '{print $$2}' | tr -d '"')
RELEASE = 0

binary binary-arch binary-indep build build-arch build-indep clean install install-arch install-indep:
dh $@ --with=python2 --parallel --list-missing --buildsystem=pybuild

override_dh_auto_install:
dh_auto_install
mv $(DESTDIR)/usr/share/m64py/m64py/m64py $(DESTDIR)/usr/share/m64py/m64py_run

override_dh_installchangelogs:
dh_installchangelogs ChangeLog

override_dh_gencontrol:
dh_gencontrol -pm64py -u-v$(VERSION)-$(RELEASE)

override_dh_builddeb:
dh_builddeb -- -Zgzip

.PHONY: binary binary-arch binary-indep build build-arch build-indep clean install install-arch install-indep \
override_dh_auto_install override_dh_installchangelogs override_dh_gencontrol override_dh_builddeb
1 change: 1 addition & 0 deletions dist/debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (quilt)
4 changes: 2 additions & 2 deletions m64py
Original file line number Diff line number Diff line change
@@ -30,15 +30,15 @@ try:
sip.setapi('QVariant', 2)
from PyQt4.QtGui import QApplication
from PyQt4.QtCore import Qt, QLocale, QTranslator
except ImportError, err:
except ImportError as err:
sys.stderr.write("This application needs PyQt4 module%sError:%s%s" % (
os.linesep, str(err), os.linesep))
sys.exit(1)

try:
from m64py.loader import load_library
from m64py.core.defs import FRONTEND_VERSION, LOGO
except ImportError, err:
except ImportError as err:
sys.stderr.write("Can't import m64py modules%sError:%s%s" % (
os.linesep, str(err), os.linesep))
sys.exit(1)
7 changes: 2 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@ def compile_ui(self, ui_file):
if not newer(ui_file, py_file):
return
fp = open(py_file, "w")
uic.compileUi(ui_file, fp)
uic.compileUi(ui_file, fp, from_imports = True)
fp.close()

def compile_rc(self, qrc_file):
@@ -47,7 +47,7 @@ def compile_rc(self, qrc_file):
path = origpath.split(os.pathsep)
path.append(dirname(PyQt4.__file__))
os.putenv("PATH", os.pathsep.join(path))
if subprocess.call(["pyrcc4", qrc_file, "-o", py_file]) > 0:
if subprocess.call(["pyrcc4", "-py3", 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)
@@ -320,8 +320,5 @@ def run(self):
data_files = [
("share/pixmaps", ["xdg/m64py.png"]),
("share/applications", ["xdg/m64py.desktop"]),
("share/mime/packages", ["xdg/application-x-m64py.xml"]),
("share/icons/hicolor/96x96/mimetypes/application-x-m64py.png",
["xdg/application-x-m64py.xml"])
]
)
30 changes: 12 additions & 18 deletions src/m64py/SDL/array.py
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@
from ctypes import *

# Arrange these in order of preference
_array_names = ('numpy', 'numarray', 'Numeric')
_array_names = ('numpy')

def _import_arrays(array_names, locals):
default_array = None
@@ -32,14 +32,12 @@ def _import_arrays(array_names, locals):
locals['_have_%s' % array_name] = False
locals['_have_array'] = default_array is not None

# This sets up local names for the arrays. If numpy, Numeric, and numarray
# are all available, the following local variables are defined:
# This sets up local names for the arrays. If numpy is
# available, the following local variables are defined:
# numpy, _numpy_typemap
# numarray, _numarray_typemap
# Numeric, _Numeric_typemap
#
# The following local variables will be set to True or False:
# _have_numpy, _have_numarray, _have_Numeric
# _have_numpy
#
# If any of the array modules were imported, the following is True:
# _have_array
@@ -147,7 +145,7 @@ def as_numpy(self, shape=None):
ar = ar.reshape(shape)
return ar

# Generic array methods (numpy, Numeric, numarray)
# Generic array methods (numpy)

def have_array(cls):
'''Determine if an array module is available.
@@ -161,7 +159,7 @@ def array_module(cls):
'''Determine the default array module.
:rtype: module
:return: one of numpy, Numeric, numarray, or None
:return: one of numpy or None
'''
if _have_array:
return _default_array
@@ -170,16 +168,16 @@ def array_module(cls):
array_module = classmethod(array_module)

def to_array(self, shape=None):
'''Convert the array to a numpy, Numeric or numarray array.
'''Convert the array to a numpy array.
The returned array will be a copy of the data. You can retrieve
the module used (numpy, Numeric or numarray) using the `array_module`
the module used (numpy) using the `array_module`
method.
If none of numpy, Numeric or numarray could be imported, an
If none of numpy could be imported, an
ImportError will be raised.
:rtype: numpy.ndarray, Numeric.array or numarray.numarraycore.NumArray
:rtype: numpy.ndarray.array
'''
if not _have_array:
raise ImportError, 'no array module could be imported'
@@ -195,19 +193,15 @@ def to_array(self, shape=None):
# Each module has its own shaping interface
if _have_numpy and _default_array is numpy:
return _default_array.fromstring(s, t).reshape(shape)
elif _have_numarray and _default_array is numarray:
return _default_array.fromstring(s, t, shape)
elif _have_Numeric and _default_array is Numeric:
return _default_array.fromstring(s, t).resize(shape)

def from_array(self, array):
'''Copy data from the given numpy, Numeric or numarray array into
'''Copy data from the given numpy array into
this array.
The array sizes must match exactly. No type checking is performed.
:Parameters:
`array` : numpy, Numeric or numarray array object
`array` : numpy array object
Array to copy.
'''
s = array.tostring()
19 changes: 10 additions & 9 deletions src/m64py/archive.py
Original file line number Diff line number Diff line change
@@ -21,6 +21,7 @@
import shutil
import tempfile
from subprocess import Popen, PIPE
import binascii

from m64py.utils import which

@@ -47,9 +48,9 @@
if HAS_7Z or LZMA_CMD: EXT_FILTER += " *.7z"

ROM_TYPE = {
'80371240': 'z64 (native)',
'37804012': 'v64 (byteswapped)',
'40123780': 'n64 (wordswapped)'
b'80371240': 'z64 (native)',
b'37804012': 'v64 (byteswapped)',
b'40123780': 'n64 (wordswapped)'
}


@@ -153,17 +154,17 @@ def get_filetype(self):
fd = open(self.file, "rb")
magic = fd.read(4)
fd.close()
if magic == 'PK\03\04':
if magic == b'PK\03\04':
return ZIP
elif magic.startswith('\037\213'):
elif magic.startswith(b'\037\213'):
return GZIP
elif magic.startswith('BZh'):
elif magic.startswith(b'BZh'):
return BZIP
elif magic == 'Rar!':
elif magic == b'Rar!':
return RAR
elif magic == '7z\xbc\xaf':
elif magic == b'7z\xbc\xaf':
return LZMA
elif magic.encode('hex') in ROM_TYPE.keys():
elif binascii.hexlify(magic) in ROM_TYPE.keys():
return ROM
return None

2 changes: 1 addition & 1 deletion src/m64py/core/config.py
Original file line number Diff line number Diff line change
@@ -60,7 +60,7 @@ def open_section(self, section=None):
try:
self.section = section
self.parameters[self.section] = {}
except ValueError, err:
except ValueError as err:
log.exception(str(err))
return
config_ptr = C.c_void_p()
Loading