1
0

qt desktop gui: upgrade qt5->qt6

closes https://github.com/spesmilo/electrum/issues/8007
This commit is contained in:
SomberNight
2024-09-05 16:20:01 +00:00
parent fcc4e1d387
commit cfe8502f96
89 changed files with 918 additions and 1010 deletions

View File

@@ -39,7 +39,7 @@ $WINE_PYTHON -m pip install --no-build-isolation --no-dependencies --no-binary :
info "Installing dependencies specific to binaries..."
# TODO tighten "--no-binary :all:" (but we don't have a C compiler...)
$WINE_PYTHON -m pip install --no-build-isolation --no-dependencies --no-warn-script-location \
--no-binary :all: --only-binary cffi,cryptography,PyQt5,PyQt5-Qt5,PyQt5-sip \
--no-binary :all: --only-binary cffi,cryptography,PyQt6,PyQt6-Qt6,PyQt6-sip \
--cache-dir "$WINE_PIP_CACHE_DIR" -r "$CONTRIB"/deterministic-build/requirements-binaries.txt
info "Installing hardware wallet requirements..."
$WINE_PYTHON -m pip install --no-build-isolation --no-dependencies --no-warn-script-location \

View File

@@ -22,7 +22,7 @@ hiddenimports += collect_submodules(f"{PYPKG}.plugins")
binaries = []
# Workaround for "Retro Look":
binaries += [b for b in collect_dynamic_libs('PyQt5') if 'qwindowsvista' in b[0]]
binaries += [b for b in collect_dynamic_libs('PyQt6') if 'qwindowsvista' in b[0]]
# add libsecp256k1, libusb, etc:
binaries += [(f"{PROJECT_ROOT}/{PYPKG}/*.dll", '.')]
@@ -69,8 +69,19 @@ for d in a.datas:
break
# Strip out parts of Qt that we never use. Reduces binary size by tens of MBs. see #4815
qt_bins2remove=('qt5web', 'qt53d', 'qt5game', 'qt5designer', 'qt5quick',
'qt5location', 'qt5test', 'qt5xml', r'pyqt5\qt\qml\qtquick')
qt_bins2remove=(
r'pyqt6\qt6\qml',
r'pyqt6\qt6\bin\qt6quick',
r'pyqt6\qt6\bin\qt6qml',
r'pyqt6\qt6\bin\qt6multimediaquick',
r'pyqt6\qt6\bin\qt6pdfquick',
r'pyqt6\qt6\bin\qt6positioning',
r'pyqt6\qt6\bin\qt6spatialaudio',
r'pyqt6\qt6\bin\qt6shadertools',
r'pyqt6\qt6\bin\qt6sensors',
r'pyqt6\qt6\bin\qt6web',
r'pyqt6\qt6\bin\qt6test',
)
print("Removing Qt binaries:", *qt_bins2remove)
for x in a.binaries.copy():
for r in qt_bins2remove:
@@ -78,7 +89,10 @@ for x in a.binaries.copy():
a.binaries.remove(x)
print('----> Removed x =', x)
qt_data2remove=(r'pyqt5\qt\translations\qtwebengine_locales',)
qt_data2remove=(
r'pyqt6\qt6\translations\qtwebengine_locales',
r'pyqt6\qt6\qml',
)
print("Removing Qt datas:", *qt_data2remove)
for x in a.datas.copy():
for r in qt_data2remove: