diff options
author | Gerald Combs <gerald@wireshark.org> | 2012-07-20 17:56:16 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2012-07-20 17:56:16 +0000 |
commit | 6b04299ae4447454d93fde81237830373b90488e (patch) | |
tree | bba07faea75d72a6ecaaebab02e6c347b8e3fbc4 | |
parent | 40e08c936d0e5a49bb7932b454292cfd5623427c (diff) |
According to
http://blogs.msdn.com/b/astebner/archive/2010/10/20/10078468.aspx
and bug 7507 the Visual C++ 2010 redistributable installer might want
to reboot the system. Tell it not to do that and request a reboot at
the end of the installation process if needed.
svn path=/trunk/; revision=43864
-rw-r--r-- | packaging/nsis/Makefile.nmake | 2 | ||||
-rw-r--r-- | packaging/nsis/wireshark.nsi | 26 |
2 files changed, 21 insertions, 7 deletions
diff --git a/packaging/nsis/Makefile.nmake b/packaging/nsis/Makefile.nmake index d174a8c01a..b16b4fec35 100644 --- a/packaging/nsis/Makefile.nmake +++ b/packaging/nsis/Makefile.nmake @@ -92,7 +92,9 @@ NSIS_FLAGS=\ /DMAKEDIR=$(MAKEDIR) \ /DSTAGING_DIR=$(STAGING_DIR) \ /DWIRESHARK_TARGET_PLATFORM=$(WIRESHARK_TARGET_PLATFORM) \ + /DTARGET_MACHINE=$(TARGET_MACHINE) \ /DMSVC_VARIANT=$(MSVC_VARIANT) \ + /DMSC_VER_REQUIRED=$(MSC_VER_REQUIRED) \ /DWIRESHARK_LIB_DIR=$(WIRESHARK_LIB_DIR) \ !IFDEF MSVCR_DLL /DMSVCR_DLL="$(MSVCR_DLL)" \ diff --git a/packaging/nsis/wireshark.nsi b/packaging/nsis/wireshark.nsi index 9fde73c4dd..66bbe0070c 100644 --- a/packaging/nsis/wireshark.nsi +++ b/packaging/nsis/wireshark.nsi @@ -275,6 +275,8 @@ FunctionEnd Var WINPCAP_UNINSTALL ;declare variable for holding the value of a registry key ;Var WIRESHARK_UNINSTALL ;declare variable for holding the value of a registry key +Var VCREDIST_FLAGS ; silent vs passive, norestart + Section "-Required" ;------------------------------------------- @@ -354,16 +356,26 @@ File "..\..\ipmap.html" !ifdef VCREDIST_EXE ; vcredist_x86.exe (MSVC V8) - copy and execute the redistributable installer File "${VCREDIST_EXE}" -!if ${WIRESHARK_TARGET_PLATFORM} == "win32" ; If the user already has the redistributable installed they will see a ; Big Ugly Dialog by default, asking if they want to uninstall or repair. ; Ideally we should add a checkbox for this somewhere. In the meantime, -; just do a silent install. -ExecWait '"$INSTDIR\vcredist_x86.exe" /q' $0 -!else -ExecWait '"$INSTDIR\vcredist_x64.exe" /q' $0 -!endif ; WIRESHARK_TARGET_PLATFORM -DetailPrint "vcredist_x86 returned $0" +; just do a "passive+norestart" install for MSVC 2010 and later and a +; "silent" install otherwise. + +; http://blogs.msdn.com/b/astebner/archive/2010/10/20/10078468.aspx +!searchparse /noerrors ${MSVC_VER_REQUIRED} "1400" VCREDIST_OLD_FLAGS "1500" VCREDIST_OLD_FLAGS +!ifdef VCREDIST_OLD_FLAGS +StrCpy $VCREDIST_FLAGS "/q" +!else ; VCREDIST_OLD_FLAGS +StrCpy $VCREDIST_FLAGS "/q /norestart" +!endif ; VCREDIST_OLD_FLAGS + +ExecWait '"$INSTDIR\vcredist_${TARGET_MACHINE}.exe" $VCREDIST_FLAGS' $0 +DetailPrint "vcredist_${TARGET_MACHINE} returned $0" +IntCmp $0 3010 redistReboot redistNoReboot +redistReboot: +SetRebootFlag true +redistNoReboot: !else !ifdef MSVCR_DLL ; msvcr*.dll (MSVC V7 or V7.1) - simply copy the dll file |