Skip to content

Commit

Permalink
windows build: remove Qt OpenSSL backend
Browse files Browse the repository at this point in the history
This is to work around a bug in PyInstaller that
can cause the wrong DLLs to be loaded, leading
to a crash.
  • Loading branch information
jonathanperret authored and dl1com committed Oct 31, 2024
1 parent d2a2b91 commit 0583fe4
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/build-multi-os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,22 @@ jobs:
pwd
ls -l src/main/python/main/ayab/
ls -l src/main/resources/base/ayab/translations/
# The OpenSSL-based backend for QtNetwork requires the OpenSSL dynamic
# libraries but they are not packaged with Qt or PySide. Pyinstaller
# tries to find them for us and make them available, but does not
# always succeed, see https://github.com/pyinstaller/pyinstaller/issues/8857
# What we can do instead is disable the OpenSSL backend by deleting the
# relevant plugin — this way, Pyinstaller won't package OpenSSL DLLs,
# and Qt will silently fall back to the `schannel` backend that uses
# native Windows libraries. Note that deleting the plugin is an approach
# that is actually suggested in the Qt documentation, see
# https://doc.qt.io/qt-6/ssl.html#considerations-while-packaging-your-application
- name: Remove OpenSSL QtNetwork backend
shell: bash
run: |
find "$(python -c 'import PySide6;print(PySide6.__path__[0])')" -iname qopensslbackend.dll -delete
- name: Build app
shell: pwsh
run: python -m fbs freeze
Expand Down

0 comments on commit 0583fe4

Please sign in to comment.