[Openlp-core] [Bug 1742766] Re: Missing MySQL Connector hidden imports in PyInstaller builds

2019-05-22 Thread Raoul Snyman
** Also affects: openlp/packaging
   Importance: Undecided
   Status: New

** Changed in: openlp
   Status: New => Invalid

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1742766

Title:
  Missing MySQL Connector hidden imports in PyInstaller builds

Status in OpenLP:
  Invalid
Status in OpenLP packaging series:
  New

Bug description:
  --- Exception Traceback ---
  Traceback (most recent call last):
File "", line 44, in 
File "openlp\core\__init__.py", line 437, in main
File "openlp\core\__init__.py", line 142, in run
File "openlp\core\common\registry.py", line 137, in execute
File "openlp\core\lib\pluginmanager.py", line 54, in bootstrap_initialise
File "openlp\core\lib\pluginmanager.py", line 102, in find_plugins
File "C:\Program Files (x86)\OpenLP\plugins\songs\songsplugin.py", line
  84, in __init__
  self.manager = Manager('songs', init_schema, upgrade_mod=upgrade)
File "openlp\core\lib\db.py", line 238, in __init__
File "openlp\core\lib\db.py", line 130, in upgrade_db
File "openlp\core\lib\db.py", line 53, in init_db
File "site-packages\sqlalchemy\engine\__init__.py", line 386, in
  create_engine
File "site-packages\sqlalchemy\engine\strategies.py", line 75, in create
File "site-packages\sqlalchemy\dialects\mysql\mysqlconnector.py", line
  107, in dbapi
  ImportError: No module named 'mysql'

  --- System information ---
  Plataforma: Windows-10-10.0.15063-SP0

  --- Library Versions ---
  Python: 3.4.4
  Qt5: 5.5.1
  PyQt5: 5.5.1
  QtWebkit: 538.1
  SQLAlchemy: 1.0.11
  SQLAlchemy Migrate: -
  BeautifulSoup: 4.4.1
  lxml: 3.4.4
  Chardet: 2.3.0
  PyEnchant: 1.6.6
  Mako: 1.0.3
  pyICU: 1.9.2
  pyUNO

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1742766/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] macOS Test Results: Passed

2019-05-22 Thread Raoul Snyman
macOS tests passed!
-- 
https://code.launchpad.net/~raoul-snyman/openlp/bundle-libvlc/+merge/367809
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] Linting: Passed

2019-05-22 Thread Raoul Snyman
Linting passed!
-- 
https://code.launchpad.net/~raoul-snyman/openlp/bundle-libvlc/+merge/367809
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] Linux Test Results: Passed

2019-05-22 Thread Raoul Snyman
Linux tests passed!
-- 
https://code.launchpad.net/~raoul-snyman/openlp/bundle-libvlc/+merge/367809
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Merge] lp:~raoul-snyman/openlp/bundle-libvlc into lp:openlp

2019-05-22 Thread Raoul Snyman
Raoul Snyman has proposed merging lp:~raoul-snyman/openlp/bundle-libvlc into 
lp:openlp.

Commit message:
Work in Progress

For now, this is a bit of a work-in-progress. This code should pick up the 
bundled libvlc.(dll|so|dylib) and use it. VLC detection seems to be a little 
iffy right now.

Requested reviews:
  Tim Bentley (trb143)

For more details, see:
https://code.launchpad.net/~raoul-snyman/openlp/bundle-libvlc/+merge/367809

Work in Progress

For now, this is a bit of a work-in-progress. This code should pick up the 
bundled libvlc.(dll|so|dylib) and use it. VLC detection seems to be a little 
iffy right now.

Please review though :-)
-- 
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/app.py'
--- openlp/core/app.py	2019-05-04 09:13:29 +
+++ openlp/core/app.py	2019-05-22 21:59:54 +
@@ -28,9 +28,9 @@
 """
 import argparse
 import logging
+import os
 import sys
 import time
-import os
 from datetime import datetime
 from traceback import format_exception
 
@@ -383,6 +383,15 @@
 else:
 application.setApplicationName('OpenLP')
 set_up_logging(AppLocation.get_directory(AppLocation.CacheDir))
+# Set the libvlc environment variable if we're frozen
+if getattr(sys, 'frozen', False):
+if is_macosx():
+vlc_lib = 'libvlc.dylib'
+elif is_win():
+vlc_lib = 'libvlc.dll'
+os.environ['PYTHON_VLC_LIB_PATH'] = str(AppLocation.get_directory(AppLocation.AppDir) / vlc_lib)
+log.debug('VLC Path: {}'.format(os.environ['PYTHON_VLC_LIB_PATH']))
+# Initialise the Registry
 Registry.create()
 Registry().register('application', application)
 Registry().set_flag('no_web_server', args.no_web_server)

=== modified file 'openlp/core/ui/mainwindow.py'
--- openlp/core/ui/mainwindow.py	2019-05-04 12:05:53 +
+++ openlp/core/ui/mainwindow.py	2019-05-22 21:59:54 +
@@ -1332,7 +1332,7 @@
 self.show_status_message(
 translate('OpenLP.MainWindow', 'Copying OpenLP data to new data directory location - {path} '
   '- Please wait for copy to finish').format(path=self.new_data_path))
-dir_util.copy_tree(old_data_path, self.new_data_path)
+dir_util.copy_tree(str(old_data_path), str(self.new_data_path))
 self.log_info('Copy successful')
 except (OSError, DistutilsFileError) as why:
 self.application.set_normal_cursor()

=== modified file 'scripts/appveyor.yml'
--- scripts/appveyor.yml	2019-05-01 08:43:36 +
+++ scripts/appveyor.yml	2019-05-22 21:59:54 +
@@ -12,18 +12,20 @@
 environment:
   matrix:
 - PYTHON: C:\\Python37-x64
+  CHOCO_VLC: vlc
 - PYTHON: C:\\Python37
+  CHOCO_VLC: vlc --forcex86
 
 install:
   # Install dependencies from pypi
-  - "%PYTHON%\\python.exe -m pip install sqlalchemy alembic appdirs chardet beautifulsoup4 lxml Mako mysql-connector-python pytest mock pyodbc psycopg2 pypiwin32 websockets asyncio waitress six webob requests QtAwesome PyQt5 PyQtWebEngine pymediainfo PyMuPDF"
+  - "%PYTHON%\\python.exe -m pip install sqlalchemy alembic appdirs chardet beautifulsoup4 lxml Mako mysql-connector-python pytest mock pyodbc psycopg2 pypiwin32 websockets asyncio waitress six webob requests QtAwesome PyQt5 PyQtWebEngine pymediainfo PyMuPDF QDarkStyle"
 
 build: off
 
 test_script:
   - cd openlp-branch
   # Run the tests
-  - "%PYTHON%\\python.exe -m pytest -v tests"
+  #- "%PYTHON%\\python.exe -m pytest -v tests"
   # Go back to the user root folder
   - cd..
 
@@ -31,12 +33,6 @@
   # This is where we create a package using PyInstaller
   # Install PyInstaller 
   - "%PYTHON%\\python.exe -m pip install pyinstaller"
-  # Download and install Inno Setup - used for packaging
-  - appveyor DownloadFile http://www.jrsoftware.org/download.php/is-unicode.exe
-  - is-unicode.exe /VERYSILENT /SUPPRESSMSGBOXES /SP-
-  # Download and unpack portable-bundle
-  - appveyor DownloadFile https://get.openlp.org/win-sdk/portable-setup.7z
-  - 7z x portable-setup.7z
   # Disabled portable installers - can't figure out how to make them silent
   # - curl -L -O http://downloads.sourceforge.net/project/portableapps/PortableApps.com%20Installer/PortableApps.comInstaller_3.4.4.paf.exe
   # - PortableApps.comInstaller_3.4.4.paf.exe /S
@@ -44,6 +40,11 @@
   # - PortableApps.comLauncher_2.2.1.paf.exe /S
   # - curl -L -O http://downloads.sourceforge.net/project/portableapps/NSIS%20Portable/NSISPortable_3.0_English.paf.exe
   # - NSISPortable_3.0_English.paf.exe /S
+  # Download and unpack portable-bundle
+  - appveyor DownloadFile https://get.openlp.org/win-sdk/portable-setup.7z
+  - 7z x portable-setup.7z
+  # Install VLC
+  - choco install %CHOCO_VLC%
   # Get the packaging code
   - appveyor DownloadFile http://bazaar.launchpad.net/~openlp-core/openlp/packaging/tarball -FileName packaging.tar.gz
   - 7z e packaging.tar.gz
@@ -66,3 +67,6 @@
 

[Openlp-core] [Merge] lp:~raoul-snyman/openlp/bundle-libvlc into lp:openlp

2019-05-22 Thread Raoul Snyman
The proposal to merge lp:~raoul-snyman/openlp/bundle-libvlc into lp:openlp has 
been updated.

Status: Needs review => Superseded

For more details, see:
https://code.launchpad.net/~raoul-snyman/openlp/bundle-libvlc/+merge/367789
-- 
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Merge] lp:~raoul-snyman/openlp/packaging-macos-pyro into lp:openlp/packaging

2019-05-22 Thread Raoul Snyman
Raoul Snyman has proposed merging lp:~raoul-snyman/openlp/packaging-macos-pyro 
into lp:openlp/packaging.

Commit message:
Add Pyro4 into the Mac build.

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~raoul-snyman/openlp/packaging-macos-pyro/+merge/367808
-- 
Your team OpenLP Core is requested to review the proposed merge of 
lp:~raoul-snyman/openlp/packaging-macos-pyro into lp:openlp/packaging.
=== modified file 'builders/builder.py'
--- builders/builder.py	2019-04-09 04:18:23 +
+++ builders/builder.py	2019-05-22 21:58:47 +
@@ -251,6 +251,9 @@
 """
 self._print('Reverting any changes to the code...')
 self._bzr('revert', self.branch_path, err_msg='Error reverting the code')
+self._print('Cleaning any extra files...')
+self._bzr('clean-tree', self.branch_path, ['--quiet', '--force', '--ignored', '--unknown'],
+  err_msg='Error cleaning up extra files')
 self._print('Updating the code...')
 self._bzr('update', self.branch_path, err_msg='Error updating the code')
 

=== modified file 'builders/macosx-builder.py'
--- builders/macosx-builder.py	2019-03-10 16:33:37 +
+++ builders/macosx-builder.py	2019-05-22 21:58:47 +
@@ -93,6 +93,7 @@
 
 """
 
+import glob
 import os
 from pathlib import Path
 from shutil import copy, copytree, move, rmtree
@@ -270,6 +271,20 @@
 """
 self._relink_mupdf('mutool')
 
+def _install_pyro4(self):
+"""
+Install Pyro4 into the vendor directory
+"""
+self._print('Installing Pyro4 for LibreOffice')
+target = os.path.join(self.dist_path, 'plugins', 'presentations', 'lib', 'vendor')
+self._run_command([self.python, '-m', 'pip', 'install', 'Pyro4', '-t', target, '--disable-pip-version-check',
+   '--no-compile'], err_msg='Error installing Pyro4')
+egg_info_glob = glob(os.path.join(target, '*.egg-info'))
+egg_info_glob.extend(glob(os.path.join(target, '*.dist-info')))
+self._print_verbose('... glob: {}'.format(egg_info_glob))
+for path in egg_info_glob:
+rmtree(path, True)
+
 def _copy_bundle_files(self):
 """
 Copy Info.plist and OpenLP.icns to app bundle.

=== added file 'pyinstaller-hooks/hook-openlp.plugins.presentations.lib.maclocontroller.py'
--- pyinstaller-hooks/hook-openlp.plugins.presentations.lib.maclocontroller.py	1970-01-01 00:00:00 +
+++ pyinstaller-hooks/hook-openlp.plugins.presentations.lib.maclocontroller.py	2019-05-22 21:58:47 +
@@ -0,0 +1,23 @@
+# -*- coding: utf-8 -*-
+# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
+
+###
+# OpenLP - Open Source Lyrics Projection  #
+# --- #
+# Copyright (c) 2008-2015 OpenLP Developers   #
+# --- #
+# 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 = ['Pyro4']

=== modified file 'pyinstaller-hooks/hook-openlp.plugins.presentations.presentationplugin.py'
--- pyinstaller-hooks/hook-openlp.plugins.presentations.presentationplugin.py	2015-06-16 20:07:34 +
+++ pyinstaller-hooks/hook-openlp.plugins.presentations.presentationplugin.py	2019-05-22 21:58:47 +
@@ -21,6 +21,7 @@
 ###
 
 hiddenimports = ['openlp.plugins.presentations.lib.impresscontroller',
+ 'openlp.plugins.presentations.lib.maclocontroller',
  'openlp.plugins.presentations.lib.pdfcontroller',
  'openlp.plugins.presentations.lib.powerpointcontroller',
  'openlp.plugins.presentations.lib.pptviewcontroller']

=== modified file 

Re: [Openlp-core] [Merge] lp:~raoul-snyman/openlp/bundle-libvlc into lp:openlp

2019-05-22 Thread Tim Bentley
Review: Approve

Looks good for the bits I understand!
-- 
https://code.launchpad.net/~raoul-snyman/openlp/bundle-libvlc/+merge/367789
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Merge] lp:~raoul-snyman/openlp/wix-packaging into lp:openlp/packaging

2019-05-22 Thread noreply
The proposal to merge lp:~raoul-snyman/openlp/wix-packaging into 
lp:openlp/packaging has been updated.

Status: Approved => Merged

For more details, see:
https://code.launchpad.net/~raoul-snyman/openlp/wix-packaging/+merge/367668
-- 
Your team OpenLP Core is subscribed to branch lp:openlp/packaging.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Merge] lp:~raoul-snyman/openlp/wix-packaging into lp:openlp/packaging

2019-05-22 Thread Raoul Snyman
The proposal to merge lp:~raoul-snyman/openlp/wix-packaging into 
lp:openlp/packaging has been updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~raoul-snyman/openlp/wix-packaging/+merge/367668
-- 
Your team OpenLP Core is subscribed to branch lp:openlp/packaging.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] macOS Test Results: Passed

2019-05-22 Thread Raoul Snyman
macOS tests passed!
-- 
https://code.launchpad.net/~raoul-snyman/openlp/bundle-libvlc/+merge/367789
Your team OpenLP Core is requested to review the proposed merge of 
lp:~raoul-snyman/openlp/bundle-libvlc into lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] Linting: Passed

2019-05-22 Thread Raoul Snyman
Linting passed!
-- 
https://code.launchpad.net/~raoul-snyman/openlp/bundle-libvlc/+merge/367789
Your team OpenLP Core is requested to review the proposed merge of 
lp:~raoul-snyman/openlp/bundle-libvlc into lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] Linux Test Results: Passed

2019-05-22 Thread Raoul Snyman
Linux tests passed!
-- 
https://code.launchpad.net/~raoul-snyman/openlp/bundle-libvlc/+merge/367789
Your team OpenLP Core is requested to review the proposed merge of 
lp:~raoul-snyman/openlp/bundle-libvlc into lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Merge] lp:~raoul-snyman/openlp/bundle-libvlc into lp:openlp

2019-05-22 Thread Raoul Snyman
Raoul Snyman has proposed merging lp:~raoul-snyman/openlp/bundle-libvlc into 
lp:openlp.

Commit message:
Work in Progress

For now, this is a bit of a work-in-progress. This code should pick up the 
bundled libvlc.(dll|so|dylib) and use it. VLC detection seems to be a little 
iffy right now.

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~raoul-snyman/openlp/bundle-libvlc/+merge/367789

Work in Progress

For now, this is a bit of a work-in-progress. This code should pick up the 
bundled libvlc.(dll|so|dylib) and use it. VLC detection seems to be a little 
iffy right now.

Please review though :-)
-- 
Your team OpenLP Core is requested to review the proposed merge of 
lp:~raoul-snyman/openlp/bundle-libvlc into lp:openlp.
=== modified file 'openlp/core/app.py'
--- openlp/core/app.py	2019-05-04 09:13:29 +
+++ openlp/core/app.py	2019-05-22 17:01:09 +
@@ -28,9 +28,9 @@
 """
 import argparse
 import logging
+import os
 import sys
 import time
-import os
 from datetime import datetime
 from traceback import format_exception
 
@@ -383,6 +383,15 @@
 else:
 application.setApplicationName('OpenLP')
 set_up_logging(AppLocation.get_directory(AppLocation.CacheDir))
+# Set the libvlc environment variable if we're frozen
+if getattr(sys, 'frozen', False):
+if is_macosx():
+vlc_lib = 'libvlc.dylib'
+elif is_win():
+vlc_lib = 'libvlc.dll'
+os.environ['PYTHON_VLC_LIB_PATH'] = str(AppLocation.get_directory(AppLocation.AppDir) / vlc_lib)
+log.debug('VLC Path: {}'.format(os.environ['PYTHON_VLC_LIB_PATH']))
+# Initialise the Registry
 Registry.create()
 Registry().register('application', application)
 Registry().set_flag('no_web_server', args.no_web_server)

=== modified file 'openlp/core/ui/mainwindow.py'
--- openlp/core/ui/mainwindow.py	2019-05-04 12:05:53 +
+++ openlp/core/ui/mainwindow.py	2019-05-22 17:01:09 +
@@ -1332,7 +1332,7 @@
 self.show_status_message(
 translate('OpenLP.MainWindow', 'Copying OpenLP data to new data directory location - {path} '
   '- Please wait for copy to finish').format(path=self.new_data_path))
-dir_util.copy_tree(old_data_path, self.new_data_path)
+dir_util.copy_tree(str(old_data_path), str(self.new_data_path))
 self.log_info('Copy successful')
 except (OSError, DistutilsFileError) as why:
 self.application.set_normal_cursor()

=== modified file 'scripts/appveyor.yml'
--- scripts/appveyor.yml	2019-05-01 08:43:36 +
+++ scripts/appveyor.yml	2019-05-22 17:01:09 +
@@ -12,18 +12,20 @@
 environment:
   matrix:
 - PYTHON: C:\\Python37-x64
+  CHOCO_VLC: vlc
 - PYTHON: C:\\Python37
+  CHOCO_VLC: vlc --forcex86
 
 install:
   # Install dependencies from pypi
-  - "%PYTHON%\\python.exe -m pip install sqlalchemy alembic appdirs chardet beautifulsoup4 lxml Mako mysql-connector-python pytest mock pyodbc psycopg2 pypiwin32 websockets asyncio waitress six webob requests QtAwesome PyQt5 PyQtWebEngine pymediainfo PyMuPDF"
+  - "%PYTHON%\\python.exe -m pip install sqlalchemy alembic appdirs chardet beautifulsoup4 lxml Mako mysql-connector-python pytest mock pyodbc psycopg2 pypiwin32 websockets asyncio waitress six webob requests QtAwesome PyQt5 PyQtWebEngine pymediainfo PyMuPDF QDarkStyle"
 
 build: off
 
 test_script:
   - cd openlp-branch
   # Run the tests
-  - "%PYTHON%\\python.exe -m pytest -v tests"
+  #- "%PYTHON%\\python.exe -m pytest -v tests"
   # Go back to the user root folder
   - cd..
 
@@ -31,12 +33,6 @@
   # This is where we create a package using PyInstaller
   # Install PyInstaller 
   - "%PYTHON%\\python.exe -m pip install pyinstaller"
-  # Download and install Inno Setup - used for packaging
-  - appveyor DownloadFile http://www.jrsoftware.org/download.php/is-unicode.exe
-  - is-unicode.exe /VERYSILENT /SUPPRESSMSGBOXES /SP-
-  # Download and unpack portable-bundle
-  - appveyor DownloadFile https://get.openlp.org/win-sdk/portable-setup.7z
-  - 7z x portable-setup.7z
   # Disabled portable installers - can't figure out how to make them silent
   # - curl -L -O http://downloads.sourceforge.net/project/portableapps/PortableApps.com%20Installer/PortableApps.comInstaller_3.4.4.paf.exe
   # - PortableApps.comInstaller_3.4.4.paf.exe /S
@@ -44,11 +40,18 @@
   # - PortableApps.comLauncher_2.2.1.paf.exe /S
   # - curl -L -O http://downloads.sourceforge.net/project/portableapps/NSIS%20Portable/NSISPortable_3.0_English.paf.exe
   # - NSISPortable_3.0_English.paf.exe /S
+  # Download and unpack portable-bundle
+  - appveyor DownloadFile https://get.openlp.org/win-sdk/portable-setup.7z
+  - 7z x portable-setup.7z
+  # Install VLC
+  - choco install %CHOCO_VLC%
   # Get the packaging code
-  - appveyor DownloadFile http://bazaar.launchpad.net/~openlp-core/openlp/packaging/tarball 

[Openlp-core] [Merge] lp:~raoul-snyman/openlp/bundle-libvlc into lp:openlp

2019-05-22 Thread Raoul Snyman
The proposal to merge lp:~raoul-snyman/openlp/bundle-libvlc into lp:openlp has 
been updated.

Status: Needs review => Superseded

For more details, see:
https://code.launchpad.net/~raoul-snyman/openlp/bundle-libvlc/+merge/367788
-- 
Your team OpenLP Core is requested to review the proposed merge of 
lp:~raoul-snyman/openlp/bundle-libvlc into lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] macOS Test Results: Passed

2019-05-22 Thread Raoul Snyman
macOS tests passed!
-- 
https://code.launchpad.net/~raoul-snyman/openlp/pyro-impress/+merge/367787
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] Linting: Failed

2019-05-22 Thread Raoul Snyman
Linting failed, please see https://ci.openlp.io/job/MP-03-Linting/100/ for more 
details
-- 
https://code.launchpad.net/~raoul-snyman/openlp/bundle-libvlc/+merge/367788
Your team OpenLP Core is requested to review the proposed merge of 
lp:~raoul-snyman/openlp/bundle-libvlc into lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] Linux Test Results: Passed

2019-05-22 Thread Raoul Snyman
Linux tests passed!
-- 
https://code.launchpad.net/~raoul-snyman/openlp/bundle-libvlc/+merge/367788
Your team OpenLP Core is requested to review the proposed merge of 
lp:~raoul-snyman/openlp/bundle-libvlc into lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] Linting: Passed

2019-05-22 Thread Raoul Snyman
Linting passed!
-- 
https://code.launchpad.net/~raoul-snyman/openlp/pyro-impress/+merge/367787
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] Linux Test Results: Passed

2019-05-22 Thread Raoul Snyman
Linux tests passed!
-- 
https://code.launchpad.net/~raoul-snyman/openlp/pyro-impress/+merge/367787
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Merge] lp:~raoul-snyman/openlp/bundle-libvlc into lp:openlp

2019-05-22 Thread Raoul Snyman
Raoul Snyman has proposed merging lp:~raoul-snyman/openlp/bundle-libvlc into 
lp:openlp.

Commit message:
Work in Progress

For now, this is a bit of a work-in-progress. This code should pick up the 
bundled libvlc.(dll|so|dylib) and use it. VLC detection seems to be a little 
iffy right now.

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~raoul-snyman/openlp/bundle-libvlc/+merge/367788

Work in Progress

For now, this is a bit of a work-in-progress. This code should pick up the 
bundled libvlc.(dll|so|dylib) and use it. VLC detection seems to be a little 
iffy right now.
-- 
Your team OpenLP Core is requested to review the proposed merge of 
lp:~raoul-snyman/openlp/bundle-libvlc into lp:openlp.
=== modified file 'openlp/core/app.py'
--- openlp/core/app.py	2019-05-04 09:13:29 +
+++ openlp/core/app.py	2019-05-22 16:52:16 +
@@ -28,6 +28,7 @@
 """
 import argparse
 import logging
+import os
 import sys
 import time
 import os
@@ -346,6 +347,9 @@
 # Bug #1018855: Set the WM_CLASS property in X11
 if not is_win() and not is_macosx():
 qt_args.append('OpenLP')
+# Set the libvlc environment variable if we're frozen
+if getattr(sys, 'frozen', False):
+os.environ['PYTHON_VLC_LIB_PATH'] = str(AppLocation.get_directory(AppLocation.AppDir))
 # Initialise the resources
 qInitResources()
 # Now create and actually run the application.
@@ -383,6 +387,15 @@
 else:
 application.setApplicationName('OpenLP')
 set_up_logging(AppLocation.get_directory(AppLocation.CacheDir))
+# Set the libvlc environment variable if we're frozen
+if getattr(sys, 'frozen', False):
+if is_macosx():
+vlc_lib = 'libvlc.dylib'
+elif is_win():
+vlc_lib = 'libvlc.dll'
+os.environ['PYTHON_VLC_LIB_PATH'] = str(AppLocation.get_directory(AppLocation.AppDir) / vlc_lib)
+log.debug('VLC Path: {}'.format(os.environ['PYTHON_VLC_LIB_PATH']))
+# Initialise the Registry
 Registry.create()
 Registry().register('application', application)
 Registry().set_flag('no_web_server', args.no_web_server)

=== modified file 'openlp/core/ui/mainwindow.py'
--- openlp/core/ui/mainwindow.py	2019-05-04 12:05:53 +
+++ openlp/core/ui/mainwindow.py	2019-05-22 16:52:16 +
@@ -1332,7 +1332,7 @@
 self.show_status_message(
 translate('OpenLP.MainWindow', 'Copying OpenLP data to new data directory location - {path} '
   '- Please wait for copy to finish').format(path=self.new_data_path))
-dir_util.copy_tree(old_data_path, self.new_data_path)
+dir_util.copy_tree(str(old_data_path), str(self.new_data_path))
 self.log_info('Copy successful')
 except (OSError, DistutilsFileError) as why:
 self.application.set_normal_cursor()

=== modified file 'scripts/appveyor.yml'
--- scripts/appveyor.yml	2019-05-01 08:43:36 +
+++ scripts/appveyor.yml	2019-05-22 16:52:16 +
@@ -12,18 +12,20 @@
 environment:
   matrix:
 - PYTHON: C:\\Python37-x64
+  CHOCO_VLC: vlc
 - PYTHON: C:\\Python37
+  CHOCO_VLC: vlc --forcex86
 
 install:
   # Install dependencies from pypi
-  - "%PYTHON%\\python.exe -m pip install sqlalchemy alembic appdirs chardet beautifulsoup4 lxml Mako mysql-connector-python pytest mock pyodbc psycopg2 pypiwin32 websockets asyncio waitress six webob requests QtAwesome PyQt5 PyQtWebEngine pymediainfo PyMuPDF"
+  - "%PYTHON%\\python.exe -m pip install sqlalchemy alembic appdirs chardet beautifulsoup4 lxml Mako mysql-connector-python pytest mock pyodbc psycopg2 pypiwin32 websockets asyncio waitress six webob requests QtAwesome PyQt5 PyQtWebEngine pymediainfo PyMuPDF QDarkStyle"
 
 build: off
 
 test_script:
   - cd openlp-branch
   # Run the tests
-  - "%PYTHON%\\python.exe -m pytest -v tests"
+  #- "%PYTHON%\\python.exe -m pytest -v tests"
   # Go back to the user root folder
   - cd..
 
@@ -31,12 +33,6 @@
   # This is where we create a package using PyInstaller
   # Install PyInstaller 
   - "%PYTHON%\\python.exe -m pip install pyinstaller"
-  # Download and install Inno Setup - used for packaging
-  - appveyor DownloadFile http://www.jrsoftware.org/download.php/is-unicode.exe
-  - is-unicode.exe /VERYSILENT /SUPPRESSMSGBOXES /SP-
-  # Download and unpack portable-bundle
-  - appveyor DownloadFile https://get.openlp.org/win-sdk/portable-setup.7z
-  - 7z x portable-setup.7z
   # Disabled portable installers - can't figure out how to make them silent
   # - curl -L -O http://downloads.sourceforge.net/project/portableapps/PortableApps.com%20Installer/PortableApps.comInstaller_3.4.4.paf.exe
   # - PortableApps.comInstaller_3.4.4.paf.exe /S
@@ -44,11 +40,18 @@
   # - PortableApps.comLauncher_2.2.1.paf.exe /S
   # - curl -L -O http://downloads.sourceforge.net/project/portableapps/NSIS%20Portable/NSISPortable_3.0_English.paf.exe
   # - 

[Openlp-core] [Merge] lp:~raoul-snyman/openlp/pyro-impress into lp:openlp

2019-05-22 Thread Raoul Snyman
Raoul Snyman has proposed merging lp:~raoul-snyman/openlp/pyro-impress into 
lp:openlp.

Requested reviews:
  Tim Bentley (trb143)

For more details, see:
https://code.launchpad.net/~raoul-snyman/openlp/pyro-impress/+merge/367787

Add presentations through LibreOffice on macOS. Comments and criticisms welcome.
-- 
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file '.bzrignore'
--- .bzrignore	2019-03-25 21:24:51 +
+++ .bzrignore	2019-05-22 16:50:27 +
@@ -1,57 +1,48 @@
 *.*~
-*.~\?~
-\#*\#
-build
-.cache
-cover
-.coverage
-coverage
-.directory
-.vscode
-dist
 *.dll
-documentation/build/doctrees
-documentation/build/html
 *.e4*
-*eric[1-9]project
-.git
-env
-# Git files
-.gitignore
-htmlcov
-.idea
 *.kate-swp
 *.kdev4
-.kdev4
 *.komodoproject
-.komodotools
-list
 *.log*
 *.nja
-openlp.cfg
-openlp/core/resources.py.old
-OpenLP.egg-info
-openlp.org 2.0.e4*
-openlp.pro
-openlp-test-projectordb.sqlite
 *.orig
-output
 *.pyc
-__pycache__
-.pylint.d
-.pytest_cache
 *.qm
 *.rej
-# Rejected diff's
-resources/innosetup/Output
-resources/windows/warnOpenLP.txt
 *.ropeproject
-tags
-output
+*.~\?~
+*eric[1-9]project
+.cache
+.coverage
+.directory
+.git
+.gitignore
+.idea
+.kdev4
+.komodotools
+.pylint.d
+.pytest_cache
+.vscode
+OpenLP.egg-info
+\#*\#
+__pycache__
+build
+cover
+coverage
+dist
+env
 htmlcov
+list
 node_modules
 openlp-test-projectordb.sqlite
+openlp.cfg
+openlp.pro
+openlp/core/resources.py.old
+openlp/plugins/presentations/lib/vendor/Pyro4
+openlp/plugins/presentations/lib/vendor/serpent.py
+output
 package-lock.json
-.cache
+tags
 test
 tests.kdev4

=== modified file 'openlp/core/common/path.py'
--- openlp/core/common/path.py	2019-04-13 13:00:22 +
+++ openlp/core/common/path.py	2019-05-22 16:50:27 +
@@ -187,6 +187,8 @@
 :return: An empty string if :param:`path` is None, else a string representation of the :param:`path`
 :rtype: str
 """
+if isinstance(path, str):
+return path
 if not isinstance(path, Path) and path is not None:
 raise TypeError('parameter \'path\' must be of type Path or NoneType')
 if path is None:

=== modified file 'openlp/core/ui/media/mediacontroller.py'
--- openlp/core/ui/media/mediacontroller.py	2019-05-05 05:59:29 +
+++ openlp/core/ui/media/mediacontroller.py	2019-05-22 16:50:27 +
@@ -129,6 +129,8 @@
 State().update_pre_conditions('mediacontroller', True)
 State().update_pre_conditions('media_live', True)
 else:
+if hasattr(self.main_window, 'splash') and self.main_window.splash.isVisible():
+self.main_window.splash.hide()
 State().missing_text('media_live', translate('OpenLP.SlideController',
  'VLC or pymediainfo are missing, so you are unable to play any media'))
 self._generate_extensions_lists()

=== added file 'openlp/plugins/presentations/lib/libreofficeserver.py'
--- openlp/plugins/presentations/lib/libreofficeserver.py	1970-01-01 00:00:00 +
+++ openlp/plugins/presentations/lib/libreofficeserver.py	2019-05-22 16:50:27 +
@@ -0,0 +1,431 @@
+# -*- coding: utf-8 -*-
+# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
+
+###
+# OpenLP - Open Source Lyrics Projection  #
+# --- #
+# Copyright (c) 2008-2016 OpenLP Developers   #
+# --- #
+# 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  #
+###
+"""
+This module runs a Pyro4 server using LibreOffice's version of Python
+
+Please Note: This intentionally uses os.path over pathlib because we don't know which version of Python is shipped with
+the version of LibreOffice on the user's computer.
+"""
+from subprocess import Popen
+import sys

[Openlp-core] [Merge] lp:~raoul-snyman/openlp/pyro-impress into lp:openlp

2019-05-22 Thread Raoul Snyman
The proposal to merge lp:~raoul-snyman/openlp/pyro-impress into lp:openlp has 
been updated.

Status: Needs review => Superseded

For more details, see:
https://code.launchpad.net/~raoul-snyman/openlp/pyro-impress/+merge/367607
-- 
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


Re: [Openlp-core] [Merge] lp:~raoul-snyman/openlp/wix-packaging into lp:openlp/packaging

2019-05-22 Thread Tomas Groth
Review: Approve


-- 
https://code.launchpad.net/~raoul-snyman/openlp/wix-packaging/+merge/367668
Your team OpenLP Core is subscribed to branch lp:openlp/packaging.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


Re: [Openlp-core] [Merge] lp:~raoul-snyman/openlp/wix-packaging into lp:openlp/packaging

2019-05-22 Thread Raoul Snyman
Replied :-)

Diff comments:

> 
> === modified file 'builders/windows-builder.py'
> --- builders/windows-builder.py   2019-03-13 21:00:05 +
> +++ builders/windows-builder.py   2019-05-20 22:20:27 +
> @@ -303,23 +389,30 @@
>  copy(self.icon_path, os.path.join(self.dist_path, 'OpenLP.ico'))
>  self._print_verbose('... LICENSE.txt')
>  copy(self.license_path, os.path.join(self.dist_path, 'LICENSE.txt'))
> -self._print_verbose('... psvince.dll')
> -copy(self.psvince_exe, os.path.join(self.dist_path, 'psvince.dll'))
> +self._print_verbose('... service_file.ico')
> +config_dir = os.path.dirname(self.config_path)
> +copy(os.path.join(config_dir, 'service_file.ico'), 
> os.path.join(self.dist_path, 'service_file.ico'))
>  if os.path.isfile(os.path.join(self.helpfile_path, 'OpenLP.chm')):
>  self._print_verbose('... OpenLP.chm')
>  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('... mutool.exe')
> -if self.mutool_exe and os.path.isfile(self.mutool_exe):
> -copy(os.path.join(self.mutool_exe), os.path.join(self.dist_path, 
> 'mutool.exe'))
> -else:
> -self._print('... WARNING: mutool.exe not found')
> -self._print_verbose('... MediaInfo.exe')
> -if self.mediainfo_exe and os.path.isfile(self.mediainfo_exe):
> -copy(os.path.join(self.mediainfo_exe), 
> os.path.join(self.dist_path, 'MediaInfo.exe'))
> -else:
> -self._print('... WARNING: MediaInfo.exe not found')
> +try:
> +# Check if PyMuPDF is installed
> +import fitz  # noqa
> +HAS_PYMUPDF = True
> +except ImportError:
> +HAS_PYMUPDF = False
> +if not HAS_PYMUPDF:
> +self._print_verbose('... mutool.exe')
> +if self.mutool_exe and os.path.isfile(self.mutool_exe):
> +copy(os.path.join(self.mutool_exe), 
> os.path.join(self.dist_path, 'mutool.exe'))
> +else:
> +self._print('... WARNING: mutool.exe not found')
> +vlc_path = os.path.join(self.program_files, 'VideoLAN', 'VLC')

In 32-bit Python, "%PROGRAMFILES%" is set to "Program Files (x86)" while in 
64-bot Python, "%PROGRAMFILES" is set to "Program Files". This line picks up 
the correct bit-ness version of VLC based on the bit-ness of Python.

> +for fname in ['libvlc.dll', 'libvlccore.dll']:
> +self._print_verbose('... {}'.format(fname))
> +copy(os.path.join(vlc_path, fname), os.path.join(self.dist_path, 
> fname))
>  
>  def after_run_sphinx(self):
>  """


-- 
https://code.launchpad.net/~raoul-snyman/openlp/wix-packaging/+merge/367668
Your team OpenLP Core is subscribed to branch lp:openlp/packaging.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Bug 1554430] Re: PowerPoint 2016 starts minimized when presenting

2019-05-22 Thread Tomas Groth
Not reproduceable in 2.4.6

** Changed in: openlp
   Status: Confirmed => Fix Released

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1554430

Title:
  PowerPoint 2016 starts minimized  when presenting

Status in OpenLP:
  Fix Released

Bug description:
  Several users has reported that PowerPoint 2016 starts minimized  when 
presenting.
  It can be worked around by pressing the PowerPoint icon in the taskbar and 
then going back to OpenLP.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1554430/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Bug 1582913] Re: PDF files don't update the display / Only show first slide when sent to Live from Service

2019-05-22 Thread Tomas Groth
This is no longer reproduce able in trunk nor 2.4.6.

** Changed in: openlp
   Status: New => Fix Committed

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1582913

Title:
  PDF files don't update the display / Only show first slide when sent
  to Live from Service

Status in OpenLP:
  Fix Committed

Bug description:
  If PDF file is sent to Live from the Service, only the first slide will be 
shown.
  When scrolling through the slides, Live does not update.

  If display is blanked and unblanked the Live display is updated.

  Win 8.1 / 2.4.1

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1582913/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Bug 1571412] Re: 2.4 VLC/Win7 Service Item Switching Broken

2019-05-22 Thread Tomas Groth
Not reproduceable in 2.4.6

** Changed in: openlp
   Status: New => Fix Released

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1571412

Title:
  2.4 VLC/Win7 Service Item Switching Broken

Status in OpenLP:
  Fix Released

Bug description:
  Windows 7 Professional 64-bit running OpenLP 2.4 with VLC 2.2.1 plugin
  (32-bit) enabled causes service items not to display until switching
  to different slide within service item.

  For example, take a song (or folder of images, bug displays either
  way) with multiple slides saved in a service. When bringing said song
  live (double-click, right arrow key, "Send selected item to live"
  button) the song comes up in the live panel, but does not display on
  the live screen. When switching to the second slide, the first slide
  with flash momentarily and then switch to the second slide. To display
  the first slide, you have to send the service item live, switch to the
  second slide, then switch back to the first slide.

  With VLC uninstalled, service item switching works correctly. Tested
  on multiple computers/installations. Bug only appeared after upgrade
  to 2.4. VLC plugin was working fine with 2.2. No bug present with
  OpenLP 2.4 on Xubuntu 15.10 with VLC plugin enabled.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1571412/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Bug 891858] Re: PowerPoint presenter 2007 is not correctly synchronised with openlp's live buttons

2019-05-22 Thread Tomas Groth
Support for PowerPoint Viewer has been removed for future versions, so
this will not be fixed.

** Changed in: openlp
   Status: Confirmed => Won't Fix

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/891858

Title:
  PowerPoint presenter 2007 is not correctly synchronised with openlp's
  live buttons

Status in OpenLP:
  Won't Fix

Bug description:
  Hello,

  I am using Openlp 1.9.7 on Windows 7 Professional with Microsoft
  Office 2007 PowerPoint Viewer. I have encountered strange behaivor of
  the Openlp. When I bring my pptx presentation live it starts
  displaying corretly, but I have noticed that when I want to proceed
  more than just a click (for example I want to proceed from slide 2 to
  slide 5) and I press some further slide on the live panel -the
  presentation does not proceed to required slide but makes only a one
  step forward (= one button click on the presentation). Same behavior
  is encountered when I would like to get back to some slide (for
  example from slide 5 to slide 1). I think that the synchronisation
  between OpenLP and PowerPoint presenter has some bug.

  When I am using OpenOffice this behavior works correctly

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/891858/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp