openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #34056
[Merge] lp:~raoul-snyman/openlp/bundle-libvlc into lp:openlp
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)
Tomas Groth (tomasgroth)
For more details, see:
https://code.launchpad.net/~raoul-snyman/openlp/bundle-libvlc/+merge/367870
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 +0000
+++ openlp/core/app.py 2019-05-23 20:26:05 +0000
@@ -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 +0000
+++ openlp/core/ui/mainwindow.py 2019-05-23 20:26:05 +0000
@@ -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 +0000
+++ scripts/appveyor.yml 2019-05-23 20:26:05 +0000
@@ -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 python-vlc"
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 @@
artifacts:
- path: openlp-branch\dist\*.exe
+ name: Portable-installer
+ - path: openlp-branch\dist\*.msi
+ name: Installer
Follow ups