mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Move Qt DLL list into this codebase from bypy
This commit is contained in:
parent
4abffead71
commit
3434a40c35
@ -11,11 +11,93 @@ import subprocess
|
||||
import sys
|
||||
|
||||
from bypy.constants import (
|
||||
LIBDIR, PREFIX, PYTHON, SRC as CALIBRE_DIR, build_dir, worker_env
|
||||
LIBDIR, PREFIX, PYTHON, SRC as CALIBRE_DIR, build_dir, islinux, ismacos,
|
||||
worker_env
|
||||
)
|
||||
from bypy.utils import run_shell
|
||||
|
||||
|
||||
dlls = [
|
||||
'Core',
|
||||
'Concurrent',
|
||||
'Gui',
|
||||
'Network',
|
||||
# 'NetworkAuth',
|
||||
'Location',
|
||||
'PrintSupport',
|
||||
'WebChannel',
|
||||
# 'WebSockets',
|
||||
# 'WebView',
|
||||
'Positioning',
|
||||
'Sensors',
|
||||
'Sql',
|
||||
'Svg',
|
||||
'WebKit',
|
||||
'WebKitWidgets',
|
||||
'WebEngineCore',
|
||||
'WebEngine',
|
||||
'WebEngineWidgets',
|
||||
'Widgets',
|
||||
# 'Multimedia',
|
||||
'OpenGL',
|
||||
# 'MultimediaWidgets',
|
||||
'Xml',
|
||||
# 'XmlPatterns',
|
||||
]
|
||||
|
||||
if islinux:
|
||||
dlls += ['X11Extras', 'XcbQpa', 'WaylandClient', 'DBus']
|
||||
elif ismacos:
|
||||
dlls += ['MacExtras', 'DBus']
|
||||
|
||||
QT_DLLS = frozenset(
|
||||
'Qt5' + x for x in dlls
|
||||
)
|
||||
|
||||
QT_PLUGINS = [
|
||||
'imageformats',
|
||||
'iconengines',
|
||||
# 'mediaservice',
|
||||
'platforms',
|
||||
'platformthemes',
|
||||
# 'playlistformats',
|
||||
'sqldrivers',
|
||||
# 'styles',
|
||||
# 'webview',
|
||||
# 'audio', 'printsupport', 'bearer', 'position',
|
||||
]
|
||||
|
||||
if not ismacos:
|
||||
QT_PLUGINS.append('platforminputcontexts')
|
||||
|
||||
if islinux:
|
||||
QT_PLUGINS += [
|
||||
'wayland-decoration-client',
|
||||
'wayland-graphics-integration-client',
|
||||
'wayland-shell-integration',
|
||||
'xcbglintegrations',
|
||||
]
|
||||
|
||||
PYQT_MODULES = (
|
||||
'Qt',
|
||||
'QtCore',
|
||||
'QtGui',
|
||||
'QtNetwork',
|
||||
# 'QtMultimedia', 'QtMultimediaWidgets',
|
||||
'QtPrintSupport',
|
||||
'QtSensors',
|
||||
'QtSvg',
|
||||
'QtWebKit',
|
||||
'QtWebKitWidgets',
|
||||
'QtWidgets',
|
||||
'QtWebEngine',
|
||||
'QtWebEngineCore',
|
||||
'QtWebEngineWidgets',
|
||||
# 'QtWebChannel',
|
||||
)
|
||||
del dlls
|
||||
|
||||
|
||||
def read_cal_file(name):
|
||||
with open(os.path.join(CALIBRE_DIR, 'src', 'calibre', name), 'rb') as f:
|
||||
return f.read().decode('utf-8')
|
||||
|
@ -17,7 +17,6 @@ from functools import partial
|
||||
from bypy.constants import (
|
||||
OUTPUT_DIR, PREFIX, SRC as CALIBRE_DIR, is64bit, python_major_minor_version
|
||||
)
|
||||
from bypy.pkgs.qt_base import PYQT_MODULES, QT_DLLS, QT_PLUGINS
|
||||
from bypy.utils import (
|
||||
create_job, get_dll_path, mkdtemp, parallel_build, py_compile, run, walk
|
||||
)
|
||||
@ -28,7 +27,9 @@ arch = 'x86_64' if is64bit else 'i686'
|
||||
|
||||
py_ver = '.'.join(map(str, python_major_minor_version()))
|
||||
QT_PREFIX = os.path.join(PREFIX, 'qt')
|
||||
calibre_constants = globals()['init_env']['calibre_constants']
|
||||
iv = globals()['init_env']
|
||||
calibre_constants = iv['calibre_constants']
|
||||
QT_DLLS, QT_PLUGINS, PYQT_MODULES = iv['QT_DLLS'], iv['QT_PLUGINS'], iv['PYQT_MODULES']
|
||||
qt_get_dll_path = partial(get_dll_path, loc=os.path.join(QT_PREFIX, 'lib'))
|
||||
|
||||
|
||||
@ -283,7 +284,7 @@ def create_tarfile(env, compression_level='9'):
|
||||
def main():
|
||||
args = globals()['args']
|
||||
ext_dir = globals()['ext_dir']
|
||||
run_tests = globals()['init_env']['run_tests']
|
||||
run_tests = iv['run_tests']
|
||||
env = Env()
|
||||
copy_libs(env)
|
||||
copy_python(env, ext_dir)
|
||||
|
@ -24,11 +24,12 @@ from itertools import repeat
|
||||
from bypy.constants import (
|
||||
OUTPUT_DIR, PREFIX, PYTHON, SRC as CALIBRE_DIR, python_major_minor_version
|
||||
)
|
||||
from bypy.pkgs.qt_base import PYQT_MODULES, QT_DLLS, QT_PLUGINS
|
||||
from bypy.utils import current_dir, mkdtemp, py_compile, timeit, walk
|
||||
|
||||
abspath, join, basename, dirname = os.path.abspath, os.path.join, os.path.basename, os.path.dirname
|
||||
calibre_constants = globals()['init_env']['calibre_constants']
|
||||
iv = globals()['init_env']
|
||||
calibre_constants = iv['calibre_constants']
|
||||
QT_DLLS, QT_PLUGINS, PYQT_MODULES = iv['QT_DLLS'], iv['QT_PLUGINS'], iv['PYQT_MODULES']
|
||||
py_ver = '.'.join(map(str, python_major_minor_version()))
|
||||
sign_app = runpy.run_path(join(dirname(abspath(__file__)), 'sign.py'))['sign_app']
|
||||
|
||||
@ -724,5 +725,5 @@ def main(args, ext_dir, test_runner):
|
||||
if __name__ == '__main__':
|
||||
args = globals()['args']
|
||||
ext_dir = globals()['ext_dir']
|
||||
run_tests = globals()['init_env']['run_tests']
|
||||
run_tests = iv['run_tests']
|
||||
main(args, ext_dir, run_tests)
|
||||
|
Loading…
x
Reference in New Issue
Block a user