From 10e17386a231ff089787e6f8acb37d41e7a1b710 Mon Sep 17 00:00:00 2001 From: Philipp Wolfer Date: Mon, 19 Aug 2019 08:33:22 +0200 Subject: [PATCH 1/2] Load Qt SSL DLLs on Windows directly from Qt install location With this the developer is no longer required to copy those files manually for packaging --- appveyor.yml | 8 -------- picard.spec | 10 ++++++---- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index a72c5f01f..1d671118b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -47,14 +47,6 @@ build_script: pip3 install -r requirements-win.txt - copy /Y %PYTHON_SITE%\PyQt5\Qt\bin\libeay32.dll . - - copy /Y %PYTHON_SITE%\PyQt5\Qt\bin\ssleay32.dll . - - copy /Y %PYTHON_SITE%\PyQt5\Qt\bin\libcrypto-1_1-x64.dll . - - copy /Y %PYTHON_SITE%\PyQt5\Qt\bin\libssl-1_1-x64.dll . - IF "%APPVEYOR_REPO_TAG%" == "false" python setup.py patch_version --platform=python%PYTHON_VERSION% python setup.py build diff --git a/picard.spec b/picard.spec index 4c90a0574..6da6155bb 100644 --- a/picard.spec +++ b/picard.spec @@ -48,15 +48,17 @@ data_files = get_locale_messages() fpcalc_name = 'fpcalc' if os_name == 'Windows': + from PyQt5.QtCore import QLibraryInfo + qt_binaries_path = QLibraryInfo.location(QLibraryInfo.BinariesPath) fpcalc_name = 'fpcalc.exe' binaries += [ ('discid.dll', '.'), # The following two lines should not be neccasary with PyInstaller 3.5 - ('libeay32.dll', '.'), - ('ssleay32.dll', '.'), + (os.path.join(qt_binaries_path, 'libeay32.dll'), '.'), + (os.path.join(qt_binaries_path, 'ssleay32.dll'), '.'), # The following two lines should not be neccasary with PyInstaller >3.5 - ('libcrypto-1_1-x64.dll', '.'), - ('libssl-1_1-x64.dll', '.'), + (os.path.join(qt_binaries_path, 'libcrypto-1_1-x64.dll'), '.'), + (os.path.join(qt_binaries_path, 'libssl-1_1-x64.dll'), '.'), ] data_files.append((os.path.join('resources', 'win10', '*'), '.')) From ee32c5b6eb3a9235ea390afc965dc37e6f6a2986 Mon Sep 17 00:00:00 2001 From: Philipp Wolfer Date: Mon, 19 Aug 2019 08:44:08 +0200 Subject: [PATCH 2/2] picard.spec: Use os_name variable instead of repeated platform.system() --- picard.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/picard.spec b/picard.spec index 6da6155bb..8b072cda2 100644 --- a/picard.spec +++ b/picard.spec @@ -107,7 +107,7 @@ coll = COLLECT(exe, name='picard') -if platform.system() == 'Darwin': +if os_name == 'Darwin': info_plist = { 'NSHighResolutionCapable': 'True', 'NSPrincipalClass': 'NSApplication',