diff --git a/packaging/nsis/common.nsh b/packaging/nsis/common.nsh index 7c6e867c2f..7676e28a3d 100755 --- a/packaging/nsis/common.nsh +++ b/packaging/nsis/common.nsh @@ -3,7 +3,6 @@ ; Name and version information ; ============================================================================ -!define PROGRAM_NAME "Wireshark" !if ${WIRESHARK_TARGET_PLATFORM} == "win32" !define BITS 32 !else diff --git a/packaging/nsis/wireshark.nsi b/packaging/nsis/wireshark.nsi index 263b6a597e..dfeb26eadd 100644 --- a/packaging/nsis/wireshark.nsi +++ b/packaging/nsis/wireshark.nsi @@ -43,7 +43,7 @@ Icon "..\..\image\wiresharkinst.ico" !define MUI_COMPONENTSPAGE_SMALLDESC !define MUI_FINISHPAGE_NOAUTOCLOSE -!define MUI_WELCOMEPAGE_TEXT "This wizard will guide you through the installation of Wireshark.\r\n\r\nBefore starting the installation, make sure Wireshark is not running.\r\n\r\nClick 'Next' to continue." +!define MUI_WELCOMEPAGE_TEXT "This wizard will guide you through the installation of ${PROGRAM_NAME}.\r\n\r\nBefore starting the installation, make sure ${PROGRAM_NAME} is not running.\r\n\r\nClick 'Next' to continue." ;!define MUI_FINISHPAGE_LINK "Install WinPcap to be able to capture packets from a network!" ;!define MUI_FINISHPAGE_LINK_LOCATION "http://www.winpcap.org" @@ -54,7 +54,7 @@ Icon "..\..\image\wiresharkinst.ico" !define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\NEWS.txt" !define MUI_FINISHPAGE_SHOWREADME_TEXT "Show News" !define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED -!define MUI_FINISHPAGE_RUN "$INSTDIR\wireshark.exe" +!define MUI_FINISHPAGE_RUN "$INSTDIR\${PROGRAM_NAME}.exe" !define MUI_FINISHPAGE_RUN_NOTCHECKED @@ -144,17 +144,17 @@ ComponentText "The following components are available for installation." ; Directory selection page configuration ; ============================================================================ ; The text to prompt the user to enter a directory -DirText "Choose a directory in which to install Wireshark." +DirText "Choose a directory in which to install ${PROGRAM_NAME}." ; The default installation directory !if ${WIRESHARK_TARGET_PLATFORM} == "win64" - InstallDir $PROGRAMFILES64\Wireshark + InstallDir $PROGRAMFILES64\${PROGRAM_NAME} !else - InstallDir $PROGRAMFILES\Wireshark + InstallDir $PROGRAMFILES\${PROGRAM_NAME} !endif ; See if this is an upgrade; if so, use the old InstallDir as default -InstallDirRegKey HKEY_LOCAL_MACHINE SOFTWARE\Wireshark "InstallDir" +InstallDirRegKey HKEY_LOCAL_MACHINE SOFTWARE\${PROGRAM_NAME} "InstallDir" ; ============================================================================ @@ -212,17 +212,17 @@ Function .onInit ; Copied from http://nsis.sourceforge.net/Auto-uninstall_old_before_installing_new ReadRegStr $OLD_UNINSTALLER HKLM \ - "Software\Microsoft\Windows\CurrentVersion\Uninstall\Wireshark" \ + "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PROGRAM_NAME}" \ "UninstallString" StrCmp $OLD_UNINSTALLER "" done ReadRegStr $OLD_INSTDIR HKLM \ - "Software\Microsoft\Windows\CurrentVersion\App Paths\wireshark.exe" \ + "Software\Microsoft\Windows\CurrentVersion\App Paths\${PROGRAM_NAME}.exe" \ "Path" StrCmp $OLD_INSTDIR "" done ReadRegStr $OLD_DISPLAYNAME HKLM \ - "Software\Microsoft\Windows\CurrentVersion\Uninstall\Wireshark" \ + "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PROGRAM_NAME}" \ "DisplayName" StrCmp $OLD_DISPLAYNAME "" done @@ -239,10 +239,10 @@ Function .onInit ; for the executable to finish, which means ExecWait won't work correctly. prep_uninstaller: ClearErrors - StrCpy $TMP_UNINSTALLER "$TEMP\wireshark_uninstaller.exe" + StrCpy $TMP_UNINSTALLER "$TEMP\${PROGRAM_NAME}_uninstaller.exe" ; ...because we surround UninstallString in quotes. StrCpy $0 $OLD_UNINSTALLER -1 1 - StrCpy $1 "$TEMP\wireshark_uninstaller.exe" + StrCpy $1 "$TEMP\${PROGRAM_NAME}_uninstaller.exe" StrCpy $2 1 System::Call 'kernel32::CopyFile(t r0, t r1, b r2) 1' IfSilent silent_uninstall @@ -632,7 +632,7 @@ File "${STAGING_DIR}\help\faq.txt" !define UNINSTALL_PATH "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PROGRAM_NAME}" WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "Comments" "${DISPLAY_NAME}" -WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "DisplayIcon" "$INSTDIR\wireshark.exe,0" +WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "DisplayIcon" "$INSTDIR\${PROGRAM_NAME}.exe,0" WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "DisplayName" "${DISPLAY_NAME}" WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "DisplayVersion" "${VERSION}" WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "HelpLink" "http://ask.wireshark.org/" @@ -650,22 +650,22 @@ WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "UninstallString" '"$INSTDIR\ WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "QuietUninstallString" '"$INSTDIR\${UNINSTALLER_NAME}" /S' ; Write an entry for ShellExecute -WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\wireshark.exe" "" '$INSTDIR\wireshark.exe' -WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\wireshark.exe" "Path" '$INSTDIR' +WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\${PROGRAM_NAME}.exe" "" '$INSTDIR\${PROGRAM_NAME}.exe' +WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\${PROGRAM_NAME}.exe" "Path" '$INSTDIR' ; Create start menu entries (depending on additional tasks page) ReadINIStr $0 "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 2" "State" StrCmp $0 "0" SecRequired_skip_StartMenu SetOutPath $PROFILE -;CreateDirectory "$SMPROGRAMS\Wireshark" +;CreateDirectory "$SMPROGRAMS\${PROGRAM_NAME}" ; To qoute "http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwue/html/ch11d.asp": ; "Do not include Readme, Help, or Uninstall entries on the Programs menu." -Delete "$SMPROGRAMS\Wireshark\Wireshark Web Site.lnk" -;WriteINIStr "$SMPROGRAMS\Wireshark\Wireshark Web Site.url" "InternetShortcut" "URL" "http://www.wireshark.org/" -CreateShortCut "$SMPROGRAMS\Wireshark.lnk" "$INSTDIR\wireshark.exe" "" "$INSTDIR\wireshark.exe" 0 "" "" "The Wireshark Network Protocol Analyzer" -;CreateShortCut "$SMPROGRAMS\Wireshark\Wireshark Manual.lnk" "$INSTDIR\wireshark.html" -;CreateShortCut "$SMPROGRAMS\Wireshark\Display Filters Manual.lnk" "$INSTDIR\wireshark-filter.html" -;CreateShortCut "$SMPROGRAMS\Wireshark\Wireshark Program Directory.lnk" "$INSTDIR" +Delete "$SMPROGRAMS\${PROGRAM_NAME}\Wireshark Web Site.lnk" +;WriteINIStr "$SMPROGRAMS\${PROGRAM_NAME}\Wireshark Web Site.url" "InternetShortcut" "URL" "http://www.wireshark.org/" +CreateShortCut "$SMPROGRAMS\${PROGRAM_NAME}.lnk" "$INSTDIR\${PROGRAM_NAME}.exe" "" "$INSTDIR\${PROGRAM_NAME}.exe" 0 "" "" "The ${PROGRAM_NAME} Network Protocol Analyzer" +;CreateShortCut "$SMPROGRAMS\${PROGRAM_NAME}\Wireshark Manual.lnk" "$INSTDIR\wireshark.html" +;CreateShortCut "$SMPROGRAMS\${PROGRAM_NAME}\Display Filters Manual.lnk" "$INSTDIR\wireshark-filter.html" +;CreateShortCut "$SMPROGRAMS\${PROGRAM_NAME}\Wireshark Program Directory.lnk" "$INSTDIR" SecRequired_skip_StartMenu: ; is command line option "/desktopicon" set? @@ -678,7 +678,7 @@ StrCmp $R1 "yes" SecRequired_install_DesktopIcon ReadINIStr $0 "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 3" "State" StrCmp $0 "0" SecRequired_skip_DesktopIcon SecRequired_install_DesktopIcon: -CreateShortCut "$DESKTOP\Wireshark.lnk" "$INSTDIR\wireshark.exe" "" "$INSTDIR\wireshark.exe" 0 "" "" "The Wireshark Network Protocol Analyzer" +CreateShortCut "$DESKTOP\${PROGRAM_NAME}.lnk" "$INSTDIR\${PROGRAM_NAME}.exe" "" "$INSTDIR\${PROGRAM_NAME}.exe" 0 "" "" "The ${PROGRAM_NAME} Network Protocol Analyzer" SecRequired_skip_DesktopIcon: ; is command line option "/quicklaunchicon" set? @@ -691,15 +691,15 @@ StrCmp $R1 "yes" SecRequired_install_QuickLaunchIcon ReadINIStr $0 "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 4" "State" StrCmp $0 "0" SecRequired_skip_QuickLaunchIcon SecRequired_install_QuickLaunchIcon: -CreateShortCut "$QUICKLAUNCH\Wireshark.lnk" "$INSTDIR\wireshark.exe" "" "$INSTDIR\wireshark.exe" 0 "" "" "The Wireshark Network Protocol Analyzer" +CreateShortCut "$QUICKLAUNCH\${PROGRAM_NAME}.lnk" "$INSTDIR\${PROGRAM_NAME}.exe" "" "$INSTDIR\${PROGRAM_NAME}.exe" 0 "" "" "The ${PROGRAM_NAME} Network Protocol Analyzer" SecRequired_skip_QuickLaunchIcon: ; Create File Extensions (depending on additional tasks page) ReadINIStr $0 "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 6" "State" StrCmp $0 "0" SecRequired_skip_FileExtensions WriteRegStr HKCR ${WIRESHARK_ASSOC} "" "Wireshark capture file" -WriteRegStr HKCR "${WIRESHARK_ASSOC}\Shell\open\command" "" '"$INSTDIR\wireshark.exe" "%1"' -WriteRegStr HKCR "${WIRESHARK_ASSOC}\DefaultIcon" "" '"$INSTDIR\wireshark.exe",1' +WriteRegStr HKCR "${WIRESHARK_ASSOC}\Shell\open\command" "" '"$INSTDIR\${PROGRAM_NAME}.exe" "%1"' +WriteRegStr HKCR "${WIRESHARK_ASSOC}\DefaultIcon" "" '"$INSTDIR\${PROGRAM_NAME}.exe",1' Call Associate @@ -743,7 +743,7 @@ SectionEnd ; "Required" Section "Wireshark" SecWireshark ;------------------------------------------- SetOutPath $INSTDIR -File "${STAGING_DIR}\wireshark.exe" +File "${STAGING_DIR}\${PROGRAM_NAME}.exe" File "${STAGING_DIR}\${GDK_DLL}" File "${STAGING_DIR}\libgdk_pixbuf-2.0-0.dll" File "${STAGING_DIR}\${GTK_DLL}" @@ -970,7 +970,7 @@ SectionEnd !ifdef QT_DIR !insertmacro MUI_DESCRIPTION_TEXT ${SecQtshark} "Qtshark is a new GUI network protocol analyzer. (Experimental)" !endif - !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsGroup} "Some plugins and extensions for both Wireshark and TShark." + !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsGroup} "Some plugins and extensions for both ${PROGRAM_NAME} and TShark." !insertmacro MUI_DESCRIPTION_TEXT ${SecPlugins} "Plugins with some extended dissections." !insertmacro MUI_DESCRIPTION_TEXT ${SecStatsTree} "Plugin for some extended statistics." !insertmacro MUI_DESCRIPTION_TEXT ${SecMate} "Plugin - Meta Analysis and Tracing Engine (Experimental)." @@ -1101,18 +1101,18 @@ lbl_winpcap_done: ; only select Start Menu Group, if previously installed ; (we use the "all users" start menu, so select it first) SetShellVarContext all - IfFileExists "$SMPROGRAMS\Wireshark\Wireshark.lnk" lbl_have_startmenu - IfFileExists "$SMPROGRAMS\Wireshark.lnk" lbl_have_startmenu + IfFileExists "$SMPROGRAMS\${PROGRAM_NAME}\${PROGRAM_NAME}.lnk" lbl_have_startmenu + IfFileExists "$SMPROGRAMS\${PROGRAM_NAME}.lnk" lbl_have_startmenu WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 2" "State" "0" lbl_have_startmenu: ; only select Desktop Icon, if previously installed - IfFileExists "$DESKTOP\Wireshark.lnk" lbl_have_desktopicon + IfFileExists "$DESKTOP\${PROGRAM_NAME}.lnk" lbl_have_desktopicon WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 3" "State" "0" lbl_have_desktopicon: ; only select Quick Launch Icon, if previously installed - IfFileExists "$QUICKLAUNCH\Wireshark.lnk" lbl_have_quicklaunchicon + IfFileExists "$QUICKLAUNCH\${PROGRAM_NAME}.lnk" lbl_have_quicklaunchicon WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 4" "State" "0" lbl_have_quicklaunchicon: