diff --git a/packages/pyinstaller/bitmessagemain.spec b/packages/pyinstaller/bitmessagemain.spec index 9249fc79..26cb1dd1 100644 --- a/packages/pyinstaller/bitmessagemain.spec +++ b/packages/pyinstaller/bitmessagemain.spec @@ -32,9 +32,14 @@ a = Analysis( 'bitmessageqt.languagebox', 'pyopencl', 'numpy', 'win32com', 'setuptools.msvc', '_cffi_backend' ], - hookspath=None, - runtime_hooks=None, - excludes=['bsddb', 'bz2', 'tcl', 'tk', 'Tkinter'] + hookspath=None, # this feature has undocumented syntax + # https://github.com/pyinstaller/pyinstaller/wiki/Recipe-PyQt4-API-Version + runtime_hooks=['pyinstaller_rthook_pyqt4.py'], + excludes=[ + 'bsddb', 'bz2', + 'PyQt4.QtOpenGL', 'PyQt4.QtOpenGL', 'PyQt4.QtSql', + 'PyQt4.QtSvg', 'PyQt4.QtTest', 'PyQt4.QtWebKit', 'PyQt4.QtXml', + 'tcl', 'tk', 'Tkinter', 'win32ui'] ) os.rename( @@ -77,9 +82,8 @@ a.datas += addTranslations() excluded_binaries = [ - 'QtOpenGL4.dll', - 'QtSvg4.dll', - 'QtXml4.dll', + 'QtOpenGL4.dll', 'QtSql4.dll', 'QtSvg4.dll', 'QtTest4.dll', + 'QtWebKit4.dll', 'QtXml4.dll' ] a.binaries = TOC([x for x in a.binaries if x[0] not in excluded_binaries]) diff --git a/src/pyinstaller_rthook_pyqt4.py b/src/pyinstaller_rthook_pyqt4.py new file mode 100644 index 00000000..b30fb1cc --- /dev/null +++ b/src/pyinstaller_rthook_pyqt4.py @@ -0,0 +1,10 @@ +# https://github.com/pyinstaller/pyinstaller/wiki/Recipe-PyQt4-API-Version +import sip + +sip.setapi(u'QDate', 2) +sip.setapi(u'QDateTime', 2) +sip.setapi(u'QString', 2) +sip.setapi(u'QTextStream', 2) +sip.setapi(u'QTime', 2) +sip.setapi(u'QUrl', 2) +sip.setapi(u'QVariant', 2)