Merge Alex Lian branch
This commit is contained in:
commit
89b177c58a
27 changed files with 198 additions and 1521 deletions
|
@ -29,14 +29,19 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/incl
|
|||
SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules/")
|
||||
|
||||
# Options
|
||||
SET(LIBNFC_LOG ON CACHE BOOL "Enable log facility")
|
||||
SET(LIBNFC_LOG ON CACHE BOOL "Enable log facility (errors, warning, info and debug messages)")
|
||||
IF(LIBNFC_LOG)
|
||||
ADD_DEFINITIONS(-DLOG)
|
||||
ENDIF(LIBNFC_LOG)
|
||||
|
||||
SET(LIBNFC_DEBUG_MODE OFF CACHE BOOL "Debug mode")
|
||||
IF(LIBNFC_DEBUG_MODE)
|
||||
ADD_DEFINITIONS(-DDEBUG -g3)
|
||||
ADD_DEFINITIONS(-DDEBUG)
|
||||
SET(CMAKE_C_FLAGS "-g3 ${CMAKE_C_FLAGS}")
|
||||
SET(WIN32_MODE "debug")
|
||||
SET(CMAKE_RC_FLAGS "-D_DEBUG ${CMAKE_RC_FLAGS}")
|
||||
ELSE(LIBNFC_DEBUG_MODE)
|
||||
SET(WIN32_MODE "release")
|
||||
ENDIF(LIBNFC_DEBUG_MODE)
|
||||
|
||||
# Doxygen
|
||||
|
@ -65,7 +70,7 @@ ENDIF(NOT DEFINED SHARE_INSTALL_PREFIX)
|
|||
# Additonnal GCC flags
|
||||
IF(CMAKE_COMPILER_IS_GNUCC)
|
||||
# Make sure we will not miss some warnings ;)
|
||||
ADD_DEFINITIONS(-Wall -pedantic -std=c99)
|
||||
SET(CMAKE_C_FLAGS "-Wall -pedantic -std=c99 ${CMAKE_C_FLAGS}")
|
||||
ENDIF(CMAKE_COMPILER_IS_GNUCC)
|
||||
|
||||
# Workarounds for libusb in C99
|
||||
|
@ -73,9 +78,11 @@ ADD_DEFINITIONS(-Du_int8_t=uint8_t -Du_int16_t=uint16_t)
|
|||
|
||||
IF(MINGW)
|
||||
# force MinGW-w64 in 32bit mode
|
||||
ADD_DEFINITIONS(-m32)
|
||||
SET(CMAKE_SHARED_LINKER_FLAGS -m32)
|
||||
SET(CMAKE_EXE_LINKER_FLAGS -m32)
|
||||
SET(CMAKE_C_FLAGS "-m32 ${CMAKE_C_FLAGS}")
|
||||
SET(CMAKE_MODULE_LINKER_FLAGS "-m32 --enable-stdcall-fixup ${CMAKE_SHARED_LINKER_FLAGS}")
|
||||
SET(CMAKE_SHARED_LINKER_FLAGS "-m32 --enable-stdcall-fixup ${CMAKE_SHARED_LINKER_FLAGS}")
|
||||
SET(CMAKE_EXE_LINKER_FLAGS "-m32 --enable-stdcall-fixup ${CMAKE_EXE_LINKER_FLAGS}")
|
||||
SET(CMAKE_RC_FLAGS "--target=pe-i386 --output-format=coff ${CMAKE_RC_FLAGS}")
|
||||
ENDIF(MINGW)
|
||||
|
||||
IF(NOT WIN32)
|
||||
|
@ -114,6 +121,23 @@ IF(LIBUSB_INCLUDE_DIRS)
|
|||
LINK_DIRECTORIES(${LIBUSB_LIBRARY_DIRS})
|
||||
ENDIF(LIBUSB_INCLUDE_DIRS)
|
||||
|
||||
# version.rc for Windows
|
||||
IF(WIN32)
|
||||
# Date for filling in rc file information
|
||||
MACRO (GET_CURRENT_YEAR RESULT)
|
||||
EXECUTE_PROCESS(COMMAND "cmd" " /C date /T" OUTPUT_VARIABLE ${RESULT})
|
||||
STRING(REGEX REPLACE ".*(..)/(..)/(....).*" "\\3" ${RESULT} ${${RESULT}})
|
||||
ENDMACRO (GET_CURRENT_YEAR)
|
||||
GET_CURRENT_YEAR(CURRENT_YEAR)
|
||||
MESSAGE("Year for copyright is " ${CURRENT_YEAR})
|
||||
|
||||
SET(RC_COMMENT "${PACKAGE_NAME} library")
|
||||
SET(RC_INTERNAL_NAME "${PACKAGE_NAME} ${WIN32_MODE}")
|
||||
SET(RC_ORIGINAL_NAME ${PACKAGE_NAME}.dll)
|
||||
SET(RC_FILE_TYPE VFT_DLL)
|
||||
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/windows/version.rc.in ${CMAKE_CURRENT_BINARY_DIR}/windows/libnfc.rc @ONLY)
|
||||
ENDIF(WIN32)
|
||||
|
||||
ADD_SUBDIRECTORY(libnfc)
|
||||
ADD_SUBDIRECTORY(include)
|
||||
ADD_SUBDIRECTORY(utils)
|
||||
|
|
|
@ -11,6 +11,7 @@ Requirements
|
|||
- MinGW-w64 compiler toolchain [1]
|
||||
- LibUsb-Win32 1.2.5.0 (or greater) [2]
|
||||
- CMake 2.8 [3]
|
||||
- PCRE for Windows [4]
|
||||
|
||||
This was tested on Windows 7 64 bit, but should work on Windows Vista and
|
||||
Windows XP and 32 bit as well.
|
||||
|
@ -57,3 +58,4 @@ References
|
|||
http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer/tdm64-gcc-4.5.1.exe/download
|
||||
[2] http://sourceforge.net/projects/libusb-win32/files/
|
||||
[3] http://www.cmake.org
|
||||
[4] http://gnuwin32.sourceforge.net/packages/pcre.htm
|
48
contrib/win32/nfc_win32.c
Normal file
48
contrib/win32/nfc_win32.c
Normal file
|
@ -0,0 +1,48 @@
|
|||
/*-
|
||||
* Public platform independent Near Field Communication (NFC) library
|
||||
*
|
||||
* Copyright (C) 2013 Alex Lian
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by the
|
||||
* Free Software Foundation, either version 3 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 Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file nfc_win32.c
|
||||
* @brief Windows System compatibility
|
||||
*/
|
||||
|
||||
// Handle platform specific includes
|
||||
#include "contrib/windows.h"
|
||||
|
||||
int setenv(const char *name, const char *value, int overwrite)
|
||||
{
|
||||
int exists = GetEnvironmentVariableA(name, NULL, 0);
|
||||
if ((exists && overwrite) || (!exists))
|
||||
{
|
||||
if (!SetEnvironmentVariableA(name, value))
|
||||
{
|
||||
// Set errno here correctly
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
// Exists and overwrite is 0.
|
||||
return -1;
|
||||
}
|
||||
|
||||
void unsetenv(const char *name)
|
||||
{
|
||||
SetEnvironmentVariableA(name, NULL);
|
||||
}
|
|
@ -14,7 +14,18 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../libnfc)
|
|||
|
||||
# Examples
|
||||
FOREACH(source ${EXAMPLES-SOURCES})
|
||||
ADD_EXECUTABLE(${source} ${source}.c)
|
||||
SET (TARGETS ${source}.c)
|
||||
|
||||
IF(WIN32)
|
||||
SET(RC_COMMENT "${PACKAGE_NAME} example")
|
||||
SET(RC_INTERNAL_NAME ${source})
|
||||
SET(RC_ORIGINAL_NAME ${source}.exe)
|
||||
SET(RC_FILE_TYPE VFT_APP)
|
||||
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/../windows/version.rc.in ${CMAKE_CURRENT_BINARY_DIR}/../windows/${source}.rc @ONLY)
|
||||
LIST(APPEND TARGETS ${CMAKE_CURRENT_BINARY_DIR}/../windows/${source}.rc)
|
||||
ENDIF(WIN32)
|
||||
|
||||
ADD_EXECUTABLE(${source} ${TARGETS})
|
||||
TARGET_LINK_LIBRARIES(${source} nfc)
|
||||
TARGET_LINK_LIBRARIES(${source} nfcutils)
|
||||
INSTALL(TARGETS ${source} RUNTIME DESTINATION bin COMPONENT examples)
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
# Windows MinGW workarounds
|
||||
IF(WIN32)
|
||||
message("Adding in contrib win32 sources")
|
||||
SET(WINDOWS_SOURCES ../contrib/win32/stdlib)
|
||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../contrib/win32)
|
||||
message("Win32: " ${WINDOWS_SOURCES})
|
||||
|
||||
# Add in the rc for version information in the dll
|
||||
LIST(APPEND WINDOWS_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/../windows/libnfc.rc)
|
||||
ENDIF(WIN32)
|
||||
|
||||
# Library's chips
|
||||
|
@ -53,16 +54,22 @@ IF(LIBUSB_FOUND)
|
|||
TARGET_LINK_LIBRARIES(nfc ${LIBUSB_LIBRARIES})
|
||||
ENDIF(LIBUSB_FOUND)
|
||||
|
||||
IF(WIN32)
|
||||
TARGET_LINK_LIBRARIES(nfc wsock32)
|
||||
ENDIF(WIN32)
|
||||
SET_TARGET_PROPERTIES(nfc PROPERTIES SOVERSION 0)
|
||||
|
||||
IF(WIN32)
|
||||
# Libraries that are windows specific
|
||||
TARGET_LINK_LIBRARIES(nfc wsock32)
|
||||
IF(PCRE_FOUND)
|
||||
TARGET_LINK_LIBRARIES(nfc ${PCRE_LIBRARIES})
|
||||
ENDIF(PCRE_FOUND)
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT libnfc.lib
|
||||
COMMAND dlltool -d ${CMAKE_CURRENT_SOURCE_DIR}/../windows/win32/nfc.def -l ${CMAKE_CURRENT_BINARY_DIR}/libnfc.lib ${CMAKE_CURRENT_BINARY_DIR}/libnfc.dll
|
||||
DEPENDS nfc ${CMAKE_CURRENT_SOURCE_DIR}/../windows/win32/nfc.def
|
||||
)
|
||||
ADD_CUSTOM_TARGET(win32lib ALL DEPENDS libnfc.lib)
|
||||
|
||||
# On Windows the shared (runtime) library should be either in the same
|
||||
# directory as the excutables or in the path, we add it to same directory
|
||||
INSTALL(TARGETS nfc RUNTIME DESTINATION bin COMPONENT libraries)
|
||||
|
|
|
@ -17,6 +17,15 @@ TARGET_LINK_LIBRARIES(nfcutils nfc)
|
|||
FOREACH(source ${UTILS-SOURCES})
|
||||
SET (TARGETS ${source}.c)
|
||||
|
||||
IF(WIN32)
|
||||
SET(RC_COMMENT "${PACKAGE_NAME} utility")
|
||||
SET(RC_INTERNAL_NAME ${source})
|
||||
SET(RC_ORIGINAL_NAME ${source}.exe)
|
||||
SET(RC_FILE_TYPE VFT_APP)
|
||||
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/../windows/version.rc.in ${CMAKE_CURRENT_BINARY_DIR}/../windows/${source}.rc @ONLY)
|
||||
LIST(APPEND TARGETS ${CMAKE_CURRENT_BINARY_DIR}/../windows/${source}.rc)
|
||||
ENDIF(WIN32)
|
||||
|
||||
IF((${source} MATCHES "nfc-mfultralight") OR (${source} MATCHES "nfc-mfclassic"))
|
||||
LIST(APPEND TARGETS mifare)
|
||||
ENDIF((${source} MATCHES "nfc-mfultralight") OR (${source} MATCHES "nfc-mfclassic"))
|
||||
|
@ -33,7 +42,6 @@ FOREACH(source ${UTILS-SOURCES})
|
|||
TARGET_LINK_LIBRARIES(${source} nfc)
|
||||
TARGET_LINK_LIBRARIES(${source} nfcutils)
|
||||
|
||||
|
||||
INSTALL(TARGETS ${source} RUNTIME DESTINATION bin COMPONENT utils)
|
||||
ENDFOREACH(source)
|
||||
|
||||
|
|
|
@ -55,6 +55,10 @@
|
|||
|
||||
#include "nfc-utils.h"
|
||||
|
||||
#if defined(WIN32) && defined(__GNUC__) /* mingw compiler */
|
||||
#include <getopt.h>
|
||||
#endif
|
||||
|
||||
static nfc_device *pnd;
|
||||
|
||||
static void
|
||||
|
|
267
windows/Makefile
267
windows/Makefile
|
@ -1,267 +0,0 @@
|
|||
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.4.0\"
|
||||
|
||||
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\mifare.obj \
|
||||
obj\nfc-utils.obj
|
||||
|
||||
NFC_MFULTRALIGHT_OBJ=obj\nfc-mfultralight.obj \
|
||||
obj\mifare.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\mifare.obj: ..\examples\mifare.c
|
||||
$(CC) /c $(CC_OUT_OBJ)$@ $(CFLAGS) ..\examples\mifare.c
|
||||
|
||||
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 ..
|
||||
|
||||
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
;----------------------------------------------------------------------------
|
||||
; 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.nfc-tools.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" >
|
|
@ -1,13 +0,0 @@
|
|||
;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
; ProductName = libnfc
|
||||
; DESCRIPTION = Public platform independent Near Field Communication (NFC) library
|
||||
; Installed = WINDOWS_ALL
|
||||
; Guid.UpgradeCode = {5880D072-659D-4038-894D-C85BF514B95A}
|
||||
; MsiName = libnfc-1.4.0
|
||||
;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
;############################################################################
|
||||
VERSION : 1.4.0.0
|
||||
DATE : 26 Oct 2010
|
||||
CHANGES : Example Packaging
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
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%
|
|
@ -1,88 +0,0 @@
|
|||
; 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 ----
|
||||
"<??@@FullUpxExeName>" ;;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
|
Binary file not shown.
Before Width: | Height: | Size: 450 KiB |
|
@ -1,408 +0,0 @@
|
|||
/*
|
||||
* from the libusb-win32 project
|
||||
*
|
||||
* Copyright (c) 2000-2003 Johannes Erdfelt <johannes@erdfelt.com>
|
||||
*
|
||||
* 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 <stdlib.h>
|
||||
#include <windows.h>
|
||||
|
||||
/*
|
||||
* '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 <pshpack1.h>
|
||||
|
||||
|
||||
/* 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 <poppack.h>
|
||||
|
||||
|
||||
#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);
|
||||
|
||||
/* <arch>.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__ */
|
||||
|
|
@ -1,294 +0,0 @@
|
|||
/**************************************************************************
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Id: usbstub.cpp 1220 2010-05-04 03:14:56Z roger.brown $
|
||||
*/
|
||||
|
||||
/*
|
||||
* this is a stub loader for the LIBUSB0.DLL
|
||||
*/
|
||||
|
||||
#include <usb.h>
|
||||
|
||||
#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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
35
windows/version.rc.in
Normal file
35
windows/version.rc.in
Normal file
|
@ -0,0 +1,35 @@
|
|||
#include "windows.h"
|
||||
|
||||
1 VERSIONINFO
|
||||
FILEVERSION @VERSION_MAJOR@,@VERSION_MINOR@,@VERSION_PATCH@,0
|
||||
PRODUCTVERSION @VERSION_MAJOR@,@VERSION_MINOR@,@VERSION_PATCH@,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS VS_FF_DEBUG|VS_FF_PRERELEASE
|
||||
#else
|
||||
FILEFLAGS 0L
|
||||
#endif
|
||||
FILEOS VOS_NT_WINDOWS32
|
||||
FILETYPE @RC_FILE_TYPE@
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904e4"
|
||||
BEGIN
|
||||
VALUE "Comments", "@RC_COMMENT@\0"
|
||||
VALUE "CompanyName", "libnfc.org\0"
|
||||
VALUE "FileDescription", "\0"
|
||||
VALUE "FileVersion", "@VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@.0\0"
|
||||
VALUE "InternalName", "@RC_INTERNAL_NAME@ @WIN32_MODE@\0"
|
||||
VALUE "LegalCopyright", "Copyright (C) @CURRENT_YEAR@\0"
|
||||
VALUE "OriginalFilename", "@RC_ORIGINAL_NAME@\0"
|
||||
VALUE "ProductName", "@PACKAGE_NAME@ @WIN32_MODE@\0"
|
||||
VALUE "ProductVersion", "@VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@.0\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x0409, 1252
|
||||
END
|
||||
END
|
|
@ -1,35 +0,0 @@
|
|||
#include "windows.h"
|
||||
|
||||
1 VERSIONINFO
|
||||
FILEVERSION 1,3,9,0
|
||||
PRODUCTVERSION 1,3,9,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.4.0.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.4.0.0\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x1409, 1252
|
||||
END
|
||||
END
|
|
@ -1,35 +0,0 @@
|
|||
#include "windows.h"
|
||||
|
||||
1 VERSIONINFO
|
||||
FILEVERSION 1,3,9,0
|
||||
PRODUCTVERSION 1,3,9,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.4.0.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.4.0.0\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x1409, 1252
|
||||
END
|
||||
END
|
|
@ -1,35 +0,0 @@
|
|||
#include "windows.h"
|
||||
|
||||
1 VERSIONINFO
|
||||
FILEVERSION 1,3,9,0
|
||||
PRODUCTVERSION 1,3,9,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.4.0.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.4.0.0\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x1409, 1252
|
||||
END
|
||||
END
|
|
@ -1,35 +0,0 @@
|
|||
#include "windows.h"
|
||||
|
||||
1 VERSIONINFO
|
||||
FILEVERSION 1,3,9,0
|
||||
PRODUCTVERSION 1,3,9,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.4.0.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.4.0.0\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x1409, 1252
|
||||
END
|
||||
END
|
|
@ -1,35 +0,0 @@
|
|||
#include "windows.h"
|
||||
|
||||
1 VERSIONINFO
|
||||
FILEVERSION 1,3,9,0
|
||||
PRODUCTVERSION 1,3,9,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.4.0.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.4.0.0\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x1409, 1252
|
||||
END
|
||||
END
|
|
@ -1,35 +0,0 @@
|
|||
#include "windows.h"
|
||||
|
||||
1 VERSIONINFO
|
||||
FILEVERSION 1,3,9,0
|
||||
PRODUCTVERSION 1,3,9,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.4.0.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.4.0.0\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x1409, 1252
|
||||
END
|
||||
END
|
|
@ -1,35 +0,0 @@
|
|||
#include "windows.h"
|
||||
|
||||
1 VERSIONINFO
|
||||
FILEVERSION 1,3,9,0
|
||||
PRODUCTVERSION 1,3,9,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.4.0.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.4.0.0\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x1409, 1252
|
||||
END
|
||||
END
|
|
@ -1,28 +1,48 @@
|
|||
LIBRARY NFC
|
||||
VERSION 1.3.9
|
||||
LIBRARY libnfc
|
||||
VERSION 1.7
|
||||
|
||||
EXPORTS
|
||||
nfc_list_devices
|
||||
nfc_connect
|
||||
nfc_disconnect
|
||||
nfc_configure
|
||||
nfc_initiator_init
|
||||
nfc_initiator_select_passive_target
|
||||
nfc_initiator_list_passive_targets
|
||||
nfc_initiator_select_dep_target
|
||||
nfc_initiator_deselect_target
|
||||
nfc_initiator_poll_targets
|
||||
nfc_initiator_transceive_bits
|
||||
nfc_initiator_transceive_bytes
|
||||
nfc_target_init
|
||||
nfc_target_receive_bits
|
||||
nfc_target_receive_bytes
|
||||
nfc_target_send_bits
|
||||
nfc_target_send_bytes
|
||||
nfc_device_name
|
||||
iso14443a_crc
|
||||
append_iso14443a_crc
|
||||
nfc_version
|
||||
nfc_perror
|
||||
nfc_strerror
|
||||
nfc_strerror_r
|
||||
nfc_init
|
||||
nfc_exit
|
||||
nfc_open
|
||||
nfc_close
|
||||
nfc_abbort_command
|
||||
nfc_list_devices
|
||||
nfc_idle
|
||||
nfc_initiator_init
|
||||
nfc_initiator_init_secure_element
|
||||
nfc_initiator_select_passive_target
|
||||
nfc_initiator_list_passive_targets
|
||||
nfc_initiator_poll_target
|
||||
nfc_initiator_select_dep_target
|
||||
nfc_initiator_poll_dep_target
|
||||
nfc_initiator_deselect_target
|
||||
nfc_initiator_poll_targets
|
||||
nfc_initiator_transceive_bytes
|
||||
nfc_initiator_transceive_bits
|
||||
nfc_initiator_transceive_bytes_timed
|
||||
nfc_initiator_transceive_bits_timed
|
||||
nfc_initiator_target_is_present
|
||||
nfc_target_init
|
||||
nfc_target_send_bytes
|
||||
nfc_target_receive_bytes
|
||||
nfc_target_send_bits
|
||||
nfc_target_receive_bits
|
||||
nfc_strerror
|
||||
nfc_strerror_r
|
||||
nfc_perror
|
||||
nfc_device_get_last_error
|
||||
nfc_device_get_name
|
||||
nfc_device_get_connstring
|
||||
nfc_device_get_supported_modulation
|
||||
nfc_device_get_supported_baud_rate
|
||||
nfc_device_set_property_int
|
||||
nfc_device_set_property_bool
|
||||
iso14443a_crc
|
||||
iso14443a_crc_append
|
||||
iso14443a_locate_historical_bytes
|
||||
nfc_version
|
||||
nfc_device_get_information_about
|
||||
str_nfc_modulation_type
|
||||
str_nfc_baud_rate
|
||||
str_nfc_target
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
#include <windows.h>
|
||||
|
||||
1 VERSIONINFO
|
||||
PRODUCTVERSION 1,3,9,0
|
||||
FILEOS VOS__WINDOWS32
|
||||
FILEVERSION 1,3,9,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.4.0.0\000\000"
|
||||
VALUE "Comments","Demonstration Win32 packaging\000\000"
|
||||
VALUE "FileDescription","Near Field Communication Library\000\000"
|
||||
VALUE "FileVersion","1.4.0.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
|
|
@ -1,35 +0,0 @@
|
|||
#include "windows.h"
|
||||
|
||||
1 VERSIONINFO
|
||||
FILEVERSION 1,3,9,0
|
||||
PRODUCTVERSION 1,3,9,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.4.0.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.4.0.0\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x1409, 1252
|
||||
END
|
||||
END
|
|
@ -1,35 +0,0 @@
|
|||
#include "windows.h"
|
||||
|
||||
1 VERSIONINFO
|
||||
FILEVERSION 1,3,9,0
|
||||
PRODUCTVERSION 1,3,9,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.4.0.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.4.0.0\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x1409, 1252
|
||||
END
|
||||
END
|
Loading…
Reference in a new issue