aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2008-08-14 17:54:35 +0000
committerGerald Combs <gerald@wireshark.org>2008-08-14 17:54:35 +0000
commit837f0d9d53c58900b679be0b65c1f2432d2fb23c (patch)
tree8cb6dba3ca4aa961571bd0be9325834641f72366
parentf7e0b6490a6f2b56012aa98adc4c6ace5a126bb3 (diff)
SecFileExtensions was removed in 2005. Don't reference it. Fixes bug 2793.
Replicate the old SecFileExtensions behavior by disabling and unchecking the file extensions option when Wireshark is unselected. While we're at it, add a "PLATFORM" variable to config.nmake, and use it to set the library directory and installer filename and title. Add a couple of minor fixes. svn path=/trunk/; revision=26019
-rw-r--r--config.nmake6
-rw-r--r--packaging/nsis/Makefile.nmake11
-rw-r--r--packaging/nsis/wireshark.nsi35
3 files changed, 27 insertions, 25 deletions
diff --git a/config.nmake b/config.nmake
index 10ced07268..815e1e8e1b 100644
--- a/config.nmake
+++ b/config.nmake
@@ -3,7 +3,9 @@
# Some more informations about the settings in this file, can be found
# in the file README.win32 and the Developer's Guide (available online).
-
+##### Platform #####
+# Only "win32" is valid (for now).
+PLATFORM=win32
##### Versions #####
@@ -30,7 +32,7 @@ WTAP_VERSION_MICRO=1
# Base directory, where your libraries reside, which are needed to
# compile the sources. This setting is used only inside this file.
#
-WIRESHARK_LIBS=C:\wireshark-win32-libs
+WIRESHARK_LIBS=C:\wireshark-$(PLATFORM)-libs
#
# Base directory, where your programs reside.
diff --git a/packaging/nsis/Makefile.nmake b/packaging/nsis/Makefile.nmake
index 6c3233e1bb..6755c8142a 100644
--- a/packaging/nsis/Makefile.nmake
+++ b/packaging/nsis/Makefile.nmake
@@ -82,7 +82,7 @@ NSI=wireshark.nsi \
DELIVERABLES=$(EXE) $(DLL) $(DOC) $(DOC_dos) $(GPL) $(HELP) $(PLUGINS)
-all: NEWS.txt wireshark-setup-$(VERSION).exe
+all: NEWS.txt wireshark-$(PLATFORM)-$(VERSION).exe
NEWS.txt: ../../NEWS
$(UNIX2DOS) < ../../NEWS > NEWS.txt
@@ -92,8 +92,9 @@ user-guide.chm::
if exist ..\..\docbook\user-guide.chm xcopy ..\..\docbook\user-guide.chm . /Y /D
if exist $(WIRESHARK_LIBS)\user-guide\user-guide.chm xcopy $(WIRESHARK_LIBS)\user-guide\user-guide.chm . /Y /D
-wireshark-setup-$(VERSION).exe : user-guide.chm $(NSI) $(DELIVERABLES) Makefile.nmake
+wireshark-$(PLATFORM)-$(VERSION).exe : user-guide.chm $(NSI) $(DELIVERABLES) Makefile.nmake
$(MAKENSIS) \
+ /DPLATFORM=$(PLATFORM) \
/DMSVC_VARIANT=$(MSVC_VARIANT) \
!IFDEF MSVCR_DLL
/DMSVCR_DLL="$(MSVCR_DLL)" \
@@ -162,14 +163,12 @@ wireshark-setup-$(VERSION).exe : user-guide.chm $(NSI) $(DELIVERABLES) Makefile.
wireshark.nsi
clean:
- rm -f wireshark-setup-$(VERSION).exe
- rm -f wireshark-gtk2-setup-$(VERSION).exe
+ rm -f wireshark-$(PLATFORM)-$(VERSION).exe
rm -f NEWS.txt
rm -f user-guide.chm
distclean: clean
- rm -f wireshark-setup-*.exe
- rm -f wireshark-gtk2-setup-*.exe
+ rm -f wireshark-$(PLATFORM)-*.exe
maintainer-clean: distclean
diff --git a/packaging/nsis/wireshark.nsi b/packaging/nsis/wireshark.nsi
index b463db0d62..a32539bff5 100644
--- a/packaging/nsis/wireshark.nsi
+++ b/packaging/nsis/wireshark.nsi
@@ -19,18 +19,23 @@ InstType "un.All (remove all)"
!define SHCNF_IDLIST 0
; Used to add associations between file extensions and Wireshark
-!define WIRESHARK_ASSOC "wireshark-file"
+!define WIRESHARK_ASSOC "wireshark-capture-file"
; ============================================================================
; Header configuration
; ============================================================================
; The name of the installer
!define PROGRAM_NAME "Wireshark"
+!if ${PLATFORM} == "win32"
+!define BITS 32
+!else
+!define BITS 64
+!endif
-Name "${PROGRAM_NAME} ${VERSION}"
+Name "${PROGRAM_NAME} ${VERSION} (${BITS}-bit)"
; The file to write
-OutFile "wireshark-setup-${VERSION}.exe"
+OutFile "wireshark-${PLATFORM}-${VERSION}.exe"
; Icon of installer and uninstaller
Icon "..\..\image\wireshark.ico"
@@ -577,7 +582,7 @@ 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 file"
+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'
push $R0
@@ -1096,27 +1101,23 @@ SectionEnd
; Callback functions
; ============================================================================
!ifdef GTK_DIR
-; Disable FileExtension if Wireshark isn't selected
+; Disable File extensions if Wireshark isn't selected
Function .onSelChange
Push $0
SectionGetFlags ${SecWireshark} $0
IntOp $0 $0 & 1
IntCmp $0 0 onSelChange.unselect
- SectionGetFlags ${SecFileExtensions} $0
- IntOp $0 $0 & 16
- IntCmp $0 16 onSelChange.unreadonly
+ WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 6" "State" 1
+ WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 6" "Flags" ""
+ WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 7" "Flags" ""
Goto onSelChange.end
+
onSelChange.unselect:
- SectionGetFlags ${SecFileExtensions} $0
- IntOp $0 $0 & 0xFFFFFFFE
- IntOp $0 $0 | 0x10
- SectionSetFlags ${SecFileExtensions} $0
- Goto onSelChange.end
-onSelChange.unreadonly:
- SectionGetFlags ${SecFileExtensions} $0
- IntOp $0 $0 & 0xFFFFFFEF
- SectionSetFlags ${SecFileExtensions} $0
+ WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 6" "State" 0
+ WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 6" "Flags" "DISABLED"
+ WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 7" "Flags" "DISABLED"
Goto onSelChange.end
+
onSelChange.end:
Pop $0
FunctionEnd