2001-04-04 04:50:05 +00:00
;
; ethereal.nsi
;
2004-07-17 20:34:41 +00:00
; $Id$
2004-02-03 01:06:21 +00:00
!ifdef MAKENSIS_MODERN_UI
2005-07-25 07:42:06 +00:00
; Set the compression mechanism first.
; As of NSIS 2.07, solid compression which makes installer about 1MB smaller
; is no longer the default, so use the /SOLID switch.
; This unfortunately is unknown to NSIS prior to 2.07 and creates an error.
; So if you get an error here, please update to at least NSIS 2.07!
2005-07-26 18:17:09 +00:00
SetCompressor /SOLID lzma
2004-02-03 01:06:21 +00:00
!endif
2001-04-04 04:50:05 +00:00
2004-02-18 20:45:54 +00:00
!ifdef GTK1_DIR & GTK2_DIR
2004-05-14 02:46:38 +00:00
InstType "Ethereal (GTK2 user interface)"
InstType "Ethereal (legacy GTK1 user interface)"
2004-02-18 20:45:54 +00:00
!endif
2005-07-23 20:34:43 +00:00
InstType "un.Default (keep Personal Settings and WinPcap)"
InstType "un.All (remove all)"
2004-06-10 10:12:30 +00:00
; Used to refresh the display of file association
!define SHCNE_ASSOCCHANGED 0x08000000
!define SHCNF_IDLIST 0
; Used to add associations between file extensions and Ethereal
!define ETHEREAL_ASSOC "ethereal-file"
2001-04-04 04:50:05 +00:00
; ============================================================================
; Header configuration
; ============================================================================
; The name of the installer
2004-02-06 18:47:45 +00:00
!define PROGRAM_NAME "Ethereal"
Name "${PROGRAM_NAME} ${VERSION}"
2001-04-04 04:50:05 +00:00
; The file to write
2004-01-26 21:12:41 +00:00
OutFile "${DEST}-setup-${VERSION}.exe"
2001-04-04 04:50:05 +00:00
2003-04-09 18:58:37 +00:00
; Icon of installer and uninstaller
2001-04-04 04:50:05 +00:00
Icon "..\..\image\ethereal.ico"
2003-04-09 18:58:37 +00:00
UninstallIcon "..\..\image\ethereal.ico"
2001-04-04 04:50:05 +00:00
2005-07-25 17:56:19 +00:00
; Uninstall stuff (NSIS 2.08: "\r\n" don't work here)
!define MUI_UNCONFIRMPAGE_TEXT_TOP "The following Ethereal installation will be uninstalled. Click 'Next' to continue."
2004-02-09 18:23:25 +00:00
; Uninstall stuff (this text isn't used with the MODERN_UI!)
2005-07-25 17:56:19 +00:00
;UninstallText "This will uninstall Ethereal.\r\nBefore starting the uninstallation, make sure Ethereal is not running.\r\nClick 'Next' to continue."
2001-04-04 04:50:05 +00:00
2003-04-09 18:58:37 +00:00
XPStyle on
2003-12-26 12:27:47 +00:00
!ifdef MAKENSIS_MODERN_UI
; ============================================================================
; Modern UI
; ============================================================================
; The modern user interface will look much better than the common one.
; However, as the development of the modern UI is still going on, and the script
; syntax changes, you will need exactly that NSIS version, which this script is
; made for. This is the current (December 2003) latest version: V2.0b4
; If you are using a different version, it's not predictable what will happen.
!include "MUI.nsh"
2005-07-23 20:34:43 +00:00
;!addplugindir ".\Plugins"
2003-12-26 12:27:47 +00:00
!define MUI_ICON "..\..\image\ethereal.ico"
!define MUI_UNICON "..\..\image\ethereal.ico"
!define MUI_COMPONENTSPAGE_SMALLDESC
2004-08-25 03:32:26 +00:00
!define MUI_FINISHPAGE_NOAUTOCLOSE
!define MUI_UNFINISHPAGE_NOAUTOCLOSE
2004-02-06 18:47:45 +00:00
!define MUI_WELCOMEPAGE_TEXT "This wizard will guide you through the installation of Ethereal.\r\n\r\nBefore starting the installation, make sure Ethereal is not running.\r\n\r\nClick 'Next' to continue."
2005-07-23 20:34:43 +00:00
;!define MUI_FINISHPAGE_LINK "Install WinPcap to be able to capture packets from a network!"
;!define MUI_FINISHPAGE_LINK_LOCATION "http://www.winpcap.org"
2004-08-25 03:32:26 +00:00
; NSIS shows Readme files by opening the Readme file with the default application for
; the file's extension. "README.win32" won't work in most cases, because extension "win32"
; is usually not associated with an appropriate text editor. We should use extension "txt"
; for a text file or "html" for an html README file.
2004-08-26 22:48:29 +00:00
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\NEWS.txt"
!define MUI_FINISHPAGE_SHOWREADME_TEXT "Show News"
!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
2005-07-23 20:34:43 +00:00
!define MUI_FINISHPAGE_RUN "$INSTDIR\ethereal.exe"
!define MUI_FINISHPAGE_RUN_NOTCHECKED
2003-12-26 12:27:47 +00:00
2005-02-03 02:35:20 +00:00
!define MUI_PAGE_CUSTOMFUNCTION_SHOW myShowCallback
2003-12-26 12:27:47 +00:00
; ============================================================================
; MUI Pages
; ============================================================================
!insertmacro MUI_PAGE_WELCOME
2004-01-05 15:27:35 +00:00
!insertmacro MUI_PAGE_LICENSE "..\..\COPYING"
2003-12-26 12:27:47 +00:00
!insertmacro MUI_PAGE_COMPONENTS
2005-07-23 20:34:43 +00:00
Page custom DisplayAdditionalTasksPage
2003-12-26 12:27:47 +00:00
!insertmacro MUI_PAGE_DIRECTORY
2005-07-23 20:34:43 +00:00
Page custom DisplayWinPcapPage
2003-12-26 12:27:47 +00:00
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_UNPAGE_WELCOME
!insertmacro MUI_UNPAGE_CONFIRM
2005-07-23 20:34:43 +00:00
!insertmacro MUI_UNPAGE_COMPONENTS
2003-12-26 12:27:47 +00:00
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_UNPAGE_FINISH
; ============================================================================
; MUI Languages
; ============================================================================
!insertmacro MUI_LANGUAGE "English"
!endif ; MAKENSIS_MODERN_UI
2005-07-23 20:34:43 +00:00
; ============================================================================
; Reserve Files
; ============================================================================
;Things that need to be extracted on first (keep these lines before any File command!)
;Only useful for BZIP2 compression
ReserveFile "AdditionalTasksPage.ini"
ReserveFile "WinPcapPage.ini"
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
2004-08-26 22:48:29 +00:00
; ============================================================================
; Section macros
; ============================================================================
!include "Sections.nsh"
; ========= Macro to unselect and disable a section =========
!macro DisableSection SECTION
Push $0
SectionGetFlags "${SECTION}" $0
IntOp $0 $0 & ${SECTION_OFF}
IntOp $0 $0 | ${SF_RO}
SectionSetFlags "${SECTION}" $0
Pop $0
!macroend
; ========= Macro to enable (unreadonly) a section =========
!define SECTION_ENABLE 0xFFFFFFEF
!macro EnableSection SECTION
Push $0
SectionGetFlags "${SECTION}" $0
IntOp $0 $0 & ${SECTION_ENABLE}
SectionSetFlags "${SECTION}" $0
Pop $0
!macroend
2005-07-23 20:34:43 +00:00
; ============================================================================
; Services
; ============================================================================
!include "servicelib.nsh"
2005-09-14 02:07:20 +00:00
; ============================================================================
; Command Line
; ============================================================================
!include "FileFunc.nsh"
!insertmacro GetParameters
!insertmacro GetOptions
2001-04-04 04:50:05 +00:00
; ============================================================================
; License page configuration
; ============================================================================
LicenseText "Ethereal is distributed under the GNU General Public License."
2004-01-05 15:27:35 +00:00
LicenseData "..\..\COPYING"
2001-04-04 04:50:05 +00:00
; ============================================================================
; Component page configuration
; ============================================================================
2001-04-05 05:36:47 +00:00
ComponentText "The following components are available for installation."
2001-04-04 04:50:05 +00:00
2002-04-08 02:18:14 +00:00
; Component check boxes
2003-04-09 18:58:37 +00:00
; Commented out for NSIS v 2.0
; EnabledBitmap "..\..\image\nsis-checked.bmp"
; DisabledBitmap "..\..\image\nsis-unchecked.bmp"
2002-04-08 02:18:14 +00:00
2001-04-04 04:50:05 +00:00
; ============================================================================
; Directory selection page configuration
; ============================================================================
; The text to prompt the user to enter a directory
DirText "Choose a directory in which to install Ethereal."
; The default installation directory
InstallDir $PROGRAMFILES\Ethereal\
; See if this is an upgrade; if so, use the old InstallDir as default
InstallDirRegKey HKEY_LOCAL_MACHINE SOFTWARE\Ethereal "InstallDir"
; ============================================================================
; Install page configuration
; ============================================================================
ShowInstDetails show
2005-07-23 20:34:43 +00:00
ShowUninstDetails show
2001-04-04 04:50:05 +00:00
2004-06-10 10:12:30 +00:00
; ============================================================================
; Functions and macros
; ============================================================================
!macro UpdateIcons
Push $R0
Push $R1
Push $R2
!define UPDATEICONS_UNIQUE ${__LINE__}
IfFileExists "$SYSDIR\shell32.dll" UpdateIcons.next1_${UPDATEICONS_UNIQUE} UpdateIcons.error1_${UPDATEICONS_UNIQUE}
UpdateIcons.next1_${UPDATEICONS_UNIQUE}:
GetDllVersion "$SYSDIR\shell32.dll" $R0 $R1
IntOp $R2 $R0 / 0x00010000
IntCmp $R2 4 UpdateIcons.next2_${UPDATEICONS_UNIQUE} UpdateIcons.error2_${UPDATEICONS_UNIQUE}
UpdateIcons.next2_${UPDATEICONS_UNIQUE}:
System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v (${SHCNE_ASSOCCHANGED}, ${SHCNF_IDLIST}, 0, 0)'
Goto UpdateIcons.quit_${UPDATEICONS_UNIQUE}
UpdateIcons.error1_${UPDATEICONS_UNIQUE}:
MessageBox MB_OK|MB_ICONSTOP "Can't find 'shell32.dll' library. Impossible to update icons"
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 Ethereal capture file icons"
Goto UpdateIcons.quit_${UPDATEICONS_UNIQUE}
UpdateIcons.quit_${UPDATEICONS_UNIQUE}:
!undef UPDATEICONS_UNIQUE
Pop $R2
Pop $R1
Pop $R0
!macroend
Function Associate
; $R0 should contain the prefix to associate to Ethereal
Push $R1
ReadRegStr $R1 HKCR $R0 ""
StrCmp $R1 "" Associate.doRegister
Goto Associate.end
Associate.doRegister:
;The extension is not associated to any program, we can do the link
WriteRegStr HKCR $R0 "" ${ETHEREAL_ASSOC}
Associate.end:
pop $R1
FunctionEnd
Function un.unlink
; $R0 should contain the prefix to unlink
Push $R1
ReadRegStr $R1 HKCR $R0 ""
StrCmp $R1 ${ETHEREAL_ASSOC} un.unlink.doUnlink
Goto un.unlink.end
un.unlink.doUnlink:
; The extension is associated with Ethereal so, we must destroy this!
DeleteRegKey HKCR $R0
un.unlink.end:
pop $R1
FunctionEnd
2002-08-19 15:48:28 +00:00
2005-07-23 20:34:43 +00:00
Function .onInit
;Extract InstallOptions INI files
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "AdditionalTasksPage.ini"
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "WinpcapPage.ini"
FunctionEnd
Function DisplayAdditionalTasksPage
!insertmacro MUI_HEADER_TEXT "Select Additional Tasks" "Which additional tasks should be done?"
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "AdditionalTasksPage.ini"
FunctionEnd
Function DisplayWinPcapPage
!insertmacro MUI_HEADER_TEXT "Install WinPcap?" "WinPcap is required to capture live network data. Should WinPcap be installed?"
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "WinPcapPage.ini"
FunctionEnd
2001-04-04 04:50:05 +00:00
; ============================================================================
; Installation execution commands
; ============================================================================
2005-07-23 20:34:43 +00:00
Var WINPCAP_UNINSTALL ;declare variable for holding the value of a registry key
;Var ETHEREAL_UNINSTALL ;declare variable for holding the value of a registry key
2001-04-04 04:50:05 +00:00
Section "-Required"
;-------------------------------------------
2002-08-19 15:48:28 +00:00
;
; Install for every user
;
2004-02-18 20:45:54 +00:00
!ifdef GTK1_DIR & GTK2_DIR
SectionIn 1 2 RO
!endif
2002-08-19 15:48:28 +00:00
SetShellVarContext all
2005-07-23 20:34:43 +00:00
2001-04-04 04:50:05 +00:00
SetOutPath $INSTDIR
2002-08-19 15:48:28 +00:00
File "..\..\wiretap\wiretap-${WTAP_VERSION}.dll"
2004-05-09 10:03:41 +00:00
!ifdef ENABLE_LIBETHEREAL
File "..\..\epan\libethereal.dll"
!endif
2003-12-22 21:41:40 +00:00
File "${GLIB_DIR}\bin\libglib-2.0-0.dll"
File "${GLIB_DIR}\bin\libgmodule-2.0-0.dll"
File "${GLIB_DIR}\bin\libgobject-2.0-0.dll"
File "${ICONV_DIR}\bin\iconv.dll"
File "${GETTEXT_DIR}\bin\intl.dll"
!ifdef ZLIB_DIR
File "${ZLIB_DIR}\zlib1.dll"
!endif
!ifdef ADNS_DIR
File "${ADNS_DIR}\adns_win32\LIB\adns_dll.dll"
!endif
!ifdef PCRE_DIR
File "${PCRE_DIR}\bin\pcre.dll"
File "${PCRE_DIR}\man\cat3\pcrepattern.3.txt"
!endif
2002-08-20 00:59:42 +00:00
File "..\..\FAQ"
2001-04-04 04:50:05 +00:00
File "..\..\README"
File "..\..\README.win32"
2004-05-21 17:31:16 +00:00
File "..\..\AUTHORS-SHORT"
2004-10-17 23:03:11 +00:00
File "..\..\AUTHORS-SHORT-FORMAT"
2004-05-21 17:31:16 +00:00
File "..\..\COPYING"
2004-10-16 11:46:17 +00:00
File "NEWS.txt"
2001-10-11 01:04:19 +00:00
File "..\..\manuf"
2004-02-18 20:45:54 +00:00
File "..\..\doc\ethereal.html"
File "..\..\doc\ethereal-filter.html"
2002-06-01 22:17:22 +00:00
2005-06-09 07:43:32 +00:00
; global config files - don't overwrite if already existing
2005-08-26 00:01:49 +00:00
;IfFileExists cfilters dont_overwrite_cfilters
2005-06-09 07:43:32 +00:00
File "..\..\cfilters"
2005-08-26 00:01:49 +00:00
;dont_overwrite_cfilters:
;IfFileExists colorfilters dont_overwrite_colorfilters
2005-06-09 07:43:32 +00:00
File "..\..\colorfilters"
2005-08-26 00:01:49 +00:00
;dont_overwrite_colorfilters:
;IfFileExists dfilters dont_overwrite_dfilters
2005-06-09 07:43:32 +00:00
File "..\..\dfilters"
2005-08-26 00:01:49 +00:00
;dont_overwrite_dfilters:
2005-06-09 07:43:32 +00:00
2002-06-01 22:17:22 +00:00
;
; Install the Diameter DTD and XML files in the "diameter" subdirectory
; of the installation directory.
;
SetOutPath $INSTDIR\diameter
2001-11-01 21:55:08 +00:00
File "..\..\dictionary.dtd"
File "..\..\dictionary.xml"
2004-10-11 08:24:46 +00:00
File "..\..\imscxdx.xml"
2001-11-01 21:55:08 +00:00
File "..\..\mobileipv4.xml"
File "..\..\nasreq.xml"
File "..\..\sunping.xml"
2002-06-01 22:17:22 +00:00
SetOutPath $INSTDIR
2001-04-04 04:50:05 +00:00
2005-07-15 21:18:32 +00:00
2005-07-15 22:36:21 +00:00
;
; Install the RADIUS directory files in the "radius" subdirectory
; of the installation directory.
;
2005-07-15 21:18:32 +00:00
SetOutPath $INSTDIR\radius
File "..\..\radius\dictionary"
File "..\..\radius\dictionary.3com"
File "..\..\radius\dictionary.3gpp"
File "..\..\radius\dictionary.3gpp2"
File "..\..\radius\dictionary.acc"
File "..\..\radius\dictionary.alcatel"
File "..\..\radius\dictionary.alteon"
File "..\..\radius\dictionary.altiga"
File "..\..\radius\dictionary.aptis"
File "..\..\radius\dictionary.ascend"
File "..\..\radius\dictionary.bay"
File "..\..\radius\dictionary.bintec"
File "..\..\radius\dictionary.bristol"
File "..\..\radius\dictionary.cablelabs"
File "..\..\radius\dictionary.cabletron"
File "..\..\radius\dictionary.cisco"
File "..\..\radius\dictionary.cisco.bbsm"
File "..\..\radius\dictionary.cisco.vpn3000"
File "..\..\radius\dictionary.cisco.vpn5000"
File "..\..\radius\dictionary.colubris"
File "..\..\radius\dictionary.columbia_university"
File "..\..\radius\dictionary.compat"
File "..\..\radius\dictionary.cosine"
File "..\..\radius\dictionary.erx"
File "..\..\radius\dictionary.extreme"
File "..\..\radius\dictionary.foundry"
File "..\..\radius\dictionary.freeradius"
File "..\..\radius\dictionary.gandalf"
File "..\..\radius\dictionary.garderos"
File "..\..\radius\dictionary.gemtek"
File "..\..\radius\dictionary.itk"
File "..\..\radius\dictionary.juniper"
File "..\..\radius\dictionary.karlnet"
File "..\..\radius\dictionary.livingston"
File "..\..\radius\dictionary.localweb"
File "..\..\radius\dictionary.merit"
File "..\..\radius\dictionary.microsoft"
File "..\..\radius\dictionary.mikrotik"
File "..\..\radius\dictionary.navini"
File "..\..\radius\dictionary.netscreen"
File "..\..\radius\dictionary.nokia"
File "..\..\radius\dictionary.nomadix"
File "..\..\radius\dictionary.propel"
File "..\..\radius\dictionary.quintum"
File "..\..\radius\dictionary.redback"
File "..\..\radius\dictionary.redcreek"
File "..\..\radius\dictionary.shasta"
File "..\..\radius\dictionary.shiva"
File "..\..\radius\dictionary.sonicwall"
File "..\..\radius\dictionary.springtide"
File "..\..\radius\dictionary.t_systems_nova"
File "..\..\radius\dictionary.telebit"
File "..\..\radius\dictionary.trapeze"
File "..\..\radius\dictionary.tunnel"
File "..\..\radius\dictionary.unisphere"
File "..\..\radius\dictionary.unix"
File "..\..\radius\dictionary.usr"
File "..\..\radius\dictionary.valemount"
File "..\..\radius\dictionary.versanet"
File "..\..\radius\dictionary.wispr"
File "..\..\radius\dictionary.xedia"
SetOutPath $INSTDIR
2005-09-17 17:17:42 +00:00
;
; install the dtds in the dtds subdirectory
;
SetOutPath $INSTDIR\dtds
File "..\..\dtds\dc.dtd"
File "..\..\dtds\itunes.dtd"
File "..\..\dtds\rss.dtd"
File "..\..\dtds\smil.dtd"
SetOutPath $INSTDIR
2004-02-18 20:45:54 +00:00
SetOutPath $INSTDIR\help
File "..\..\help\toc"
File "..\..\help\overview.txt"
File "..\..\help\getting_started.txt"
File "..\..\help\capturing.txt"
File "..\..\help\capture_filters.txt"
File "..\..\help\display_filters.txt"
File "..\..\help\faq.txt"
2001-04-04 04:50:05 +00:00
; Write the uninstall keys for Windows
2003-12-10 19:05:06 +00:00
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Ethereal" "DisplayVersion" "${VERSION}"
2004-02-18 20:45:54 +00:00
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Ethereal" "DisplayName" "Ethereal ${VERSION}"
2001-04-04 04:50:05 +00:00
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Ethereal" "UninstallString" '"$INSTDIR\uninstall.exe"'
2003-12-16 06:25:56 +00:00
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Ethereal" "Publisher" "The Ethereal developer community, http://www.ethereal.com"
2003-12-19 23:25:05 +00:00
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Ethereal" "HelpLink" "mailto:ethereal-users@ethereal.com"
2003-12-10 19:05:06 +00:00
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Ethereal" "URLInfoAbout" "http://www.ethereal.com"
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Ethereal" "URLUpdateInfo" "http://www.ethereal.com/distribution/win32/"
WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Ethereal" "NoModify" 1
WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Ethereal" "NoRepair" 1
2002-01-04 06:57:10 +00:00
WriteUninstaller "uninstall.exe"
2004-10-21 02:06:37 +00:00
; Write an entry for ShellExecute
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\ethereal.exe" "" '$INSTDIR\ethereal.exe'
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\ethereal.exe" "Path" '$INSTDIR'
2005-07-23 20:34:43 +00:00
; 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\Ethereal"
; 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\Ethereal\Ethereal Web Site.lnk"
;WriteINIStr "$SMPROGRAMS\Ethereal\Ethereal Web Site.url" "InternetShortcut" "URL" "http://www.ethereal.com/"
CreateShortCut "$SMPROGRAMS\Ethereal\Ethereal.lnk" "$INSTDIR\ethereal.exe" "" "$INSTDIR\ethereal.exe" 0 "" "" "The Ethereal Network Protocol Analyzer"
;CreateShortCut "$SMPROGRAMS\Ethereal\Ethereal Manual.lnk" "$INSTDIR\ethereal.html"
;CreateShortCut "$SMPROGRAMS\Ethereal\Display Filters Manual.lnk" "$INSTDIR\ethereal-filter.html"
CreateShortCut "$SMPROGRAMS\Ethereal\Ethereal Program Directory.lnk" \
"$INSTDIR"
;CreateShortCut "$SMPROGRAMS\Ethereal\Uninstall Ethereal.lnk" "$INSTDIR\uninstall.exe"
SecRequired_skip_StartMenu:
2005-09-14 02:07:20 +00:00
; is command line option "/desktopicon" set?
${GetParameters} $R0
${GetOptions} $R0 "/desktopicon=" $R1
StrCmp $R1 "no" SecRequired_skip_DesktopIcon
StrCmp $R1 "yes" SecRequired_install_DesktopIcon
2005-07-23 20:34:43 +00:00
2005-09-14 02:07:20 +00:00
; Create desktop icon (depending on additional tasks page and command line option)
2005-07-23 20:34:43 +00:00
ReadINIStr $0 "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 3" "State"
StrCmp $0 "0" SecRequired_skip_DesktopIcon
2005-09-14 02:07:20 +00:00
SecRequired_install_DesktopIcon:
2005-07-23 20:34:43 +00:00
CreateShortCut "$DESKTOP\Ethereal.lnk" "$INSTDIR\ethereal.exe" "" "$INSTDIR\ethereal.exe" 0 "" "" "The Ethereal Network Protocol Analyzer"
SecRequired_skip_DesktopIcon:
2001-04-04 04:50:05 +00:00
2005-09-14 02:07:20 +00:00
; is command line option "/quicklaunchicon" set?
${GetParameters} $R0
${GetOptions} $R0 "/quicklaunchicon=" $R1
StrCmp $R1 "no" SecRequired_skip_QuickLaunchIcon
StrCmp $R1 "yes" SecRequired_install_QuickLaunchIcon
; Create quick launch icon (depending on additional tasks page and command line option)
2005-07-23 20:34:43 +00:00
ReadINIStr $0 "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 4" "State"
StrCmp $0 "0" SecRequired_skip_QuickLaunchIcon
2005-09-14 02:07:20 +00:00
SecRequired_install_QuickLaunchIcon:
2005-07-23 20:34:43 +00:00
CreateShortCut "$QUICKLAUNCH\Ethereal.lnk" "$INSTDIR\ethereal.exe" "" "$INSTDIR\ethereal.exe" 0 "" "" "The Ethereal 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 ${ETHEREAL_ASSOC} "" "Ethereal file"
WriteRegStr HKCR "${ETHEREAL_ASSOC}\Shell\open\command" "" '"$INSTDIR\ethereal.exe" "%1"'
WriteRegStr HKCR "${ETHEREAL_ASSOC}\DefaultIcon" "" '"$INSTDIR\ethereal.exe",0'
push $R0
StrCpy $R0 ".5vw"
Call Associate
StrCpy $R0 ".acp"
Call Associate
StrCpy $R0 ".apc"
Call Associate
StrCpy $R0 ".atc"
Call Associate
StrCpy $R0 ".bfr"
Call Associate
StrCpy $R0 ".cap"
Call Associate
StrCpy $R0 ".enc"
Call Associate
StrCpy $R0 ".erf"
Call Associate
StrCpy $R0 ".fdc"
Call Associate
StrCpy $R0 ".pcap"
Call Associate
StrCpy $R0 ".pkt"
Call Associate
StrCpy $R0 ".snoop"
Call Associate
StrCpy $R0 ".syc"
Call Associate
StrCpy $R0 ".tpc"
Call Associate
StrCpy $R0 ".tr1"
Call Associate
StrCpy $R0 ".trace"
Call Associate
StrCpy $R0 ".trc"
Call Associate
StrCpy $R0 ".wpc"
Call Associate
StrCpy $R0 ".wpz"
Call Associate
; if somethings added here, add it also to the uninstall section and the AdditionalTask page
pop $R0
!insertmacro UpdateIcons
SecRequired_skip_FileExtensions:
2005-08-26 00:59:07 +00:00
; if running as a silent installer, don't try to install winpcap
IfSilent SecRequired_skip_Winpcap
2005-07-23 20:34:43 +00:00
; Install WinPcap (depending on winpcap page setting)
ReadINIStr $0 "$PLUGINSDIR\WinPcapPage.ini" "Field 4" "State"
StrCmp $0 "0" SecRequired_skip_Winpcap
; Uinstall old WinPcap first
ReadRegStr $WINPCAP_UNINSTALL HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\WinPcapInst" "UninstallString"
IfErrors lbl_winpcap_notinstalled ;if RegKey is unavailable, WinPcap is not installed
2005-08-07 23:10:06 +00:00
; from released version 3.1, WinPcap will uninstall an old version by itself
;ExecWait '$WINPCAP_UNINSTALL' $0
;DetailPrint "WinPcap uninstaller returned $0"
2005-07-23 20:34:43 +00:00
lbl_winpcap_notinstalled:
SetOutPath $INSTDIR
2005-08-07 23:10:06 +00:00
File "WinPcap_3_1.exe"
ExecWait '"$INSTDIR\WinPcap_3_1.exe"' $0
2005-07-23 20:34:43 +00:00
DetailPrint "WinPcap installer returned $0"
SecRequired_skip_Winpcap:
2005-08-07 23:10:06 +00:00
; Load Winpcap NPF service at startup (depending on winpcap page)
2005-07-23 20:34:43 +00:00
ReadINIStr $0 "$PLUGINSDIR\WinPcapPage.ini" "Field 8" "State"
2005-07-25 17:56:19 +00:00
StrCmp $0 "0" SecRequired_no_WinpcapService
2005-07-23 20:34:43 +00:00
WriteRegDWORD HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Services\NPF" "Start" 2 ;set NPF to (SERVICE_AUTO_START)
!insertmacro SERVICE "start" "NPF" ""
2005-07-25 17:56:19 +00:00
Goto SecRequired_done_WinpcapService
SecRequired_no_WinpcapService:
WriteRegDWORD HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Services\NPF" "Start" 3 ;set NPF to (SERVICE_DEMAND_START)
!insertmacro SERVICE "stop" "NPF" ""
SecRequired_done_WinpcapService:
2005-07-23 20:34:43 +00:00
SectionEnd ; "Required"
SectionGroup "!Ethereal" SecEtherealGroup
2005-07-21 20:05:37 +00:00
2004-02-18 20:45:54 +00:00
!ifdef GTK1_DIR
Section "Ethereal GTK1" SecEtherealGTK1
2001-04-04 04:50:05 +00:00
;-------------------------------------------
2004-02-18 20:45:54 +00:00
!ifdef GTK1_DIR & GTK2_DIR
2004-05-14 02:46:38 +00:00
SectionIn 2 RO
2004-02-18 20:45:54 +00:00
!endif
2001-04-04 04:50:05 +00:00
SetOutPath $INSTDIR
2004-02-18 20:45:54 +00:00
File "..\..\ethereal.exe"
2004-02-06 18:47:45 +00:00
File "${GTK1_DIR}\lib\libgtk-0.dll"
File "${GTK1_DIR}\lib\libgdk-0.dll"
2004-02-18 20:45:54 +00:00
SectionEnd
!endif
!ifdef GTK2_DIR
Section "Ethereal GTK2" SecEtherealGTK2
;-------------------------------------------
!ifdef GTK1_DIR & GTK2_DIR
2004-05-14 02:46:38 +00:00
SectionIn 1 RO
2004-02-18 20:45:54 +00:00
!endif
SetOutPath $INSTDIR
File /oname=ethereal.exe "..\..\ethereal-gtk2.exe"
2004-02-06 18:47:45 +00:00
File "${GTK2_DIR}\bin\libgdk-win32-2.0-0.dll"
File "${GTK2_DIR}\bin\libgdk_pixbuf-2.0-0.dll"
File "${GTK2_DIR}\bin\libgtk-win32-2.0-0.dll"
File "${GTK2_DIR}\bin\libatk-1.0-0.dll"
File "${GTK2_DIR}\bin\libpango-1.0-0.dll"
File "${GTK2_DIR}\bin\libpangowin32-1.0-0.dll"
2003-07-22 22:00:38 +00:00
SetOutPath $INSTDIR\etc\gtk-2.0
From Lars Roland: define an "installation" version of GTK+ 2.x and Pango
in "config.nmake", and use that in the NSIS script when generating the
NSIS installer, so it puts GTK+ and Pango in the appropriate
subdirectories. Also, when uninstalling, remove both of the sets of
subdirectories.
As per his suggestion, get rid of the "GTK1_VERSION" and "GTK2_VERSION"
macros, and just directly insert the values where those macros were used
- "GTK1_VERSION" wasn't used at all, and "GTK2_VERSION" was only used
immediately below where it was defined, and stuff elsewhere, such as in
the NSIS script, didn't use them and would break if you changed them
anyway.
svn path=/trunk/; revision=10976
2004-05-23 22:21:30 +00:00
File "${GTK2_DIR}\etc\gtk-2.0\*.*"
2003-07-22 22:00:38 +00:00
SetOutPath $INSTDIR\etc\pango
From Lars Roland: define an "installation" version of GTK+ 2.x and Pango
in "config.nmake", and use that in the NSIS script when generating the
NSIS installer, so it puts GTK+ and Pango in the appropriate
subdirectories. Also, when uninstalling, remove both of the sets of
subdirectories.
As per his suggestion, get rid of the "GTK1_VERSION" and "GTK2_VERSION"
macros, and just directly insert the values where those macros were used
- "GTK1_VERSION" wasn't used at all, and "GTK2_VERSION" was only used
immediately below where it was defined, and stuff elsewhere, such as in
the NSIS script, didn't use them and would break if you changed them
anyway.
svn path=/trunk/; revision=10976
2004-05-23 22:21:30 +00:00
File "${GTK2_DIR}\etc\pango\pango.*"
SetOutPath $INSTDIR\lib\gtk-2.0\${GTK2_INST_VERSION}.0\loaders
File "${GTK2_DIR}\lib\gtk-2.0\${GTK2_INST_VERSION}.0\loaders\libpixbufloader-*.dll"
SetOutPath $INSTDIR\lib\gtk-2.0\${GTK2_INST_VERSION}.0\immodules
File "${GTK2_DIR}\lib\gtk-2.0\${GTK2_INST_VERSION}.0\immodules\im-*.dll"
SetOutPath $INSTDIR\lib\pango\${PANGO_INST_VERSION}.0\modules
File "${GTK2_DIR}\lib\pango\${PANGO_INST_VERSION}.0\modules\pango-*.dll"
2001-07-12 22:45:23 +00:00
SectionEnd
2004-08-26 22:48:29 +00:00
2004-02-24 18:51:40 +00:00
!ifdef GTK_WIMP_DIR
Section "GTK-Wimp" SecGTKWimp
;-------------------------------------------
2005-07-21 20:05:37 +00:00
SectionIn 1
From Lars Roland: define an "installation" version of GTK+ 2.x and Pango
in "config.nmake", and use that in the NSIS script when generating the
NSIS installer, so it puts GTK+ and Pango in the appropriate
subdirectories. Also, when uninstalling, remove both of the sets of
subdirectories.
As per his suggestion, get rid of the "GTK1_VERSION" and "GTK2_VERSION"
macros, and just directly insert the values where those macros were used
- "GTK1_VERSION" wasn't used at all, and "GTK2_VERSION" was only used
immediately below where it was defined, and stuff elsewhere, such as in
the NSIS script, didn't use them and would break if you changed them
anyway.
svn path=/trunk/; revision=10976
2004-05-23 22:21:30 +00:00
SetOutPath $INSTDIR\lib\gtk-2.0\${GTK2_INST_VERSION}.0\engines
2004-02-24 18:51:40 +00:00
File "${GTK_WIMP_DIR}\libwimp.dll"
SetOutPath $INSTDIR\share\themes\Default\gtk-2.0
File "${GTK_WIMP_DIR}\Theme\gtk-2.0\gtkrc"
SectionEnd
!endif
2004-08-26 22:48:29 +00:00
!endif
2004-02-24 18:51:40 +00:00
2005-07-21 20:05:37 +00:00
SectionGroupEnd ; "Ethereal"
2003-12-26 12:27:47 +00:00
Section "Tethereal" SecTethereal
2001-04-04 04:50:05 +00:00
;-------------------------------------------
2004-02-18 20:45:54 +00:00
!ifdef GTK1_DIR & GTK2_DIR
SectionIn 1 2
!endif
2001-04-04 04:50:05 +00:00
SetOutPath $INSTDIR
File "..\..\tethereal.exe"
File "..\..\doc\tethereal.html"
2001-07-12 22:45:23 +00:00
SectionEnd
2001-04-04 04:50:05 +00:00
2005-07-23 20:34:43 +00:00
SectionGroup "Plugins / Extensions" SecPluginsGroup
2001-04-04 04:50:05 +00:00
2005-03-07 22:31:13 +00:00
Section "Dissector Plugins" SecPlugins
2001-04-04 04:50:05 +00:00
;-------------------------------------------
2004-02-18 20:45:54 +00:00
!ifdef GTK1_DIR & GTK2_DIR
SectionIn 1 2
!endif
2002-08-19 15:48:28 +00:00
SetOutPath $INSTDIR\plugins\${VERSION}
2003-10-14 01:18:11 +00:00
File "..\..\plugins\acn\acn.dll"
2005-02-10 06:36:21 +00:00
File "..\..\plugins\agentx\agentx.dll"
2003-04-21 21:28:39 +00:00
File "..\..\plugins\artnet\artnet.dll"
2003-10-28 07:02:38 +00:00
File "..\..\plugins\asn1\asn1.dll"
2004-03-25 11:21:07 +00:00
File "..\..\plugins\ciscosm\ciscosm.dll"
2002-07-12 22:52:43 +00:00
File "..\..\plugins\docsis\docsis.dll"
2003-11-17 20:57:14 +00:00
File "..\..\plugins\enttec\enttec.dll"
2002-07-12 22:52:43 +00:00
File "..\..\plugins\giop\coseventcomm.dll"
File "..\..\plugins\giop\cosnaming.dll"
2005-07-07 19:48:06 +00:00
File "..\..\plugins\giop\parlay.dll"
File "..\..\plugins\giop\tango.dll"
2001-04-04 04:50:05 +00:00
File "..\..\plugins\gryphon\gryphon.dll"
2003-12-18 19:07:14 +00:00
File "..\..\plugins\irda\irda.dll"
2003-08-05 05:09:37 +00:00
File "..\..\plugins\lwres\lwres.dll"
2003-01-28 22:18:06 +00:00
File "..\..\plugins\megaco\megaco.dll"
2001-04-04 04:50:05 +00:00
File "..\..\plugins\mgcp\mgcp.dll"
2004-07-21 06:31:33 +00:00
File "..\..\plugins\opsi\opsi.dll"
2003-01-28 22:18:06 +00:00
File "..\..\plugins\pcli\pcli.dll"
2005-05-20 21:40:03 +00:00
File "..\..\plugins\profinet\profinet.dll"
2003-11-17 20:57:14 +00:00
File "..\..\plugins\rdm\rdm.dll"
2004-03-25 11:21:07 +00:00
File "..\..\plugins\rlm\rlm.dll"
2003-06-11 09:17:03 +00:00
File "..\..\plugins\rtnet\rtnet.dll"
2004-03-25 11:21:07 +00:00
File "..\..\plugins\rudp\rudp.dll"
2003-12-17 05:16:21 +00:00
File "..\..\plugins\v5ua\v5ua.dll"
2005-03-07 22:31:13 +00:00
SectionEnd
2005-07-26 17:58:17 +00:00
Section "Tree Statistics Plugin" SecStatsTree
2005-03-07 22:31:13 +00:00
;-------------------------------------------
!ifdef GTK1_DIR & GTK2_DIR
SectionIn 1 2
!endif
SetOutPath $INSTDIR\plugins\${VERSION}
File "..\..\plugins\stats_tree\stats_tree.dll"
2001-07-12 22:45:23 +00:00
SectionEnd
2001-04-04 04:50:05 +00:00
2005-07-21 20:05:37 +00:00
Section "Mate - Meta Analysis and Tracing Engine" SecMate
2005-01-21 19:16:05 +00:00
;-------------------------------------------
SetOutPath $INSTDIR\plugins\${VERSION}
File "..\..\plugins\mate\mate.dll"
SectionEnd
2003-12-26 12:27:47 +00:00
Section "SNMP MIBs" SecMIBs
2002-12-07 21:10:22 +00:00
;-------------------------------------------
2004-02-18 20:45:54 +00:00
!ifdef GTK1_DIR & GTK2_DIR
SectionIn 1 2
!endif
2002-12-07 21:10:22 +00:00
SetOutPath $INSTDIR\snmp\mibs
2003-04-18 04:46:38 +00:00
File "${NET_SNMP_DIR}\mibs\*.txt"
2002-12-07 21:10:22 +00:00
SectionEnd
2005-07-21 20:05:37 +00:00
SectionGroupEnd ; "Plugins / Extensions"
2005-07-23 20:34:43 +00:00
SectionGroup "Tools" SecToolsGroup
2005-07-21 20:05:37 +00:00
Section "Editcap" SecEditcap
;-------------------------------------------
!ifdef GTK1_DIR & GTK2_DIR
SectionIn 1 2
!endif
SetOutPath $INSTDIR
File "..\..\editcap.exe"
File "..\..\doc\editcap.html"
SectionEnd
Section "Text2Pcap" SecText2Pcap
;-------------------------------------------
!ifdef GTK1_DIR & GTK2_DIR
SectionIn 1 2
!endif
SetOutPath $INSTDIR
File "..\..\text2pcap.exe"
File "..\..\doc\text2pcap.html"
SectionEnd
Section "Mergecap" SecMergecap
;-------------------------------------------
!ifdef GTK1_DIR & GTK2_DIR
SectionIn 1 2
!endif
SetOutPath $INSTDIR
File "..\..\mergecap.exe"
File "..\..\doc\mergecap.html"
SectionEnd
Section "Capinfos" SecCapinfos
;-------------------------------------------
!ifdef GTK1_DIR & GTK2_DIR
SectionIn 1 2
!endif
SetOutPath $INSTDIR
File "..\..\capinfos.exe"
File "..\..\doc\capinfos.html"
SectionEnd
SectionGroupEnd ; "Tools"
2005-07-23 20:34:43 +00:00
Section "Uninstall" un.SecUinstall
2001-04-04 04:50:05 +00:00
;-------------------------------------------
2003-04-09 18:58:37 +00:00
2003-06-03 02:32:56 +00:00
;
; UnInstall for every user
;
2005-07-23 20:34:43 +00:00
SectionIn 1 2
2003-06-03 02:32:56 +00:00
SetShellVarContext all
2004-02-03 20:03:40 +00:00
Delete "$INSTDIR\tethereal.exe"
IfErrors 0 NoTetherealErrorMsg
2004-07-17 20:34:41 +00:00
MessageBox MB_OK "Please note: tethereal.exe could not be removed, it's probably in use!" IDOK 0 ;skipped if tethereal.exe removed
Abort "Please note: tethereal.exe could not be removed, it's probably in use! Abort uninstall process!"
2004-02-03 20:03:40 +00:00
NoTetherealErrorMsg:
2004-02-06 18:47:45 +00:00
Delete "$INSTDIR\ethereal.exe"
2004-02-03 20:03:40 +00:00
IfErrors 0 NoEtherealErrorMsg
2004-07-17 20:34:41 +00:00
MessageBox MB_OK "Please note: ethereal.exe could not be removed, it's probably in use!" IDOK 0 ;skipped if ethereal.exe removed
Abort "Please note: ethereal.exe could not be removed, it's probably in use! Abort uninstall process!"
2004-02-03 20:03:40 +00:00
NoEtherealErrorMsg:
DeleteRegKey HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Ethereal"
2004-10-21 02:06:37 +00:00
DeleteRegKey HKEY_LOCAL_MACHINE "Software\Ethereal"
DeleteRegKey HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\ethereal.exe"
2004-02-03 20:03:40 +00:00
2004-06-10 10:12:30 +00:00
push $R0
StrCpy $R0 ".5vw"
Call un.unlink
StrCpy $R0 ".acp"
Call un.unlink
StrCpy $R0 ".apc"
Call un.unlink
StrCpy $R0 ".atc"
Call un.unlink
StrCpy $R0 ".bfr"
Call un.unlink
StrCpy $R0 ".cap"
Call un.unlink
StrCpy $R0 ".enc"
Call un.unlink
StrCpy $R0 ".erf"
Call un.unlink
StrCpy $R0 ".fdc"
Call un.unlink
StrCpy $R0 ".pcap"
Call un.unlink
StrCpy $R0 ".pkt"
Call un.unlink
StrCpy $R0 ".snoop"
Call un.unlink
StrCpy $R0 ".syc"
Call un.unlink
StrCpy $R0 ".tpc"
Call un.unlink
StrCpy $R0 ".tr1"
Call un.unlink
StrCpy $R0 ".trace"
Call un.unlink
StrCpy $R0 ".trc"
Call un.unlink
StrCpy $R0 ".wpc"
Call un.unlink
StrCpy $R0 ".wpz"
Call un.unlink
pop $R0
DeleteRegKey HKCR ${ETHEREAL_ASSOC}
DeleteRegKey HKCR "${ETHEREAL_ASSOC}\Shell\open\command"
DeleteRegKey HKCR "${ETHEREAL_ASSOC}\DefaultIcon"
!insertmacro UpdateIcons
2004-02-06 18:47:45 +00:00
; regardless if we currently installed GTK1 or 2, try to uninstall GTK2 files too
2003-07-22 22:00:38 +00:00
Delete "$INSTDIR\etc\gtk-2.0\*.*"
Delete "$INSTDIR\etc\pango\*.*"
2004-02-24 18:51:40 +00:00
Delete "$INSTDIR\lib\gtk-2.0\2.2.0\engines\*.*"
2003-07-22 22:00:38 +00:00
Delete "$INSTDIR\lib\gtk-2.0\2.2.0\loaders\*.*"
Delete "$INSTDIR\lib\gtk-2.0\2.2.0\immodules\*.*"
From Lars Roland: define an "installation" version of GTK+ 2.x and Pango
in "config.nmake", and use that in the NSIS script when generating the
NSIS installer, so it puts GTK+ and Pango in the appropriate
subdirectories. Also, when uninstalling, remove both of the sets of
subdirectories.
As per his suggestion, get rid of the "GTK1_VERSION" and "GTK2_VERSION"
macros, and just directly insert the values where those macros were used
- "GTK1_VERSION" wasn't used at all, and "GTK2_VERSION" was only used
immediately below where it was defined, and stuff elsewhere, such as in
the NSIS script, didn't use them and would break if you changed them
anyway.
svn path=/trunk/; revision=10976
2004-05-23 22:21:30 +00:00
Delete "$INSTDIR\lib\gtk-2.0\2.4.0\engines\*.*"
Delete "$INSTDIR\lib\gtk-2.0\2.4.0\loaders\*.*"
Delete "$INSTDIR\lib\gtk-2.0\2.4.0\immodules\*.*"
2003-07-22 22:00:38 +00:00
Delete "$INSTDIR\lib\pango\1.2.0\modules\*.*"
From Lars Roland: define an "installation" version of GTK+ 2.x and Pango
in "config.nmake", and use that in the NSIS script when generating the
NSIS installer, so it puts GTK+ and Pango in the appropriate
subdirectories. Also, when uninstalling, remove both of the sets of
subdirectories.
As per his suggestion, get rid of the "GTK1_VERSION" and "GTK2_VERSION"
macros, and just directly insert the values where those macros were used
- "GTK1_VERSION" wasn't used at all, and "GTK2_VERSION" was only used
immediately below where it was defined, and stuff elsewhere, such as in
the NSIS script, didn't use them and would break if you changed them
anyway.
svn path=/trunk/; revision=10976
2004-05-23 22:21:30 +00:00
Delete "$INSTDIR\lib\pango\1.4.0\modules\*.*"
2004-02-24 18:51:40 +00:00
Delete "$INSTDIR\share\themes\Default\gtk-2.0\*.*"
2003-12-26 11:36:43 +00:00
Delete "$INSTDIR\help\*.*"
2002-09-30 14:43:18 +00:00
Delete "$INSTDIR\diameter\*.*"
2002-12-07 21:10:22 +00:00
Delete "$INSTDIR\snmp\mibs\*.*"
Delete "$INSTDIR\snmp\*.*"
2004-02-18 20:45:54 +00:00
Delete "$INSTDIR\*.exe"
Delete "$INSTDIR\*.dll"
Delete "$INSTDIR\*.html"
2004-05-21 17:31:16 +00:00
Delete "$INSTDIR\COPYING"
Delete "$INSTDIR\AUTHORS-SHORT"
2004-10-17 23:03:11 +00:00
Delete "$INSTDIR\AUTHORS-SHORT-FORMAT"
2004-02-18 20:45:54 +00:00
Delete "$INSTDIR\README*"
Delete "$INSTDIR\FAQ"
2004-08-26 22:48:29 +00:00
Delete "$INSTDIR\NEWS.txt"
2004-02-18 20:45:54 +00:00
Delete "$INSTDIR\manuf"
Delete "$INSTDIR\pcrepattern.3.txt"
2005-07-21 20:17:52 +00:00
Delete "$INSTDIR\radius\*.*"
2005-09-17 17:17:42 +00:00
Delete "$INSTDIR\dtds\*.*"
2001-04-04 04:50:05 +00:00
Delete "$SMPROGRAMS\Ethereal\*.*"
2001-04-05 05:36:47 +00:00
Delete "$DESKTOP\Ethereal.lnk"
2005-07-23 20:34:43 +00:00
Delete "$QUICKLAUNCH\Ethereal.lnk"
2001-04-04 04:50:05 +00:00
2003-07-22 22:00:38 +00:00
RMDir "$INSTDIR\etc\gtk-2.0"
RMDir "$INSTDIR\etc\pango"
RMDir "$INSTDIR\etc"
2004-02-24 18:51:40 +00:00
RMDir "$INSTDIR\lib\gtk-2.0\2.2.0\engines"
2003-07-22 22:00:38 +00:00
RMDir "$INSTDIR\lib\gtk-2.0\2.2.0\loaders"
RMDir "$INSTDIR\lib\gtk-2.0\2.2.0\immodules"
RMDir "$INSTDIR\lib\gtk-2.0\2.2.0"
From Lars Roland: define an "installation" version of GTK+ 2.x and Pango
in "config.nmake", and use that in the NSIS script when generating the
NSIS installer, so it puts GTK+ and Pango in the appropriate
subdirectories. Also, when uninstalling, remove both of the sets of
subdirectories.
As per his suggestion, get rid of the "GTK1_VERSION" and "GTK2_VERSION"
macros, and just directly insert the values where those macros were used
- "GTK1_VERSION" wasn't used at all, and "GTK2_VERSION" was only used
immediately below where it was defined, and stuff elsewhere, such as in
the NSIS script, didn't use them and would break if you changed them
anyway.
svn path=/trunk/; revision=10976
2004-05-23 22:21:30 +00:00
RMDir "$INSTDIR\lib\gtk-2.0\2.4.0\engines"
RMDir "$INSTDIR\lib\gtk-2.0\2.4.0\loaders"
RMDir "$INSTDIR\lib\gtk-2.0\2.4.0\immodules"
RMDir "$INSTDIR\lib\gtk-2.0\2.4.0"
2003-07-22 22:00:38 +00:00
RMDir "$INSTDIR\lib\gtk-2.0"
RMDir "$INSTDIR\lib\pango\1.2.0\modules"
RMDir "$INSTDIR\lib\pango\1.2.0"
From Lars Roland: define an "installation" version of GTK+ 2.x and Pango
in "config.nmake", and use that in the NSIS script when generating the
NSIS installer, so it puts GTK+ and Pango in the appropriate
subdirectories. Also, when uninstalling, remove both of the sets of
subdirectories.
As per his suggestion, get rid of the "GTK1_VERSION" and "GTK2_VERSION"
macros, and just directly insert the values where those macros were used
- "GTK1_VERSION" wasn't used at all, and "GTK2_VERSION" was only used
immediately below where it was defined, and stuff elsewhere, such as in
the NSIS script, didn't use them and would break if you changed them
anyway.
svn path=/trunk/; revision=10976
2004-05-23 22:21:30 +00:00
RMDir "$INSTDIR\lib\pango\1.4.0\modules"
RMDir "$INSTDIR\lib\pango\1.4.0"
2003-07-22 22:00:38 +00:00
RMDir "$INSTDIR\lib\pango"
RMDir "$INSTDIR\lib"
2004-02-24 18:51:40 +00:00
RMDir "$INSTDIR\share\themes\Default\gtk-2.0"
RMDir "$INSTDIR\share\themes\Default"
RMDir "$INSTDIR\share\themes"
RMDir "$INSTDIR\share"
2001-04-04 04:50:05 +00:00
RMDir "$SMPROGRAMS\Ethereal"
2003-12-26 11:36:43 +00:00
RMDir "$INSTDIR\help"
2002-09-30 14:43:18 +00:00
RMDir "$INSTDIR\diameter"
2002-12-07 21:10:22 +00:00
RMDir "$INSTDIR\snmp\mibs"
RMDir "$INSTDIR\snmp"
2005-07-21 20:17:52 +00:00
RMDir "$INSTDIR\radius"
2005-09-17 17:17:42 +00:00
RMDir "$INSTDIR\dtds"
2001-04-04 04:50:05 +00:00
RMDir "$INSTDIR"
2005-07-23 20:34:43 +00:00
SectionEnd ; "Uinstall"
Section "Un.Plugins" un.SecPlugins
;-------------------------------------------
SectionIn 1 2
;Delete "$INSTDIR\plugins\${VERSION}\*.*"
;Delete "$INSTDIR\plugins\*.*"
;RMDir "$INSTDIR\plugins\${VERSION}"
;RMDir "$INSTDIR\plugins"
RMDir /r "$INSTDIR\plugins"
SectionEnd
Section "Un.Global Settings" un.SecGlobalSettings
;-------------------------------------------
SectionIn 1 2
Delete "$INSTDIR\cfilters"
Delete "$INSTDIR\colorfilters"
Delete "$INSTDIR\dfilters"
RMDir "$INSTDIR"
SectionEnd
Section /o "Un.Personal Settings" un.SecPersonalSettings
;-------------------------------------------
SectionIn 2
SetShellVarContext current
Delete "$APPDATA\Ethereal\*.*"
RMDir "$APPDATA\Ethereal"
SectionEnd
;VAR un.WINPCAP_UNINSTALL
Section /o "Un.WinPcap" un.SecWinPcap
;-------------------------------------------
SectionIn 2
ReadRegStr $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\WinPcapInst" "UninstallString"
;IfErrors un.lbl_winpcap_notinstalled ;if RegKey is unavailable, WinPcap is not installed
;MessageBox MB_OK "WinPcap $1"
ExecWait '$1' $0
DetailPrint "WinPcap uninstaller returned $0"
;SetRebootFlag true
;un.lbl_winpcap_notinstalled:
SectionEnd
Section "-Un.Finally"
;-------------------------------------------
SectionIn 1 2
; this test must be done after all other things uninstalled (e.g. Global Settings)
2004-02-03 20:03:40 +00:00
IfFileExists "$INSTDIR" 0 NoFinalErrorMsg
2005-07-23 20:34:43 +00:00
MessageBox MB_OK "Please note: The directory $INSTDIR could not be removed!" IDOK 0 ; skipped if dir doesn't exist
2004-02-03 20:03:40 +00:00
NoFinalErrorMsg:
2002-01-04 06:57:10 +00:00
SectionEnd
2003-12-26 12:27:47 +00:00
2005-07-23 20:34:43 +00:00
2005-04-10 13:43:07 +00:00
; ============================================================================
; PLEASE MAKE SURE, THAT THE DESCRIPTIVE TEXT FITS INTO THE DESCRIPTION FIELD!
; ============================================================================
2003-12-26 12:27:47 +00:00
!ifdef MAKENSIS_MODERN_UI
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
2005-07-23 20:34:43 +00:00
!insertmacro MUI_DESCRIPTION_TEXT ${SecEtherealGroup} "${PROGRAM_NAME} is a GUI network protocol analyzer."
2004-02-18 20:45:54 +00:00
!ifdef GTK1_DIR
2005-07-23 20:34:43 +00:00
!insertmacro MUI_DESCRIPTION_TEXT ${SecEtherealGTK1} "${PROGRAM_NAME} using the classical GTK1 user interface."
2004-02-18 20:45:54 +00:00
!endif
!ifdef GTK2_DIR
2005-07-23 20:34:43 +00:00
!insertmacro MUI_DESCRIPTION_TEXT ${SecEtherealGTK2} "${PROGRAM_NAME} using the modern GTK2 user interface."
2004-03-22 22:37:41 +00:00
!ifdef GTK_WIMP_DIR
2005-07-23 20:34:43 +00:00
!insertmacro MUI_DESCRIPTION_TEXT ${SecGTKWimp} "GTK-Wimp is the GTK2 windows impersonator (native Win32 look and feel, for Win2000 and up)."
2004-03-22 22:37:41 +00:00
!endif
2004-08-26 22:48:29 +00:00
!endif
2005-04-10 13:43:07 +00:00
!insertmacro MUI_DESCRIPTION_TEXT ${SecTethereal} "Tethereal is a text based network protocol analyzer."
2005-07-23 20:34:43 +00:00
!insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsGroup} "Some plugins and extensions for both Ethereal and Tethereal."
2003-12-26 12:27:47 +00:00
!insertmacro MUI_DESCRIPTION_TEXT ${SecPlugins} "Plugins with some extended dissections."
2005-03-07 22:31:13 +00:00
!insertmacro MUI_DESCRIPTION_TEXT ${SecStatsTree} "Plugin for some extended statistics."
2005-01-21 19:16:05 +00:00
!insertmacro MUI_DESCRIPTION_TEXT ${SecMate} "Plugin - Meta Analysis and Tracing Engine (Experimental)."
2003-12-26 12:27:47 +00:00
!insertmacro MUI_DESCRIPTION_TEXT ${SecMIBs} "SNMP MIBs for better SNMP dissection."
2005-07-23 20:34:43 +00:00
!insertmacro MUI_DESCRIPTION_TEXT ${SecToolsGroup} "Additional command line based tools."
!insertmacro MUI_DESCRIPTION_TEXT ${SecEditCap} "Editcap is a program that reads a capture file and writes some or all of the packets into another capture file."
!insertmacro MUI_DESCRIPTION_TEXT ${SecText2Pcap} "Text2pcap is a program that reads in an ASCII hex dump and writes the data into a libpcap-style capture file."
!insertmacro MUI_DESCRIPTION_TEXT ${SecMergecap} "Mergecap is a program that combines multiple saved capture files into a single output file"
!insertmacro MUI_DESCRIPTION_TEXT ${SecCapinfos} "Capinfos is a program that provides information on capture files."
2003-12-26 12:27:47 +00:00
!insertmacro MUI_FUNCTION_DESCRIPTION_END
2005-07-23 20:34:43 +00:00
!insertmacro MUI_UNFUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${un.SecUinstall} "Uninstall all Ethereal components."
!insertmacro MUI_DESCRIPTION_TEXT ${un.SecPlugins} "Uninstall all Plugins (even from previous Ethereal versions)."
!insertmacro MUI_DESCRIPTION_TEXT ${un.SecGlobalSettings} "Uninstall global settings like: $INSTDIR\cfilters"
!insertmacro MUI_DESCRIPTION_TEXT ${un.SecPersonalSettings} "Uninstall personal settings like your preferences file from your profile: $PROFILE."
!insertmacro MUI_DESCRIPTION_TEXT ${un.SecWinPcap} "Call WinPcap's uninstall program."
!insertmacro MUI_UNFUNCTION_DESCRIPTION_END
2003-12-26 12:27:47 +00:00
!endif ; MAKENSIS_MODERN_UI
2004-06-10 10:12:30 +00:00
; ============================================================================
; Callback functions
; ============================================================================
2004-06-29 07:14:39 +00:00
!ifdef GTK1_DIR & GTK2_DIR
2004-08-26 22:48:29 +00:00
;Disable GTK-Wimp for GTK1
2005-07-23 20:34:43 +00:00
2004-08-26 22:48:29 +00:00
Function .onSelChange
Push $0
SectionGetFlags ${SecEtherealGTK1} $0
IntOp $0 $0 & 1
IntCmp $0 1 onSelChange.disableGTK2Sections
;enable GTK2Sections
!insertmacro EnableSection ${SecGTKWimp}
Goto onSelChange.end
onSelChange.disableGTK2Sections:
!insertmacro DisableSection ${SecGTKWimp}
Goto onSelChange.end
onSelChange.end:
Pop $0
FunctionEnd
2004-06-29 07:14:39 +00:00
!else
!ifdef GTK1_DIR | GTK2_DIR
2004-08-26 22:48:29 +00:00
; Disable FileExtension if Ethereal isn't selected
2004-06-10 10:12:30 +00:00
Function .onSelChange
Push $0
2004-06-29 07:14:39 +00:00
!ifdef GTK1_DIR
2004-06-10 10:12:30 +00:00
SectionGetFlags ${SecEtherealGTK1} $0
2004-06-29 07:14:39 +00:00
IntOp $0 $0 & 1
2004-06-10 10:12:30 +00:00
IntCmp $0 0 onSelChange.unselect
2004-06-29 07:14:39 +00:00
SectionGetFlags ${SecFileExtensions} $0
IntOp $0 $0 & 16
IntCmp $0 16 onSelChange.unreadonly
2004-06-10 10:12:30 +00:00
Goto onSelChange.end
2004-06-29 07:14:39 +00:00
!else
2004-06-10 10:12:30 +00:00
SectionGetFlags ${SecEtherealGTK2} $0
2004-06-29 07:14:39 +00:00
IntOp $0 $0 & 1
2004-06-10 10:12:30 +00:00
IntCmp $0 0 onSelChange.unselect
2004-06-29 07:14:39 +00:00
SectionGetFlags ${SecFileExtensions} $0
IntOp $0 $0 & 16
IntCmp $0 16 onSelChange.unreadonly
2004-06-10 10:12:30 +00:00
Goto onSelChange.end
!endif
onSelChange.unselect:
SectionGetFlags ${SecFileExtensions} $0
IntOp $0 $0 & 0xFFFFFFFE
2004-06-29 07:14:39 +00:00
IntOp $0 $0 | 0x10
2004-06-10 10:12:30 +00:00
SectionSetFlags ${SecFileExtensions} $0
2004-06-29 07:14:39 +00:00
Goto onSelChange.end
onSelChange.unreadonly:
SectionGetFlags ${SecFileExtensions} $0
IntOp $0 $0 & 0xFFFFFFEF
SectionSetFlags ${SecFileExtensions} $0
Goto onSelChange.end
2004-06-10 10:12:30 +00:00
onSelChange.end:
Pop $0
FunctionEnd
2004-06-29 07:14:39 +00:00
!endif
!endif
2005-02-03 02:35:20 +00:00
!include "GetWindowsVersion.nsh"
2005-07-23 20:34:43 +00:00
!include WinMessages.nsh
2005-02-03 02:35:20 +00:00
2005-02-08 02:34:15 +00:00
Var NPF_START ;declare variable for holding the value of a registry key
2005-07-23 20:34:43 +00:00
Var WINPCAP_VERSION ;declare variable for holding the value of a registry key
2005-02-03 02:35:20 +00:00
Function myShowCallback
2005-07-23 20:34:43 +00:00
; Uinstall old Ethereal first
; XXX - doesn't work, but kept here for further experiments
;ReadRegStr $ETHEREAL_UNINSTALL HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Ethereal" "UninstallString"
;IfErrors lbl_ethereal_notinstalled ;if RegKey is unavailable, WinPcap is not installed
;MessageBox MB_YESNO|MB_ICONQUESTION "Uninstall the old Ethereal version first (recommended)?"
; Hide the installer while uninstalling
;GetDlgItem $0 $HWNDPARENT 1
;FindWindow $0 "#32770" "" $HWNDPARENT
;MessageBox MB_OK "Window $0"
;ShowWindow $0 ${SW_HIDE}
;HideWindow
;ExecWait '$ETHEREAL_UNINSTALL' $0
;DetailPrint "WinPcap uninstaller returned $0"
;GetDlgItem $0 $HWNDPARENT 1
;ShowWindow $0 ${SW_SHOW}
;MessageBox MB_OK "Uninstalled"
;lbl_ethereal_notinstalled:
2005-02-08 02:34:15 +00:00
; Get the Windows version
Call GetWindowsVersion
Pop $R0 ; Windows Version
2005-02-03 02:35:20 +00:00
!ifdef GTK2_DIR
; Enable GTK-Wimp only for Windows 2000/XP/2003
; ...as Win9x/ME/NT known to have problems with it!
;DetailPrint 'Windows Version: $R0'
StrCmp $R0 '2000' lbl_select_wimp
StrCmp $R0 'XP' lbl_select_wimp
StrCmp $R0 '2003' lbl_select_wimp
DetailPrint "Windows $R0 doesn't support GTK-Wimp!"
Goto lbl_ignore_wimp
lbl_select_wimp:
!insertmacro SelectSection ${SecGTKWimp}
lbl_ignore_wimp:
!endif
2005-07-23 20:34:43 +00:00
2005-08-26 00:59:07 +00:00
2005-07-23 20:34:43 +00:00
; detect if WinPcap should be installed
2005-08-07 23:10:06 +00:00
WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 4" "Text" "Install WinPcap 3.1"
2005-07-23 20:34:43 +00:00
ReadRegStr $WINPCAP_VERSION HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\WinPcapInst" "DisplayName"
IfErrors 0 lbl_winpcap_installed ;if RegKey is available, WinPcap is already installed
WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 2" "Text" "WinPcap is currently not installed"
WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 2" "Flags" "DISABLED"
WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 5" "Text" "(Use Add/Remove Programs first to uninstall any undetected old WinPcap versions)"
Goto lbl_winpcap_done
lbl_winpcap_installed:
WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 2" "Text" "$WINPCAP_VERSION"
2005-07-26 17:58:17 +00:00
; WinPcap 2.x (including betas): the version string starts with "WinPcap 2."
2005-07-23 20:34:43 +00:00
StrCpy $1 "$WINPCAP_VERSION" 10
2005-07-26 17:58:17 +00:00
StrCmp $1 "WinPcap 2." lbl_winpcap_do_install
; WinPcap 3.0 (including betas): the version string starts with "WinPcap 3.0"
StrCpy $1 "$WINPCAP_VERSION" 11
StrCmp $1 "WinPcap 3.0" lbl_winpcap_do_install
; WinPcap 3.1 previous beta's; exact string match
StrCmp "$WINPCAP_VERSION" "WinPcap 3.1 beta" lbl_winpcap_do_install
StrCmp "$WINPCAP_VERSION" "WinPcap 3.1 beta2" lbl_winpcap_do_install
StrCmp "$WINPCAP_VERSION" "WinPcap 3.1 beta3" lbl_winpcap_do_install
2005-08-07 23:10:06 +00:00
StrCmp "$WINPCAP_VERSION" "WinPcap 3.1 beta4" lbl_winpcap_do_install
2005-07-26 17:58:17 +00:00
2005-09-09 21:04:19 +00:00
;lbl_winpcap_dont_install:
2005-07-26 17:58:17 +00:00
; seems to be the current or even a newer version, so don't install
WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 4" "State" "0"
WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 5" "Text" "If selected, the currently installed $WINPCAP_VERSION will be uninstalled first."
Goto lbl_winpcap_done
lbl_winpcap_do_install:
; seems to be an old version, install newer one
2005-07-23 20:34:43 +00:00
WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 4" "State" "1"
WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 5" "Text" "The currently installed $WINPCAP_VERSION will be uninstalled first."
lbl_winpcap_done:
2005-07-25 17:56:19 +00:00
; Disable NPF service setting for Win OT
2005-02-08 02:34:15 +00:00
StrCmp $R0 '95' lbl_npf_disable
StrCmp $R0 '98' lbl_npf_disable
StrCmp $R0 'ME' lbl_npf_disable
ReadRegDWORD $NPF_START HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Services\NPF" "Start"
2005-07-25 17:56:19 +00:00
; (Winpcap may not be installed already, so no regKey is no error here)
2005-07-23 20:34:43 +00:00
IfErrors lbl_npf_done ;RegKey not available, so do not set it
2005-07-25 17:56:19 +00:00
IntCmp $NPF_START 2 0 lbl_npf_done lbl_npf_done
2005-07-23 20:34:43 +00:00
WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 8" "State" "1"
Goto lbl_npf_done
2005-02-08 02:34:15 +00:00
;disable
lbl_npf_disable:
2005-07-23 20:34:43 +00:00
WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 8" "State" "0"
WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 8" "Flags" "DISABLED"
WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 9" "Flags" "DISABLED"
lbl_npf_done:
2005-07-25 17:56:19 +00:00
; if Ethereal was previously installed, unselect previously not installed icons etc.
; detect if Ethereal is already installed ->
ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Ethereal" "UninstallString"
IfErrors lbl_ethereal_notinstalled ;if RegKey is unavailable, Ethereal is not installed
; only select Start Menu Group, if previously installed
; (we use the "all users" start menu, so select it first)
SetShellVarContext all
IfFileExists "$SMPROGRAMS\Ethereal\Ethereal.lnk" lbl_have_startmenu
WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 2" "State" "0"
lbl_have_startmenu:
; only select Desktop Icon, if previously installed
IfFileExists "$DESKTOP\Ethereal.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\Ethereal.lnk" lbl_have_quicklaunchicon
WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 4" "State" "0"
lbl_have_quicklaunchicon:
lbl_ethereal_notinstalled:
2005-02-03 02:35:20 +00:00
FunctionEnd