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 argparse
|
||||||
import logging
|
import logging
|
||||||
|
import os
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
import os
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from shutil import copytree
|
from shutil import copytree
|
||||||
@ -385,6 +385,15 @@ def main():
|
|||||||
else:
|
else:
|
||||||
application.setApplicationName('OpenLP')
|
application.setApplicationName('OpenLP')
|
||||||
set_up_logging(AppLocation.get_directory(AppLocation.CacheDir))
|
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.create()
|
||||||
Registry().register('application', application)
|
Registry().register('application', application)
|
||||||
Registry().set_flag('no_web_server', args.no_web_server)
|
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(
|
self.show_status_message(
|
||||||
translate('OpenLP.MainWindow', 'Copying OpenLP data to new data directory location - {path} '
|
translate('OpenLP.MainWindow', 'Copying OpenLP data to new data directory location - {path} '
|
||||||
'- Please wait for copy to finish').format(path=self.new_data_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')
|
self.log_info('Copy successful')
|
||||||
except (OSError, DistutilsFileError) as why:
|
except (OSError, DistutilsFileError) as why:
|
||||||
self.application.set_normal_cursor()
|
self.application.set_normal_cursor()
|
||||||
|
@ -12,11 +12,13 @@ clone_script:
|
|||||||
environment:
|
environment:
|
||||||
matrix:
|
matrix:
|
||||||
- PYTHON: C:\\Python37-x64
|
- PYTHON: C:\\Python37-x64
|
||||||
|
CHOCO_VLC: vlc
|
||||||
- PYTHON: C:\\Python37
|
- PYTHON: C:\\Python37
|
||||||
|
CHOCO_VLC: vlc --forcex86
|
||||||
|
|
||||||
install:
|
install:
|
||||||
# Install dependencies from pypi
|
# 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
|
build: off
|
||||||
|
|
||||||
@ -31,12 +33,6 @@ after_test:
|
|||||||
# This is where we create a package using PyInstaller
|
# This is where we create a package using PyInstaller
|
||||||
# Install PyInstaller
|
# Install PyInstaller
|
||||||
- "%PYTHON%\\python.exe -m pip 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
|
# 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
|
# - 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
|
# - PortableApps.comInstaller_3.4.4.paf.exe /S
|
||||||
@ -44,6 +40,11 @@ after_test:
|
|||||||
# - PortableApps.comLauncher_2.2.1.paf.exe /S
|
# - 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
|
# - curl -L -O http://downloads.sourceforge.net/project/portableapps/NSIS%20Portable/NSISPortable_3.0_English.paf.exe
|
||||||
# - NSISPortable_3.0_English.paf.exe /S
|
# - 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
|
# Get the packaging code
|
||||||
- appveyor DownloadFile http://bazaar.launchpad.net/~openlp-core/openlp/packaging/tarball -FileName packaging.tar.gz
|
- appveyor DownloadFile http://bazaar.launchpad.net/~openlp-core/openlp/packaging/tarball -FileName packaging.tar.gz
|
||||||
- 7z e packaging.tar.gz
|
- 7z e packaging.tar.gz
|
||||||
@ -66,3 +67,6 @@ after_test:
|
|||||||
|
|
||||||
artifacts:
|
artifacts:
|
||||||
- path: openlp-branch\dist\*.exe
|
- path: openlp-branch\dist\*.exe
|
||||||
|
name: Portable-installer
|
||||||
|
- path: openlp-branch\dist\*.msi
|
||||||
|
name: Installer
|
||||||
|
Loading…
Reference in New Issue
Block a user