summaryrefslogtreecommitdiff
path: root/packaging
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2014-07-29 15:51:57 -0700
committerGerald Combs <gerald@wireshark.org>2014-07-29 23:24:21 +0000
commit9a897d55fcf8a58d730ae0878bf415697a15b5e6 (patch)
treec16fada7214f27c7a7c792e899f77b67ddffa26e /packaging
parent9d0e4f6fdb2ed940b625a8b32707027e6f021a95 (diff)
downloadwireshark-9a897d55fcf8a58d730ae0878bf415697a15b5e6.tar.gz
Use windeployqt with NSIS.
If we find windeployqt, use it to create a DLL manifest for NSIS. Fall back to the previous manual lists if we don't. This assumes that your copy of windeployqt works. New bug: The Windows installer is huge when using the official Digia DLLs (around 43 MB for the win 64 package). Change-Id: I1f662381b7a2c5474595b05177dbdfd3138c7e60 Reviewed-on: https://code.wireshark.org/review/3253 Reviewed-by: Gerald Combs <gerald@wireshark.org>
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!
; ============================================================================