openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #23641
[Merge] lp:~tomasgroth/openlp/packaging-win into lp:openlp/packaging
Tomas Groth has proposed merging lp:~tomasgroth/openlp/packaging-win into lp:openlp/packaging.
Requested reviews:
OpenLP Core (openlp-core)
For more details, see:
https://code.launchpad.net/~tomasgroth/openlp/packaging-win/+merge/221584
Fix for windows packaging of 2.1 Also bundles mudraw for pdf support.
Includes some temporary workarounds for pyinstaller issues.
--
https://code.launchpad.net/~tomasgroth/openlp/packaging-win/+merge/221584
Your team OpenLP Core is requested to review the proposed merge of lp:~tomasgroth/openlp/packaging-win into lp:openlp/packaging.
=== modified file 'osx/macosx-builder.py'
--- osx/macosx-builder.py 2014-05-06 20:05:05 +0000
+++ osx/macosx-builder.py 2014-05-30 19:37:21 +0000
@@ -4,12 +4,14 @@
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
-# 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 #
-# Woldsund #
+# Copyright (c) 2008-2014 Raoul Snyman #
+# Portions copyright (c) 2008-2014 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 #
@@ -87,6 +89,9 @@
http://code.google.com/p/sqlalchemy-migrate/
+MuPDF
+ Required for PDF support in OpenLP. Install using macports, or use the
+ '--mudraw-bin' option of this script to point to the mudraw binary.
config.ini.default
The configuration file contains settings of the version string to include
@@ -226,6 +231,8 @@
parser.add_argument('--transifex-pass', dest='transifex_pass', help='Transifex password.')
parser.add_argument('-v', '--verbose', dest='verbose', action='store_true', default=False,
help='Print out additional information.')
+ parser.add_argument('--mudraw-bin', dest='mudraw_bin', default='/opt/local/bin/mudraw',
+ help='Path to the mudraw binary.')
self.args = parser.parse_args()
def read_config(self):
@@ -267,7 +274,10 @@
self.docs_path = os.path.abspath(self.args.docs)
else:
self.docs_path = self.config.get('paths', 'documentation')
-
+ if self.args.mudraw_bin:
+ self.mudraw_bin = self.args.mudraw_bin
+ else:
+ self.mudraw_bin = ''
self.openlp_script = os.path.abspath(os.path.join(self.branch_path, 'openlp.py'))
self.hooks_path = os.path.abspath(os.path.join(self.branch_path, self.config.get('paths', 'hooks')))
self.mac_icon = os.path.abspath(self.config.get('paths', 'macicon'))
@@ -438,6 +448,11 @@
self._print('Copying extra files for Mac OS X...')
self._print_verbose('... LICENSE.txt')
copy(os.path.join(self.script_path, 'LICENSE.txt'), os.path.join(self.dist_path, 'LICENSE.txt'))
+ self._print_verbose('... mudraw')
+ if self.mudraw_bin and os.path.isfile(self.mudraw_bin):
+ copy(os.path.join(self.mudraw_bin), os.path.join(self.dist_path, 'mudraw'))
+ else:
+ self._print('... WARNING: mudraw not found')
def update_translations(self):
"""
@@ -636,6 +651,7 @@
self._print_verbose('"hooks" path: ............%s', self.hooks_path)
self._print_verbose('PyInstaller: .............%s', self.pyinstaller)
self._print_verbose('Documentation branch path:%s', self.docs_path)
+ self._print_verbose('Mudraw binary ............%s', self.mudraw_bin)
self._print_verbose('')
if not self.args.skip_update:
self.update_code()
=== modified file 'pyinstaller-hooks/hook-openlp.core.ui.media.py'
--- pyinstaller-hooks/hook-openlp.core.ui.media.py 2013-01-01 01:04:23 +0000
+++ pyinstaller-hooks/hook-openlp.core.ui.media.py 2014-05-30 19:37:21 +0000
@@ -4,8 +4,8 @@
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
-# Copyright (c) 2008-2013 Raoul Snyman #
-# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
+# Copyright (c) 2008-2014 Raoul Snyman #
+# Portions copyright (c) 2008-2014 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, #
=== modified file 'pyinstaller-hooks/hook-openlp.plugins.presentations.presentationplugin.py'
--- pyinstaller-hooks/hook-openlp.plugins.presentations.presentationplugin.py 2013-01-01 01:04:23 +0000
+++ pyinstaller-hooks/hook-openlp.plugins.presentations.presentationplugin.py 2014-05-30 19:37:21 +0000
@@ -4,8 +4,8 @@
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
-# Copyright (c) 2008-2013 Raoul Snyman #
-# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
+# Copyright (c) 2008-2014 Raoul Snyman #
+# Portions copyright (c) 2008-2014 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, #
@@ -28,5 +28,6 @@
###############################################################################
hiddenimports = ['openlp.plugins.presentations.lib.impresscontroller',
+ 'openlp.plugins.presentations.lib.pdfcontroller',
'openlp.plugins.presentations.lib.powerpointcontroller',
'openlp.plugins.presentations.lib.pptviewcontroller']
=== modified file 'pyinstaller-hooks/hook-openlp.py'
--- pyinstaller-hooks/hook-openlp.py 2013-01-01 01:04:23 +0000
+++ pyinstaller-hooks/hook-openlp.py 2014-05-30 19:37:21 +0000
@@ -4,8 +4,8 @@
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
-# Copyright (c) 2008-2013 Raoul Snyman #
-# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
+# Copyright (c) 2008-2014 Raoul Snyman #
+# Portions copyright (c) 2008-2014 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, #
@@ -27,12 +27,12 @@
# 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']
+hiddenimports = ['openlp.plugins.songs.songsplugin',
+ 'openlp.plugins.bibles.bibleplugin',
+ 'openlp.plugins.presentations.presentationplugin',
+ 'openlp.plugins.media.mediaplugin',
+ 'openlp.plugins.images.imageplugin',
+ 'openlp.plugins.custom.customplugin',
+ 'openlp.plugins.songusage.songusageplugin',
+ 'openlp.plugins.remotes.remoteplugin',
+ 'openlp.plugins.alerts.alertsplugin']
=== modified file 'windows/OpenLP-2.0.iss.default'
--- windows/OpenLP-2.0.iss.default 2013-01-20 23:10:49 +0000
+++ windows/OpenLP-2.0.iss.default 2014-05-30 19:37:21 +0000
@@ -27,7 +27,7 @@
DefaultGroupName={#AppVerName}
AllowNoIcons=true
LicenseFile=LICENSE.txt
-OutputDir=%(branch)s\dist
+OutputDir=%(branch)s\dist\OpenLP\
OutputBaseFilename=OpenLP-{#RealVersion}-setup
Compression=lzma/Max
SolidCompression=true
@@ -38,7 +38,6 @@
[Languages]
Name: english; MessagesFile: compiler:Default.isl
-Name: basque; MessagesFile: compiler:Languages\Basque.isl
Name: brazilianportuguese; MessagesFile: compiler:Languages\BrazilianPortuguese.isl
Name: catalan; MessagesFile: compiler:Languages\Catalan.isl
Name: czech; MessagesFile: compiler:Languages\Czech.isl
@@ -55,7 +54,6 @@
Name: polish; MessagesFile: compiler:Languages\Polish.isl
Name: portuguese; MessagesFile: compiler:Languages\Portuguese.isl
Name: russian; MessagesFile: compiler:Languages\Russian.isl
-Name: slovak; MessagesFile: compiler:Languages\Slovak.isl
Name: slovenian; MessagesFile: compiler:Languages\Slovenian.isl
Name: spanish; MessagesFile: compiler:Languages\Spanish.isl
=== modified file 'windows/windows-builder.py'
--- windows/windows-builder.py 2014-05-06 20:05:05 +0000
+++ windows/windows-builder.py 2014-05-30 19:37:21 +0000
@@ -4,12 +4,14 @@
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
-# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 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 #
-# Woldsund #
+# Copyright (c) 2008-2014 Raoul Snyman #
+# Portions copyright (c) 2008-2014 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 #
@@ -104,6 +106,11 @@
http://code.google.com/p/sqlalchemy-migrate/
+MuPDF
+ Required for PDF support in OpenLP. Download the windows build from
+ mupdf.com, extract it, and use the '--mudraw-bin' option of this script to
+ point to mudraw.exe.
+
Portable App Builds
The following are required if you are planning to make a portable build of
OpenLP. The portable build conforms to the standards published by
@@ -182,6 +189,7 @@
help='Do NOT update the language translation files.')
parser.add_argument('-v', '--verbose', dest='verbose', action='store_true', default=False,
help='Print out additional information.')
+ parser.add_argument('--mudraw-bin', dest='mudraw_bin', default=None, help='Path to the mudraw binary.')
self.args = parser.parse_args()
def read_config(self):
@@ -192,7 +200,8 @@
'pyroot': self.python_root,
'progfiles': self.program_files,
'sitepackages': self.site_packages,
- 'here': self.script_path
+ 'here': self.script_path,
+ 'projects': os.path.abspath(os.path.join(self.script_path, '..', '..')),
})
self.config.read(os.path.abspath(self.args.config))
@@ -200,9 +209,9 @@
"""
Set up some system paths.
"""
- self.script_path = os.path.split(os.path.abspath(__file__))[0]
+ self.script_path = os.path.dirname(os.path.abspath(__file__))
self.python = sys.executable
- self.python_root = os.path.split(self.python)[0]
+ self.python_root = os.path.dirname(self.python)
self.site_packages = os.path.join(self.python_root, 'Lib', 'site-packages')
self.program_files = os.getenv('PROGRAMFILES')
@@ -253,6 +262,10 @@
self.args.portable = self.portable_path
else:
self.portable_path = ''
+ if self.args.mudraw_bin:
+ self.mudraw_bin = self.args.mudraw_bin
+ else:
+ self.mudraw_bin = ''
self.openlp_script = os.path.abspath(os.path.join(branch_path, 'openlp.py'))
self.hooks_path = os.path.abspath(self.config.get('paths', 'hooks'))
self.win32_icon = os.path.abspath(self.config.get('paths', 'win32icon'))
@@ -265,6 +278,7 @@
self.winres_path = os.path.join(self.branch_path, 'resources', 'windows')
self.build_path = os.path.join(self.branch_path, 'build')
self.dist_path = os.path.join(self.branch_path, 'dist', 'OpenLP')
+ self.dist_path_pyinst_arg = os.path.join(self.branch_path, 'dist')
self.pptviewlib_path = os.path.join(self.source_path, 'plugins', 'presentations', 'lib', 'pptviewlib')
def update_code(self):
@@ -299,11 +313,12 @@
'--noupx',
'--additional-hooks-dir', self.hooks_path,
'--runtime-hook', os.path.join(self.hooks_path, 'rthook_openlp_pyqt4.py'),
- '--log-level=ERROR',
- '--distpath', self.branch_path,
+ '--log-level=DEBUG',
+ '--distpath', self.dist_path_pyinst_arg,
'-i', self.win32_icon,
'-p', self.branch_path,
'-n', 'OpenLP',
+ '-d', '-c', # for now this is needed to make OpenLP run under windows
self.openlp_script),
stdout=PIPE)
output = pyinstaller.communicate()[0]
@@ -407,6 +422,23 @@
copy(os.path.join(self.helpfile_path, 'OpenLP.chm'), os.path.join(self.dist_path, 'OpenLP.chm'))
else:
self._print('... WARNING: Windows help file not found')
+ self._print_verbose('... mudraw.exe')
+ if self.mudraw_bin and os.path.isfile(self.mudraw_bin):
+ copy(os.path.join(self.mudraw_bin), os.path.join(self.dist_path, 'mudraw.exe'))
+ else:
+ self._print('... WARNING: mudraw.exe not found')
+ self._print_verbose('Tempoary workaround for needed dlls not copied by pyinstaller')
+ self._print_verbose('... pythoncom33.dll')
+ if os.path.isfile('C:\\Python33\\Lib\\site-packages\\pywin32_system32\\pythoncom33.dll'):
+ copy('C:\\Python33\\Lib\\site-packages\\pywin32_system32\\pythoncom33.dll',
+ os.path.join(self.dist_path, 'pythoncom33.dll'))
+ else:
+ self._print('... WARNING: pythoncom33.dll not found')
+ if os.path.isfile('C:\\windows\\system32\\msvcr100.dll'):
+ self._print_verbose('... msvcr100.dll')
+ copy('C:\\windows\\system32\\msvcr100.dll', os.path.join(self.dist_path, 'msvcr100.dll'))
+ else:
+ self._print('... WARNING: msvcr100.dll not found')
def update_translations(self):
"""
@@ -421,7 +453,7 @@
raise Exception('No option named "password" found.')
username = self.config.get('transifex', 'username')
password = self.config.get('transifex', 'password')
- os.chdir(os.path.split(self.i18n_utils)[0])
+ os.chdir(os.path.dirname(self.i18n_utils))
translation_utils = Popen([self.python, self.i18n_utils, '-qdpu', '-U', username, '-P', password])
code = translation_utils.wait()
if code != 0:
@@ -593,7 +625,7 @@
The main function to run the Windows builder.
"""
self._print_verbose('OpenLP main script: ......%s', self.openlp_script)
- self._print_verbose('Script path: .............%s', os.path.split(os.path.abspath(__file__))[0])
+ self._print_verbose('Script path: .............%s', os.path.dirname(os.path.abspath(__file__)))
self._print_verbose('Branch path: .............%s', self.branch_path)
self._print_verbose('Source path: .............%s', self.source_path)
self._print_verbose('Dist path: ...............%s', self.dist_path)
@@ -607,6 +639,7 @@
self._print_verbose('Windows resources: .......%s', self.winres_path)
self._print_verbose('VCBuild path: ............%s', self.vcbuild)
self._print_verbose('PPTVIEWLIB path: .........%s', self.pptviewlib_path)
+ self._print_verbose('Mudraw binary ............%s', self.mudraw_bin)
self._print_verbose('')
if not self.args.skip_update:
self.update_code()
Follow ups