openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #18523
[Merge] lp:~mzibricky/openlp/packaging into lp:openlp/packaging
matysek has proposed merging lp:~mzibricky/openlp/packaging into lp:openlp/packaging.
Requested reviews:
OpenLP Core (openlp-core)
Related bugs:
Bug #779201 in OpenLP: "QString and QVariant auto-conversion"
https://bugs.launchpad.net/openlp/+bug/779201
Bug #814838 in OpenLP: "cleanup Mac OS X build script"
https://bugs.launchpad.net/openlp/+bug/814838
For more details, see:
https://code.launchpad.net/~mzibricky/openlp/packaging/+merge/141497
These packaging changes should fix the osx and windows builds to properly set sip API before any PyQt module is imported.
These changes depends on latest development version of PyInstaller.
It also enables 64bit build on osx.
--
https://code.launchpad.net/~mzibricky/openlp/packaging/+merge/141497
Your team OpenLP Core is requested to review the proposed merge of lp:~mzibricky/openlp/packaging into lp:openlp/packaging.
=== modified file 'osx/config.ini.default'
--- osx/config.ini.default 2012-06-24 14:59:45 +0000
+++ osx/config.ini.default 2012-12-30 23:18:21 +0000
@@ -11,7 +11,7 @@
documentation = %(projects)s/documentation
macicon = %(here)s/OpenLP.icns
bundleinfo = %(here)s/Info.plist
-hooks = resources/pyinstaller
+hooks = %(here)s/../pyinstaller-hooks
dmg_background = %(here)s/DmgImageInstallBackground.png
[transifex]
=== modified file 'osx/macosx-builder.py'
--- osx/macosx-builder.py 2012-12-01 13:23:08 +0000
+++ osx/macosx-builder.py 2012-12-30 23:18:21 +0000
@@ -332,13 +332,14 @@
"""
self._print(u'Running PyInstaller...')
os.chdir(self.branch_path)
- # arch -i386 ensures 32bit build is created.
- pyinstaller = Popen(('arch', '-i386', self.python,
+ pyinstaller = Popen((self.python,
self.pyinstaller,
u'--noconfirm',
u'--windowed',
u'--noupx',
u'--additional-hooks-dir', self.hooks_path,
+ u'--runtime-hook', os.path.join(self.hooks_path,
+ 'rthook_openlp_pyqt4.py'),
u'--log-level=ERROR',
u'-o', self.branch_path,
#u'-i', self.mac_icon,
=== added directory 'pyinstaller-hooks'
=== added file 'pyinstaller-hooks/hook-openlp.core.ui.media.py'
--- pyinstaller-hooks/hook-openlp.core.ui.media.py 1970-01-01 00:00:00 +0000
+++ pyinstaller-hooks/hook-openlp.core.ui.media.py 2012-12-30 23:18:21 +0000
@@ -0,0 +1,32 @@
+# -*- coding: utf-8 -*-
+# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
+
+###############################################################################
+# OpenLP - Open Source Lyrics Projection #
+# --------------------------------------------------------------------------- #
+# Copyright (c) 2008-2012 Raoul Snyman #
+# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
+# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
+# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
+# Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
+# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Dave Warnock, #
+# Frode Woldsund, Martin Zibricky, Patrick Zimmermann #
+# --------------------------------------------------------------------------- #
+# This program is free software; you can redistribute it and/or modify it #
+# under the terms of the GNU General Public License as published by the Free #
+# Software Foundation; version 2 of the License. #
+# #
+# This program is distributed in the hope that it will be useful, but WITHOUT #
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
+# more details. #
+# #
+# You should have received a copy of the GNU General Public License along #
+# with this program; if not, write to the Free Software Foundation, Inc., 59 #
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
+###############################################################################
+
+hiddenimports = ['openlp.core.ui.media.phononplayer',
+ 'openlp.core.ui.media.vlcplayer',
+ 'openlp.core.ui.media.webkitplayer']
=== added file 'pyinstaller-hooks/hook-openlp.plugins.presentations.presentationplugin.py'
--- pyinstaller-hooks/hook-openlp.plugins.presentations.presentationplugin.py 1970-01-01 00:00:00 +0000
+++ pyinstaller-hooks/hook-openlp.plugins.presentations.presentationplugin.py 2012-12-30 23:18:21 +0000
@@ -0,0 +1,32 @@
+# -*- coding: utf-8 -*-
+# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
+
+###############################################################################
+# OpenLP - Open Source Lyrics Projection #
+# --------------------------------------------------------------------------- #
+# Copyright (c) 2008-2012 Raoul Snyman #
+# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
+# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
+# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
+# Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
+# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Dave Warnock, #
+# Frode Woldsund, Martin Zibricky, Patrick Zimmermann #
+# --------------------------------------------------------------------------- #
+# This program is free software; you can redistribute it and/or modify it #
+# under the terms of the GNU General Public License as published by the Free #
+# Software Foundation; version 2 of the License. #
+# #
+# This program is distributed in the hope that it will be useful, but WITHOUT #
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
+# more details. #
+# #
+# You should have received a copy of the GNU General Public License along #
+# with this program; if not, write to the Free Software Foundation, Inc., 59 #
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
+###############################################################################
+
+hiddenimports = ['openlp.plugins.presentations.lib.impresscontroller',
+ 'openlp.plugins.presentations.lib.powerpointcontroller',
+ 'openlp.plugins.presentations.lib.pptviewcontroller']
=== added file 'pyinstaller-hooks/hook-openlp.py'
--- pyinstaller-hooks/hook-openlp.py 1970-01-01 00:00:00 +0000
+++ pyinstaller-hooks/hook-openlp.py 2012-12-30 23:18:21 +0000
@@ -0,0 +1,38 @@
+# -*- coding: utf-8 -*-
+# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
+
+###############################################################################
+# OpenLP - Open Source Lyrics Projection #
+# --------------------------------------------------------------------------- #
+# Copyright (c) 2008-2012 Raoul Snyman #
+# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
+# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
+# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
+# Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
+# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Dave Warnock, #
+# Frode Woldsund, Martin Zibricky, Patrick Zimmermann #
+# --------------------------------------------------------------------------- #
+# This program is free software; you can redistribute it and/or modify it #
+# under the terms of the GNU General Public License as published by the Free #
+# Software Foundation; version 2 of the License. #
+# #
+# This program is distributed in the hope that it will be useful, but WITHOUT #
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
+# more details. #
+# #
+# You should have received a copy of the GNU General Public License along #
+# with this program; if not, write to the Free Software Foundation, Inc., 59 #
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
+###############################################################################
+
+hiddenimports = ['plugins.songs.songsplugin',
+ 'plugins.bibles.bibleplugin',
+ 'plugins.presentations.presentationplugin',
+ 'plugins.media.mediaplugin',
+ 'plugins.images.imageplugin',
+ 'plugins.custom.customplugin',
+ 'plugins.songusage.songusageplugin',
+ 'plugins.remotes.remoteplugin',
+ 'plugins.alerts.alertsplugin']
=== added file 'pyinstaller-hooks/rthook_openlp_pyqt4.py'
--- pyinstaller-hooks/rthook_openlp_pyqt4.py 1970-01-01 00:00:00 +0000
+++ pyinstaller-hooks/rthook_openlp_pyqt4.py 2012-12-30 23:18:21 +0000
@@ -0,0 +1,50 @@
+# -*- coding: utf-8 -*-
+# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
+
+###############################################################################
+# OpenLP - Open Source Lyrics Projection #
+# --------------------------------------------------------------------------- #
+# Copyright (c) 2008-2012 Raoul Snyman #
+# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
+# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
+# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
+# Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
+# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Dave Warnock, #
+# Frode Woldsund, Martin Zibricky, Patrick Zimmermann #
+# --------------------------------------------------------------------------- #
+# This program is free software; you can redistribute it and/or modify it #
+# under the terms of the GNU General Public License as published by the Free #
+# Software Foundation; version 2 of the License. #
+# #
+# This program is distributed in the hope that it will be useful, but WITHOUT #
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
+# more details. #
+# #
+# You should have received a copy of the GNU General Public License along #
+# with this program; if not, write to the Free Software Foundation, Inc., 59 #
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
+###############################################################################
+
+
+# PyQt4 supports two different APIs: version 1 (default on Python 2) and
+# version 2 (default on Python 3). For OpenLP we want to use the version 2 API
+# with Python 2.
+#
+# The v2 API has to be set before any import of PyQt4 modules.
+# However, the executable created by PyInstaller overrides qt_plugins directory
+# (it uses PyQt4) before any code from OpenLP gets executed.
+#
+# The following code is bundled with the created executable and executed
+# before any other code.
+
+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)
=== modified file 'windows/config.ini.default'
--- windows/config.ini.default 2012-06-09 19:02:47 +0000
+++ windows/config.ini.default 2012-12-30 23:18:21 +0000
@@ -13,7 +13,7 @@
branch = %(projects)s\trunk
documentation = %(projects)s\documentation
win32icon = %(here)s\OpenLP.ico
-hooks = %(here)s
+hooks = %(here)s\..\pyinstaller-hooks
portable = %(projects)s\OpenLPPortable
[transifex]
=== modified file 'windows/windows-builder.py'
--- windows/windows-builder.py 2012-06-25 16:38:21 +0000
+++ windows/windows-builder.py 2012-12-30 23:18:21 +0000
@@ -319,6 +319,8 @@
u'--windowed',
u'--noupx',
u'--additional-hooks-dir', self.hooks_path,
+ u'--runtime-hook', os.path.join(self.hooks_path,
+ 'rthook_openlp_pyqt4.py'),
u'--log-level=ERROR',
u'-o', self.branch_path,
u'-i', self.win32_icon,
Follow ups