U3 package update to:
authorGraeme Lunt <graeme.lunt@smhs.co.uk>
Sun, 28 Oct 2007 11:58:16 +0000 (11:58 -0000)
committerGraeme Lunt <graeme.lunt@smhs.co.uk>
Sun, 28 Oct 2007 11:58:16 +0000 (11:58 -0000)
a) include smi.dll if SMI_DIR is set
b) add a batch script to run the U3 wireshark configuration by simulating the U3 environment
c) include a test step in the build process to verify that the U3 package contains all the required files (tries to run "wireshark -D")
d) include the wireshark.bat in the U3 zip file.

This final step means that the U3 package can be unzipped on any drive and run using the wireshark.bat script. (Note this currently creates an unwanted cmd window.)

svn path=/trunk/; revision=23295

packaging/u3/win32/makefile.nmake
packaging/u3/win32/wireshark.bat [new file with mode: 0755]

index b64c4c8e5036935f380824089d09ba9b48e8ae87..bb9047564f49ca9f4736dfc1728194aaad4ef3e5 100644 (file)
@@ -62,6 +62,7 @@ device-dirs:
 
 data-dirs:
        if not exist $(DATA) $(MKDIR) $(DATA)
+       if not exist $(DATA)\"My Captures" $(MKDIR) $(DATA)\"My Captures"
 
 manifest-dirs:
        if not exist $(MANIFEST) $(MKDIR) $(MANIFEST)
@@ -71,7 +72,7 @@ user-guide.chm:
        nmake -f Makefile.nmake user-guide.chm
        cd ../u3/win32
 
-distribution: host-dirs device-dirs data-dirs manifest-dirs  manifest.u3i u3util.exe user-guide.chm
+distribution: host-dirs device-dirs data-dirs manifest-dirs  manifest.u3i u3util.exe user-guide.chm wireshark.bat
 # manifest
        $(COPY) manifest.u3i $(MANIFEST) $(COPY_FLAGS)
        $(COPY) $(TOPDIR)\image\wireshark.ico $(MANIFEST) $(COPY_FLAGS)
@@ -274,6 +275,9 @@ distribution: host-dirs device-dirs data-dirs manifest-dirs  manifest.u3i u3util
 !ifdef LUA_DIR
        $(COPY) $(LUA_DIR)\lib\dll\lua5.1.dll $(HOST) $(COPY_FLAGS)
 !endif
+!ifdef SMI_DIR
+       $(COPY) $(SMI_DIR)\lib\smi.dll $(HOST) $(COPY_FLAGS)
+!endif
 
 !IFDEF GTK2_DIR
        $(COPY) $(TOPDIR)\wireshark-gtk2.exe $(HOST) $(COPY_FLAGS)
@@ -325,8 +329,13 @@ distribution: host-dirs device-dirs data-dirs manifest-dirs  manifest.u3i u3util
        $(COPY) $(TOPDIR)\tshark.exe $(HOST) $(COPY_FLAGS)
        $(COPY) u3util.exe $(HOST) $(COPY_FLAGS)
 
-package:       distribution
-       zip -r wireshark-$(VERSION).u3p $(MANIFEST) $(DEVICE) $(DATA) $(HOST)
+test:          distribution
+       wireshark.bat -D
+
+package:       test
+       zip -r wireshark-$(VERSION).u3p $(MANIFEST) $(DEVICE) $(DATA) $(HOST) wireshark.bat
+
+
 
 u3util_LIBS= user32.lib shell32.lib
 
diff --git a/packaging/u3/win32/wireshark.bat b/packaging/u3/win32/wireshark.bat
new file mode 100755 (executable)
index 0000000..f93f53b
--- /dev/null
@@ -0,0 +1,44 @@
+:: wireshark.bat
+:: A batch script to run wireshark from the files that
+:: constitute the U3 package.
+:: Also used to test the U3 package build.
+::
+:: $Id$ 
+::
+:: Wireshark - Network traffic analyzer
+:: By Gerald Combs <gerald@wireshark.org>
+:: Copyright 1998 Gerald Combs
+:: This program is free software; you can redistribute it and/or
+:: modify it under the terms of the GNU General Public License
+:: as published by the Free Software Foundation; either version 2
+:: of the License, or (at your option) any later version.
+::
+:: This program is distributed in the hope that it will be useful,
+:: but WITHOUT ANY WARRANTY; without even the implied warranty of
+:: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+:: GNU General Public License for more details.
+::
+:: You should have received a copy of the GNU General Public License
+:: along with this program; if not, write to the Free Software
+:: Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+::
+
+@echo off
+SETLOCAL
+
+SET U3_DEVICE_SERIAL=0000060414068917
+SET U3_DEVICE_PATH=%~d0
+SET U3_DEVICE_DOCUMENT_PATH=%CD%\data
+
+SET U3_DEVICE_VENDOR="Wireshark Developers"
+SET U3_DEVICE_PRODUCT="Non-U3 Drive"
+SET U3_DEVICE_VENDOR_ID=0000
+
+SET U3_APP_DATA_PATH=%CD%\data
+SET U3_HOST_EXEC_PATH=%CD%\host
+SET U3_DEVICE_EXEC_PATH=%CD%\device
+
+SET U3_ENV_VERSION=1.0
+SET U3_ENV_LANGUAGE=1033
+
+%U3_HOST_EXEC_PATH%\wireshark.exe %*