forked from openlp/openlp
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.
bzr-revno: 2873
This commit is contained in:
commit
6800490995
@ -28,9 +28,9 @@ logging and a plugin framework are contained within the openlp.core module.
|
||||
"""
|
||||
import argparse
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
import os
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
from shutil import copytree
|
||||
@ -385,6 +385,15 @@ def main():
|
||||
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)
|
||||
|
@ -1334,7 +1334,7 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow, LogMixin, RegistryPropert
|
||||
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()
|
||||
|
@ -12,11 +12,13 @@ clone_script:
|
||||
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
|
||||
|
||||
@ -31,12 +33,6 @@ after_test:
|
||||
# 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 @@ after_test:
|
||||
# - 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 @@ after_test:
|
||||
|
||||
artifacts:
|
||||
- path: openlp-branch\dist\*.exe
|
||||
name: Portable-installer
|
||||
- path: openlp-branch\dist\*.msi
|
||||
name: Installer
|
||||
|
Loading…
Reference in New Issue
Block a user