From 453191f395e9a3b68e6c3c46530aa49d163d0e3a Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Thu, 11 Apr 2019 20:57:15 -0700 Subject: [PATCH] Move the VLC setup to after the logging is set up --- openlp/core/app.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/openlp/core/app.py b/openlp/core/app.py index 84838628c..05e8ed0da 100644 --- a/openlp/core/app.py +++ b/openlp/core/app.py @@ -345,12 +345,6 @@ def main(args=None): # 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)) - print('VLC Path: {}'.format(os.environ['PYTHON_VLC_LIB_PATH'])) - else: - print('Not frozen: {}'.format(str(AppLocation.get_directory(AppLocation.AppDir)))) # Initialise the resources qInitResources() # Now create and actually run the application. @@ -381,6 +375,13 @@ def main(args=None): 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): + os.environ['PYTHON_VLC_LIB_PATH'] = str(AppLocation.get_directory(AppLocation.AppDir)) + log.debug('VLC Path: {}'.format(os.environ['PYTHON_VLC_LIB_PATH'])) + else: + log.debug('Not frozen: {}'.format(str(AppLocation.get_directory(AppLocation.AppDir)))) + # Initialise the Registry Registry.create() Registry().register('application', application) Registry().set_flag('no_web_server', args.no_web_server)