+# generate and install Wireshark GTK1 in INSTALL1_DIR
+debug-gtk1: wireshark.exe install-files1
+
+# generate and install Wireshark GTK2 in INSTALL2_DIR
+debug-gtk2: wireshark-gtk2.exe install-files2
+
+# generate and install Wireshark GTK2 in INSTALL2_DIR
+debug-tshark: tshark.exe
+ set copycmd=/y
+ set INSTALL_DIR=$(INSTALL2_DIR)
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake install-common-files
+
+# generate and install Wireshark GTK2 in INSTALL2_DIR
+debug-dumpcap: dumpcap.exe
+
+
+# "install-deps" will copy all files needed to run Wwireshark/Tshark
+# to the INSTALL1_DIR/INSTALL2_DIR, so you can run/debug Wireshark/Tshark from there.
+
+install-deps: install-deps1 install-deps2 install-files1 install-files2
+
+# install Wireshark GTK2 and other generated files
+install-files1:
+!IFDEF GTK1_DIR
+ set copycmd=/y
+ set INSTALL_DIR=$(INSTALL1_DIR)
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake install-common-files
+ xcopy wireshark.exe $(INSTALL1_DIR) /d
+ if exist wireshark.exe.manifest xcopy wireshark.exe.manifest $(INSTALL1_DIR) /d
+ if exist wireshark.pdb xcopy wireshark.pdb $(INSTALL1_DIR) /d
+!ENDIF
+
+# install Wireshark GTK2 and other generated files
+install-files2:
+!IFDEF GTK2_DIR
+ set INSTALL_DIR=$(INSTALL2_DIR)
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake install-common-files
+ copy wireshark-gtk2.exe $(INSTALL2_DIR)\wireshark.exe
+ if exist wireshark-gtk2.exe.manifest copy wireshark-gtk2.exe.manifest $(INSTALL2_DIR)\wireshark.exe.manifest
+ if exist wireshark-gtk2.pdb copy wireshark-gtk2.pdb $(INSTALL2_DIR)\wireshark.pdb
+ if exist ".\docbook\user-guide.chm" xcopy ".\docbook\user-guide.chm" $(INSTALL2_DIR) /d
+!ENDIF
+
+install-common-files:
+ set copycmd=/y
+ if not exist $(INSTALL_DIR) mkdir $(INSTALL_DIR)
+!IFDEF ENABLE_LIBWIRESHARK
+ xcopy epan\libwireshark.dll $(INSTALL_DIR) /d
+!ENDIF
+ xcopy ".\wiretap\wiretap-$(WTAP_VERSION).dll" $(INSTALL_DIR) /d
+ if exist ".\wiretap\wiretap-$(WTAP_VERSION).dll.manifest" xcopy ".\wiretap\wiretap-$(WTAP_VERSION).dll.manifest" $(INSTALL_DIR) /d
+ if exist ".\wiretap\wiretap-$(WTAP_VERSION).pdb" xcopy ".\wiretap\wiretap-$(WTAP_VERSION).pdb" $(INSTALL_DIR) /d
+ xcopy ".\epan\libwireshark.dll" $(INSTALL_DIR) /d
+ if exist ".\epan\libwireshark.dll.manifest" xcopy ".\epan\libwireshark.dll.manifest" $(INSTALL_DIR) /d
+ if exist ".\epan\libwireshark.pdb" xcopy ".\epan\libwireshark.pdb" $(INSTALL_DIR) /d
+ if exist tshark.exe xcopy tshark.exe $(INSTALL_DIR) /d
+ if exist tshark.exe.manifest xcopy tshark.exe.manifest $(INSTALL_DIR) /d
+ if exist tshark.pdb xcopy tshark.pdb $(INSTALL_DIR) /d
+ if exist dumpcap.exe xcopy dumpcap.exe $(INSTALL_DIR) /d
+ if exist dumpcap.exe.manifest xcopy dumpcap.exe.manifest $(INSTALL_DIR) /d
+ if exist dumpcap.pdb xcopy dumpcap.pdb $(INSTALL_DIR) /d
+ if exist mergecap.exe xcopy mergecap.exe $(INSTALL_DIR) /d
+ if exist mergecap.exe.manifest xcopy mergecap.exe.manifest $(INSTALL_DIR) /d
+ if exist mergecap.pdb xcopy mergecap.pdb $(INSTALL_DIR) /d
+ if exist text2pcap.exe xcopy text2pcap.exe $(INSTALL_DIR) /d
+ if exist text2pcap.exe.manifest xcopy text2pcap.exe.manifest $(INSTALL_DIR) /d
+ if exist text2pcap.pdb xcopy text2pcap.pdb $(INSTALL_DIR) /d
+ if exist capinfos.exe xcopy capinfos.exe $(INSTALL_DIR) /d
+ if exist capinfos.exe.manifest xcopy capinfos.exe.manifest $(INSTALL_DIR) /d
+ if exist capinfos.pdb xcopy capinfos.pdb $(INSTALL_DIR) /d
+ if exist editcap.exe xcopy editcap.exe $(INSTALL_DIR) /d
+ if exist editcap.exe.manifest xcopy editcap.exe.manifest $(INSTALL_DIR) /d
+ if exist editcap.pdb xcopy editcap.pdb $(INSTALL_DIR) /d
+ xcopy ".\AUTHORS-SHORT" $(INSTALL_DIR) /d
+ xcopy ".\manuf" $(INSTALL_DIR) /d
+ xcopy ".\FAQ" $(INSTALL_DIR) /d
+ xcopy ".\README" $(INSTALL_DIR) /d
+ xcopy ".\README.win32" $(INSTALL_DIR) /d
+ xcopy ".\AUTHORS-SHORT" $(INSTALL_DIR) /d
+ xcopy ".\COPYING" $(INSTALL_DIR) /d
+ copy ".\NEWS" $(INSTALL_DIR)\NEWS.txt
+ xcopy ".\cfilters" $(INSTALL_DIR) /d
+ xcopy ".\colorfilters" $(INSTALL_DIR) /d
+ xcopy ".\dfilters" $(INSTALL_DIR) /d
+ xcopy doc\*.html $(INSTALL_DIR) /d
+!IFDEF ETHEREAL_EUG_DIR
+ xcopy $(ETHEREAL_EUG_DIR) $(INSTALL_DIR) /d
+!ENDIF
+ if not exist $(INSTALL_DIR)\help mkdir $(INSTALL_DIR)\help
+ xcopy ".\help\*.*" $(INSTALL_DIR)\help /d
+ if not exist $(INSTALL_DIR)\dtds mkdir $(INSTALL_DIR)\dtds
+ xcopy ".\dtds\*.*" $(INSTALL_DIR)\dtds /d
+ if not exist $(INSTALL_DIR)\asn1 mkdir $(INSTALL_DIR)\asn1
+ echo create empty asn1 default.tt file to prevent problems 2> $(INSTALL_DIR)\asn1\default.tt
+ if not exist $(INSTALL_DIR)\radius mkdir $(INSTALL_DIR)\radius
+ xcopy ".\radius\*.*" $(INSTALL_DIR)\radius /d
+ if not exist $(INSTALL_DIR)\diameter mkdir $(INSTALL_DIR)\diameter
+ xcopy ".\diameter\*.dtd" $(INSTALL_DIR)\diameter /d
+ xcopy ".\diameter\*.xml" $(INSTALL_DIR)\diameter /d
+ if not exist $(INSTALL_DIR)\plugins\$(VERSION) mkdir $(INSTALL_DIR)\plugins\$(VERSION)
+ xcopy ".\plugins\agentx\agentx.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
+ xcopy ".\plugins\artnet\artnet.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
+ xcopy ".\plugins\asn1\asn1.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
+ xcopy ".\plugins\ciscosm\ciscosm.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
+ xcopy ".\plugins\docsis\docsis.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
+ xcopy ".\plugins\enttec\enttec.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
+ xcopy ".\plugins\giop\coseventcomm.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
+ xcopy ".\plugins\giop\cosnaming.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
+ xcopy ".\plugins\giop\parlay.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
+ xcopy ".\plugins\giop\tango.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
+ xcopy ".\plugins\gryphon\gryphon.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
+ xcopy ".\plugins\h223\h223.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
+ xcopy ".\plugins\irda\irda.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
+ xcopy ".\plugins\lwres\lwres.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
+ xcopy ".\plugins\mate\mate.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
+ xcopy ".\plugins\megaco\megaco.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
+ xcopy ".\plugins\mgcp\mgcp.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
+ xcopy ".\plugins\opsi\opsi.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
+ xcopy ".\plugins\pcli\pcli.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
+ xcopy ".\plugins\profinet\profinet.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
+ xcopy ".\plugins\rlm\rlm.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
+ xcopy ".\plugins\rtnet\rtnet.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
+ xcopy ".\plugins\rudp\rudp.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
+ xcopy ".\plugins\sbus\sbus.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
+ xcopy ".\plugins\stats_tree\stats_tree.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
+ xcopy ".\plugins\v5ua\v5ua.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
+ if exist custom-install.bat custom-install $(INSTALL_DIR) $(VERSION)
+
+install-deps1: install-common-deps1
+!IFDEF GTK1_DIR
+ set copycmd=/y
+ xcopy $(GTK1_DIR)\lib\libgtk-0.dll $(INSTALL1_DIR) /d
+ xcopy $(GTK1_DIR)\lib\libgdk-0.dll $(INSTALL1_DIR) /d
+!ENDIF