diff --git a/osx/config.ini.default b/osx/config.ini.default index 4445e64..cfcd862 100644 --- a/osx/config.ini.default +++ b/osx/config.ini.default @@ -1,5 +1,5 @@ [executables] -sphinx = sphinx-build +sphinx = sphinx-build-2.7 pyinstaller = %(projects)s/pyinstaller/pyinstaller.py lrelease = lrelease diskutil = diskutil @@ -11,7 +11,7 @@ branch = %(projects)s/trunk 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] diff --git a/osx/macosx-builder.py b/osx/macosx-builder.py index ef25dd8..88f13d0 100644 --- a/osx/macosx-builder.py +++ b/osx/macosx-builder.py @@ -4,8 +4,8 @@ ############################################################################### # OpenLP - Open Source Lyrics Projection # # --------------------------------------------------------------------------- # -# Copyright (c) 2008-2011 Raoul Snyman # -# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # +# Copyright (c) 2008-2013 Raoul Snyman # +# Portions copyright (c) 2008-2013 Tim Bentley, Jonathan Corwin, Michael # # Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Jeffrey Smith, Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode # @@ -332,13 +332,13 @@ class MacosxBuilder(object): """ 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, diff --git a/pyinstaller-hooks/hook-openlp.core.ui.media.py b/pyinstaller-hooks/hook-openlp.core.ui.media.py new file mode 100644 index 0000000..36d98ab --- /dev/null +++ b/pyinstaller-hooks/hook-openlp.core.ui.media.py @@ -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-2013 Raoul Snyman # +# Portions copyright (c) 2008-2013 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'] diff --git a/pyinstaller-hooks/hook-openlp.plugins.presentations.presentationplugin.py b/pyinstaller-hooks/hook-openlp.plugins.presentations.presentationplugin.py new file mode 100644 index 0000000..4948a64 --- /dev/null +++ b/pyinstaller-hooks/hook-openlp.plugins.presentations.presentationplugin.py @@ -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-2013 Raoul Snyman # +# Portions copyright (c) 2008-2013 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'] diff --git a/pyinstaller-hooks/hook-openlp.py b/pyinstaller-hooks/hook-openlp.py new file mode 100644 index 0000000..4a78d93 --- /dev/null +++ b/pyinstaller-hooks/hook-openlp.py @@ -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-2013 Raoul Snyman # +# Portions copyright (c) 2008-2013 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'] diff --git a/pyinstaller-hooks/rthook_openlp_pyqt4.py b/pyinstaller-hooks/rthook_openlp_pyqt4.py new file mode 100644 index 0000000..44b9956 --- /dev/null +++ b/pyinstaller-hooks/rthook_openlp_pyqt4.py @@ -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-2013 Raoul Snyman # +# Portions copyright (c) 2008-2013 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) diff --git a/windows/config.ini.default b/windows/config.ini.default index f580aaf..6fe9451 100644 --- a/windows/config.ini.default +++ b/windows/config.ini.default @@ -13,7 +13,7 @@ portableinstaller = %(progfiles)s\PortableApps.comInstaller\PortableApps.comInst 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] diff --git a/windows/windows-builder.py b/windows/windows-builder.py index 7ee6c29..9a4441e 100644 --- a/windows/windows-builder.py +++ b/windows/windows-builder.py @@ -319,6 +319,7 @@ class WindowsBuilder(object): 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,