#
-# $Id: Makefile.nmake,v 1.34 2004/01/26 21:12:41 ulfl Exp $
+# $Id: Makefile.nmake,v 1.35 2004/02/03 20:03:40 ulfl Exp $
#
# NSIS is a free packager/installer/uninstaller program for Win32.
# It was originally written for the Winamp package, but various
include ../../config.nmake
-EXE=../../ethereal.exe ../../tethereal.exe ../../editcap.exe \
+!IFDEF GTK1
+DEST=ethereal
+GTK_DIR=$(GTK1_DIR)
+!ELSE
+DEST=ethereal2
+GTK_DIR=$(GTK2_DIR)
+!ENDIF
+
+EXE=../../$(DEST).exe ../../tethereal.exe ../../editcap.exe \
../../text2pcap.exe ../../mergecap.exe
DLL=../../wiretap/wiretap-$(WTAP_VERSION).dll
DOC=../../doc/ethereal.html \
DELIVERABLES=$(EXE) $(DLL) $(DOC) $(GPL) $(HELP) $(PLUGINS)
-
-!IFDEF GTK1
-DEST=ethereal
-GTK_DIR=$(GTK1_DIR)
-!ELSE
-DEST=ethereal2
-GTK_DIR=$(GTK2_DIR)
-!ENDIF
-
-
$(DEST)-setup-$(VERSION).exe : ethereal.nsi $(DELIVERABLES) Makefile.nmake
$(MAKENSIS) \
!IF "$(MAKENSIS_MODERN_UI)" != ""
clean:
rm -f ethereal-setup-$(VERSION).exe
+ rm -f ethereal2-setup-$(VERSION).exe
distclean: clean
;
; ethereal.nsi
;
-; $Id: ethereal.nsi,v 1.42 2004/02/03 01:06:21 ulfl Exp $
+; $Id: ethereal.nsi,v 1.43 2004/02/03 20:03:39 ulfl Exp $
!ifdef MAKENSIS_MODERN_UI
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"
+CreateShortCut "$SMPROGRAMS\Ethereal\Ethereal.lnk" "$INSTDIR\${DEST}.exe"
CreateShortCut "$SMPROGRAMS\Ethereal\Ethereal Manual.lnk" "$INSTDIR\ethereal.html"
CreateShortCut "$SMPROGRAMS\Ethereal\Display Filters Manual.lnk" "$INSTDIR\ethereal-filter.html"
CreateShortCut "$SMPROGRAMS\Ethereal\Uninstall.lnk" "$INSTDIR\uninstall.exe"
Section "Desktop Icon" SecDesktopIcon
;-------------------------------------------
-CreateShortCut "$DESKTOP\Ethereal.lnk" "$INSTDIR\Ethereal.exe"
+CreateShortCut "$DESKTOP\Ethereal.lnk" "$INSTDIR\${DEST}.exe"
SectionEnd
Section "Uninstall"
;-------------------------------------------
-DeleteRegKey HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Ethereal"
-DeleteRegKey HKEY_LOCAL_MACHINE SOFTWARE\Ethereal
-
;
; UnInstall for every user
;
SetShellVarContext all
+Delete "$INSTDIR\tethereal.exe"
+IfErrors 0 NoTetherealErrorMsg
+ MessageBox MB_OK "Note: Tethereal could not be removed! Probably in use!" IDOK 0 ;skipped if tethereal.exe removed
+ Abort "Note: tethereal.exe could not be removed! Probably in use! Abort unistall!"
+NoTetherealErrorMsg:
+
+Delete "$INSTDIR\${DEST}.exe"
+IfErrors 0 NoEtherealErrorMsg
+ MessageBox MB_OK "Note: Ethereal could not be removed! Probably in use!" IDOK 0 ;skipped if ethereal.exe removed
+ Abort "Note: ${DEST}.exe could not be removed! Probably in use! Abort uninstall!"
+NoEtherealErrorMsg:
+
+DeleteRegKey HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Ethereal"
+DeleteRegKey HKEY_LOCAL_MACHINE SOFTWARE\Ethereal
+
!ifdef GTK2
Delete "$INSTDIR\etc\gtk-2.0\*.*"
Delete "$INSTDIR\etc\pango\*.*"
RMDir "$INSTDIR\snmp"
RMDir "$INSTDIR"
+IfFileExists "$INSTDIR" 0 NoFinalErrorMsg
+ MessageBox MB_OK "Note: $INSTDIR could not be removed!" IDOK 0 ; skipped if file doesn't exist
+NoFinalErrorMsg:
+
+IfFileExists "$INSTDIR" 0 NoFinalErrorMsg
+ MessageBox MB_OK "Note: $INSTDIR could not be removed!" IDOK 0 ; skipped if file doesn't exist
+NoFinalErrorMsg:
+
SectionEnd