freeze.py: Copy plugin folders on Windows
This makes HTML5 video work. Fixes #1068.
This commit is contained in:
parent
ecf358b53a
commit
0f5e6abc11
@ -49,6 +49,16 @@ def get_egl_path():
|
|||||||
r'PyQt5\libEGL.dll')
|
r'PyQt5\libEGL.dll')
|
||||||
|
|
||||||
|
|
||||||
|
def get_plugin_folders():
|
||||||
|
"""Get the plugin folders to copy to the output."""
|
||||||
|
if not sys.platform.startswith('win'):
|
||||||
|
return []
|
||||||
|
plugin_dir = os.path.join(distutils.sysconfig.get_python_lib(),
|
||||||
|
'PyQt5', 'plugins')
|
||||||
|
folders = ['audio', 'iconengines', 'mediaservice', 'printsupport']
|
||||||
|
return [os.path.join(plugin_dir, folder) for folder in folders]
|
||||||
|
|
||||||
|
|
||||||
def get_build_exe_options(skip_html=False):
|
def get_build_exe_options(skip_html=False):
|
||||||
"""Get the options passed as build_exe_options to cx_Freeze.
|
"""Get the options passed as build_exe_options to cx_Freeze.
|
||||||
|
|
||||||
@ -81,6 +91,8 @@ def get_build_exe_options(skip_html=False):
|
|||||||
if egl_path is not None:
|
if egl_path is not None:
|
||||||
include_files.append((egl_path, 'libEGL.dll'))
|
include_files.append((egl_path, 'libEGL.dll'))
|
||||||
|
|
||||||
|
include_files += get_plugin_folders()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'include_files': include_files,
|
'include_files': include_files,
|
||||||
'include_msvcr': True,
|
'include_msvcr': True,
|
||||||
|
Loading…
Reference in New Issue
Block a user