From 99b15680b08049bd8380aa871a2dee1e4d0dc386 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Thu, 19 Mar 2020 18:09:32 +0100 Subject: [PATCH] more work on QT5 for windows --- bacula/src/qt-console/make-win32 | 36 +++++++++++ .../qt-console/tray-monitor/win32/qmake.conf | 2 +- bacula/src/win32/README.mingw | 56 ++--------------- bacula/src/win32/build-depkgs-mingw-w64 | 61 +++++++++---------- bacula/src/win32/build-depkgs-mingw32 | 38 ++++++------ bacula/src/win32/patches/qt5-qaction.patch | 10 +++ bacula/src/win32/win32_installer/DumpLog.nsh | 2 + bacula/src/win32/win32_installer/Makefile | 14 +++-- .../src/win32/win32_installer/winbacula.nsi | 40 ++++++++---- bacula/src/win32/win64_installer/DumpLog.nsh | 2 + bacula/src/win32/win64_installer/Makefile | 16 ++--- .../src/win32/win64_installer/winbacula.nsi | 56 ++++++++++++----- 12 files changed, 189 insertions(+), 144 deletions(-) create mode 100644 bacula/src/win32/patches/qt5-qaction.patch diff --git a/bacula/src/qt-console/make-win32 b/bacula/src/qt-console/make-win32 index 80e262c05..b9872e6c8 100755 --- a/bacula/src/qt-console/make-win32 +++ b/bacula/src/qt-console/make-win32 @@ -8,6 +8,42 @@ # +prepare_regw_build() +{ + local version=$1 + local dpkgs_mingw + if test -d ../win32/release${version}; then + if [ ${version} -eq 32 ] + then + depkgs_mingw='depkgs-mingw32' + + elif [ ${version} -eq 64 ] + then + depkgs_mingw='depkgs-mingw-w64' + else + echo "wrong version - '${version}'." + exit 1 + fi + + cd RegistrationWizard + qmake -spec $PWD/../win32 -unix -o Makefile.mingw${version} "CONFIG += mingw${version}" RegistrationWizard.pro + + # Don't know why this libGL is added + sed -i s/-lGL// Makefile.mingw${version} + # Linux headers are also added automatically + perl -plne "s:-I/usr/[^ ]+::g" Makefile.mingw${version} > 1 + perl -plne "s:-L/usr/[^ ]+::g" 1 > Makefile.mingw${version} + + echo "Make Windows RegistrationWizard" + make -j3 -f Makefile.mingw${version} $2 + if test -f RegistrationWizard.exe; then + cp -f RegistrationWizard.exe ../../win32/release${version} + fi + rm -f RegistrationWizard.exe + fi + cd .. +} + prepare_regw_build() { local version=$1 diff --git a/bacula/src/qt-console/tray-monitor/win32/qmake.conf b/bacula/src/qt-console/tray-monitor/win32/qmake.conf index efde4a8fc..19334920e 100644 --- a/bacula/src/qt-console/tray-monitor/win32/qmake.conf +++ b/bacula/src/qt-console/tray-monitor/win32/qmake.conf @@ -39,7 +39,7 @@ QMAKE_CXXFLAGS_RTTI_OFF = -fno-rtti QMAKE_CXXFLAGS_EXCEPTIONS_ON = -fexceptions -mthreads QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -fno-exceptions -QMAKE_INCDIR = $(DEPKGS)/depkgs-mingw32/include/pthreads $(DEPKGS)/depkgs-mingw32/include/ ../win32/compat +QMAKE_INCDIR = $(DEPKGS)/depkgs-mingw32/include/ ../win32/compat QMAKE_INCDIR_QT = $(DEPKGS)/depkgs-mingw32/include/qt QMAKE_LIBDIR_QT = $(DEPKGS)/depkgs-mingw32/lib/qt diff --git a/bacula/src/win32/README.mingw b/bacula/src/win32/README.mingw index ffbbf50cc..4efb970e8 100644 --- a/bacula/src/win32/README.mingw +++ b/bacula/src/win32/README.mingw @@ -3,7 +3,7 @@ Instructions for cross compiling the Win32/64 FD on Linux ======================================================= This part of the file documents the tools (scripts) we use for building Bacula for Microsoft Windows using the cross-compiler tools on a Linux system. We -use Ubuntu 14.04 so building on that system should definitely work. But there +use Debian Buster so building on that system should definitely work. But there shouldn't be any issues on other Linux distributions. We don't officially support this method, but it is what we use, and it should @@ -15,7 +15,8 @@ are pretty much on your own. However, we will try to provide responses to your questions on the bacula-devel list, but we can't guarantee anything. Note: the environment variable DEPKGS must point to a directory that -contains: depkgs-mingw32 depkgs-mingw-w64 and cross-tools +contains: depkgs-mingw32 depkgs-mingw-w64 + Directory Structure ===================== @@ -99,27 +100,12 @@ NB: On Debian, I had to remove /usr/bin/lorder for postresql to build correctly. Install the cross compiler and makensis - apt-get install g++-mingw-w64-i686 g++-mingw-w64-x86-64 gcc-mingw-w64-i686 gcc-mingw-w64-x86-64 nsis - -For OpenSSL 1.0.2n, I have commented out the fstat() definition in /usr/share/mingw-w64/include/sys/stat.h -with #ifdef 0 / #endif + apt-get install g++-mingw-w64-i686 g++-mingw-w64-x86-64 gcc-mingw-w64-i686 gcc-mingw-w64-x86-64 nsis qt5-default Download and build the 3rd party dependencies ./build-depkgs-mingw32 ./build-depkgs-mingw64 -Files are also available on bsweb:/var/www/dl/Depkgs-mingw32-6.6-paa9aiMa/ - - -Make sure that libgcc and libstdc++ mingw files are copied to depkgs-mingw32/bin and depkgs-mingw-w64/bin - /usr/lib/gcc/i686-w64-mingw32/*-posix/libgcc_s_sjlj-1.dll - /usr/lib/gcc/i686-w64-mingw32/*-posix/libstdc++-6.dll - /usr/i686-w64-mingw32/lib/libwinpthread-1.dll - - /usr/lib/gcc/x86_64-w64-mingw32/*-posix/libgcc_s_seh-1.dll - /usr/lib/gcc/x86_64-w64-mingw32/*-posix/libstdc++-6.dll - /usr/x86_64-w64-mingw32/lib/libwinpthread-1.dll - Note, that during the build process you will see a moderate amount of output and some warnings. If something more serious happens and the build fails, it is probably because you don't have one @@ -136,16 +122,6 @@ of the compiles, links, and installs done for that package. === -For the QT part, you must download QT binaries from -QT website - -the http://download.qt-project.org/archive/qt/4.8/4.8.4/ - -Then, copy Qt*dll files to depkgs-mingw32/bin and headers to -depkgs-mingw32/include - -=== - See External-mingw-w64 for download location You need the header files from the Microsoft VSS SDK. Unfortunately the SDK @@ -350,27 +326,3 @@ are copied from the depkgs directory into the installer binary. Alternatively, you can look at the build-depkgs-xxx script and manually run the code in the function process_mingw(). - -Upgrading your depkgs mingw -==================================== - -mkdir old -mv cross-tools old -mv depkgs-mingw32 old -mv depkgs-mingw-w64 old - -# from src/win32 -./build-depkgs-mingw32 -./build-depkgs-mingw-w64 - -# from new depkgs-mingw32 dir -cp ../old/depkgs-mingw32/bin/libgcc_s_dw2-1.dll bin/ -cp ../old/depkgs-mingw32/bin/Qt* bin/ -cp -r ../old/depkgs-mingw32/lib/qt lib -cp -r ../old/depkgs-mingw32/include/qt include/ -cp -r ../old/depkgs-mingw32/include/src include/ -cp -r ../old/depkgs-mingw32/vss . - - -# from new depkgs-mingw-w64 -cp -r ../old/depkgs-mingw-w64/vss . diff --git a/bacula/src/win32/build-depkgs-mingw-w64 b/bacula/src/win32/build-depkgs-mingw-w64 index 44fa8a119..dedcf66da 100755 --- a/bacula/src/win32/build-depkgs-mingw-w64 +++ b/bacula/src/win32/build-depkgs-mingw-w64 @@ -293,42 +293,39 @@ process_qt4() patch -p1 < ${SCRIPT_DIR}/patches/qt4-compilation-see.patch patch -p1 < ${SCRIPT_DIR}/patches/qt4-compilation.patch fi - echo "Configuring Qt4" - ./configure -opensource -confirm-license -fast -xplatform win32-g++-4.6 \ - -device-option CROSS_COMPILE=x86_64-w64-mingw32- -device-option \ - PKG_CONFIG='x86_64-w64-mingw32-pkg-config' -force-pkg-config -release \ - -exceptions -shared -prefix ${DEPPKG_DIR}/qt-out -prefix-install -no-script \ - -no-iconv -no-webkit -no-glib -no-gstreamer -no-phonon -no-phonon-backend \ - -accessibility -no-reduce-exports -no-rpath -make libs -nomake demos \ - -nomake docs -nomake examples -system-zlib -no-mitshm -no-libjpeg \ - -no-libmng -no-libtiff -no-sql-db2 -no-sql-ibase -no-sql-mysql -no-sql-oci \ - -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 \ - -no-sql-sqlite_symbian -no-sql-symsql -no-sql-tds -no-nis -no-cups -no-dbus \ - -no-openvg -no-openssl -no-nas-sound -no-audio-backend -no-sm -no-opengl \ - -no-javascript-jit -no-qt3support -nomake tools \ - -no-xmlpatterns -no-multimedia -nomake tools -silent - - local qt_source_dir=`pwd` - # Required libz.dll.a, zlib.h and zconf.h for proper Qt build purpose - process_zlib - cd "${qt_source_dir}" - local zlib_dir=`basename "${URL_ZLIB}" | sed 's/.tar.gz//'` - cp "../${zlib_dir}/libz.dll.a" ./lib/ - cp "../${zlib_dir}/zlib.h" ./include/ - cp "../${zlib_dir}/zconf.h" ./include/ + echo "Configuring Qt5" + export OPENSSL_LIBS="-lssl -lcrypto" + echo y | ./configure \ +-xplatform win32-g++ \ +-device-option CROSS_COMPILE=/usr/bin/x86_64-w64-mingw32- \ +-prefix ${DEPKGS_DIR}/ \ +-opensource -confirm-license \ +-no-compile-examples -nomake examples -nomake tests \ +-skip qtactiveqt -skip qtcharts -skip qtdoc -skip qtlocation \ +-skip qtremoteobjects -skip qtserialbus -skip qtwebchannel \ +-skip qtwebview -skip qtandroidextras -skip qtconnectivity \ +-skip qtgamepad -skip qtmacextras -skip qtpurchasing -skip qtscript \ +-skip qttranslations -skip qtwebengine -skip qtwinextras \ +-skip qtdatavis3d -skip qtgraphicaleffects -skip qtmultimedia \ +-skip qtquickcontrols -skip qtscxml -skip qtspeech \ +-skip qtvirtualkeyboard -skip qtwebglplugin -skip qtx11extras \ +-skip qt3d -skip qtcanvas3d -skip qtdeclarative \ +-skip qtimageformats -skip qtquickcontrols2 -no-opengl \ +-skip qtsensors -skip qtwayland -skip qtwebsockets -I ${DEPKGS_DIR}/include -L ${DEPKGS_DIR}/lib make - - echo "Installing Qt4" - rm -rf ${DEPPKG_DIR}/include/qt ${DEPPKG_DIR}/lib/qt - mkdir -p ${DEPPKG_DIR}/include/qt ${DEPPKG_DIR}/lib/qt - cp -rf include/* ${DEPPKG_DIR}/include/qt - cp -rf lib/* ${DEPPKG_DIR}/lib/qt + make install + + echo "Installing Qt5" + # TODO: Not working + cd qtbase + cp -f ./plugins/platforms/qwindows.dll $DEPPKG_DIR/bin + cp -r ./plugins/platforms $DEPPKG_DIR/bin + cp -r ./plugins/platforms $DEPPKG_DIR/lib cp -rf src/corelib ${DEPPKG_DIR}/src/ cp -rf src/gui ${DEPPKG_DIR}/src/ cp -rf src/network ${DEPPKG_DIR}/src/ - cp -rf bin/Qt5Widgets.dll bin/libqtmain.a lib/Qt5Core.dll lib/Qt5Gui.dll lib/Qt5Network.dll ${DEPPKG_DIR}/bin/ - cp -rf bin/Qt5Widgets.dll bin/libqtmain.a lib/Qt5Core.dll lib/Qt5Gui.dll lib/Qt5Network.dll ${DEPPKG_DIR}/lib/qt/ + cd $DEPPKG_DIR/src } @@ -436,7 +433,7 @@ then process_lzo process_zlib # process_pcre - process_pthreads +# process_pthreads process_openssl process_qt4 process_sed diff --git a/bacula/src/win32/build-depkgs-mingw32 b/bacula/src/win32/build-depkgs-mingw32 index d3733b9e2..34ca1edf5 100755 --- a/bacula/src/win32/build-depkgs-mingw32 +++ b/bacula/src/win32/build-depkgs-mingw32 @@ -554,11 +554,13 @@ process_qt5() { if get_source "${URL_Qt5}" "${DIR_Qt5}" "${MKD_Qt5}" then - echo Patching Qt5 - fi - ./configure -xplatform win32-g++ -device-option CROSS_COMPILE=/usr/bin/x86_64-w64-mingw32- \ - -prefix ${DEPPKG_DIR}/qt-out -opensource -no-compile-examples \ - -no-openvg -no-sm -no-opengl \ + echo Patching Qt5 + do_patch qt5-qaction.patch + fi + export OPENSSL_LIBS="-lssl -lcrypto" + echo y | ./configure -xplatform win32-g++ -device-option CROSS_COMPILE=/usr/bin/i686-w64-mingw32- \ + -prefix ${DEPPKG_DIR} -opensource -no-compile-examples \ + -no-openvg -no-sm -no-opengl -nomake examples -nomake tests \ -skip qtactiveqt -skip qtcharts -skip qtdoc -skip qtlocation \ -skip qtremoteobjects -skip qtserialbus -skip qtwebchannel \ -skip qtwebview -skip qtandroidextras -skip qtconnectivity \ @@ -568,19 +570,21 @@ process_qt5() -skip qtquickcontrols -skip qtscxml -skip qtspeech \ -skip qtvirtualkeyboard -skip qtwebglplugin -skip qtx11extras \ -skip qt3d -skip qtcanvas3d -skip qtdeclarative \ - -skip qtimageformats -skip qtnetworkauth -skip qtquickcontrols2 \ - -skip qtsensors -skip qtwayland -skip qtwebsockets -silent -nomake examples + -skip qtimageformats -skip qtquickcontrols2 \ + -skip qtsensors -skip qtwayland -skip qtwebsockets -silent -openssl-linked \ + -I $DEPPKG_DIR/include -L $DEPPKG_DIR/lib make - rm -rf ${DEPPKG_DIR}/include/qt ${DEPPKG_DIR}/lib/qt - mkdir -p ${DEPPKG_DIR}/include/qt ${DEPPKG_DIR}/lib/qt - cd $DEPPKG_DIR/qt-out - cp -rf include/* ${DEPPKG_DIR}/include/qt - cp -rf lib/* ${DEPPKG_DIR}/lib/qt + make install + + cd qtbase + cp -f ./plugins/platforms/qwindows.dll $DEPPKG_DIR/bin + cp -r ./plugins/platforms $DEPPKG_DIR/bin + cp -r ./plugins/platforms $DEPPKG_DIR/lib + cp -rf src/corelib ${DEPPKG_DIR}/src/ cp -rf src/gui ${DEPPKG_DIR}/src/ - cp -rf bin/Qt5Widgets.dll bin/libqtmain.a bin/Qt5Core.dll bin/Qt5Gui.dll bin/Qt5Network.dll ${DEPPKG_DIR}/bin/ - cp -rf bin/Qt5Widgets.dll bin/libqtmain.a bin/Qt5Core.dll bin/Qt5Gui.dll bin/Qt5Network.dll ${DEPPKG_DIR}/lib/qt/ + cd $DEPPKG_DIR/src } process_qt4() @@ -605,7 +609,7 @@ process_qt4() -no-libmng -no-libtiff -no-sql-db2 -no-sql-ibase -no-sql-mysql -no-sql-oci \ -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 \ -no-sql-sqlite_symbian -no-sql-symsql -no-sql-tds -no-nis -no-cups -no-dbus \ - -no-openvg -no-openssl -no-nas-sound -no-audio-backend -no-sm -no-opengl \ + -no-openvg -no-nas-sound -no-audio-backend -no-sm -no-opengl \ -no-javascript-jit -no-qt3support -nomake tools \ -no-xmlpatterns -no-multimedia -nomake tools -silent @@ -657,7 +661,7 @@ then process_lzo process_zlib process_rsync - process_pthreads + #process_pthreads process_openssl process_stab2cv process_sed @@ -674,7 +678,7 @@ then # process_mt # process_mkisofs # process_dvd_rw_tools - process_qt4 + process_qt5 else for dependency in "$@" do diff --git a/bacula/src/win32/patches/qt5-qaction.patch b/bacula/src/win32/patches/qt5-qaction.patch new file mode 100644 index 000000000..b51924a5b --- /dev/null +++ b/bacula/src/win32/patches/qt5-qaction.patch @@ -0,0 +1,10 @@ +--- qtbase/src/widgets/kernel/qaction.cpp.org 2020-04-01 11:44:14.293432810 +0200 ++++ qtbase/src/widgets/kernel/qaction.cpp 2020-04-01 11:37:20.391428062 +0200 +@@ -48,6 +48,7 @@ + #include "qstylehints.h" + #include + #include ++#include "qwidget_p.h" + #if QT_CONFIG(menu) + #include + #endif diff --git a/bacula/src/win32/win32_installer/DumpLog.nsh b/bacula/src/win32/win32_installer/DumpLog.nsh index 064a37007..b178806f4 100644 --- a/bacula/src/win32/win32_installer/DumpLog.nsh +++ b/bacula/src/win32/win32_installer/DumpLog.nsh @@ -1,7 +1,9 @@ !ifndef LVM_GETITEMCOUNT !define LVM_GETITEMCOUNT 0x1004 !endif +!ifndef LVM_GETITEMTEXT !define LVM_GETITEMTEXT 0x102D +!endif Function DumpLog Exch $5 diff --git a/bacula/src/win32/win32_installer/Makefile b/bacula/src/win32/win32_installer/Makefile index a76edbee9..df6e61ccd 100644 --- a/bacula/src/win32/win32_installer/Makefile +++ b/bacula/src/win32/win32_installer/Makefile @@ -45,7 +45,7 @@ ifeq ($(bat),no) BACULA_BINARIES=$(BACULABINARIES) HELP= else - BACULA_BINARIES=$(BACULABINARIES) bat.exe bacula-tray-monitor.exe + BACULA_BINARIES=$(BACULABINARIES) bat.exe bacula-tray-monitor.exe RegistrationWizard.exe HELP=help endif @@ -55,16 +55,18 @@ EXTRA= DEPKGS_BINARIES := \ - libeay32.dll \ - pthreadGCE2.dll \ + libcrypto-1_1.dll \ zlib1.dll \ - ssleay32.dll \ + libssl-1_1.dll \ openssl.exe \ sed.exe \ expr64.exe \ snooze.exe \ - QtCore4.dll \ - QtGui4.dll \ + Qt5Core.dll \ + Qt5Gui.dll \ + Qt5Network.dll \ + Qt5Widgets.dll \ + qwindows.dll \ libwinpthread-1.dll \ libgcc_s_sjlj-1.dll \ libstdc++-6.dll diff --git a/bacula/src/win32/win32_installer/winbacula.nsi b/bacula/src/win32/win32_installer/winbacula.nsi index 3e71acdfb..4064353b3 100644 --- a/bacula/src/win32/win32_installer/winbacula.nsi +++ b/bacula/src/win32/win32_installer/winbacula.nsi @@ -298,8 +298,8 @@ Function .onInit ; PLUGINSDIR refers to temporary helper programs and not Bacula plugins! InitPluginsDir File "/oname=$PLUGINSDIR\openssl.exe" "${SRC_DIR}\openssl.exe" - File "/oname=$PLUGINSDIR\libeay32.dll" "${SRC_DIR}\libeay32.dll" - File "/oname=$PLUGINSDIR\ssleay32.dll" "${SRC_DIR}\ssleay32.dll" + File "/oname=$PLUGINSDIR\libssl-1_1.dll" "${SRC_DIR}\libssl-1_1.dll" + File "/oname=$PLUGINSDIR\libcrypto-1_1.dll" "${SRC_DIR}\libcrypto-1_1.dll" File "/oname=$PLUGINSDIR\sed.exe" "${SRC_DIR}\sed.exe" !InsertMacro MUI_INSTALLOPTIONS_EXTRACT "InstallType.ini" @@ -357,17 +357,15 @@ Function InstallCommonFiles SetOutPath "$INSTDIR" !if "${BUILD_TOOLS}" == "MinGW32" - File "${SRC_DIR}\pthreadGCE2.dll" - File "${SRC_DIR}\ssleay32.dll" - File "${SRC_DIR}\libeay32.dll" + File "${SRC_DIR}\libcrypto-1_1.dll" + File "${SRC_DIR}\libssl-1_1.dll" File "${SRC_DIR}\libwinpthread-1.dll" File "${SRC_DIR}\libgcc_s_sjlj-1.dll" File "${SRC_DIR}\libstdc++-6.dll" !endif !if "${BUILD_TOOLS}" == "MinGW64" - File "${SRC_DIR}\pthreadGCE.dll" - File "${SRC_DIR}\cryptoeay32-0.9.8.dll" - File "${SRC_DIR}\ssleay32-0.9.8.dll" + File "${SRC_DIR}\libssl-1_1.dll" + File "${SRC_DIR}\libcrypto-1_1.dll" !endif File "${SRC_DIR}\zlib1.dll" File "${SRC_DIR}\bacula.dll" @@ -569,17 +567,22 @@ Section "Bat Console" SecBatConsole !if "${BUILD_BAT}" == "yes" Call InstallCommonFiles - File "${SRC_DIR}\QtCore4.dll" - File "${SRC_DIR}\QtGui4.dll" + File "${SRC_DIR}\Qt5Core.dll" + File "${SRC_DIR}\Qt5Gui.dll" + File "${SRC_DIR}\Qt5Network.dll" + File "${SRC_DIR}\Qt5Widgets.dll" File "${SRC_DIR}\libgcc_s_sjlj-1.dll" File "${SRC_DIR}\bat.exe" - File "/oname=$PLUGINSDIR\bat.conf" "bat.conf.in" StrCpy $0 "$INSTDIR" StrCpy $1 bat.conf Call ConfigEditAndCopy + SetOutPath "$INSTDIR\platforms" + File "${SRC_DIR}\qwindows.dll" + SetOutPath "$INSTDIR" + SetOutPath "$INSTDIR\help" File "${SRC_DIR}\help\*" SetOutPath "$INSTDIR" @@ -598,11 +601,19 @@ Section "Bacula Tray Monitor" SecTrayMonitor !if "${BUILD_BAT}" == "yes" Call InstallCommonFiles - File "${SRC_DIR}\QtCore4.dll" - File "${SRC_DIR}\QtGui4.dll" + File "${SRC_DIR}\libssl-1_1.dll" + File "${SRC_DIR}\libcrypto-1_1.dll" + File "${SRC_DIR}\Qt5Gui.dll" + File "${SRC_DIR}\Qt5Core.dll" + File "${SRC_DIR}\Qt5Network.dll" + File "${SRC_DIR}\Qt5Widgets.dll" File "${SRC_DIR}\libgcc_s_sjlj-1.dll" File "${SRC_DIR}\bacula-tray-monitor.exe" + SetOutPath "$INSTDIR\platforms" + File "${SRC_DIR}\qwindows.dll" + SetOutPath "$INSTDIR" + ;File "/oname=$PLUGINSDIR\bacula-tray-monitor.conf" "bacula-tray-monitor.conf.in" StrCpy $0 "$INSTDIR" StrCpy $1 bacula-tray-monitor.conf @@ -787,6 +798,9 @@ Section "Uninstall" Delete /REBOOTOK "$INSTDIR\doc\*" Delete /REBOOTOK "$INSTDIR\openssl.exe" Delete /REBOOTOK "$INSTDIR\bacula-fd.exe" + Delete /REBOOTOK "$INSTDIR\bat.exe" + Delete /REBOOTOK "$INSTDIR\RegitrationWizard.exe" + Delete /REBOOTOK "$INSTDIR\bacula-tray-monitor.exe" Delete /REBOOTOK "$INSTDIR\bsleep.exe" Delete /REBOOTOK "$INSTDIR\bsmtp.exe" Delete /REBOOTOK "$INSTDIR\bconsole.exe" diff --git a/bacula/src/win32/win64_installer/DumpLog.nsh b/bacula/src/win32/win64_installer/DumpLog.nsh index 71fb25807..822777cf6 100644 --- a/bacula/src/win32/win64_installer/DumpLog.nsh +++ b/bacula/src/win32/win64_installer/DumpLog.nsh @@ -1,7 +1,9 @@ !ifndef LVM_GETITEMCOUNT !define LVM_GETITEMCOUNT 0x1004 !endif +!ifndef LVM_GETITEMTEXT !define LVM_GETITEMTEXT 0x102D +!endif Function DumpLog Exch $5 diff --git a/bacula/src/win32/win64_installer/Makefile b/bacula/src/win32/win64_installer/Makefile index 1f0a03082..a5174166f 100644 --- a/bacula/src/win32/win64_installer/Makefile +++ b/bacula/src/win32/win64_installer/Makefile @@ -45,15 +45,17 @@ DEPKGS_BINARIES := \ sed.exe \ expr64.exe \ snooze.exe \ - QtCore4.dll \ - QtGui4.dll \ - pthreadGCE2.dll \ + Qt5Core.dll \ + Qt5Gui.dll \ + Qt5Network.dll \ + Qt5Widgets.dll \ + qwindows.dll \ libwinpthread-1.dll \ libgcc_s_seh-1.dll \ libstdc++-6.dll \ - libeay32.dll \ - ssleay32.dll \ - zlib1.dll + libcrypto-1_1-x64.dll \ + libssl-1_1-x64.dll \ + zlib1.dll \ # libgcc_s_dw2-1.dll @@ -112,7 +114,7 @@ ifeq ($(bat),no) BACULA_BINARIES=$(BACULABINARIES) HELP= else - BACULA_BINARIES=$(BACULABINARIES) bat.exe bacula-tray-monitor.exe + BACULA_BINARIES=$(BACULABINARIES) bat.exe bacula-tray-monitor.exe RegistrationWizard.exe HELP=help endif diff --git a/bacula/src/win32/win64_installer/winbacula.nsi b/bacula/src/win32/win64_installer/winbacula.nsi index b06181981..96985c057 100644 --- a/bacula/src/win32/win64_installer/winbacula.nsi +++ b/bacula/src/win32/win64_installer/winbacula.nsi @@ -317,14 +317,12 @@ Function .onInit StrCpy $ConfigMonitorName "$HostName-mon" ;StrCpy $ConfigMonitorPassword -; TEMP refers to temporary helper programs and not Bacula plugins! -; InitTEMP - CreateDirectory "$INSTDIR" - CreateDirectory "$INSTDIR\working" - File "/oname=$INSTDIR\working\openssl.exe" "${SRC_DIR}\openssl.exe" - File "/oname=$INSTDIR\working\libeay32.dll" "${SRC_DIR}\libeay32.dll" - File "/oname=$INSTDIR\working\ssleay32.dll" "${SRC_DIR}\ssleay32.dll" - File "/oname=$INSTDIR\working\sed.exe" "${SRC_DIR}\sed.exe" +; PLUGINSDIR refers to temporary helper programs and not Bacula plugins! + InitPluginsDir + File "/oname=$PLUGINSDIR\openssl.exe" "${SRC_DIR}\openssl.exe" + File "/oname=$PLUGINSDIR\libssl-1_1-x64.dll" "${SRC_DIR}\libssl-1_1-x64.dll" + File "/oname=$PLUGINSDIR\libcrypto-1_1-x64.dll" "${SRC_DIR}\libcrypto-1_1-x64.dll" + File "/oname=$PLUGINSDIR\sed.exe" "${SRC_DIR}\sed.exe" !InsertMacro MUI_INSTALLOPTIONS_EXTRACT "InstallType.ini" !InsertMacro MUI_INSTALLOPTIONS_EXTRACT "WriteTemplates.ini" @@ -384,11 +382,11 @@ Function InstallCommonFiles File "${SRC_DIR}\mingwm10.dll" !endif File "${SRC_DIR}\libwinpthread-1.dll" - File "${SRC_DIR}\pthreadGCE2.dll" +# File "${SRC_DIR}\libgcc_s_dw2-1.dll" File "${SRC_DIR}\libgcc_s_seh-1.dll" File "${SRC_DIR}\libstdc++-6.dll" - File "${SRC_DIR}\ssleay32.dll" - File "${SRC_DIR}\libeay32.dll" + File "${SRC_DIR}\libssl-1_1-x64.dll" + File "${SRC_DIR}\libcrypto-1_1-x64.dll" File "${SRC_DIR}\zlib1.dll" File "${SRC_DIR}\bacula.dll" @@ -617,15 +615,28 @@ Section "Bat Console" SecBatConsole !if "${BUILD_BAT}" == "yes" Call InstallCommonFiles - File "${SRC64_DIR}\QtCore4.dll" - File "${SRC64_DIR}\QtGui4.dll" + File "${SRC64_DIR}\Qt5Core.dll" + File "${SRC64_DIR}\Qt5Gui.dll" + File "${SRC64_DIR}\Qt5Network.dll" + File "${SRC64_DIR}\Qt5Widgets.dll" + File "${SRC64_DIR}\libwinpthread-1.dll" +# File "${SRC64_DIR}\libgcc_s_dw2-1.dll" + File "${SRC64_DIR}\libgcc_s_seh-1.dll" + File "${SRC64_DIR}\libssl-1_1-x64.dll" + File "${SRC64_DIR}\libcrypto-1_1-x64.dll" File "${SRC64_DIR}\bat.exe" + File "/oname=$INSTDIR\bacula.dll" "${SRC64_DIR}\bacula.dll" + File "/oname=$INSTDIR\zlib1.dll" "${SRC64_DIR}\zlib1.dll" File "/oname=$INSTDIR\working\bat.conf.in" "bat.conf.in" StrCpy $0 "$INSTDIR" StrCpy $1 bat.conf Call ConfigEditAndCopy + SetOutPath "$INSTDIR\platforms" + File "${SRC64_DIR}\qwindows.dll" + SetOutPath "$INSTDIR" + SetOutPath "$INSTDIR\help" File "${SRC64_DIR}\help\*" SetOutPath "$INSTDIR" @@ -645,11 +656,24 @@ Section "Tray Monitor" SecTrayMonitor !if "${BUILD_BAT}" == "yes" Call InstallCommonFiles - File "${SRC64_DIR}\QtCore4.dll" - File "${SRC64_DIR}\QtGui4.dll" + File "${SRC64_DIR}\Qt5Core.dll" + File "${SRC64_DIR}\Qt5Gui.dll" + File "${SRC64_DIR}\Qt5Network.dll" + File "${SRC64_DIR}\Qt5Widgets.dll" + File "${SRC64_DIR}\libssl-1_1-x64.dll" + File "${SRC64_DIR}\libcrypto-1_1-x64.dll" + File "${SRC64_DIR}\libwinpthread-1.dll" +# File "${SRC64_DIR}\libgcc_s_dw2-1.dll" + File "${SRC64_DIR}\libgcc_s_seh-1.dll" File "${SRC64_DIR}\bacula-tray-monitor.exe" + File "/oname=$INSTDIR\bacula.dll" "${SRC64_DIR}\bacula.dll" + File "/oname=$INSTDIR\zlib1.dll" "${SRC64_DIR}\zlib1.dll" + + SetOutPath "$INSTDIR\platforms" + File "${SRC64_DIR}\qwindows.dll" + SetOutPath "$INSTDIR" - File "/oname=$INSTDIR\working\bacula-tray-monitor.conf.in" "bacula-tray-monitor.conf.in" + File "/oname=$PLUGINSDIR\bacula-tray-monitor.conf" "bacula-tray-monitor.conf.in" StrCpy $0 "$INSTDIR" StrCpy $1 bacula-tray-monitor.conf Call ConfigEditAndCopy -- 2.47.3