aboutsummaryrefslogtreecommitdiffstats
path: root/packaging/u3
diff options
context:
space:
mode:
authorGraeme Lunt <graeme.lunt@smhs.co.uk>2006-08-26 17:55:21 +0000
committerGraeme Lunt <graeme.lunt@smhs.co.uk>2006-08-26 17:55:21 +0000
commit14be5e2bcc15c3c9d6717c12f395d820eb57c176 (patch)
treeace50f329a9117308f5f3124fd5eef6204f9f539 /packaging/u3
parenta5f6c6cdbf9ed54651285a0b3a8921c8889ff8e9 (diff)
U3 packaging, utility and Wireshark modifications that allows Wireshark to be run from a U3 USB device.
For more details see packaging/u3/win32/README.txt svn path=/trunk/; revision=19046
Diffstat (limited to 'packaging/u3')
-rw-r--r--packaging/u3/win32/README.txt26
-rw-r--r--packaging/u3/win32/makefile.nmake308
-rw-r--r--packaging/u3/win32/manifest.tmpl17
-rw-r--r--packaging/u3/win32/u3util.c292
4 files changed, 643 insertions, 0 deletions
diff --git a/packaging/u3/win32/README.txt b/packaging/u3/win32/README.txt
new file mode 100644
index 0000000000..f3de56b037
--- /dev/null
+++ b/packaging/u3/win32/README.txt
@@ -0,0 +1,26 @@
+$Id: README.txt 18191 2006-05-20 17:54:12Z gerald $
+
+U3 Packaging
+============
+
+This directory contains the scripts to build a U3 Pacakge (wirehsark.u3p) that can be loaded onto a U3 device. This will allow Wireshark to be run from any Windows machine the U3 device is plugged into, without having to install Wireshark directly. For more details about U3 devices, see http://www.u3.com/.
+
+The U3 package is basically a zip file with a manifest file (wireshark.u3i), a small utility to manage the shutdown of Wireshark when the device is removed, and the Wireshark application files. The package contains all the standard Wireshark components (e.g. tshark.exe), even though they cannot be directly accessed. However, with a suitable additional script (setting the U3 environment variables), the would meet the "wireshark-as-a-zip" wish.
+
+You will need the cygwin zip archive package to build the package itself. Once you have the package you can load the package using "Add Programs"/"Install from My Computer" from the U3 LaunchPad.
+
+A few minor changes have been made to Wireshark itself:
+1) Wireshark will write a <pid>.pid file while running. This allows the utility to close down Wireshark when the device is removed.
+2) filesystem.c has been changed to take advantage of the U3 "datafile_dir" and "persconffile_dir". Personal settings are then stored on the device.
+
+There is a [self-]certification process for U3 packages which could be undertaken if there is sufficient interest for this package format. Wireshark could then be placed on Software Central - http://software.u3.com/SoftwareCentral.aspx?skip=1.
+
+
+Known Issues:
+=============
+
+1) The U3 package does not include WinPcap - so that must be installed separately on the machine into which the U3 device is plugged into.
+2) The distribution of the files across the U3 host and U3 device needs to be verified for all protocols.
+3) The list of files should be derived from a common source (e.g. nsis/wireshark.nsi)
+4) Should there be a Wiki page? Yes - but where?
+5) Wireshark does not close down cleanly when a dialog is up.
diff --git a/packaging/u3/win32/makefile.nmake b/packaging/u3/win32/makefile.nmake
new file mode 100644
index 0000000000..4f423fa1d7
--- /dev/null
+++ b/packaging/u3/win32/makefile.nmake
@@ -0,0 +1,308 @@
+#
+# $Id: Makefile.nmake 18526 2006-06-21 06:31:06Z jake $
+#
+
+include ../../../config.nmake
+include <win32.mak>
+
+CC = cl
+LINK = link
+
+LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 $(LOCAL_LDFLAGS)
+
+DEVICE = device
+HOST = host
+MANIFEST= manifest
+DATA = data
+
+TOPDIR = ..\..\..
+COPY = xcopy
+MKDIR = mkdir
+COPY_FLAGS = /d /y
+
+all: package
+
+manifest.u3i: manifest.tmpl $(TOPDIR)\config.nmake
+ sed -e 's/$$(VERSION)/$(VERSION)/g' < manifest.tmpl > manifest.u3i
+
+$(HOST):
+ $(MKDIR) $(HOST)
+ $(MKDIR) $(HOST)\etc
+ $(MKDIR) $(HOST)\etc\gtk-2.0
+ $(MKDIR) $(HOST)\etc\pango
+ $(MKDIR) $(HOST)\lib
+ $(MKDIR) $(HOST)\lib\gtk-2.0
+ $(MKDIR) $(HOST)\lib\gtk-2.0\$(GTK2_LIB_DIR)
+ $(MKDIR) $(HOST)\lib\gtk-2.0\$(GTK2_LIB_DIR)\loaders
+ $(MKDIR) $(HOST)\lib\gtk-2.0\$(GTK2_LIB_DIR)\immodules
+ $(MKDIR) $(HOST)\lib\pango
+ $(MKDIR) $(HOST)\lib\pango\$(PANGO_LIB_DIR)
+ $(MKDIR) $(HOST)\lib\pango\$(PANGO_LIB_DIR)\modules
+
+$(DEVICE):
+ $(MKDIR) $(DEVICE)
+ $(MKDIR) $(DEVICE)\plugins
+ $(MKDIR) $(DEVICE)\plugins\$(VERSION)
+ $(MKDIR) $(DEVICE)\help
+ $(MKDIR) $(DEVICE)\share
+ $(MKDIR) $(DEVICE)\share\themes
+ $(MKDIR) $(DEVICE)\share\themes\Default
+ $(MKDIR) $(DEVICE)\share\themes\Default\gtk-2.0
+ $(MKDIR) $(DEVICE)\snmp
+ $(MKDIR) $(DEVICE)\snmp\mibs
+ $(MKDIR) $(DEVICE)\diameter
+ $(MKDIR) $(DEVICE)\dtds
+ $(MKDIR) $(DEVICE)\radius
+
+$(DATA):
+ $(MKDIR) $(DATA)
+
+$(MANIFEST):
+ $(MKDIR) $(MANIFEST)
+
+distribution: $(HOST) $(DEVICE) $(DATA) $(MANIFEST) manifest.u3i u3util.exe
+# manifest
+ $(COPY) manifest.u3i $(MANIFEST) $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\image\wireshark.ico $(MANIFEST) $(COPY_FLAGS)
+# device
+#
+# these files stay on the U3 device and should not cause Wireshark to become unstable
+# if they are missing (e.g. U3 device removed)
+#
+ $(COPY) $(TOPDIR)\AUTHORS-SHORT $(DEVICE) $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\AUTHORS-SHORT-FORMAT $(DEVICE) $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\COPYING $(DEVICE) $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\FAQ $(DEVICE) $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\README $(DEVICE) $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\doc\capinfos.html $(DEVICE) $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\diameter\chargecontrol.xml $(DEVICE)\diameter $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\diameter\dictionary.dtd $(DEVICE)\diameter $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\diameter\dictionary.xml $(DEVICE)\diameter $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\diameter\imscxdx.xml $(DEVICE)\diameter $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\diameter\mobileipv4.xml $(DEVICE)\diameter $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\diameter\nasreq.xml $(DEVICE)\diameter $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\diameter\sunping.xml $(DEVICE)\diameter $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\diameter\TGPPSh.xml $(DEVICE)\diameter $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\dtds\dc.dtd $(DEVICE)\dtds $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\dtds\itunes.dtd $(DEVICE)\dtds $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\dtds\pocsettings.dtd $(DEVICE)\dtds $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\dtds\presence.dtd $(DEVICE)\dtds $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\dtds\reginfo.dtd $(DEVICE)\dtds $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\dtds\rss.dtd $(DEVICE)\dtds $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\dtds\smil.dtd $(DEVICE)\dtds $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\dtds\xcap-caps.dtd $(DEVICE)\dtds $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\dtds\watcherinfo.dtd $(DEVICE)\dtds $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\doc\dumpcap.html $(DEVICE) $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\doc\editcap.html $(DEVICE) $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\help\toc $(DEVICE)\help $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\help\overview.txt $(DEVICE)\help $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\help\getting_started.txt $(DEVICE)\help $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\help\capturing.txt $(DEVICE)\help $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\help\capture_filters.txt $(DEVICE)\help $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\help\display_filters.txt $(DEVICE)\help $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\help\faq.txt $(DEVICE)\help $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\manuf $(DEVICE) $(COPY_FLAGS)
+!IFDEF PCRE_DIR
+ $(COPY) $(PCRE_DIR)\man\cat3\pcrepattern.3.txt $(DEVICE) $(COPY_FLAGS)
+!ENDIF
+ $(COPY) $(TOPDIR)\doc\mergecap.html $(DEVICE) $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\plugins\acn\acn.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\plugins\agentx\agentx.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\plugins\artnet\artnet.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\plugins\asn1\asn1.dll $(DEVICE)\plugins\$(VERSION)$(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\plugins\ciscosm\ciscosm.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\plugins\docsis\docsis.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\plugins\enttec\enttec.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\plugins\giop\coseventcomm.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\plugins\giop\cosnaming.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\plugins\giop\parlay.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\plugins\giop\tango.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\plugins\gryphon\gryphon.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\plugins\h223\h223.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\plugins\irda\irda.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\plugins\lwres\lwres.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\plugins\megaco\megaco.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\plugins\mgcp\mgcp.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\plugins\opsi\opsi.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\plugins\pcli\pcli.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\plugins\profinet\profinet.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\plugins\rdm\rdm.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\plugins\rlm\rlm.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\plugins\rtnet\rtnet.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\plugins\rudp\rudp.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\plugins\sbus\sbus.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\plugins\v5ua\v5ua.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\plugins\stats_tree\stats_tree.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\plugins\mate\mate.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
+!IFDEF LUA_DIR
+ $(COPY) $(TOPDIR)\plugins\lua\lua.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
+!ENDIF
+ $(COPY) $(TOPDIR)\radius\dictionary $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.3com $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.3gpp $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.3gpp2 $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.acc $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.alcatel $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.alteon $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.altiga $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.aptis $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.ascend $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.bay $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.bintec $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.bristol $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.cablelabs $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.cabletron $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.cisco $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.cisco.bbsm $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.cisco.vpn3000 $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.cisco.vpn5000 $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.colubris $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.columbia_university $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.compat $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.cosine $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.ericsson $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.erx $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.extreme $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.foundry $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.freeradius $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.gandalf $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.garderos $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.gemtek $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.itk $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.juniper $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.karlnet $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.livingston $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.localweb $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.merit $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.microsoft $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.mikrotik $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.navini $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.netscreen $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.nokia $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.nomadix $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.propel $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.quintum $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.redback $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.redcreek $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.shasta $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.shiva $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.sonicwall $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.springtide $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.t_systems_nova $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.telebit $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.trapeze $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.tunnel $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.unisphere $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.unix $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.usr $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.valemount $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.versanet $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.wispr $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\radius\dictionary.xedia $(DEVICE)\radius $(COPY_FLAGS)
+ $(COPY) $(GTK_THEME_DIR)\gtkrc $(DEVICE)\share\themes\Default\gtk-2.0 $(COPY_FLAGS)
+ $(COPY) $(NET_SNMP_DIR)\mibs\*.txt $(DEVICE)\snmp\mibs $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\doc\text2pcap.html $(DEVICE) $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\doc\tshark.html $(DEVICE) $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\doc\wireshark.html $(DEVICE) $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\doc\wireshark-filter.html $(DEVICE) $(COPY_FLAGS)
+!IFDEF LUA_DIR
+ $(COPY) $(TOPDIR)\plugins\lua\init.lua $(DEVICE) $(COPY_FLAGS)
+!ENDIF
+# host
+#
+# these files are copy onto the U3 host and are required to make Wireshark stable
+#
+ $(COPY) $(TOPDIR)\wiretap\wiretap-$(WTAP_VERSION).dll $(HOST) $(COPY_FLAGS)
+!IFDEF ENABLE_LIBWIRESHARK
+ $(COPY) $(TOPDIR)\epan\libwireshark.dll $(HOST) $(COPY_FLAGS)
+!ENDIF
+ $(COPY) $(GLIB_DIR)\bin\libglib-2.0-0.dll $(HOST) $(COPY_FLAGS)
+ $(COPY) $(GLIB_DIR)\bin\libgmodule-2.0-0.dll $(HOST) $(COPY_FLAGS)
+ $(COPY) $(GLIB_DIR)\bin\libgobject-2.0-0.dll $(HOST) $(COPY_FLAGS)
+ $(COPY) $(ICONV_DIR)\bin\iconv.dll $(HOST) $(COPY_FLAGS)
+ $(COPY) $(GETTEXT_DIR)\bin\intl.dll $(HOST) $(COPY_FLAGS)
+!ifdef ZLIB_DIR
+ $(COPY) $(ZLIB_DIR)\zlib1.dll $(HOST) $(COPY_FLAGS)
+!endif
+!IFDEF ADNS_DIR
+ $(COPY) $(ADNS_DIR)\adns_win32\LIB\adns_dll.dll $(HOST) $(COPY_FLAGS)
+!ENDIF
+!IFDEF PCRE_DIR
+ $(COPY) $(PCRE_DIR)\bin\pcre.dll $(HOST) $(COPY_FLAGS)
+!ENDIF
+!ifdef KFW_DIR
+ $(COPY) $(KFW_DIR)\bin\comerr32.dll $(HOST) $(COPY_FLAGS)
+ $(COPY) $(KFW_DIR)\bin\krb5_32.dll $(HOST) $(COPY_FLAGS)
+!endif
+!ifdef GNUTLS_DIR
+ $(COPY) $(GNUTLS_DIR)\bin\libgcrypt-11.dll $(HOST) $(COPY_FLAGS)
+ $(COPY) $(GNUTLS_DIR)\bin\libgnutls-14.dll $(HOST) $(COPY_FLAGS)
+ $(COPY) $(GNUTLS_DIR)\bin\libgnutls-extra-14.dll $(HOST) $(COPY_FLAGS)
+ $(COPY) $(GNUTLS_DIR)\bin\libgnutls-openssl-14.dll $(HOST) $(COPY_FLAGS)
+ $(COPY) $(GNUTLS_DIR)\bin\libgpg-error-0.dll $(HOST) $(COPY_FLAGS)
+ $(COPY) $(GNUTLS_DIR)\bin\libtasn1-3.dll $(HOST) $(COPY_FLAGS)
+!endif
+!IFDEF GTK2_DIR
+ $(COPY) $(TOPDIR)\wireshark-gtk2.exe $(HOST) $(COPY_FLAGS)
+# can't get /i to work with $(COPY) above to do the rename there
+ mv $(HOST)\wireshark-gtk2.exe $(HOST)\wireshark.exe
+ $(COPY) $(GTK2_DIR)\bin\libgdk-win32-2.0-0.dll $(HOST) $(COPY_FLAGS)
+ $(COPY) $(GTK2_DIR)\bin\libgdk_pixbuf-2.0-0.dll $(HOST) $(COPY_FLAGS)
+ $(COPY) $(GTK2_DIR)\bin\libgtk-win32-2.0-0.dll $(HOST) $(COPY_FLAGS)
+ $(COPY) $(GTK2_DIR)\bin\libatk-1.0-0.dll $(HOST) $(COPY_FLAGS)
+ $(COPY) $(GTK2_DIR)\bin\libpango-1.0-0.dll $(HOST) $(COPY_FLAGS)
+ $(COPY) $(GTK2_DIR)\bin\libpangowin32-1.0-0.dll $(HOST) $(COPY_FLAGS)
+!IFDEF NEED_CAIRO_DLL
+ $(COPY) $(GTK2_DIR)\bin\libcairo-2.dll $(HOST) $(COPY_FLAGS)
+ $(COPY) $(GTK2_DIR)\bin\libpangocairo-1.0-0.dll $(HOST) $(COPY_FLAGS)
+!ENDIF
+!IFDEF NEED_LIBPNG_DLL
+ $(COPY) $(GTK2_DIR)\bin\libpng13.dll $(HOST) $(COPY_FLAGS)
+!ENDIF
+ $(COPY) $(GTK2_DIR)\etc\gtk-2.0\*.* $(HOST)\etc\gtk-2.0 $(COPY_FLAGS)
+ $(COPY) $(GTK2_DIR)\etc\pango\pango.* $(HOST)\etc\pango $(COPY_FLAGS)
+ $(COPY) $(GTK2_DIR)\lib\gtk-2.0\$(GTK2_LIB_DIR)\loaders\libpixbufloader-*.dll $(HOST)\lib\gtk-2.0\$(GTK2_LIB_DIR)\loaders
+ $(COPY) $(GTK2_DIR)\lib\gtk-2.0\$(GTK2_LIB_DIR)\immodules\im-*.dll $(HOST)\lib\gtk-2.0\$(GTK2_LIB_DIR)\immodules
+ $(COPY) $(GTK2_DIR)\lib\pango\$(PANGO_LIB_DIR)\modules\pango-*.dll $(HOST)\lib\pango\$(PANGO_LIB_DIR)\modules
+
+!IFDEF GTK_WIMP_DIR
+ $(COPY) $(GTK_WIMP_DIR)\libwimp.dll $(HOST) $(COPY_FLAGS)
+ $(COPY) $(GTK_THEME_DIR)\gtkrc $(HOST)\etc\gtk-2.0 $(COPY_FLAGS)
+!ENDIF
+!ELSE
+!IFDEF GTK1_DIR
+ $(COPY) $(TOPDIR)\wireshark.exe $(HOST) $(COPY_FLAGS)
+ $(COPY) $(GTK1_DIR)\lib\libgtk-0.dll $(HOST) $(COPY_FLAGS)
+ $(COPY) $(GTK1_DIR)\lib\libgdk-0.dll $(HOST) $(COPY_FLAGS)
+!ENDIF
+!ENDIF
+ $(COPY) $(TOPDIR)\capinfos.exe $(HOST) $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\dumpcap.exe $(HOST) $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\editcap.exe $(HOST) $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\mergecap.exe $(HOST) $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\text2pcap.exe $(HOST) $(COPY_FLAGS)
+ $(COPY) $(TOPDIR)\tshark.exe $(HOST) $(COPY_FLAGS)
+ $(COPY) u3util.exe $(HOST) $(COPY_FLAGS)
+
+package: distribution
+ zip -r wireshark.u3p $(MANIFEST) $(DEVICE) $(DATA) $(HOST)
+
+u3util_LIBS= user32.lib kernel32.lib
+
+u3util.exe: u3util.obj
+ @echo Linking $@
+ $(LINK) /OUT:u3util.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console u3util.obj $(u3util_LIBS)
+
+clean:
+ rm -rf manifest.u3i
+ rm -rf $(HOST)
+ rm -rf $(DEVICE)
+ rm -rf $(DATA)
+ rm -rf $(MANIFEST)
+ rm -rf u3util.{exe,obj}
+ rm -rf wireshark.u3p
+ rm -rf *~
+
+distclean: clean
+
+maintainer-clean: distclean
diff --git a/packaging/u3/win32/manifest.tmpl b/packaging/u3/win32/manifest.tmpl
new file mode 100644
index 0000000000..3a7a45d78a
--- /dev/null
+++ b/packaging/u3/win32/manifest.tmpl
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<u3manifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="C:\ethereal\packaging\u3\U3_manifest_1003.xsd" version="1.0">
+ <application uuid="11b47440-1fa7-11db-9ce2-0002a5d5c51b" version="$(VERSION)">
+ <icon>wireshark.ico</icon>
+ <name>Wireshark</name>
+ <vendor url="http://www.wireshark.org/">The Wireshark Developer Community</vendor>
+ <description>Wireshark is one of the world's foremost network protocol analyzers, and is the standard in many parts of the industry.</description>
+ <options>
+ <minFreeSpace>60</minFreeSpace>
+ </options>
+ </application>
+ <actions>
+ <appStart cmd="%U3_HOST_EXEC_PATH%\wireshark.exe"/>
+ <appStop cmd="%U3_HOST_EXEC_PATH%\u3util.exe">appStop</appStop>
+ <hostCleanUp cmd="%U3_HOST_EXEC_PATH%\u3util.exe">hostCleanUp</hostCleanUp>
+ </actions>
+</u3manifest>
diff --git a/packaging/u3/win32/u3util.c b/packaging/u3/win32/u3util.c
new file mode 100644
index 0000000000..388180a421
--- /dev/null
+++ b/packaging/u3/win32/u3util.c
@@ -0,0 +1,292 @@
+/* u3util.c
+ * Utility routines for U3 device support
+ *
+ * $Id: oid_resolv.c 18197 2006-05-21 05:12:17Z sahlberg $
+ *
+ * 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.
+ */
+
+/* Adapted from Microsoft Knowledge Base Article 178893
+ *
+ * http://support.microsoft.com/?kbid=178893
+ *
+ * and the U3 Answer 106
+ *
+ * https://u3.custhelp.com/cgi-bin/u3/php/enduser/std_adp.php?p_faqid=106
+ *
+ * Indentation logic: 2-space
+ */
+
+#include <windows.h>
+
+#define TA_FAILED 0
+#define TA_SUCCESS_CLEAN 1
+#define TA_SUCCESS_KILL 2
+#define TA_SUCCESS_16 3
+
+DWORD TerminateApp( DWORD dwPID, DWORD dwTimeout ) ;
+DWORD Terminate16App( DWORD dwPID, DWORD dwThread, WORD w16Task, DWORD dwTimeout );
+
+#include <vdmdbg.h>
+
+typedef struct
+{
+ DWORD dwID ;
+ DWORD dwThread ;
+} TERMINFO ;
+
+/* Declare Callback Enum Functions. */
+BOOL CALLBACK TerminateAppEnum( HWND hwnd, LPARAM lParam ) ;
+BOOL CALLBACK Terminate16AppEnum( HWND hwnd, LPARAM lParam ) ;
+
+/*----------------------------------------------------------------
+ DWORD TerminateApp( DWORD dwPID, DWORD dwTimeout )
+
+ Purpose:
+ Shut down a 32-Bit Process (or 16-bit process under Windows 95)
+
+ Parameters:
+ dwPID
+ Process ID of the process to shut down.
+
+ dwTimeout
+ Wait time in milliseconds before shutting down the process.
+
+ Return Value:
+ TA_FAILED - If the shutdown failed.
+ TA_SUCCESS_CLEAN - If the process was shutdown using WM_CLOSE.
+ TA_SUCCESS_KILL - if the process was shut down with
+ TerminateProcess().
+ NOTE: See header for these defines.
+ ----------------------------------------------------------------*/
+
+DWORD TerminateApp( DWORD dwPID, DWORD dwTimeout )
+{
+ HANDLE hProc ;
+ DWORD dwRet ;
+
+ // If we can't open the process with PROCESS_TERMINATE rights,
+ // then we give up immediately.
+ hProc = OpenProcess(SYNCHRONIZE|PROCESS_TERMINATE, FALSE, dwPID);
+
+ if(hProc == NULL){
+ return TA_FAILED;
+ }
+
+ if(dwTimeout) {
+ /* we are prepared to wait */
+
+ /* TerminateAppEnum() posts WM_CLOSE to all windows whose PID */
+ /* matches your process's. */
+ EnumWindows((WNDENUMPROC)TerminateAppEnum, (LPARAM) dwPID) ;
+
+ /* Wait on the handle. If it signals, great. If it times out, */
+ /* then you kill it. */
+ if(WaitForSingleObject(hProc, dwTimeout)!=WAIT_OBJECT_0)
+ dwRet=(TerminateProcess(hProc,0)?TA_SUCCESS_KILL:TA_FAILED);
+ else
+ dwRet = TA_SUCCESS_CLEAN ;
+ } else {
+ /* we immediately kill the proces */
+ dwRet=(TerminateProcess(hProc,0)?TA_SUCCESS_KILL:TA_FAILED);
+ }
+
+ CloseHandle(hProc) ;
+
+ return dwRet ;
+}
+
+/*----------------------------------------------------------------
+ DWORD Terminate16App( DWORD dwPID, DWORD dwThread,
+ WORD w16Task, DWORD dwTimeout )
+
+ Purpose:
+ Shut down a Win16 APP.
+
+ Parameters:
+ dwPID
+ Process ID of the NTVDM in which the 16-bit application is
+ running.
+
+ dwThread
+ Thread ID of the thread of execution for the 16-bit
+ application.
+
+ w16Task
+ 16-bit task handle for the application.
+
+ dwTimeout
+ Wait time in milliseconds before shutting down the task.
+
+ Return Value:
+ If successful, returns TA_SUCCESS_16
+ If unsuccessful, returns TA_FAILED.
+ NOTE: These values are defined in the header for this
+ function.
+
+ NOTE:
+ You can get the Win16 task and thread ID through the
+ VDMEnumTaskWOW() or the VDMEnumTaskWOWEx() functions.
+ ----------------------------------------------------------------*/
+
+DWORD Terminate16App( DWORD dwPID, DWORD dwThread, WORD w16Task, DWORD dwTimeout )
+{
+ HINSTANCE hInstLib ;
+ TERMINFO info ;
+
+ /* You will be calling the functions through explicit linking */
+ /* so that this code will be binary compatible across */
+ /* Win32 platforms. */
+ BOOL (WINAPI *lpfVDMTerminateTaskWOW)(DWORD dwProcessId, WORD htask) ;
+
+ hInstLib = LoadLibraryA( "VDMDBG.DLL" ) ;
+ if( hInstLib == NULL )
+ return TA_FAILED ;
+
+ // Get procedure addresses.
+ lpfVDMTerminateTaskWOW = (BOOL (WINAPI *)(DWORD, WORD ))
+ GetProcAddress( hInstLib, "VDMTerminateTaskWOW" ) ;
+
+ if( lpfVDMTerminateTaskWOW == NULL )
+ {
+ FreeLibrary( hInstLib ) ;
+ return TA_FAILED ;
+ }
+
+ /* Post a WM_CLOSE to all windows that match the ID and the */
+ /* thread. */
+ info.dwID = dwPID ;
+ info.dwThread = dwThread ;
+ EnumWindows((WNDENUMPROC)Terminate16AppEnum, (LPARAM) &info) ;
+
+ /* Wait. */
+ Sleep( dwTimeout ) ;
+
+ /* Then terminate. */
+ lpfVDMTerminateTaskWOW(dwPID, w16Task) ;
+
+ FreeLibrary( hInstLib ) ;
+ return TA_SUCCESS_16 ;
+}
+
+BOOL CALLBACK TerminateAppEnum( HWND hwnd, LPARAM lParam )
+{
+ DWORD dwID ;
+
+ GetWindowThreadProcessId(hwnd, &dwID) ;
+
+ if(dwID == (DWORD)lParam)
+ {
+ PostMessage(hwnd, WM_CLOSE, 0, 0) ;
+ }
+
+ return TRUE ;
+}
+
+BOOL CALLBACK Terminate16AppEnum( HWND hwnd, LPARAM lParam )
+{
+ DWORD dwID ;
+ DWORD dwThread ;
+ TERMINFO *termInfo ;
+
+ termInfo = (TERMINFO *)lParam ;
+
+ dwThread = GetWindowThreadProcessId(hwnd, &dwID) ;
+
+ if(dwID == termInfo->dwID && termInfo->dwThread == dwThread )
+ {
+ PostMessage(hwnd, WM_CLOSE, 0, 0) ;
+ }
+
+ return TRUE ;
+}
+
+/* This is the new function */
+
+void app_stop(DWORD timeOut)
+{
+ DWORD pid = 0;
+ HANDLE hFind = INVALID_HANDLE_VALUE;
+ WIN32_FIND_DATA find_file_data;
+ DWORD dwError;
+ char *u3_host_exec_path;
+ char dir_spec[MAX_PATH+1];
+ char file_name[MAX_PATH+1];
+
+ u3_host_exec_path = getenv("U3_HOST_EXEC_PATH");
+
+ strncpy(dir_spec, u3_host_exec_path, strlen(u3_host_exec_path) + 1);
+ strncat(dir_spec, "\\*.pid", 7);
+
+ hFind = FindFirstFile(dir_spec, &find_file_data);
+
+ if(hFind != INVALID_HANDLE_VALUE) {
+
+ do {
+
+ pid = (DWORD)atoi(find_file_data.cFileName);
+
+ if(pid)
+ TerminateApp(pid, timeOut);
+
+ strncpy(file_name, u3_host_exec_path, strlen(u3_host_exec_path) + 1);
+ strncat(file_name, "\\", 2);
+ strncat(file_name, find_file_data.cFileName, strlen(find_file_data.cFileName) + 1);
+
+ DeleteFile(TEXT(file_name));
+
+ } while(FindNextFile(hFind, &find_file_data) != 0);
+
+ FindClose(hFind);
+
+ }
+
+}
+
+void host_clean_up(void)
+{
+ /* the device has been removed -
+ just close the application as quickly as possible */
+
+ app_stop(0);
+}
+
+main(int argc, char *argv[])
+{
+ DWORD time_out = 0;
+ char *u3_is_device_available;
+
+ u3_is_device_available = getenv("U3_IS_DEVICE_AVAILABLE");
+
+ if(u3_is_device_available && !strncmp(u3_is_device_available, "true", 5))
+ /* the device is available - wait 5 seconds for user to respond to
+ any dialogs */
+ time_out = 5000; /* 5 seconds */
+
+ if(argc > 1) {
+
+ if(!strncmp(argv[1], "appStop", 8))
+ app_stop(time_out);
+ else if(!strncmp(argv[1], "hostCleanUp", 11))
+ host_clean_up();
+
+ }
+
+ exit(0);
+}