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>
This commit is contained in:
parent
9d0e4f6fdb
commit
9a897d55fc
|
@ -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
|
||||
|
|
|
@ -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!
|
||||
; ============================================================================
|
||||
|
|
Loading…
Reference in New Issue