Wireshark-dev: [Wireshark-dev] Adding install target to Makefile.nmake for plugins
From: "John Dill" <John.Dill@xxxxxxxxxxxxxxxxx>
Date: Wed, 13 Nov 2013 11:01:31 -0500
I added an install target for my protocol dissector plugin nmake file.  Simplifies the tedious step of copying it to the Wireshark/plugins folder during development and test.  Here's the snippets that I added.

---
INSTALL_ROOT=$(PROGRAMFILES)\Wireshark\plugins
WIRESHARK_VER=1.10.3
!IF EXIST($(INSTALL_ROOT)\$(WIRESHARK_VER))
INSTALL_DIR=$(INSTALL_ROOT)\$(WIRESHARK_VER)
!ENDIF

...

!IF EXIST($(INSTALL_ROOT))
!  IF EXIST($(INSTALL_DIR))
install:
	@echo "Copying $(PLUGIN_NAME).dll to $(INSTALL_DIR)"
	xcopy /dy $(PLUGIN_NAME).dll "$(INSTALL_DIR)"
!  ELSE
install:
	@echo "Copying $(PLUGIN_NAME).dll to $(INSTALL_ROOT)\$(WIRESHARK_VER)"
	@echo "ERROR: Wireshark version not found!  Check WIRESHARK_VER in Makefile.nmake"
!  ENDIF
!ELSE
install:
	@echo "ERROR: Wireshark not installed!"
!ENDIF
---

There is probably a smarter way to detect the version folder, but I didn't bother to go down that path.

Best regards,
John Dill

<<winmail.dat>>