aboutsummaryrefslogtreecommitdiffstats
path: root/packaging
diff options
context:
space:
mode:
Diffstat (limited to 'packaging')
-rw-r--r--packaging/nsis/Makefile.nmake31
-rw-r--r--packaging/nsis/wireshark.nsi14
2 files changed, 27 insertions, 18 deletions
diff --git a/packaging/nsis/Makefile.nmake b/packaging/nsis/Makefile.nmake
index 30f74ab153..d9e721853c 100644
--- a/packaging/nsis/Makefile.nmake
+++ b/packaging/nsis/Makefile.nmake
@@ -229,11 +229,31 @@ NSIS_FLAGS=\
!IF EXIST("..\..\wireshark-qt-release\qtshark.exe")
/DQT_DIR="..\..\wireshark-qt-release" \
!ENDIF
-!IF EXIST("..\..\wireshark-qt-release\Qt5Core.dll")
- /DNEED_QT5_DLL=USE \
-!ENDIF
-!IF EXIST("..\..\wireshark-qt-release\QtCore4.dll")
- /DNEED_QT4_DLL=USE \
+
+wireshark.nsi: qt-dll-manifest.txt
+qt-dll-manifest.txt: _FORCE_
+!IF EXIST("$(QT5_BASE_DIR)\bin\windeployqt.exe")
+ "$(QT5_BASE_DIR)\bin\windeployqt.exe" \
+ --release \
+ --no-compiler-runtime \
+ --list source ..\..\wireshark-qt-release\qtshark.exe \
+ > $@
+ sed -i -e 's/^/File "/' -e 's/$$/"/' $@
+!ELSE IF EXIST("..\..\wireshark-qt-release\Qt5Core.dll")
+ type << > $@
+File "..\..\wireshark-qt-release\Qt5Core.dll"
+File "..\..\wireshark-qt-release\Qt5Gui.dll"
+File "..\..\wireshark-qt-release\Qt5Widgets.dll"
+File "..\..\wireshark-qt-release\Qt5PrintSupport.dll"
+File "..\..\wireshark-qt-release\platforms\qwindows.dll"
+<<
+!ELSE IF EXIST("..\..\wireshark-qt-release\QtCore4.dll")
+ type << > $@
+File "..\..\wireshark-qt-release\QtCore4.dll"
+File "..\..\wireshark-qt-release\QtGui4.dll"
+<<
+!ELSE
+ copy nul $@ /y
!ENDIF
$(STAGING_DIR)\uninstall.exe : $(NSI)
@@ -252,6 +272,7 @@ clean:
rm -f $(UNINSTALL_INSTALLER)
rm -f NEWS.txt
rm -f user-guide.chm
+ rm -f qt-dll-manifest.txt
distclean: clean
rm -f wireshark-$(WIRESHARK_TARGET_PLATFORM)-*.exe
diff --git a/packaging/nsis/wireshark.nsi b/packaging/nsis/wireshark.nsi
index a301c6b258..b816e3721b 100644
--- a/packaging/nsis/wireshark.nsi
+++ b/packaging/nsis/wireshark.nsi
@@ -875,18 +875,7 @@ Section "${PROGRAM_NAME} 2 Preview" SecWiresharkQt
; by default, QtShark is installed but file is always associate with Wireshark GTK+
SetOutPath $INSTDIR
File "${QT_DIR}\${PROGRAM_NAME_PATH_QT}"
-!ifdef NEED_QT4_DLL
-File "${QT_DIR}\QtCore4.dll"
-File "${QT_DIR}\QtGui4.dll"
-!endif
-!ifdef NEED_QT5_DLL
-File "${QT_DIR}\Qt5Core.dll"
-File "${QT_DIR}\Qt5Gui.dll"
-File "${QT_DIR}\Qt5Widgets.dll"
-File "${QT_DIR}\Qt5PrintSupport.dll"
-SetOutPath $INSTDIR\platforms
-File "${QT_DIR}\platforms\qwindows.dll"
-!endif
+!include qt-dll-manifest.txt
Push $0
;SectionGetFlags ${SecWiresharkQt} $0
@@ -1051,7 +1040,6 @@ WriteRegDWORD HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "EstimatedSize" "$0"
SectionEnd
-
; ============================================================================
; PLEASE MAKE SURE, THAT THE DESCRIPTIVE TEXT FITS INTO THE DESCRIPTION FIELD!
; ============================================================================