Add OpenSSL library to bundle to prevent error "QSslSocket error when SSL is

NOT used".

Try to prevent crashes on Windows because OpenSSL library is not installed or
installed very old version. Also will help suppress annoying messages.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2017-01-24 16:12:43 +02:00
parent 1014cc86ca
commit f982bea7ba
5 changed files with 33 additions and 0 deletions

View File

@ -25,6 +25,21 @@ win32{
VCOPY = $$QMAKE_COPY /D VCOPY = $$QMAKE_COPY /D
} }
# See question on StackOwerflow "QSslSocket error when SSL is NOT used" (http://stackoverflow.com/a/31277055/3045403)
# Copy of answer:
# We occasionally had customers getting very similar warning messages but the software was also crashing.
# We determined it was because, although we weren't using SSL either, the program found a copy of OpenSSL on the
# customer's computer and tried interfacing with it. The version it found was too old though (from Qt 5.2 onwards v1.0.0
# or later is required).
#
# Our solution was to distribute the OpenSSL DLLs along with our application (~1.65 MB). The alternative is to compile
# Qt from scratch without OpenSSL support.
win32 {
INSTALL_OPENSSL += \
../../../dist/win/libeay32.dll \
../../../dist/win/ssleay32.dll
}
macx{ macx{
# QTBUG-31034 qmake doesn't allow override QMAKE_CXX # QTBUG-31034 qmake doesn't allow override QMAKE_CXX
CONFIG+=no_ccache CONFIG+=no_ccache

BIN
dist/win/libeay32.dll vendored Normal file

Binary file not shown.

BIN
dist/win/ssleay32.dll vendored Normal file

Binary file not shown.

View File

@ -259,6 +259,15 @@ unix{
} }
} }
#win32 {
for(DIR, INSTALL_OPENSSL) {
#add these absolute paths to a variable which
#ends up as 'mkcommands = path1 path2 path3 ...'
openssl_path += $${PWD}/$$DIR
}
copyToDestdir($$openssl_path, $$shell_path($${OUT_PWD}/$$DESTDIR))
#}
# Compilation will fail without this files after we added them to this section. # Compilation will fail without this files after we added them to this section.
OTHER_FILES += \ OTHER_FILES += \
share/resources/tapeicon/64x64/logo.ico \ # Tape's logo. share/resources/tapeicon/64x64/logo.ico \ # Tape's logo.

View File

@ -285,6 +285,8 @@ win32:*-g++ {
$$PWD/../../../dist/win/s-measurements.ico \ $$PWD/../../../dist/win/s-measurements.ico \
$$PWD/../../../dist/win/pattern.ico \ $$PWD/../../../dist/win/pattern.ico \
$$PWD/../../../dist/win/pdftops.exe \ $$PWD/../../../dist/win/pdftops.exe \
$$PWD/../../../dist/win/libeay32.dll \
$$PWD/../../../dist/win/ssleay32.dll \
$$PWD/../../../AUTHORS.txt \ $$PWD/../../../AUTHORS.txt \
$$PWD/../../../LICENSE_GPL.txt \ $$PWD/../../../LICENSE_GPL.txt \
$$PWD/../../../README.txt \ $$PWD/../../../README.txt \
@ -437,6 +439,13 @@ win32 {
pdftops_path += $${PWD}/$$DIR pdftops_path += $${PWD}/$$DIR
} }
copyToDestdir($$pdftops_path, $$shell_path($${OUT_PWD}/$$DESTDIR)) copyToDestdir($$pdftops_path, $$shell_path($${OUT_PWD}/$$DESTDIR))
for(DIR, INSTALL_OPENSSL) {
#add these absolute paths to a variable which
#ends up as 'mkcommands = path1 path2 path3 ...'
openssl_path += $${PWD}/$$DIR
}
copyToDestdir($$openssl_path, $$shell_path($${OUT_PWD}/$$DESTDIR))
} }
noRunPath{ # For enable run qmake with CONFIG+=noRunPath noRunPath{ # For enable run qmake with CONFIG+=noRunPath