From 8fb278886b0b518c9c49fe65a49366942c945392 Mon Sep 17 00:00:00 2001 From: mailchuck Date: Wed, 23 Dec 2015 00:34:41 +0100 Subject: [PATCH] Fix frozen localisation (OSX) Fixes Bitmessage#737 --- src/build_osx.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/build_osx.py b/src/build_osx.py index a5b004e6..03293efd 100644 --- a/src/build_osx.py +++ b/src/build_osx.py @@ -1,18 +1,27 @@ import os +from PyQt4 import QtCore from setuptools import setup name = "Bitmessage" version = os.getenv("PYBITMESSAGEVERSION", "custom") mainscript = ["bitmessagemain.py"] +DATA_FILES = [ + ('', ['sslkeys', 'images']), + ('bitmsghash', ['bitmsghash/bitmsghash.cl', 'bitmsghash/bitmsghash.so']), + ('translations', glob('translations/*.qm')), + ('translations', glob(str(QtCore.QLibraryInfo.location(QtCore.QLibraryInfo.TranslationsPath)) + '/qt_??.qm')), + ('translations', glob(str(QtCore.QLibraryInfo.location(QtCore.QLibraryInfo.TranslationsPath)) + '/qt_??_??.qm')), +] + setup( name = name, version = version, app = mainscript, + data_files=DATA_FILES setup_requires = ["py2app"], options = dict( py2app = dict( - resources = ["images", "translations", "bitmsghash", "sslkeys"], includes = ['sip', 'PyQt4._qt'], iconfile = "images/bitmessage.icns" )