diff options
author | Gerald Combs <gerald@wireshark.org> | 2009-02-18 20:27:16 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2009-02-18 20:27:16 +0000 |
commit | 09315279976c5931b4af5b3218c6da90ac2daafe (patch) | |
tree | 746177369da4d8180fabb03b4c87e9669a60908e /packaging | |
parent | 1714f14b7570ceeb417ec18b30deef8e04ef8746 (diff) |
Make the dialog that confirms uninstalling the previous version of
Wireshark default to "yes" for silent installs. Add silent default
actions for other dialogs. Don't do so for error messages, since we
probably want the user to see those no matter what. Fixes bug 3260.
Switch back to using the uninstaller icon (which got clobbered 2 weeks
after it was introduced in 2007).
svn path=/trunk/; revision=27484
Diffstat (limited to 'packaging')
-rw-r--r-- | packaging/nsis/wireshark.nsi | 37 |
1 files changed, 27 insertions, 10 deletions
diff --git a/packaging/nsis/wireshark.nsi b/packaging/nsis/wireshark.nsi index 5fa5123dec..56f796f013 100644 --- a/packaging/nsis/wireshark.nsi +++ b/packaging/nsis/wireshark.nsi @@ -38,8 +38,8 @@ Name "${PROGRAM_NAME} ${VERSION} (${BITS}-bit)" OutFile "wireshark-${PLATFORM}-${VERSION}.exe" ; Icon of installer and uninstaller -Icon "..\..\image\wireshark.ico" -UninstallIcon "..\..\image\wireshark.ico" +Icon "..\..\image\wiresharkinst.ico" +UninstallIcon "..\..\image\wiresharkinst.ico" ; Uninstall stuff (NSIS 2.08: "\r\n" don't work here) !define MUI_UNCONFIRMPAGE_TEXT_TOP "The following Wireshark installation will be uninstalled. Click 'Next' to continue." @@ -62,8 +62,8 @@ XPStyle on !include "MUI.nsh" ;!addplugindir ".\Plugins" -!define MUI_ICON "..\..\image\wireshark.ico" -!define MUI_UNICON "..\..\image\wireshark.ico" +!define MUI_ICON "..\..\image\wiresharkinst.ico" +!define MUI_UNICON "..\..\image\wiresharkinst.ico" !define MUI_COMPONENTSPAGE_SMALLDESC !define MUI_FINISHPAGE_NOAUTOCLOSE @@ -220,10 +220,14 @@ UpdateIcons.next2_${UPDATEICONS_UNIQUE}: Goto UpdateIcons.quit_${UPDATEICONS_UNIQUE} UpdateIcons.error1_${UPDATEICONS_UNIQUE}: - MessageBox MB_OK|MB_ICONSTOP "Can't find 'shell32.dll' library. Impossible to update icons" + MessageBox MB_OK|MB_ICONSTOP \ + "Can't find 'shell32.dll' library. Impossible to update icons" \ + /SD IDOK Goto UpdateIcons.quit_${UPDATEICONS_UNIQUE} UpdateIcons.error2_${UPDATEICONS_UNIQUE}: - MessageBox MB_OK|MB_ICONINFORMATION "You should install the free 'Microsoft Layer for Unicode' to update Wireshark capture file icons" + MessageBox MB_OK|MB_ICONINFORMATION \ + "You should install the free 'Microsoft Layer for Unicode' to update Wireshark capture file icons" \ + /SD IDOK Goto UpdateIcons.quit_${UPDATEICONS_UNIQUE} UpdateIcons.quit_${UPDATEICONS_UNIQUE}: !undef UPDATEICONS_UNIQUE @@ -286,14 +290,15 @@ Function .onInit MessageBox MB_YESNOCANCEL|MB_ICONQUESTION \ "$OLD_DISPLAYNAME is already installed.\ $\n$\nWould you like to uninstall it first?" \ - IDYES uninst \ + /SD IDYES \ + IDYES prep_uninstaller \ IDNO done Abort ; Copy the uninstaller to $TEMP and run it. ; The uninstaller normally does this by itself, but doesn't wait around ; for the executable to finish, which means ExecWait won't work correctly. -uninst: +prep_uninstaller: ClearErrors StrCpy $TMP_UNINSTALLER "$TEMP\wireshark_uninstaller.exe" ; ...because we surround UninstallString in quotes. @@ -301,7 +306,14 @@ uninst: StrCpy $1 "$TEMP\wireshark_uninstaller.exe" StrCpy $2 1 System::Call 'kernel32::CopyFile(t r0, t r1, b r2) 1' + IfSilent silent_uninstall ExecWait "$TMP_UNINSTALLER _?=$OLD_INSTDIR" + Goto cleanup + +silent_uninstall: + ExecWait "$TMP_UNINSTALLER /S _?=$OLD_INSTDIR" + +cleanup: Delete "$TMP_UNINSTALLER" done: @@ -1195,11 +1207,16 @@ Function myShowCallback StrCmp $R0 'NT 4.0' lbl_winversion_unsupported_nt4 Goto lbl_winversion_supported lbl_winversion_unsupported: - MessageBox MB_OK "Windows $R0 is no longer supported. The last known version working with 98/ME was Ethereal 0.99.0!" + MessageBox MB_OK \ + "Windows $R0 is no longer supported. The last known version working with 98/ME was Ethereal 0.99.0!" \ + /SD IDOK + Quit lbl_winversion_unsupported_nt4: - MessageBox MB_OK "Windows $R0 is no longer supported. The last known version working with NT 4.0 was Wireshark 0.99.4!" + MessageBox MB_OK \ + "Windows $R0 is no longer supported. The last known version working with NT 4.0 was Wireshark 0.99.4!" \ + /SD IDOK Quit lbl_winversion_supported: |