diff --git a/windows/Makefile b/windows/Makefile new file mode 100644 index 0000000..cd1ad7b --- /dev/null +++ b/windows/Makefile @@ -0,0 +1,262 @@ +COMMONOPTS=/W3 /MD /DNDEBUG /DWIN32 /D_WIN32_DCOM /D_WIN32_WINNT=0x500 /D_CRT_SECURE_NO_DEPRECATE /Zp8 /DNTDDI_VERSION=0x05000400 + +DLLNAME=nfc + +NFCOPTS= /I..\include \ + /I..\contrib\win32 \ + /I..\contrib\win32\stdint \ + /Iusb\include \ + /I..\libnfc \ + /I..\libnfc\buses \ + /DDRIVER_PN531_USB_ENABLED \ + /DDRIVER_PN533_USB_ENABLED \ + /DDRIVER_ACR122_ENABLED \ + /DDRIVER_ARYGON_ENABLED \ + /DDRIVER_PN532_UART_ENABLED + +NFCLIBOPTS=/Dnfc_EXPORTS /DPACKAGE_VERSION=\"1.3.4\" + +CFLAGS=$(COMMONOPTS) /WX $(NFCOPTS) +CXXFLAGS=$(COMMONOPTS) /EHa $(NFCOPTS) +CC=cl.exe /nologo +CXX=$(CC) +CC_OUT_EXE=/Fe +CC_OUT_DLL=/LD /Fe +CC_OUT_OBJ=/Fo + +LIBNFC_DLL=bin\$(DLLNAME).dll +NFC_LIST=bin\nfc-list.exe +NFC_ANTICOL=bin\nfc-anticol.exe +NFC_EMULATE=bin\nfc-emulate.exe +NFC_MFCLASSIC=bin\nfc-mfclassic.exe +NFC_MFULTRALIGHT=bin\nfc-mfultralight.exe +NFC_POLL=bin\nfc-poll.exe +NFC_RELAY=bin\nfc-relay.exe +NFCIP_INITIATOR=bin\nfcip-initiator.exe +NFCIP_TARGET=bin\nfcip-target.exe + +LIBNFC_OBJ= obj\nfc.obj \ + obj\pn531_usb.obj \ + obj\pn53x_usb.obj \ + obj\usbstub.obj \ + obj\uart.obj \ + obj\pn53x.obj \ + obj\mirror-subr.obj \ + obj\iso14443-subr.obj \ + obj\acr122.obj \ + obj\arygon.obj \ + obj\pn533_usb.obj \ + obj\pn532_uart.obj + +NFC_LIST_OBJ=obj\nfc-list.obj \ + obj\nfc-utils.obj + +NFC_POLL_OBJ=obj\nfc-poll.obj \ + obj\nfc-utils.obj + +NFC_RELAY_OBJ=obj\nfc-relay.obj \ + obj\nfc-utils.obj + +NFC_ANTICOL_OBJ=obj\nfc-anticol.obj \ + obj\nfc-utils.obj + +NFC_EMULATE_OBJ=obj\nfc-emulate.obj \ + obj\nfc-utils.obj + +NFCIP_INITIATOR_OBJ=obj\nfcip-initiator.obj \ + obj\nfc-utils.obj + +NFCIP_TARGET_OBJ=obj\nfcip-target.obj \ + obj\nfc-utils.obj + +NFC_MFCLASSIC_OBJ=obj\nfc-mfclassic.obj \ + obj\nfc-utils.obj + +NFC_MFULTRALIGHT_OBJ=obj\nfc-mfultralight.obj \ + obj\nfc-utils.obj + +all: obj bin $(LIBNFC_DLL) $(NFC_LIST) $(NFC_POLL) $(NFC_RELAY) $(NFCIP_INITIATOR) $(NFCIP_TARGET) $(NFC_ANTICOL) $(NFC_EMULATE) $(NFC_MFCLASSIC) $(NFC_MFULTRALIGHT) + +clean: + for %d in ( $(LIBNFC_DLL) $(NFC_LIST) $(NFC_POLL) $(NFC_RELAY) ) do if exist %d del %d + for %d in ( $(LIBNFC_OBJ) $(NFC_LIST_OBJ) ) do if exist %d del %d + for %d in ( obj\nfc-list.res obj\$(DLLNAME).res ) do if exist %d del %d + for %d in ( bin\$(DLLNAME).exp bin\$(DLLNAME).lib obj\$(DLLNAME).lib ) do if exist %d del %d + for %d in ( $(NFC_RELAY_OBJ) ) do if exist %d del %d + for %d in ( $(NFC_POLL_OBJ) obj\nfc-poll.res ) do if exist %d del %d + for %d in ( $(NFC_RELAY_OBJ) obj\nfc-relay.res ) do if exist %d del %d + for %d in ( $(NFCIP_INITIATOR) $(NFCIP_INITIATOR_OBJ) obj\nfcip-initiator.res ) do if exist %d del %d + for %d in ( $(NFCIP_TARGET) $(NFCIP_TARGET_OBJ) obj\nfcip-target.res ) do if exist %d del %d + for %d in ( $(NFC_MFCLASSIC) $(NFC_MFCLASSIC_OBJ) obj\nfc-mfclassic.res ) do if exist %d del %d + for %d in ( $(NFC_MFULTRALIGHT) $(NFC_MFULTRALIGHT_OBJ) obj\nfc-mfultralight.res ) do if exist %d del %d + for %d in ( $(NFC_EMULATE) $(NFC_EMULATE_OBJ) obj\nfc-emulate.res ) do if exist %d del %d + for %d in ( $(NFC_ANTICOL) $(NFC_ANTICOL_OBJ) obj\nfc-anticol.res ) do if exist %d del %d + if exist obj rmdir obj + if exist bin rmdir bin + if exist mm\out rmdir /s /q mm\out + +obj bin: + mkdir $@ + +obj\$(DLLNAME).lib: $(LIBNFC_OBJ) + if exist $@ del $@ + lib /out:$@ $(LIBNFC_OBJ) + +$(LIBNFC_DLL): obj\$(DLLNAME).lib win32\$(DLLNAME).def obj\$(DLLNAME).res + $(CC) $(CC_OUT_DLL)$@ \ + obj\$(DLLNAME).lib \ + obj\$(DLLNAME).res \ + /link \ + /DEF:win32\$(DLLNAME).def \ + winscard.lib + if exist $@.manifest mt.exe -manifest $@.manifest -outputresource:$@;#2 + if exist $@.manifest del $@.manifest + +$(NFC_LIST): $(NFC_LIST_OBJ) $(LIBNFC_DLL) bin\$(DLLNAME).lib obj\nfc-list.res + $(CC) $(CC_OUT_EXE)$@ $(NFC_LIST_OBJ) bin\$(DLLNAME).lib obj\nfc-list.res + if exist $@.manifest mt.exe -manifest $@.manifest -outputresource:$@;#1 + if exist $@.manifest del $@.manifest + +$(NFC_EMULATE): $(NFC_EMULATE_OBJ) $(LIBNFC_DLL) bin\$(DLLNAME).lib obj\nfc-emulate.res + $(CC) $(CC_OUT_EXE)$@ $(NFC_EMULATE_OBJ) bin\$(DLLNAME).lib obj\nfc-emulate.res + if exist $@.manifest mt.exe -manifest $@.manifest -outputresource:$@;#1 + if exist $@.manifest del $@.manifest + +$(NFC_POLL): $(NFC_POLL_OBJ) $(LIBNFC_DLL) bin\$(DLLNAME).lib obj\nfc-poll.res + $(CC) $(CC_OUT_EXE)$@ $(NFC_POLL_OBJ) bin\$(DLLNAME).lib obj\nfc-poll.res + if exist $@.manifest mt.exe -manifest $@.manifest -outputresource:$@;#1 + if exist $@.manifest del $@.manifest + +$(NFC_ANTICOL): $(NFC_ANTICOL_OBJ) $(LIBNFC_DLL) bin\$(DLLNAME).lib obj\nfc-anticol.res + $(CC) $(CC_OUT_EXE)$@ $(NFC_ANTICOL_OBJ) bin\$(DLLNAME).lib obj\nfc-anticol.res + if exist $@.manifest mt.exe -manifest $@.manifest -outputresource:$@;#1 + if exist $@.manifest del $@.manifest + +$(NFC_RELAY): $(NFC_RELAY_OBJ) $(LIBNFC_DLL) bin\$(DLLNAME).lib obj\nfc-relay.res + $(CC) $(CC_OUT_EXE)$@ $(NFC_RELAY_OBJ) bin\$(DLLNAME).lib obj\nfc-relay.res + if exist $@.manifest mt.exe -manifest $@.manifest -outputresource:$@;#1 + if exist $@.manifest del $@.manifest + +$(NFCIP_INITIATOR): $(NFCIP_INITIATOR_OBJ) $(LIBNFC_DLL) bin\$(DLLNAME).lib obj\nfcip-initiator.res + $(CC) $(CC_OUT_EXE)$@ $(NFCIP_INITIATOR_OBJ) bin\$(DLLNAME).lib obj\nfcip-initiator.res + if exist $@.manifest mt.exe -manifest $@.manifest -outputresource:$@;#1 + if exist $@.manifest del $@.manifest + +$(NFCIP_TARGET): $(NFCIP_TARGET_OBJ) $(LIBNFC_DLL) bin\$(DLLNAME).lib obj\nfcip-target.res + $(CC) $(CC_OUT_EXE)$@ $(NFCIP_TARGET_OBJ) bin\$(DLLNAME).lib obj\nfcip-target.res + if exist $@.manifest mt.exe -manifest $@.manifest -outputresource:$@;#1 + if exist $@.manifest del $@.manifest + +$(NFC_MFCLASSIC): $(NFC_MFCLASSIC_OBJ) $(LIBNFC_DLL) bin\$(DLLNAME).lib obj\nfc-mfclassic.res + $(CC) $(CC_OUT_EXE)$@ $(NFC_MFCLASSIC_OBJ) bin\$(DLLNAME).lib obj\nfc-mfclassic.res + if exist $@.manifest mt.exe -manifest $@.manifest -outputresource:$@;#1 + if exist $@.manifest del $@.manifest + +$(NFC_MFULTRALIGHT): $(NFC_MFULTRALIGHT_OBJ) $(LIBNFC_DLL) bin\$(DLLNAME).lib obj\nfc-mfultralight.res + $(CC) $(CC_OUT_EXE)$@ $(NFC_MFULTRALIGHT_OBJ) bin\$(DLLNAME).lib obj\nfc-mfultralight.res + if exist $@.manifest mt.exe -manifest $@.manifest -outputresource:$@;#1 + if exist $@.manifest del $@.manifest + +obj\nfc-relay.obj: ..\examples\nfc-relay.c + $(CC) /c $(CC_OUT_OBJ)$@ $(CFLAGS) ..\examples\nfc-relay.c + +obj\nfc-mfclassic.obj: ..\examples\nfc-mfclassic.c + $(CC) /c $(CC_OUT_OBJ)$@ $(CFLAGS) ..\examples\nfc-mfclassic.c + +obj\nfc-mfultralight.obj: ..\examples\nfc-mfultralight.c + $(CC) /c $(CC_OUT_OBJ)$@ $(CFLAGS) ..\examples\nfc-mfultralight.c + +obj\nfc-emulate.obj: ..\examples\nfc-emulate.c + $(CC) /c $(CC_OUT_OBJ)$@ $(CFLAGS) ..\examples\nfc-emulate.c + +obj\nfcip-initiator.obj: ..\examples\nfcip-initiator.c + $(CC) /c $(CC_OUT_OBJ)$@ $(CFLAGS) ..\examples\nfcip-initiator.c + +obj\nfcip-target.obj: ..\examples\nfcip-target.c + $(CC) /c $(CC_OUT_OBJ)$@ $(CFLAGS) ..\examples\nfcip-target.c + +obj\nfc-poll.obj: ..\examples\nfc-poll.c + $(CC) /c $(CC_OUT_OBJ)$@ $(CFLAGS) ..\examples\nfc-poll.c + +obj\nfc-anticol.obj: ..\examples\nfc-anticol.c + $(CC) /c $(CC_OUT_OBJ)$@ $(CFLAGS) ..\examples\nfc-anticol.c + +obj\nfc-list.obj: ..\examples\nfc-list.c + $(CC) /c $(CC_OUT_OBJ)$@ $(CFLAGS) ..\examples\nfc-list.c + +obj\nfc-utils.obj: ..\examples\nfc-utils.c + $(CC) /c $(CC_OUT_OBJ)$@ $(CFLAGS) ..\examples\nfc-utils.c + +obj\nfc.obj: ..\libnfc\nfc.c + $(CC) /c $(CC_OUT_OBJ)$@ $(NFCLIBOPTS) $(CFLAGS) ..\libnfc\nfc.c + +obj\iso14443-subr.obj: ..\libnfc\iso14443-subr.c + $(CC) /c $(CC_OUT_OBJ)$@ $(NFCLIBOPTS) $(CFLAGS) ..\libnfc\iso14443-subr.c + +obj\pn531_usb.obj: ..\libnfc\drivers\pn531_usb.c + $(CC) /c $(CC_OUT_OBJ)$@ $(NFCLIBOPTS) $(CFLAGS) ..\libnfc\drivers\pn531_usb.c + +obj\pn533_usb.obj: ..\libnfc\drivers\pn533_usb.c + $(CC) /c $(CC_OUT_OBJ)$@ $(NFCLIBOPTS) $(CFLAGS) ..\libnfc\drivers\pn533_usb.c + +obj\pn532_uart.obj: ..\libnfc\drivers\pn532_uart.c + $(CC) /c $(CC_OUT_OBJ)$@ $(NFCLIBOPTS) $(CFLAGS) ..\libnfc\drivers\pn532_uart.c + +obj\pn53x_usb.obj: ..\libnfc\drivers\pn53x_usb.c + $(CC) /c $(CC_OUT_OBJ)$@ $(NFCLIBOPTS) $(CFLAGS) ..\libnfc\drivers\pn53x_usb.c + +obj\acr122.obj: ..\libnfc\drivers\acr122.c + $(CC) /c $(CC_OUT_OBJ)$@ $(NFCLIBOPTS) $(CFLAGS) ..\libnfc\drivers\acr122.c + +obj\arygon.obj: ..\libnfc\drivers\arygon.c + $(CC) /c $(CC_OUT_OBJ)$@ $(NFCLIBOPTS) $(CFLAGS) ..\libnfc\drivers\arygon.c + +obj\pn53x.obj: ..\libnfc\chips\pn53x.c + $(CC) /c $(CC_OUT_OBJ)$@ $(NFCLIBOPTS) $(CFLAGS) ..\libnfc\chips\pn53x.c + +obj\uart.obj: ..\libnfc\buses\uart.c + $(CC) /c $(CC_OUT_OBJ)$@ $(NFCLIBOPTS) $(CFLAGS) ..\libnfc\buses\uart.c + +obj\usbstub.obj: usb\src\usbstub.cpp + $(CXX) /c $(CC_OUT_OBJ)$@ $(NFCLIBOPTS) $(CXXFLAGS) usb\src\usbstub.cpp + +obj\mirror-subr.obj: ..\libnfc\mirror-subr.c + $(CC) /c $(CC_OUT_OBJ)$@ $(NFCLIBOPTS) $(CFLAGS) ..\libnfc\mirror-subr.c + +obj\$(DLLNAME).res: win32\$(DLLNAME).rc + rc /r $(RCFLAGS) /fo$@ win32\$(DLLNAME).rc + +obj\nfc-list.res: win32\nfc-list.rc + rc /r $(RCFLAGS) /fo$@ win32\nfc-list.rc + +obj\nfc-poll.res: win32\nfc-poll.rc + rc /r $(RCFLAGS) /fo$@ win32\nfc-poll.rc + +obj\nfc-relay.res: win32\nfc-relay.rc + rc /r $(RCFLAGS) /fo$@ win32\nfc-relay.rc + +obj\nfcip-initiator.res: win32\nfcip-initiator.rc + rc /r $(RCFLAGS) /fo$@ win32\nfcip-initiator.rc + +obj\nfcip-target.res: win32\nfcip-target.rc + rc /r $(RCFLAGS) /fo$@ win32\nfcip-target.rc + +obj\nfc-anticol.res: win32\nfc-anticol.rc + rc /r $(RCFLAGS) /fo$@ win32\nfc-anticol.rc + +obj\nfc-emulate.res: win32\nfc-emulate.rc + rc /r $(RCFLAGS) /fo$@ win32\nfc-emulate.rc + +obj\nfc-mfclassic.res: win32\nfc-mfclassic.rc + rc /r $(RCFLAGS) /fo$@ win32\nfc-mfclassic.rc + +obj\nfc-mfultralight.res: win32\nfc-mfultralight.rc + rc /r $(RCFLAGS) /fo$@ win32\nfc-mfultralight.rc + +install: all + cd mm + call make.bat + cd .. + + + \ No newline at end of file diff --git a/windows/mm/libnfc.mm b/windows/mm/libnfc.mm new file mode 100644 index 0000000..6d388c4 --- /dev/null +++ b/windows/mm/libnfc.mm @@ -0,0 +1,54 @@ +;---------------------------------------------------------------------------- +; MODULE NAME: LIBNFC.MM +; +; $Author: USER "rogerb" $ +; $Revision: 1267 $ +; $Date: 02 Jun 2006 17:10:46 $ +; $Logfile: C:/DBAREIS/Projects.PVCS/Win32/MakeMsi/TryMe.mm.pvcs $ +; +; DESCRIPTION +; ~~~~~~~~~~~ +; This is a simple sample/test MSI. Takes about 30 seconds to build and +; validate on my AMD 3200. +; +; Any line within this file that begins with ";" can be ignored as its +; only a comment so there are only 3 important lines in this file: +; +; 1. #include "ME.MMH" +; 2. <$DirectoryTree Key="INSTALLDIR" ... +; 3. <$Files "TryMe.*" DestDir="INSTALLDIR"> +;---------------------------------------------------------------------------- + +; #define? COMPANY_PRODUCT_ICON ..\win32\libnfc.ico ;; override from company.mmh +#define? UISAMPLE_DIALOG_FILE_dlgbmp nfcleft.bmp ;; override uisample.mmh +#define? UISAMPLE_BLINE_TEXT www.libnfc.org +#define? COMPANY_WANT_TO_INSTALL_DOCUMENTATION N + +;--- Include MAKEMSI support (with my customisations and MSI branding) ------ +#define VER_FILENAME.VER libnfc.Ver ;;I only want one VER file for all samples! (this line not actually required in "tryme.mm") +#include "ME.MMH" + +;--- Want to debug (not common) --------------------------------------------- +;#debug on +;#Option DebugLevel=^NONE, +OpSys^ + + +;--- Define default location where file should install and add files -------- +<$DirectoryTree Key="INSTALLDIR" Dir="[ProgramFilesFolder]libnfc-1.3.4" CHANGE="\" PrimaryFolder="Y"> +<$DirectoryTree Key="INSTALLDIR2" Dir="[INSTALLDIR]bin" > +<$DirectoryTree Key="INSTALLDIR3" Dir="[INSTALLDIR]lib" > +<$DirectoryTree Key="INSTALLDIR4" Dir="[INSTALLDIR]include" > +<$DirectoryTree Key="INSTALLDIR5" Dir="[INSTALLDIR4]nfc" > +<$Files "..\bin\nfc-list.exe" DestDir="INSTALLDIR2" > +<$Files "..\bin\nfc-poll.exe" DestDir="INSTALLDIR2" > +<$Files "..\bin\nfc-relay.exe" DestDir="INSTALLDIR2" > +<$Files "..\bin\nfc-emulate.exe" DestDir="INSTALLDIR2" > +<$Files "..\bin\nfc-mfultralight.exe" DestDir="INSTALLDIR2" > +<$Files "..\bin\nfc-mfclassic.exe" DestDir="INSTALLDIR2" > +<$Files "..\bin\nfcip-initiator.exe" DestDir="INSTALLDIR2" > +<$Files "..\bin\nfcip-target.exe" DestDir="INSTALLDIR2" > +<$Files "..\bin\nfc.dll" DestDir="SystemFolder" > +<$Files "..\bin\nfc.lib" DestDir="INSTALLDIR3" > +<$Files "..\..\include\nfc\nfc.h" DestDir="INSTALLDIR5" > +<$Files "..\..\include\nfc\nfc-messages.h" DestDir="INSTALLDIR5" > +<$Files "..\..\include\nfc\nfc-types.h" DestDir="INSTALLDIR5" > diff --git a/windows/mm/libnfc.ver b/windows/mm/libnfc.ver new file mode 100644 index 0000000..7e05108 --- /dev/null +++ b/windows/mm/libnfc.ver @@ -0,0 +1,13 @@ +;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +; ProductName = libnfc +; DESCRIPTION = Public platform independent Near Field Communication (NFC) library +; Installed = WINDOWS_ALL +; Guid.UpgradeCode = {5880D072-659D-4038-894D-C85BF514B95A} +; MsiName = libnfc-1.3.4 +;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +;############################################################################ +VERSION : 1.3.4.0 +DATE : 4 May 2010 +CHANGES : Example Packaging + diff --git a/windows/mm/make.bat b/windows/mm/make.bat new file mode 100644 index 0000000..56d3b93 --- /dev/null +++ b/windows/mm/make.bat @@ -0,0 +1,15 @@ +set OLDPATH=%PATH% +set PATH=%PATH%;"c:\program files\makemsi" +rmdir /s /q out +call "%ProgramFiles%\MakeMSI\mm.cmd" "libnfc.mm" +if errorlevel 1 goto failed + +:success +echo success +goto doneall + +:failed +echo failed + +:doneall +set PATH=%OLDPATH% diff --git a/windows/mm/me.mmh b/windows/mm/me.mmh new file mode 100644 index 0000000..ea61d4a --- /dev/null +++ b/windows/mm/me.mmh @@ -0,0 +1,88 @@ +; Copyright 2009, Snapper Services Limited, New Zealand +; All rights reserved +; $Id: me.mmh 1224 2010-05-04 04:14:44Z roger.brown $ + +;---------------------------------------------------------------------------- +; +; MODULE NAME: ME.MMH +; +; $Author: USER "Dennis" $ +; $Revision: 1224 $ +; $Date: 27 Sep 2007 17:38:34 $ +; $Logfile: C:/DBAREIS/Projects.PVCS/Win32/MakeMsi/ME.mmh.pvcs $ +; +; Very simplistic example of a MAKEMSI customisation/branding file, see +; "DENNIS.MMH" for a more complex variation (please don't use it though...). +;---------------------------------------------------------------------------- + + + +;---------------------------------------------------------------------------- +;--- Set up some options specific to my requirements ------------------------ +;---------------------------------------------------------------------------- +#define? DEPT_ARP_URL_PUBLISHER http://www.MyUrl.com/See/ME.MMH/ +#define? DEPT_ARP_URL_TECHNICAL_SUPPORT http://www.MyUrl.com/See/ME.MMH/Support +#define? DEPT_NAME no department +#define? DEPT_ADDRESS New Zealand +#define? COMPANY_CONTACT_NAME <$DEPT_NAME> +#define? COMPANY_CONTACT_NAME_PHONE ;;No phone +#define? COMPANY_SUMMARY_SCHEMA 110 ;;Minimum v1.1 Installer + + + +;---------------------------------------------------------------------------- +;--- Override/set some standard defaults ------------------------------------ +;---------------------------------------------------------------------------- +#define? DBG_ALL Y ;;Add MAKEMSI debugging to "console file" +#define? DBG_SAY_LOCATION call Say2Logs <$DBG_INDENT> || ' ' || time() || ' ' ;;Adding time makes it a bit slower but useful for debugging slow builds... +#define? COMMONFRAMEWORK_ZIP_SOURCE_FOR_BACKUP N ;;No "insurance" until I bother to install "info zip"... +#define? DEFAULT_SERVICE_CONTROL_UNINSTALL_EVENTS ;;I think this option is safer than the MAKEMSI default +#define? DEFAULT_SERVICE_CONTROL_INSTALL_EVENTS ;;I think this option is better +#define? DEFAULT_FILE_WANT_FILEHASH Y ;;My box can generate MD5 hashes! +#define? COMPANY_PREPROCESS_LICENCE_FILE Y ;;Default is to preprocess licence files +#define? MAKEMSI_HTML_EXTENSION hta ;;Default extension (HTML Application - gets around WINXP SP2 issue) +#define? UISAMPLE_LEFTSIDE_TEXT_FONT_NAME Tahoma +#define? UISAMPLE_LEFTSIDE_TEXT_FONT_SIZE 8 +#define? UISAMPLE_LEFTSIDE_TEXT_FONT_COLOR &H000000 ;;Black +#( + #define? UISAMPLE_LEFTSIDE_TEXT +#) +#( + #define? @VALIDATE_TEXT_FOR_MISSINGDATA ;;Example only as now duplicates exact text as new default value + This column is not mentioned in the _Validation table. + Either add the validation data or use the "@validate" parameter + on the "row" command (or alter its default). +#) + + + +;---------------------------------------------------------------------------- +;--- Include MAKEMSI support ------------------------------------------------ +;---------------------------------------------------------------------------- +#include "DEPT.MMH" + + +;---------------------------------------------------------------------------- +;--- I want to compress any DLL based custom actions generated by MAKEMSI --- +;---------------------------------------------------------------------------- +<$GetFullBuildTimeFileName RcVar="@@FullUpxExeName" Macro="DENNIS_UPX.EXE" File="upx.exe" MustExist="N"> +#if [@@FullUpxExeName = ''] + ;--- If UPX.EXE doesn't exist report an error --------------------------- + ;#error "DLL not being compressed (UPX.EXE not found)" ;;This is also a sample, can't expect users to have "UPX.EXE"... + #info "DLL custom action code will not be compressed (UPX.EXE not found)" +#else + ;--- "UPX.EXE" was found ------------------------------------------------ + #( + ;--- Define the macro that MAKEMSI will use as required ------------- + #define+ DLLCA-C_COMPRESS_DLL_COMMAND_LINE ;;Need to OVERRIDE value (we couldn't do it earler or "GetFullBuildTimeFileName" wouldn't exist!) + + ;--- I expect "upx.exe" to be in the "PATH" environment variable ---- + "" ;;Full name of UPX.EXE (get from "http://upx.sourceforge.net/") + + ;--- I want highest compression ------------------------------------- + --best + + ;--- Backup the DLL as a debugging aid... --------------------------- + -k + #) +#endif diff --git a/windows/mm/nfcleft.bmp b/windows/mm/nfcleft.bmp new file mode 100644 index 0000000..038bb9a Binary files /dev/null and b/windows/mm/nfcleft.bmp differ diff --git a/windows/usb/include/usb.h b/windows/usb/include/usb.h new file mode 100644 index 0000000..b141c86 --- /dev/null +++ b/windows/usb/include/usb.h @@ -0,0 +1,408 @@ +/* + * from the libusb-win32 project + * + * Copyright (c) 2000-2003 Johannes Erdfelt + * + * This library is covered by the LGPL, read LICENSE for details. + * + */ + +/* + * $Id: usb.h 1220 2010-05-04 03:14:56Z roger.brown $ + */ + + +#ifndef __USB_H__ +#define __USB_H__ + +#include +#include + +/* + * 'interface' is defined somewhere in the Windows header files. This macro + * is deleted here to avoid conflicts and compile errors. + */ + +#ifdef interface +#undef interface +#endif + +/* + * PATH_MAX from limits.h can't be used on Windows if the dll and + * import libraries are build/used by different compilers + */ + +#define LIBUSB_PATH_MAX 512 + + +/* + * USB spec information + * + * This is all stuff grabbed from various USB specs and is pretty much + * not subject to change + */ + +/* + * Device and/or Interface Class codes + */ +#define USB_CLASS_PER_INTERFACE 0 /* for DeviceClass */ +#define USB_CLASS_AUDIO 1 +#define USB_CLASS_COMM 2 +#define USB_CLASS_HID 3 +#define USB_CLASS_PRINTER 7 +#define USB_CLASS_MASS_STORAGE 8 +#define USB_CLASS_HUB 9 +#define USB_CLASS_DATA 10 +#define USB_CLASS_VENDOR_SPEC 0xff + +/* + * Descriptor types + */ +#define USB_DT_DEVICE 0x01 +#define USB_DT_CONFIG 0x02 +#define USB_DT_STRING 0x03 +#define USB_DT_INTERFACE 0x04 +#define USB_DT_ENDPOINT 0x05 + +#define USB_DT_HID 0x21 +#define USB_DT_REPORT 0x22 +#define USB_DT_PHYSICAL 0x23 +#define USB_DT_HUB 0x29 + +/* + * Descriptor sizes per descriptor type + */ +#define USB_DT_DEVICE_SIZE 18 +#define USB_DT_CONFIG_SIZE 9 +#define USB_DT_INTERFACE_SIZE 9 +#define USB_DT_ENDPOINT_SIZE 7 +#define USB_DT_ENDPOINT_AUDIO_SIZE 9 /* Audio extension */ +#define USB_DT_HUB_NONVAR_SIZE 7 + + +/* ensure byte-packed structures */ +#include + + +/* All standard descriptors have these 2 fields in common */ +struct usb_descriptor_header { + unsigned char bLength; + unsigned char bDescriptorType; +}; + +/* String descriptor */ +struct usb_string_descriptor { + unsigned char bLength; + unsigned char bDescriptorType; + unsigned short wData[1]; +}; + +/* HID descriptor */ +struct usb_hid_descriptor { + unsigned char bLength; + unsigned char bDescriptorType; + unsigned short bcdHID; + unsigned char bCountryCode; + unsigned char bNumDescriptors; +}; + +/* Endpoint descriptor */ +#define USB_MAXENDPOINTS 32 +struct usb_endpoint_descriptor { + unsigned char bLength; + unsigned char bDescriptorType; + unsigned char bEndpointAddress; + unsigned char bmAttributes; + unsigned short wMaxPacketSize; + unsigned char bInterval; + unsigned char bRefresh; + unsigned char bSynchAddress; + + unsigned char *extra; /* Extra descriptors */ + int extralen; +}; + +#define USB_ENDPOINT_ADDRESS_MASK 0x0f /* in bEndpointAddress */ +#define USB_ENDPOINT_DIR_MASK 0x80 + +#define USB_ENDPOINT_TYPE_MASK 0x03 /* in bmAttributes */ +#define USB_ENDPOINT_TYPE_CONTROL 0 +#define USB_ENDPOINT_TYPE_ISOCHRONOUS 1 +#define USB_ENDPOINT_TYPE_BULK 2 +#define USB_ENDPOINT_TYPE_INTERRUPT 3 + +/* Interface descriptor */ +#define USB_MAXINTERFACES 32 +struct usb_interface_descriptor { + unsigned char bLength; + unsigned char bDescriptorType; + unsigned char bInterfaceNumber; + unsigned char bAlternateSetting; + unsigned char bNumEndpoints; + unsigned char bInterfaceClass; + unsigned char bInterfaceSubClass; + unsigned char bInterfaceProtocol; + unsigned char iInterface; + + struct usb_endpoint_descriptor *endpoint; + + unsigned char *extra; /* Extra descriptors */ + int extralen; +}; + +#define USB_MAXALTSETTING 128 /* Hard limit */ + +struct usb_interface { + struct usb_interface_descriptor *altsetting; + + int num_altsetting; +}; + +/* Configuration descriptor information.. */ +#define USB_MAXCONFIG 8 +struct usb_config_descriptor { + unsigned char bLength; + unsigned char bDescriptorType; + unsigned short wTotalLength; + unsigned char bNumInterfaces; + unsigned char bConfigurationValue; + unsigned char iConfiguration; + unsigned char bmAttributes; + unsigned char MaxPower; + + struct usb_interface *interface; + + unsigned char *extra; /* Extra descriptors */ + int extralen; +}; + +/* Device descriptor */ +struct usb_device_descriptor { + unsigned char bLength; + unsigned char bDescriptorType; + unsigned short bcdUSB; + unsigned char bDeviceClass; + unsigned char bDeviceSubClass; + unsigned char bDeviceProtocol; + unsigned char bMaxPacketSize0; + unsigned short idVendor; + unsigned short idProduct; + unsigned short bcdDevice; + unsigned char iManufacturer; + unsigned char iProduct; + unsigned char iSerialNumber; + unsigned char bNumConfigurations; +}; + +struct usb_ctrl_setup { + unsigned char bRequestType; + unsigned char bRequest; + unsigned short wValue; + unsigned short wIndex; + unsigned short wLength; +}; + +/* + * Standard requests + */ +#define USB_REQ_GET_STATUS 0x00 +#define USB_REQ_CLEAR_FEATURE 0x01 +/* 0x02 is reserved */ +#define USB_REQ_SET_FEATURE 0x03 +/* 0x04 is reserved */ +#define USB_REQ_SET_ADDRESS 0x05 +#define USB_REQ_GET_DESCRIPTOR 0x06 +#define USB_REQ_SET_DESCRIPTOR 0x07 +#define USB_REQ_GET_CONFIGURATION 0x08 +#define USB_REQ_SET_CONFIGURATION 0x09 +#define USB_REQ_GET_INTERFACE 0x0A +#define USB_REQ_SET_INTERFACE 0x0B +#define USB_REQ_SYNCH_FRAME 0x0C + +#define USB_TYPE_STANDARD (0x00 << 5) +#define USB_TYPE_CLASS (0x01 << 5) +#define USB_TYPE_VENDOR (0x02 << 5) +#define USB_TYPE_RESERVED (0x03 << 5) + +#define USB_RECIP_DEVICE 0x00 +#define USB_RECIP_INTERFACE 0x01 +#define USB_RECIP_ENDPOINT 0x02 +#define USB_RECIP_OTHER 0x03 + +/* + * Various libusb API related stuff + */ + +#define USB_ENDPOINT_IN 0x80 +#define USB_ENDPOINT_OUT 0x00 + +/* Error codes */ +#define USB_ERROR_BEGIN 500000 + +/* + * This is supposed to look weird. This file is generated from autoconf + * and I didn't want to make this too complicated. + */ +#define USB_LE16_TO_CPU(x) + +/* Data types */ +/* struct usb_device; */ +/* struct usb_bus; */ + +struct usb_device { + struct usb_device *next, *prev; + + char filename[LIBUSB_PATH_MAX]; + + struct usb_bus *bus; + + struct usb_device_descriptor descriptor; + struct usb_config_descriptor *config; + + void *dev; /* Darwin support */ + + unsigned char devnum; + + unsigned char num_children; + struct usb_device **children; +}; + +struct usb_bus { + struct usb_bus *next, *prev; + + char dirname[LIBUSB_PATH_MAX]; + + struct usb_device *devices; + unsigned long location; + + struct usb_device *root_dev; +}; + +/* Version information, Windows specific */ +struct usb_version { + struct { + int major; + int minor; + int micro; + int nano; + } dll; + struct { + int major; + int minor; + int micro; + int nano; + } driver; +}; + + +struct usb_dev_handle; +typedef struct usb_dev_handle usb_dev_handle; + +/* Variables */ +#ifndef __USB_C__ +#define usb_busses usb_get_busses() +#endif + + + +#include + + +#ifdef __cplusplus +extern "C" { +#endif + + /* Function prototypes */ + + /* usb.c */ + usb_dev_handle *usb_open(struct usb_device *dev); + int usb_close(usb_dev_handle *dev); + int usb_get_string(usb_dev_handle *dev, int index, int langid, char *buf, + size_t buflen); + int usb_get_string_simple(usb_dev_handle *dev, int index, char *buf, + size_t buflen); + + /* descriptors.c */ + int usb_get_descriptor_by_endpoint(usb_dev_handle *udev, int ep, + unsigned char type, unsigned char index, + void *buf, int size); + int usb_get_descriptor(usb_dev_handle *udev, unsigned char type, + unsigned char index, void *buf, int size); + + /* .c */ + int usb_bulk_write(usb_dev_handle *dev, int ep, char *bytes, int size, + int timeout); + int usb_bulk_read(usb_dev_handle *dev, int ep, char *bytes, int size, + int timeout); + int usb_interrupt_write(usb_dev_handle *dev, int ep, char *bytes, int size, + int timeout); + int usb_interrupt_read(usb_dev_handle *dev, int ep, char *bytes, int size, + int timeout); + int usb_control_msg(usb_dev_handle *dev, int requesttype, int request, + int value, int index, char *bytes, int size, + int timeout); + int usb_set_configuration(usb_dev_handle *dev, int configuration); + int usb_claim_interface(usb_dev_handle *dev, int interface); + int usb_release_interface(usb_dev_handle *dev, int interface); + int usb_set_altinterface(usb_dev_handle *dev, int alternate); + int usb_resetep(usb_dev_handle *dev, unsigned int ep); + int usb_clear_halt(usb_dev_handle *dev, unsigned int ep); + int usb_reset(usb_dev_handle *dev); + + char *usb_strerror(void); + + void usb_init(void); + void usb_set_debug(int level); + int usb_find_busses(void); + int usb_find_devices(void); + struct usb_device *usb_device(usb_dev_handle *dev); + struct usb_bus *usb_get_busses(void); + + + /* Windows specific functions */ + + #define LIBUSB_HAS_INSTALL_SERVICE_NP 1 + int usb_install_service_np(void); + void CALLBACK usb_install_service_np_rundll(HWND wnd, HINSTANCE instance, + LPSTR cmd_line, int cmd_show); + + #define LIBUSB_HAS_UNINSTALL_SERVICE_NP 1 + int usb_uninstall_service_np(void); + void CALLBACK usb_uninstall_service_np_rundll(HWND wnd, HINSTANCE instance, + LPSTR cmd_line, int cmd_show); + + #define LIBUSB_HAS_INSTALL_DRIVER_NP 1 + int usb_install_driver_np(const char *inf_file); + void CALLBACK usb_install_driver_np_rundll(HWND wnd, HINSTANCE instance, + LPSTR cmd_line, int cmd_show); + + #define LIBUSB_HAS_TOUCH_INF_FILE_NP 1 + int usb_touch_inf_file_np(const char *inf_file); + void CALLBACK usb_touch_inf_file_np_rundll(HWND wnd, HINSTANCE instance, + LPSTR cmd_line, int cmd_show); + + #define LIBUSB_HAS_INSTALL_NEEDS_RESTART_NP 1 + int usb_install_needs_restart_np(void); + + const struct usb_version *usb_get_version(void); + + int usb_isochronous_setup_async(usb_dev_handle *dev, void **context, + unsigned char ep, int pktsize); + int usb_bulk_setup_async(usb_dev_handle *dev, void **context, + unsigned char ep); + int usb_interrupt_setup_async(usb_dev_handle *dev, void **context, + unsigned char ep); + + int usb_submit_async(void *context, char *bytes, int size); + int usb_reap_async(void *context, int timeout); + int usb_reap_async_nocancel(void *context, int timeout); + int usb_cancel_async(void *context); + int usb_free_async(void **context); + + +#ifdef __cplusplus +} +#endif + +#endif /* __USB_H__ */ + diff --git a/windows/usb/src/usbstub.cpp b/windows/usb/src/usbstub.cpp new file mode 100644 index 0000000..f39abb7 --- /dev/null +++ b/windows/usb/src/usbstub.cpp @@ -0,0 +1,294 @@ +/************************************************************************** + * + * Copyright 2010, Roger Brown + * + * This file is part of Roger Brown's Toolkit. + * + * Roger Brown's Toolkit 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 3 of the License, or + * (at your option) any later version. + * + * Roger Brown's Toolkit 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 Roger Brown's Toolkit. If not, see . + * + */ + +/* + * $Id: usbstub.cpp 1220 2010-05-04 03:14:56Z roger.brown $ + */ + +/* + * this is a stub loader for the LIBUSB0.DLL + */ + +#include + +#define LIBUSB_CALLTYPE __cdecl + +extern "C" +{ + typedef void (LIBUSB_CALLTYPE *voidProc)(void); +} + +class CStubLoader +{ + HMODULE hDll; + CRITICAL_SECTION cs; + const char *name; + + void bomb(DWORD dw) + { + RaiseException(dw,EXCEPTION_NONCONTINUABLE,0,0); + } + +public: + ~CStubLoader() + { +/* if (hDll) + { + FreeLibrary(hDll); + }*/ + + DeleteCriticalSection(&cs); + } + + CStubLoader(const char *n) : name(n) + { + InitializeCriticalSection(&cs); + } + + HMODULE get_dll(void) + { + HMODULE h=NULL; + DWORD dw=0; + + EnterCriticalSection(&cs); + + if (!hDll) + { + hDll=LoadLibrary(name); + if (!hDll) dw=GetLastError(); + } + + h=hDll; + + LeaveCriticalSection(&cs); + + if (!h) + { + bomb(dw); + } + + return h; + } + + voidProc GetProc(const char *name) + { + voidProc p=(voidProc)GetProcAddress(get_dll(),name); + + if (!p) + { + bomb(GetLastError()); + } + + return p; + } +}; + + +static CStubLoader libusb0("LIBUSB0"); + +extern "C" +{ +# define MAP_FN(ret,name,args) \ + typedef ret (LIBUSB_CALLTYPE *pfn_##name##_t)args; \ + static ret LIBUSB_CALLTYPE load_##name args; \ + static pfn_##name##_t pfn_##name=load_##name,test_##name=##name; + +# define LOAD_FN(name) int success=1; __try { pfn_##name=(pfn_##name##_t)libusb0.GetProc(#name); } __except(1) { success=0; } + + MAP_FN(int,usb_reset,(usb_dev_handle *dev)) + MAP_FN(int,usb_claim_interface,(usb_dev_handle *dev,int)) + MAP_FN(int,usb_find_busses,(void)) + MAP_FN(int,usb_find_devices,(void)) + MAP_FN(void,usb_init,(void)) + MAP_FN(int,usb_close,(usb_dev_handle *dev)) + MAP_FN(int,usb_bulk_write,(usb_dev_handle *,int,char *,int,int)); + MAP_FN(int,usb_bulk_read,(usb_dev_handle *,int,char *,int,int)); + MAP_FN(usb_dev_handle *,usb_open,(struct usb_device *)); + MAP_FN(int,usb_set_configuration,(usb_dev_handle *,int)); + MAP_FN(usb_bus *,usb_get_busses,(void)); + MAP_FN(int,usb_release_interface,(usb_dev_handle *,int)); + MAP_FN(int,usb_get_string_simple,(usb_dev_handle *dev, int index, char *buf,size_t buflen)); + + static int LIBUSB_CALLTYPE load_usb_reset(usb_dev_handle *dev) + { + LOAD_FN(usb_reset); + + return success ? usb_reset(dev) : -1; + } + + static int LIBUSB_CALLTYPE load_usb_claim_interface(usb_dev_handle *dev,int interface) + { + LOAD_FN(usb_claim_interface) + + return success ? usb_claim_interface(dev,interface) : -1; + } + + static int LIBUSB_CALLTYPE load_usb_release_interface(usb_dev_handle *dev,int interface) + { + LOAD_FN(usb_release_interface) + + return success ? usb_release_interface(dev,interface) : -1; + } + + static int LIBUSB_CALLTYPE load_usb_close(usb_dev_handle *dev) + { + LOAD_FN(usb_close) + + return success ? usb_close(dev) : -1; + } + + static usb_dev_handle * LIBUSB_CALLTYPE load_usb_open(struct usb_device *dev) + { + LOAD_FN(usb_open) + + return success ? usb_open(dev) : NULL; + } + + static int LIBUSB_CALLTYPE load_usb_find_devices(void) + { + LOAD_FN(usb_find_devices) + + return success ? usb_find_devices() : -1; + } + + static int LIBUSB_CALLTYPE load_usb_find_busses(void) + { + LOAD_FN(usb_find_busses) + + return success ? usb_find_busses() : -1; + } + + static int LIBUSB_CALLTYPE load_usb_set_configuration(usb_dev_handle *dev,int configuration) + { + LOAD_FN(usb_set_configuration) + + return success ? usb_set_configuration(dev,configuration) : -1; + } + + static usb_bus * LIBUSB_CALLTYPE load_usb_get_busses(void) + { + LOAD_FN(usb_get_busses) + + return success ? usb_get_busses() : NULL; + } + + static void LIBUSB_CALLTYPE load_usb_init(void) + { + LOAD_FN(usb_init) + + if (success) usb_init(); + } + + static int LIBUSB_CALLTYPE load_usb_bulk_read(usb_dev_handle *dev,int ep,char *bytes,int size,int timeout) + { + LOAD_FN(usb_bulk_read); + + return success ? usb_bulk_read(dev,ep,bytes,size,timeout) : -1; + } + + static int LIBUSB_CALLTYPE load_usb_bulk_write(usb_dev_handle *dev,int ep,char *bytes,int size,int timeout) + { + LOAD_FN(usb_bulk_write); + + return success ? usb_bulk_write(dev,ep,bytes,size,timeout) : -1; + } + + static int LIBUSB_CALLTYPE load_usb_get_string_simple(usb_dev_handle *dev, int index, char *buf, + size_t buflen) + { + LOAD_FN(usb_get_string_simple); + + return success ? usb_get_string_simple(dev,index,buf,buflen) : -1; + } +} + +int LIBUSB_CALLTYPE usb_claim_interface(usb_dev_handle *dev, int interface) +{ + return pfn_usb_claim_interface(dev,interface); +} + +int LIBUSB_CALLTYPE usb_reset(usb_dev_handle *dev) +{ + return pfn_usb_reset(dev); +} + +int LIBUSB_CALLTYPE usb_find_busses(void) +{ + return pfn_usb_find_busses(); +} + +int LIBUSB_CALLTYPE usb_find_devices(void) +{ + return pfn_usb_find_devices(); +} + +void LIBUSB_CALLTYPE usb_init(void) +{ + pfn_usb_init(); +} + +int LIBUSB_CALLTYPE usb_close(usb_dev_handle *dev) +{ + return pfn_usb_close(dev); +} + +usb_dev_handle * LIBUSB_CALLTYPE usb_open(struct usb_device *dev) +{ + return pfn_usb_open(dev); +} + +int LIBUSB_CALLTYPE usb_set_configuration(usb_dev_handle *dev, int configuration) +{ + return pfn_usb_set_configuration(dev,configuration); +} + +struct usb_bus * LIBUSB_CALLTYPE usb_get_busses(void) +{ + return pfn_usb_get_busses(); +} + +int LIBUSB_CALLTYPE usb_release_interface(usb_dev_handle *dev, int interface) +{ + return pfn_usb_release_interface(dev,interface); +} + +int LIBUSB_CALLTYPE usb_bulk_write(usb_dev_handle *dev, int ep, char *bytes, int size, + int timeout) +{ + return pfn_usb_bulk_write(dev,ep,bytes,size,timeout); +} + +int LIBUSB_CALLTYPE usb_bulk_read(usb_dev_handle *dev, int ep, char *bytes, int size, + int timeout) +{ + return pfn_usb_bulk_read(dev,ep,bytes,size,timeout); +} + +int LIBUSB_CALLTYPE usb_get_string_simple(usb_dev_handle *dev, int index, char *buf, + size_t buflen) +{ + return pfn_usb_get_string_simple(dev,index,buf,buflen); +} + + + + + diff --git a/windows/win32/nfc-anticol.rc b/windows/win32/nfc-anticol.rc new file mode 100644 index 0000000..e38589a --- /dev/null +++ b/windows/win32/nfc-anticol.rc @@ -0,0 +1,35 @@ +#include "windows.h" + +1 VERSIONINFO + FILEVERSION 1,3,4,0 + PRODUCTVERSION 1,3,4,0 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG|VS_FF_PRERELEASE +#else + FILEFLAGS VS_FF_PRERELEASE +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "140904e4" + BEGIN + VALUE "Comments", "example from libnfc\0" + VALUE "CompanyName", "libnfc.org\0" + VALUE "FileDescription", "NFC test application\0" + VALUE "FileVersion", "1.3.4.0\0" + VALUE "InternalName", "nfc-anticol\0" + VALUE "LegalCopyright", "Copyright (C) 2009, Roel Verdult\0" + VALUE "OriginalFilename", "NFC-ANTICOL.EXE\0" + VALUE "ProductName", "libnfc\0" + VALUE "ProductVersion", "1.3.4.0\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x1409, 1252 + END +END diff --git a/windows/win32/nfc-emulate.rc b/windows/win32/nfc-emulate.rc new file mode 100644 index 0000000..fcf4859 --- /dev/null +++ b/windows/win32/nfc-emulate.rc @@ -0,0 +1,35 @@ +#include "windows.h" + +1 VERSIONINFO + FILEVERSION 1,3,4,0 + PRODUCTVERSION 1,3,4,0 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG|VS_FF_PRERELEASE +#else + FILEFLAGS VS_FF_PRERELEASE +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "140904e4" + BEGIN + VALUE "Comments", "example from libnfc\0" + VALUE "CompanyName", "libnfc.org\0" + VALUE "FileDescription", "NFC test application\0" + VALUE "FileVersion", "1.3.4.0\0" + VALUE "InternalName", "nfc-emulate\0" + VALUE "LegalCopyright", "Copyright (C) 2009, Roel Verdult\0" + VALUE "OriginalFilename", "NFC-EMULATE.EXE\0" + VALUE "ProductName", "libnfc\0" + VALUE "ProductVersion", "1.3.4.0\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x1409, 1252 + END +END diff --git a/windows/win32/nfc-list.rc b/windows/win32/nfc-list.rc new file mode 100644 index 0000000..1f3641e --- /dev/null +++ b/windows/win32/nfc-list.rc @@ -0,0 +1,35 @@ +#include "windows.h" + +1 VERSIONINFO + FILEVERSION 1,3,4,0 + PRODUCTVERSION 1,3,4,0 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG|VS_FF_PRERELEASE +#else + FILEFLAGS VS_FF_PRERELEASE +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "140904e4" + BEGIN + VALUE "Comments", "example from libnfc\0" + VALUE "CompanyName", "libnfc.org\0" + VALUE "FileDescription", "NFC test application\0" + VALUE "FileVersion", "1.3.4.0\0" + VALUE "InternalName", "nfc-list\0" + VALUE "LegalCopyright", "Copyright (C) 2009, Roel Verdult\0" + VALUE "OriginalFilename", "NFC-LIST.EXE\0" + VALUE "ProductName", "libnfc\0" + VALUE "ProductVersion", "1.3.4.0\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x1409, 1252 + END +END diff --git a/windows/win32/nfc-mfclassic.rc b/windows/win32/nfc-mfclassic.rc new file mode 100644 index 0000000..6f8e939 --- /dev/null +++ b/windows/win32/nfc-mfclassic.rc @@ -0,0 +1,35 @@ +#include "windows.h" + +1 VERSIONINFO + FILEVERSION 1,3,4,0 + PRODUCTVERSION 1,3,4,0 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG|VS_FF_PRERELEASE +#else + FILEFLAGS VS_FF_PRERELEASE +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "140904e4" + BEGIN + VALUE "Comments", "example from libnfc\0" + VALUE "CompanyName", "libnfc.org\0" + VALUE "FileDescription", "NFC test application\0" + VALUE "FileVersion", "1.3.4.0\0" + VALUE "InternalName", "nfc-mfclassic\0" + VALUE "LegalCopyright", "Copyright (C) 2009, Roel Verdult\0" + VALUE "OriginalFilename", "NFC-MFCLASSIC.EXE\0" + VALUE "ProductName", "libnfc\0" + VALUE "ProductVersion", "1.3.4.0\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x1409, 1252 + END +END diff --git a/windows/win32/nfc-mfultralight.rc b/windows/win32/nfc-mfultralight.rc new file mode 100644 index 0000000..88d112b --- /dev/null +++ b/windows/win32/nfc-mfultralight.rc @@ -0,0 +1,35 @@ +#include "windows.h" + +1 VERSIONINFO + FILEVERSION 1,3,4,0 + PRODUCTVERSION 1,3,4,0 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG|VS_FF_PRERELEASE +#else + FILEFLAGS VS_FF_PRERELEASE +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "140904e4" + BEGIN + VALUE "Comments", "example from libnfc\0" + VALUE "CompanyName", "libnfc.org\0" + VALUE "FileDescription", "NFC test application\0" + VALUE "FileVersion", "1.3.4.0\0" + VALUE "InternalName", "nfc-mfultralight\0" + VALUE "LegalCopyright", "Copyright (C) 2009, Roel Verdult\0" + VALUE "OriginalFilename", "NFC-MFULTRALIGHT.EXE\0" + VALUE "ProductName", "libnfc\0" + VALUE "ProductVersion", "1.3.4.0\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x1409, 1252 + END +END diff --git a/windows/win32/nfc-poll.rc b/windows/win32/nfc-poll.rc new file mode 100644 index 0000000..de1d8a8 --- /dev/null +++ b/windows/win32/nfc-poll.rc @@ -0,0 +1,35 @@ +#include "windows.h" + +1 VERSIONINFO + FILEVERSION 1,3,4,0 + PRODUCTVERSION 1,3,4,0 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG|VS_FF_PRERELEASE +#else + FILEFLAGS VS_FF_PRERELEASE +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "140904e4" + BEGIN + VALUE "Comments", "example from libnfc\0" + VALUE "CompanyName", "libnfc.org\0" + VALUE "FileDescription", "NFC test application\0" + VALUE "FileVersion", "1.3.4.0\0" + VALUE "InternalName", "nfc-poll\0" + VALUE "LegalCopyright", "Copyright (C) 2009, Roel Verdult\0" + VALUE "OriginalFilename", "NFC-POLL.EXE\0" + VALUE "ProductName", "libnfc\0" + VALUE "ProductVersion", "1.3.4.0\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x1409, 1252 + END +END diff --git a/windows/win32/nfc-relay.rc b/windows/win32/nfc-relay.rc new file mode 100644 index 0000000..7f97c55 --- /dev/null +++ b/windows/win32/nfc-relay.rc @@ -0,0 +1,35 @@ +#include "windows.h" + +1 VERSIONINFO + FILEVERSION 1,3,4,0 + PRODUCTVERSION 1,3,4,0 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG|VS_FF_PRERELEASE +#else + FILEFLAGS VS_FF_PRERELEASE +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "140904e4" + BEGIN + VALUE "Comments", "example from libnfc\0" + VALUE "CompanyName", "libnfc.org\0" + VALUE "FileDescription", "NFC test application\0" + VALUE "FileVersion", "1.3.4.0\0" + VALUE "InternalName", "nfc-relay\0" + VALUE "LegalCopyright", "Copyright (C) 2009, Roel Verdult\0" + VALUE "OriginalFilename", "NFC-RELAY.EXE\0" + VALUE "ProductName", "libnfc\0" + VALUE "ProductVersion", "1.3.4.0\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x1409, 1252 + END +END diff --git a/windows/win32/nfc.def b/windows/win32/nfc.def new file mode 100644 index 0000000..7688af4 --- /dev/null +++ b/windows/win32/nfc.def @@ -0,0 +1,28 @@ +LIBRARY NFC +VERSION 1.3 + +EXPORTS + nfc_list_devices + nfc_connect + nfc_disconnect + nfc_configure + nfc_initiator_init + nfc_initiator_select_tag + nfc_initiator_select_dep_target + nfc_initiator_deselect_tag + nfc_initiator_poll_targets + nfc_initiator_transceive_bits + nfc_initiator_transceive_bytes + nfc_initiator_transceive_dep_bytes + nfc_initiator_mifare_cmd + nfc_target_init + nfc_target_receive_bits + nfc_target_receive_bytes + nfc_target_receive_dep_bytes + nfc_target_send_bits + nfc_target_send_bytes + nfc_target_send_dep_bytes + nfc_device_name + iso14443a_crc + append_iso14443a_crc + nfc_version diff --git a/windows/win32/nfc.rc b/windows/win32/nfc.rc new file mode 100644 index 0000000..f4f4271 --- /dev/null +++ b/windows/win32/nfc.rc @@ -0,0 +1,28 @@ +#include + +1 VERSIONINFO + PRODUCTVERSION 1,3,4,0 + FILEOS VOS__WINDOWS32 + FILEVERSION 1,3,4,0 + FILETYPE VFT_DLL +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "140904E4" + BEGIN + VALUE "CompanyName","nfc.org\000\000" + VALUE "LegalCopyright","Copyright (C) 2009, Roel Verdult\000\000" + VALUE "ProductName","nfc\000\000" + VALUE "ProductVersion","1.3.4.0\000\000" + VALUE "Comments","Demonstration Win32 packaging\000\000" + VALUE "FileDescription","Near Field Communication Library\000\000" + VALUE "FileVersion","1.3.4.0\000\000" + VALUE "InternalName","nfc\000\000" + VALUE "OriginalFilename","NFC.DLL\000\000" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x1409, 1252 + END +END diff --git a/windows/win32/nfcip-initiator.rc b/windows/win32/nfcip-initiator.rc new file mode 100644 index 0000000..b4df937 --- /dev/null +++ b/windows/win32/nfcip-initiator.rc @@ -0,0 +1,35 @@ +#include "windows.h" + +1 VERSIONINFO + FILEVERSION 1,3,4,0 + PRODUCTVERSION 1,3,4,0 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG|VS_FF_PRERELEASE +#else + FILEFLAGS VS_FF_PRERELEASE +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "140904e4" + BEGIN + VALUE "Comments", "example from libnfc\0" + VALUE "CompanyName", "libnfc.org\0" + VALUE "FileDescription", "NFC test application\0" + VALUE "FileVersion", "1.3.4.0\0" + VALUE "InternalName", "nfcip-initiator\0" + VALUE "LegalCopyright", "Copyright (C) 2009, Roel Verdult\0" + VALUE "OriginalFilename", "NFC-INITIATOR.EXE\0" + VALUE "ProductName", "libnfc\0" + VALUE "ProductVersion", "1.3.4.0\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x1409, 1252 + END +END diff --git a/windows/win32/nfcip-target.rc b/windows/win32/nfcip-target.rc new file mode 100644 index 0000000..e9578da --- /dev/null +++ b/windows/win32/nfcip-target.rc @@ -0,0 +1,35 @@ +#include "windows.h" + +1 VERSIONINFO + FILEVERSION 1,3,4,0 + PRODUCTVERSION 1,3,4,0 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG|VS_FF_PRERELEASE +#else + FILEFLAGS VS_FF_PRERELEASE +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "140904e4" + BEGIN + VALUE "Comments", "example from libnfc\0" + VALUE "CompanyName", "libnfc.org\0" + VALUE "FileDescription", "NFC test application\0" + VALUE "FileVersion", "1.3.4.0\0" + VALUE "InternalName", "nfcip-target\0" + VALUE "LegalCopyright", "Copyright (C) 2009, Roel Verdult\0" + VALUE "OriginalFilename", "NFCIP-TARGET.EXE\0" + VALUE "ProductName", "libnfc\0" + VALUE "ProductVersion", "1.3.4.0\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x1409, 1252 + END +END