Machine Interface Utility:VER1.0
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,27 @@
|
||||
libusb-win32-bin v1.2.4.6 (05/12/2011) - [Package Information]
|
||||
|
||||
ALL ARCHITECTURES:
|
||||
x86\libusb0_x86.dll: x86 32-bit library. Must be renamed to libusb0.dll
|
||||
On 64 bit, Installs to Windows\syswow64\libusb0.dll.
|
||||
On 32 bit, Installs to Windows\system32\libusb0.dll.
|
||||
|
||||
x86\inf-wizard.exe: inf-wizard application with embedded libusb-win32
|
||||
v1.2.4.6 binaries.
|
||||
|
||||
X86 ONLY ARCHITECTURES:
|
||||
x86\libusb0.sys: x86 32-bit driver.
|
||||
Installs to Windows\system32\drivers\libusb0.sys
|
||||
|
||||
AMD64-INTEL64 ONLY ARCHITECTURES:
|
||||
amd64\libusb0.sys: x64 64-bit driver.
|
||||
Installs to Windows\system32\drivers\libusb0.sys
|
||||
|
||||
amd64\libusb0.dll: x64 64-bit library.
|
||||
Installs to Windows\system32\libusb0.dll
|
||||
|
||||
IA64 ONLY ARCHITECTURES:
|
||||
ia64\libusb0.sys: IA64 64-bit driver.
|
||||
Installs to Windows\system32\drivers\libusb0.sys
|
||||
|
||||
ia64\libusb0.dll: IA64 64-bit library.
|
||||
Installs to Windows\system32\libusb0.dll
|
||||
Binary file not shown.
@@ -0,0 +1,416 @@
|
||||
#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);
|
||||
|
||||
#define LIBUSB_HAS_INSTALL_NP 1
|
||||
int usb_install_npW(HWND hwnd, HINSTANCE instance, LPCWSTR cmd_line, int starg_arg);
|
||||
int usb_install_npA(HWND hwnd, HINSTANCE instance, LPCSTR cmd_line, int starg_arg);
|
||||
#define usb_install_np usb_install_npA
|
||||
void CALLBACK usb_install_np_rundll(HWND wnd, HINSTANCE instance,
|
||||
LPSTR cmd_line, int cmd_show);
|
||||
|
||||
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__ */
|
||||
|
||||
@@ -0,0 +1,415 @@
|
||||
#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);
|
||||
|
||||
#define LIBUSB_HAS_INSTALL_NP 1
|
||||
int usb_install_npW(HWND hwnd, HINSTANCE instance, LPCWSTR cmd_line, int starg_arg);
|
||||
int usb_install_npA(HWND hwnd, HINSTANCE instance, LPCSTR cmd_line, int starg_arg);
|
||||
#define usb_install_np usb_install_npA
|
||||
void CALLBACK usb_install_np_rundll(HWND wnd, HINSTANCE instance,
|
||||
LPSTR cmd_line, int cmd_show);
|
||||
|
||||
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__ */
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,27 @@
|
||||
Build started 4/21/2012 6:31:52 AM.
|
||||
1>Project "E:\PcDmis\2012_MR1_QA\Pcdlrn\INTERFAC\MSI\HSI\MicroVu\libusb-win32-src-1.2.4.0\projects\libusb-dll.vcxproj" on node 2 (rebuild target(s)).
|
||||
1>_PrepareForClean:
|
||||
Deleting file "E:\PcDmis\2012_MR1_QA\Pcdlrn\INTERFAC\MSI\HSI\MicroVu\Mv_Util\Win32\Debug\libusb0\libusb0.lastbuildstate".
|
||||
InitializeBuildStatus:
|
||||
Creating "E:\PcDmis\2012_MR1_QA\Pcdlrn\INTERFAC\MSI\HSI\MicroVu\Mv_Util\Win32\Debug\libusb0\libusb0.unsuccessfulbuild" because "AlwaysCreate" was specified.
|
||||
ClCompile:
|
||||
d:\Program Files\Microsoft Visual Studio 10.0\VC\bin\CL.exe /c /I..\src /I..\src\driver /ZI /nologo /W3 /WX- /Od /Oy- /D _WIN32_WINNT=0x0500 /D "LOG_APPNAME=\"libusb0\"" /D TARGETTYPE=DYNLINK /D _WINDLL /D _MBCS /Gm /EHsc /RTC1 /MTd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"E:\PcDmis\2012_MR1_QA\Pcdlrn\INTERFAC\MSI\HSI\MicroVu\Mv_Util\Win32\Debug\libusb0\\" /Fd"E:\PcDmis\2012_MR1_QA\Pcdlrn\INTERFAC\MSI\HSI\MicroVu\Mv_Util\Win32\Debug\libusb0\vc100.pdb" /Gd /TC /wd4996 /analyze- /errorReport:prompt ..\src\descriptors.c ..\src\error.c ..\src\install.c ..\src\registry.c ..\src\usb.c ..\src\windows.c
|
||||
windows.c
|
||||
usb.c
|
||||
registry.c
|
||||
install.c
|
||||
error.c
|
||||
descriptors.c
|
||||
Generating Code...
|
||||
ResourceCompile:
|
||||
C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\rc.exe /D "LOG_APPNAME=\"libusb0\"" /D "MANIFEST_FILE=\"..\\manifest_x86.xml\"" /l"0x0409" /I..\src /nologo /fo"E:\PcDmis\2012_MR1_QA\Pcdlrn\INTERFAC\MSI\HSI\MicroVu\Mv_Util\Win32\Debug\libusb0\resource.res" ..\src\resource.rc
|
||||
Link:
|
||||
d:\Program Files\Microsoft Visual Studio 10.0\VC\bin\link.exe /ERRORREPORT:PROMPT /OUT:"E:\PcDmis\2012_MR1_QA\Pcdlrn\INTERFAC\MSI\HSI\MicroVu\Mv_Util\Win32\Debug\libusb0\libusb0.dll" /NOLOGO setupapi.lib kernel32.lib advapi32.lib user32.lib shell32.lib gdi32.lib /DEF:"..\libusb0.def" /MANIFEST:NO /DEBUG /PDB:"E:\PcDmis\2012_MR1_QA\Pcdlrn\INTERFAC\MSI\HSI\MicroVu\Mv_Util\Win32\Debug\libusb0\libusb0.pdb" /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"E:\PcDmis\2012_MR1_QA\Pcdlrn\INTERFAC\MSI\HSI\MicroVu\Mv_Util\Win32\Debug\libusb0\libusb0.lib" /MACHINE:X86 /DLL E:\PcDmis\2012_MR1_QA\Pcdlrn\INTERFAC\MSI\HSI\MicroVu\Mv_Util\Win32\Debug\libusb0\resource.res
|
||||
E:\PcDmis\2012_MR1_QA\Pcdlrn\INTERFAC\MSI\HSI\MicroVu\Mv_Util\Win32\Debug\libusb0\descriptors.obj
|
||||
E:\PcDmis\2012_MR1_QA\Pcdlrn\INTERFAC\MSI\HSI\MicroVu\Mv_Util\Win32\Debug\libusb0\error.obj
|
||||
E:\PcDmis\2012_MR1_QA\Pcdlrn\INTERFAC\MSI\HSI\MicroVu\Mv_Util\Win32\Debug\libusb0\install.obj
|
||||
E:\PcDmis\2012_MR1_QA\Pcdlrn\INTERFAC\MSI\HSI\MicroVu\Mv_Util\Win32\Debug\libusb0\registry.obj
|
||||
E:\PcDmis\2012_MR1_QA\Pcdlrn\INTERFAC\MSI\HSI\MicroVu\Mv_Util\Win32\Debug\libusb0\usb.obj
|
||||
E:\PcDmis\2012_MR1_QA\Pcdlrn\INTERFAC\MSI\HSI\MicroVu\Mv_Util\Win32\Debug\libusb0\windows.obj
|
||||
Creating library E:\PcDmis\2012_MR1_QA\Pcdlrn\INTERFAC\MSI\HSI\MicroVu\Mv_Util\Win32\Debug\libusb0\libusb0.lib and object E:\PcDmis\2012_MR1_QA\Pcdlrn\INTERFAC\MSI\HSI\MicroVu\Mv_Util\Win32\Debug\libusb0\libusb0.exp
|
||||
libusb-dll.vcxproj -> E:\PcDmis\2012_MR1_QA\Pcdlrn\INTERFAC\MSI\HSI\MicroVu\Mv_Util\Win32\Debug\libusb0\libusb0.dll
|
||||
Binary file not shown.
@@ -0,0 +1,26 @@
|
||||
E:\PcDmis\2012_MR1_QA\Pcdlrn\INTERFAC\MSI\HSI\MicroVu\Mv_Util\Win32\Debug\libusb0\cl.command.1.tlog
|
||||
E:\PcDmis\2012_MR1_QA\Pcdlrn\INTERFAC\MSI\HSI\MicroVu\Mv_Util\Win32\Debug\libusb0\CL.read.1.tlog
|
||||
E:\PcDmis\2012_MR1_QA\Pcdlrn\INTERFAC\MSI\HSI\MicroVu\Mv_Util\Win32\Debug\libusb0\CL.write.1.tlog
|
||||
E:\PCDMIS\2012_MR1_QA\PCDLRN\INTERFAC\MSI\HSI\MICROVU\MV_UTIL\WIN32\DEBUG\LIBUSB0\DESCRIPTORS.OBJ
|
||||
E:\PCDMIS\2012_MR1_QA\PCDLRN\INTERFAC\MSI\HSI\MICROVU\MV_UTIL\WIN32\DEBUG\LIBUSB0\ERROR.OBJ
|
||||
E:\PCDMIS\2012_MR1_QA\PCDLRN\INTERFAC\MSI\HSI\MICROVU\MV_UTIL\WIN32\DEBUG\LIBUSB0\INSTALL.OBJ
|
||||
E:\PCDMIS\2012_MR1_QA\PCDLRN\INTERFAC\MSI\HSI\MICROVU\MV_UTIL\WIN32\DEBUG\LIBUSB0\LIBUSB0.DLL
|
||||
E:\PcDmis\2012_MR1_QA\Pcdlrn\INTERFAC\MSI\HSI\MicroVu\Mv_Util\Win32\Debug\libusb0\libusb0.exp
|
||||
E:\PCDMIS\2012_MR1_QA\PCDLRN\INTERFAC\MSI\HSI\MICROVU\MV_UTIL\WIN32\DEBUG\LIBUSB0\LIBUSB0.ILK
|
||||
E:\PcDmis\2012_MR1_QA\Pcdlrn\INTERFAC\MSI\HSI\MicroVu\Mv_Util\Win32\Debug\libusb0\libusb0.lib
|
||||
E:\PCDMIS\2012_MR1_QA\PCDLRN\INTERFAC\MSI\HSI\MICROVU\MV_UTIL\WIN32\DEBUG\LIBUSB0\LIBUSB0.PDB
|
||||
E:\PcDmis\2012_MR1_QA\Pcdlrn\INTERFAC\MSI\HSI\MicroVu\Mv_Util\Win32\Debug\libusb0\libusb0.write.1.tlog
|
||||
E:\PcDmis\2012_MR1_QA\Pcdlrn\INTERFAC\MSI\HSI\MicroVu\Mv_Util\Win32\Debug\libusb0\link.command.1.tlog
|
||||
E:\PcDmis\2012_MR1_QA\Pcdlrn\INTERFAC\MSI\HSI\MicroVu\Mv_Util\Win32\Debug\libusb0\link.read.1.tlog
|
||||
E:\PcDmis\2012_MR1_QA\Pcdlrn\INTERFAC\MSI\HSI\MicroVu\Mv_Util\Win32\Debug\libusb0\link.write.1.tlog
|
||||
E:\PcDmis\2012_MR1_QA\Pcdlrn\INTERFAC\MSI\HSI\MicroVu\Mv_Util\Win32\Debug\libusb0\link-cvtres.read.1.tlog
|
||||
E:\PcDmis\2012_MR1_QA\Pcdlrn\INTERFAC\MSI\HSI\MicroVu\Mv_Util\Win32\Debug\libusb0\link-cvtres.write.1.tlog
|
||||
E:\PcDmis\2012_MR1_QA\Pcdlrn\INTERFAC\MSI\HSI\MicroVu\Mv_Util\Win32\Debug\libusb0\rc.command.1.tlog
|
||||
E:\PcDmis\2012_MR1_QA\Pcdlrn\INTERFAC\MSI\HSI\MicroVu\Mv_Util\Win32\Debug\libusb0\rc.read.1.tlog
|
||||
E:\PcDmis\2012_MR1_QA\Pcdlrn\INTERFAC\MSI\HSI\MicroVu\Mv_Util\Win32\Debug\libusb0\rc.write.1.tlog
|
||||
E:\PCDMIS\2012_MR1_QA\PCDLRN\INTERFAC\MSI\HSI\MICROVU\MV_UTIL\WIN32\DEBUG\LIBUSB0\REGISTRY.OBJ
|
||||
E:\PCDMIS\2012_MR1_QA\PCDLRN\INTERFAC\MSI\HSI\MICROVU\MV_UTIL\WIN32\DEBUG\LIBUSB0\RESOURCE.RES
|
||||
E:\PCDMIS\2012_MR1_QA\PCDLRN\INTERFAC\MSI\HSI\MICROVU\MV_UTIL\WIN32\DEBUG\LIBUSB0\USB.OBJ
|
||||
E:\PcDmis\2012_MR1_QA\Pcdlrn\INTERFAC\MSI\HSI\MicroVu\Mv_Util\Win32\Debug\libusb0\vc100.idb
|
||||
E:\PCDMIS\2012_MR1_QA\PCDLRN\INTERFAC\MSI\HSI\MICROVU\MV_UTIL\WIN32\DEBUG\LIBUSB0\VC100.PDB
|
||||
E:\PCDMIS\2012_MR1_QA\PCDLRN\INTERFAC\MSI\HSI\MICROVU\MV_UTIL\WIN32\DEBUG\LIBUSB0\WINDOWS.OBJ
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
#v4.0:v100:false
|
||||
Debug|Win32|E:\PcDmis\2012_MR1_QA\Pcdlrn\INTERFAC\MSI\HSI\MicroVu\Mv_Util\|
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,5 @@
|
||||
^E:\PcDmis\2012_MR1_QA\Pcdlrn\INTERFAC\MSI\HSI\MicroVu\libusb-win32-src-1.2.4.0\projects\libusb-dll.vcxproj
|
||||
E:\PcDmis\2012_MR1_QA\Pcdlrn\INTERFAC\MSI\HSI\MicroVu\Mv_Util\Win32\Debug\libusb0\libusb0.lib
|
||||
E:\PcDmis\2012_MR1_QA\Pcdlrn\INTERFAC\MSI\HSI\MicroVu\Mv_Util\Win32\Debug\libusb0\libusb0.lib
|
||||
E:\PcDmis\2012_MR1_QA\Pcdlrn\INTERFAC\MSI\HSI\MicroVu\Mv_Util\Win32\Debug\libusb0\libusb0.exp
|
||||
E:\PcDmis\2012_MR1_QA\Pcdlrn\INTERFAC\MSI\HSI\MicroVu\Mv_Util\Win32\Debug\libusb0\libusb0.exp
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,16 @@
|
||||
|
||||
Library, Test Programs:
|
||||
|
||||
Stephan Meyer, <ste_meyer@web.de>
|
||||
Johannes Erdfelt, <johannes@erdfelt.com>
|
||||
Thomas Sailer, <sailer@ife.ee.ethz.ch>
|
||||
|
||||
Drivers, Installer:
|
||||
|
||||
Stephan Meyer, <ste_meyer@web.de>
|
||||
Travis Robinson, <libusbdotnet@gmail.com>
|
||||
|
||||
Testing, Technical support:
|
||||
|
||||
Xiaofan Chen, <xiaofanc@gmail.com>
|
||||
|
||||
@@ -0,0 +1,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 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 General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
@@ -0,0 +1,165 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
|
||||
0. Additional Definitions.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||
General Public License.
|
||||
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort to
|
||||
ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the
|
||||
Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
4. Combined Works.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that,
|
||||
taken together, effectively do not restrict modification of the
|
||||
portions of the Library contained in the Combined Work and reverse
|
||||
engineering for debugging such modifications, if you also do each of
|
||||
the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this
|
||||
License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (a) uses at run time
|
||||
a copy of the Library already present on the user's computer
|
||||
system, and (b) will operate properly with a modified version
|
||||
of the Library that is interface-compatible with the Linked
|
||||
Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise
|
||||
be required to provide such information under section 6 of the
|
||||
GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the
|
||||
Application with a modified version of the Linked Version. (If
|
||||
you use option 4d0, the Installation Information must accompany
|
||||
the Minimal Corresponding Source and Corresponding Application
|
||||
Code. If you use option 4d1, you must provide the Installation
|
||||
Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
|
||||
You may place library facilities that are a work based on the
|
||||
Library side by side in a single library together with other library
|
||||
facilities that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities,
|
||||
conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it
|
||||
is a work based on the Library, and explaining where to find the
|
||||
accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Lesser General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Library as you received it specifies that a certain numbered version
|
||||
of the GNU Lesser General Public License "or any later version"
|
||||
applies to it, you have the option of following the terms and
|
||||
conditions either of that published version or of any later version
|
||||
published by the Free Software Foundation. If the Library as you
|
||||
received it does not specify a version number of the GNU Lesser
|
||||
General Public License, you may choose any version of the GNU Lesser
|
||||
General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
||||
@@ -0,0 +1,261 @@
|
||||
# LIBUSB-WIN32, Generic Windows USB Library
|
||||
# Copyright (c) 2002-2005 Stephan Meyer <ste_meyer@web.de>
|
||||
# Copyright (c) 2010 Travis Robinson <libusbdotnet@gmail.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
# Supported arugments: all, dll, filter, infwizard, test, testwin, driver
|
||||
#
|
||||
#
|
||||
|
||||
# If you're cross-compiling and your mingw32 tools are called
|
||||
# i586-mingw32msvc-gcc and so on, then you can compile libusb-win32
|
||||
# by running
|
||||
# make host_prefix=i586-mingw32msvc all
|
||||
|
||||
ifdef host_prefix
|
||||
override host_prefix := $(host_prefix)-
|
||||
endif
|
||||
ifdef host_prefix_x86
|
||||
override host_prefix_x86 := $(host_prefix_x86)-
|
||||
endif
|
||||
ifdef cflags
|
||||
DBG_DEFINE = $(cflags)
|
||||
endif
|
||||
|
||||
CC = $(host_prefix)gcc
|
||||
LD = $(host_prefix)ld
|
||||
WINDRES = $(host_prefix)windres
|
||||
DLLTOOL = $(host_prefix)dlltool
|
||||
|
||||
CC86 = $(host_prefix_x86)gcc
|
||||
LD86 = $(host_prefix_x86)ld
|
||||
WINDRES86 = windres
|
||||
DLLTOOL86 = dlltool
|
||||
|
||||
MAKE = make
|
||||
CP = cp
|
||||
CD = cd
|
||||
MV = mv
|
||||
RM = -rm -fr
|
||||
TAR = tar
|
||||
ISCC = iscc
|
||||
INSTALL = install
|
||||
LIB = lib
|
||||
IMPLIB = implib
|
||||
UNIX2DOS = unix2dos
|
||||
|
||||
TARGET = libusb
|
||||
DLL_TARGET = $(TARGET)0
|
||||
LIB_TARGET = $(TARGET)
|
||||
DRIVER_TARGET = $(TARGET)0.sys
|
||||
INSTALL_DIR = /usr
|
||||
VPATH = .:./src:./src/driver:./tests
|
||||
|
||||
LIBWDI_DIR = ./projects/additional/libwdi/libwdi
|
||||
SRC_DIR = ./src
|
||||
DRIVER_SRC_DIR = $(SRC_DIR)/driver
|
||||
|
||||
LIBWDI_CONFIG_H = -DWDF_VER=\"01009\" -DUSER_DIR=\"\" -DOPT_M32 -DWINVER=0x500
|
||||
|
||||
DRIVER_OBJECTS = abort_endpoint.o claim_interface.o clear_feature.o \
|
||||
dispatch.o get_configuration.o \
|
||||
get_descriptor.o get_interface.o get_status.o \
|
||||
ioctl.o libusb_driver.o pnp.o release_interface.o reset_device.o \
|
||||
reset_endpoint.o set_configuration.o set_descriptor.o \
|
||||
set_feature.o set_interface.o transfer.o vendor_request.o \
|
||||
power.o driver_registry.o error.o libusb_driver_rc.o
|
||||
|
||||
LIBWDI_OBJECTS = $(LIBWDI_DIR)/logging.5.o \
|
||||
$(LIBWDI_DIR)/tokenizer.5.o \
|
||||
$(LIBWDI_DIR)/vid_data.5.o \
|
||||
$(LIBWDI_DIR)/libwdi_dlg.5.o \
|
||||
$(LIBWDI_DIR)/libwdi.5.o
|
||||
|
||||
|
||||
INCLUDES = -I./src -I./src/driver -I.
|
||||
|
||||
CFLAGS = -O2 -Wall -DWINVER=0x500 $(DBG_DEFINE)
|
||||
WIN_CFLAGS = $(CFLAGS) -mwindows
|
||||
|
||||
WINDRES_FLAGS = -I$(SRC_DIR)
|
||||
|
||||
STDC_LD_LIBS=-lkernel32 \
|
||||
-luser32 \
|
||||
-lgdi32 \
|
||||
-lwinspool \
|
||||
-lcomdlg32 \
|
||||
-ladvapi32 \
|
||||
-lshell32 \
|
||||
-lole32 \
|
||||
-loleaut32 \
|
||||
-luuid \
|
||||
-lodbc32 \
|
||||
-lodbccp32
|
||||
|
||||
LDFLAGS = -s -L. -lusb -lgdi32 -luser32 -lcfgmgr32 -lsetupapi -lcomctl32
|
||||
TEST_WIN_LDFLAGS = -s -L. -lusb -lkernel32 -lgdi32 -luser32 -lnewdev -lsetupapi -lcomctl32 -lole32 -mwindows
|
||||
WIN_LDFLAGS = -s -L. -lkernel32 -lgdi32 -luser32 -lnewdev -lsetupapi -lcomctl32 -lole32 -mwindows
|
||||
DLL_LDFLAGS = -s -mdll \
|
||||
-Wl,--kill-at \
|
||||
-Wl,--out-implib,$(LIB_TARGET).a \
|
||||
-Wl,--enable-stdcall-fixup \
|
||||
-L. -lcfgmgr32 -lsetupapi -lgdi32
|
||||
|
||||
LIBWDI_DLL_LDFLAGS = -s -shared \
|
||||
-Wl,--kill-at \
|
||||
-Wl,--out-implib,libwdi.a \
|
||||
-Wl,--enable-stdcall-fixup \
|
||||
-L. -lnewdev -lsetupapi -lole32
|
||||
|
||||
DRIVER_LDFLAGS = -s -shared -Wl,--entry,_DriverEntry@8 \
|
||||
-nostartfiles -nostdlib -L. -lusbd -lntoskrnl -lhal
|
||||
|
||||
|
||||
.PHONY: all
|
||||
all: dll filter infwizard test testwin driver
|
||||
|
||||
.PHONY: dll
|
||||
dll: DLL_CFLAGS = $(CFLAGS) -DLOG_APPNAME=\"$(DLL_TARGET)-dll\" -DTARGETTYPE=DYNLINK
|
||||
dll: $(DLL_TARGET).dll
|
||||
|
||||
$(DLL_TARGET).dll: usb.2.o error.2.o descriptors.2.o windows.2.o install.2.o registry.2.o resource.2.o
|
||||
$(CC) $(DLL_CFLAGS) -o $@ -I./src $^ $(DLL_TARGET).def $(DLL_LDFLAGS)
|
||||
|
||||
%.2.o: %.c libusb_driver.h driver_api.h error.h
|
||||
$(CC) $(DLL_CFLAGS) -c $< -o $@ $(CPPFLAGS) $(INCLUDES)
|
||||
|
||||
%.2.o: %.rc
|
||||
$(WINDRES) $(CPPFLAGS) $(WINDRES_FLAGS) $< -o $@
|
||||
|
||||
.PHONY: filter
|
||||
filter: FILTER_CFLAGS = $(CFLAGS) -DLOG_APPNAME=\"install-filter\" -DTARGETTYPE=PROGRAMconsole -DLOG_STYLE_SHORT
|
||||
filter: FILTER_LDFLAGS = -s -L. -lgdi32 -luser32 -lcfgmgr32 -lsetupapi
|
||||
filter: install-filter.exe
|
||||
|
||||
|
||||
install-filter.exe: install_filter.1.o error.1.o install.1.o registry.1.o install_filter_rc.1.o
|
||||
$(CC) $(FILTER_CFLAGS) -o $@ -I./src $^ $(FILTER_LDFLAGS)
|
||||
|
||||
%.1.o: %.c libusb_driver.h driver_api.h error.h
|
||||
$(CC) $(FILTER_CFLAGS) -c $< -o $@ $(CPPFLAGS) $(INCLUDES)
|
||||
|
||||
%.1.o: %.rc
|
||||
$(WINDRES) $(CPPFLAGS) $(WINDRES_FLAGS) $< -o $@
|
||||
|
||||
.PHONY: test
|
||||
test: dll
|
||||
test: TEST_CFLAGS = $(CFLAGS) -DLOG_APPNAME=\"testlibusb\" -DTARGETTYPE=PROGRAMconsole
|
||||
test: testlibusb.exe
|
||||
|
||||
testlibusb.exe: testlibusb.3.o
|
||||
$(CC) $(TEST_CFLAGS) -o $@ -I./src $^ $(LDFLAGS)
|
||||
|
||||
%.3.o: %.c libusb_driver.h driver_api.h error.h
|
||||
$(CC) -c $< -o $@ $(TEST_CFLAGS) $(CPPFLAGS) $(INCLUDES)
|
||||
|
||||
.PHONY: testwin
|
||||
testwin: dll
|
||||
testwin: TESTWIN_CFLAGS = $(CFLAGS) -DLOG_APPNAME=\"testlibusb-win\" -DTARGETTYPE=PROGRAMwindows
|
||||
testwin: testlibusb-win.exe
|
||||
|
||||
testlibusb-win.exe: testlibusb_win.4.o testlibusb_win_rc.4.o
|
||||
$(CC) $(TESTWIN_CFLAGS) -o $@ -I./src $^ $(TEST_WIN_LDFLAGS)
|
||||
|
||||
%.4.o: %.c libusb_driver.h driver_api.h error.h
|
||||
$(CC) -c $< -o $@ $(TESTWIN_CFLAGS) $(CPPFLAGS) $(INCLUDES)
|
||||
|
||||
%.4.o: %.rc
|
||||
$(WINDRES) $(CPPFLAGS) $(WINDRES_FLAGS) $< -o $@
|
||||
|
||||
#
|
||||
# LIBWDI installer_x86
|
||||
#
|
||||
.PHONY: installer_x86
|
||||
installer_x86: INSTALLER_CFLAGS = $(CFLAGS) -DLOG_APPNAME=\"installer_x86\" -DTARGETTYPE=PROGRAMconsole $(LIBWDI_CONFIG_H)
|
||||
installer_x86: INSTALLER_LDFLAGS = -s -L. -ladvapi32 -lnewdev -lsetupapi
|
||||
installer_x86: installer_x86.exe
|
||||
|
||||
installer_x86.exe: $(LIBWDI_DIR)/installer.6.o
|
||||
$(CC86) $(INSTALLER_CFLAGS) -o $@ -I$(LIBWDI_DIR) $^ $(INSTALLER_LDFLAGS)
|
||||
$(CP) $(LIBWDI_DIR)/../msvc/config.h $(LIBWDI_DIR)
|
||||
|
||||
%.6.o: %.c $(LIBWDI_DIR)/installer.h
|
||||
$(CC86) -c $< -o $@ $(INSTALLER_CFLAGS) $(CPPFLAGS) -DWINVER=0x500 -I$(LIBWDI_DIR)
|
||||
|
||||
#
|
||||
# LIBWDI embedder
|
||||
#
|
||||
.PHONY: embedder
|
||||
embedder: installer_x86
|
||||
embedder: EMBEDDER_CFLAGS = $(CFLAGS) -DLOG_APPNAME=\"embedder\" -DTARGETTYPE=PROGRAMconsole $(LIBWDI_CONFIG_H)
|
||||
embedder: EMBEDDER_LDFLAGS = -s -L. -luser32 -lversion
|
||||
embedder: embedder.exe
|
||||
|
||||
embedder.exe: $(LIBWDI_DIR)/embedder.7.o
|
||||
$(CC86) $(EMBEDDER_CFLAGS) -o $@ -I$(LIBWDI_DIR) $^ $(EMBEDDER_LDFLAGS)
|
||||
$(CP) -u $(LIBWDI_DIR)/winusb.inf.in ./
|
||||
$(CP) -u $(LIBWDI_DIR)/libusb-win32.inf.in ./
|
||||
./embedder.exe embedded.h
|
||||
|
||||
%.7.o: %.c $(LIBWDI_DIR)/embedder.h
|
||||
$(CC86) -c $< -o $@ $(EMBEDDER_CFLAGS) $(CPPFLAGS) -DWINVER=0x500 -I$(LIBWDI_DIR)
|
||||
|
||||
.PHONY: infwizard
|
||||
infwizard: embedder
|
||||
infwizard: INFWIZARD_CFLAGS = $(CFLAGS) -DLOG_APPNAME=\"infwizard\" -DTARGETTYPE=PROGRAMwindows
|
||||
infwizard: inf-wizard.exe
|
||||
|
||||
inf-wizard.exe: inf_wizard.5.o inf_wizard_rc.5.o $(LIBWDI_OBJECTS)
|
||||
$(CC86) $(WIN_CFLAGS) -o $@ -I./src -I$(LIBWDI_DIR) $^ $(WIN_LDFLAGS)
|
||||
|
||||
%.5.o: %.c libusb-win32_version.h $(LIBWDI_DIR)/libwdi.h
|
||||
$(CC86) -c $< -o $@ -I$(LIBWDI_DIR) $(INFWIZARD_CFLAGS) $(CPPFLAGS) $(INCLUDES)
|
||||
|
||||
%.5.o: %.rc
|
||||
$(WINDRES86) $(CPPFLAGS) $(WINDRES_FLAGS) $< -o $@
|
||||
|
||||
.PHONY: driver
|
||||
driver: DRIVER_CFLAGS = $(CFLAGS) -DLOG_APPNAME=\"$(DLL_TARGET)-sys\" -DTARGETTYPE=DRIVER
|
||||
driver: $(DRIVER_TARGET)
|
||||
|
||||
$(DRIVER_TARGET): libusbd.a $(DRIVER_OBJECTS)
|
||||
$(CC) -o $@ $(DRIVER_OBJECTS) $(DLL_TARGET)_drv.def $(DRIVER_LDFLAGS)
|
||||
|
||||
libusbd.a:
|
||||
$(DLLTOOL) --dllname usbd.sys --add-underscore --def ./src/driver/usbd.def --output-lib libusbd.a
|
||||
|
||||
%.o: %.c libusb_driver.h driver_api.h error.h
|
||||
$(CC) -c $< -o $@ $(DRIVER_CFLAGS) $(CPPFLAGS) $(INCLUDES)
|
||||
|
||||
%.o: %.rc
|
||||
$(WINDRES) $(CPPFLAGS) $(WINDRES_FLAGS) $< -o $@
|
||||
|
||||
.PHONY: cleantemp
|
||||
cleantemp:
|
||||
$(RM) *.o *.a *.exp *.tar.gz *~ *.iss *.rc *.h
|
||||
$(RM) $(LIBWDI_DIR)/*.o
|
||||
$(RM) $(LIBWDI_DIR)/config.h
|
||||
$(RM) ./src/*~ *.log
|
||||
$(RM) $(DRIVER_SRC_DIR)/*~
|
||||
$(RM) README.txt
|
||||
$(RM) winusb.inf.in
|
||||
$(RM) libusb-win32.inf.in
|
||||
$(RM) inf_wizard.ico
|
||||
|
||||
.PHONY: clean
|
||||
clean: cleantemp
|
||||
$(RM) *.dll *.lib *.exe *.sys
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
This is libusb-win32 (http://libusb-win32.sourceforge.net) version @VERSION@.
|
||||
Libusb-win32 is a library that allows userspace application to access USB
|
||||
devices on Windows operation systems (Win2k, WinXP, Vista, Win7).
|
||||
It is derived from and fully API compatible to libusb available at
|
||||
http://libusb.sourceforge.net.
|
||||
|
||||
For more information visit the project's web site at:
|
||||
|
||||
http://libusb-win32.sourceforge.net
|
||||
http://sourceforge.net/projects/libusb-win32
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
This is libusb-win32 (http://libusb-win32.sourceforge.net) version 1.2.4.0.
|
||||
Libusb-win32 is a library that allows userspace application to access USB
|
||||
devices on Windows operation systems (Win2k, WinXP, Vista, Win7).
|
||||
It is derived from and fully API compatible to libusb available at
|
||||
http://libusb.sourceforge.net.
|
||||
|
||||
For more information visit the project's web site at:
|
||||
|
||||
http://libusb-win32.sourceforge.net
|
||||
http://sourceforge.net/projects/libusb-win32
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
@ECHO OFF
|
||||
:: Use this batch file instead of the winddk "build" command.
|
||||
::
|
||||
:: - Calls the winddk build command. Sets BUILD_ERRORLEVEL=1 if
|
||||
:: a build error is detected.
|
||||
:: - Sets LOG_APPNAME define (unless already set)
|
||||
:: - Sets libusb-win32 version defines (unless already set)
|
||||
::
|
||||
|
||||
IF "%LOG_APPNAME%"=="" SET LOG_APPNAME=$(TARGETNAME)
|
||||
SET COMMON_C_DEFINES=
|
||||
SET COMMON_C_DEFINES=%COMMON_C_DEFINES% /DLOG_APPNAME="\"$(LOG_APPNAME)\""
|
||||
IF DEFINED CMDVAR_LOG_DIRECTORY SET COMMON_C_DEFINES=%COMMON_C_DEFINES% /DLOG_DIRECTORY="\"$(CMDVAR_LOG_DIRECTORY)\""
|
||||
SET COMMON_C_DEFINES=%COMMON_C_DEFINES% %*
|
||||
|
||||
IF EXIST "build%BUILD_ALT_DIR%.err" DEL /Q "build%BUILD_ALT_DIR%.err" >NUL
|
||||
IF EXIST "build%BUILD_ALT_DIR%.wrn" DEL /Q "build%BUILD_ALT_DIR%.wrn" >NUL
|
||||
SET BUILD_ERRORLEVEL=0
|
||||
|
||||
if exist libusb0.lib move /Y libusb0.lib libusb.lib >NUL
|
||||
|
||||
build -cwgZ 2>NUL>NUL
|
||||
IF EXIST "build%BUILD_ALT_DIR%.err" TYPE "build%BUILD_ALT_DIR%.err"
|
||||
IF EXIST "build%BUILD_ALT_DIR%.wrn" TYPE "build%BUILD_ALT_DIR%.wrn"
|
||||
IF EXIST "build%BUILD_ALT_DIR%.err" SET BUILD_ERRORLEVEL=1
|
||||
IF EXIST "build%BUILD_ALT_DIR%.err" SET ERRORLEVEL=1
|
||||
|
||||
+142
@@ -0,0 +1,142 @@
|
||||
; LIBUSB-WIN32, Generic Windows USB Library
|
||||
; Copyright (c) 2002-2010 Stephan Meyer <ste_meyer@web.de>
|
||||
; Copyright (c) 2010 Travis Robinson <libusbdotnet@gmail.com>
|
||||
;
|
||||
; This program is free software; you can redistribute it and/or modify
|
||||
; it under the terms of the GNU General Public License as published by
|
||||
; the Free Software Foundation; either version 2 of the License, or
|
||||
; (at your option) any later version.
|
||||
;
|
||||
; This program is distributed in the hope that it will be useful,
|
||||
; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
; GNU General Public License for more details.
|
||||
;
|
||||
; You should have received a copy of the GNU General Public License
|
||||
; along with this program; if not, write to the Free Software
|
||||
; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
[Setup]
|
||||
AppName = LibUSB-Win32
|
||||
AppVerName = LibUSB-Win32-@VERSION@
|
||||
AppId = LibUSB-Win32
|
||||
AppPublisher = LibUSB-Win32
|
||||
AppPublisherURL = http://libusb-win32.sourceforge.net
|
||||
AppVersion = @VERSION@
|
||||
VersionInfoVersion = @VERSION@
|
||||
DefaultDirName = {pf}\LibUSB-Win32
|
||||
DefaultGroupName = LibUSB-Win32
|
||||
LicenseFile = installer_license.txt
|
||||
InfoBeforeFile = libusb-win32-changelog-@VERSION@.txt
|
||||
Compression = lzma
|
||||
SolidCompression = yes
|
||||
OutputDir = .
|
||||
OutputBaseFilename = @PCKGNAME@
|
||||
; requires Win2k, or higher
|
||||
MinVersion = 0, 5.0.2195
|
||||
PrivilegesRequired=admin
|
||||
|
||||
; "ArchitecturesInstallIn64BitMode=x64 ia64" requests that the install
|
||||
; be done in "64-bit mode" on x64 & Itanium, meaning it should use the
|
||||
; native 64-bit Program Files directory and the 64-bit view of the
|
||||
; registry. On all other architectures it will install in "32-bit mode".
|
||||
ArchitecturesInstallIn64BitMode=x64 ia64
|
||||
AllowNoIcons=yes
|
||||
|
||||
[Code]
|
||||
function IsX64: Boolean;
|
||||
begin
|
||||
Result := Is64BitInstallMode and (ProcessorArchitecture = paX64);
|
||||
end;
|
||||
|
||||
function IsI64: Boolean;
|
||||
begin
|
||||
Result := Is64BitInstallMode and (ProcessorArchitecture = paIA64);
|
||||
end;
|
||||
|
||||
function IsX86: Boolean;
|
||||
begin
|
||||
Result := not IsX64 and not IsI64;
|
||||
end;
|
||||
|
||||
function Is64: Boolean;
|
||||
begin
|
||||
Result := IsX64 or IsI64;
|
||||
end;
|
||||
|
||||
function IsNormalInstall: Boolean;
|
||||
begin
|
||||
Result := not IsTaskSelected('installmode_upgade');
|
||||
end;
|
||||
|
||||
[Files]
|
||||
; LibUsb-win32 x86 (Windows 2000/XP and greater)
|
||||
Source: @PACKAGE_BIN_DIR@x86\libusb0_x86.dll; DestName: libusb0.dll; DestDir: {sys}; Flags: uninsneveruninstall replacesameversion restartreplace promptifolder; Check: IsX86;
|
||||
Source: @PACKAGE_BIN_DIR@x86\libusb0.sys; DestDir: {sys}\drivers; Flags: uninsneveruninstall replacesameversion restartreplace promptifolder; Check: IsX86;
|
||||
Source: @PACKAGE_BIN_DIR@x86\install-filter.exe; DestDir: {app}\bin; Flags: ignoreversion; Check: IsX86;
|
||||
Source: @PACKAGE_BIN_DIR@x86\install-filter-win.exe; DestDir: {app}\bin; Flags: ignoreversion; Check: IsX86;
|
||||
Source: @PACKAGE_BIN_DIR@x86\testlibusb-win.exe; DestDir: {app}\bin; Flags: ignoreversion; Check: IsX86;
|
||||
Source: @PACKAGE_BIN_DIR@x86\testlibusb.exe; DestDir: {app}\bin; Flags: ignoreversion; Check: IsX86;
|
||||
|
||||
; LibUsb-win32 AMD 64bit
|
||||
Source: @PACKAGE_BIN_DIR@x86\libusb0_x86.dll; DestName: libusb0.dll; DestDir: {syswow64}; Flags: uninsneveruninstall replacesameversion restartreplace promptifolder; Check: IsX64;
|
||||
Source: @PACKAGE_BIN_DIR@amd64\libusb0.sys; DestDir: {sys}\drivers; Flags: uninsneveruninstall replacesameversion restartreplace promptifolder; Check: IsX64;
|
||||
Source: @PACKAGE_BIN_DIR@amd64\libusb0.dll; DestDir: {sys}; Flags: uninsneveruninstall replacesameversion restartreplace promptifolder; Check: IsX64;
|
||||
Source: @PACKAGE_BIN_DIR@amd64\install-filter.exe; DestDir: {app}\bin; Flags: ignoreversion; Check: IsX64;
|
||||
Source: @PACKAGE_BIN_DIR@amd64\install-filter-win.exe; DestDir: {app}\bin; Flags: ignoreversion; Check: IsX64;
|
||||
Source: @PACKAGE_BIN_DIR@amd64\testlibusb-win.exe; DestDir: {app}\bin; Flags: ignoreversion; Check: IsX64;
|
||||
Source: @PACKAGE_BIN_DIR@amd64\testlibusb.exe; DestDir: {app}\bin; Flags: ignoreversion; Check: IsX64;
|
||||
|
||||
; LibUsb-win32 Itanium 64bit
|
||||
Source: @PACKAGE_BIN_DIR@x86\libusb0_x86.dll; DestName: libusb0.dll; DestDir: {syswow64}; Flags: uninsneveruninstall replacesameversion restartreplace promptifolder; Check: IsI64;
|
||||
Source: @PACKAGE_BIN_DIR@ia64\libusb0.sys; DestDir: {sys}\drivers; Flags: uninsneveruninstall replacesameversion restartreplace promptifolder; Check: IsI64;
|
||||
Source: @PACKAGE_BIN_DIR@ia64\libusb0.dll; DestDir: {sys}; Flags: uninsneveruninstall replacesameversion restartreplace promptifolder; Check: IsI64;
|
||||
Source: @PACKAGE_BIN_DIR@ia64\install-filter.exe; DestDir: {app}\bin; Flags: ignoreversion; Check: IsI64;
|
||||
Source: @PACKAGE_BIN_DIR@ia64\install-filter-win.exe; DestDir: {app}\bin; Flags: ignoreversion; Check: IsI64;
|
||||
Source: @PACKAGE_BIN_DIR@ia64\testlibusb-win.exe; DestDir: {app}\bin; Flags: ignoreversion; Check: IsI64;
|
||||
Source: @PACKAGE_BIN_DIR@ia64\testlibusb.exe; DestDir: {app}\bin; Flags: ignoreversion; Check: IsI64;
|
||||
|
||||
;inf-wizard (x86 only)
|
||||
Source: @PACKAGE_BIN_DIR@inf-wizard.exe; DestDir: {app}\bin; Flags: ignoreversion;
|
||||
|
||||
Source: @LIBUSB_DIR@src\install-filter-help.txt; DestDir: {app}; Flags: ignoreversion;
|
||||
|
||||
; test applications(x86 runtimes for 64bit machines)
|
||||
Source: @PACKAGE_BIN_DIR@x86\testlibusb-win.exe; DestDir: {app}\bin\x86; Flags: ignoreversion; Check: Is64;
|
||||
Source: @PACKAGE_BIN_DIR@x86\testlibusb.exe; DestDir: {app}\bin\x86; Flags: ignoreversion; Check: Is64;
|
||||
|
||||
; Text, Licenses
|
||||
Source: *.txt; DestDir: {app}; Flags: ignoreversion;
|
||||
|
||||
; Test Certificate (This is only included in debug builds)
|
||||
Source: *.cer; DestDir: {app}; Flags: ignoreversion skipifsourcedoesntexist; Check: Is64;
|
||||
|
||||
; DebugView (This is only included in debug builds)
|
||||
Source: @PACKAGE_ROOT_DIR@additional\dbgview.*; DestDir: {app}\additional; Flags: ignoreversion skipifsourcedoesntexist;
|
||||
|
||||
[Icons]
|
||||
; these icons are only used in debug builds
|
||||
Name: "{group}\Libusb-Win32 Test Certificate"; Filename: {app}\LibusbWin32TestCert.cer; Flags: createonlyiffileexists;
|
||||
Name: "{group}\DebugView\DebugView"; Filename: {app}\additional\Dbgview.exe; Flags: createonlyiffileexists;
|
||||
Name: "{group}\DebugView\DebugView Help"; Filename: {app}\additional\dbgview.chm; Flags: createonlyiffileexists;
|
||||
|
||||
; libusb-win32 icons
|
||||
Name: "{group}\Test (Win) Program"; Filename: {app}\bin\testlibusb-win.exe;
|
||||
Name: "{group}\Inf Wizard"; Filename: {app}\bin\inf-wizard.exe;
|
||||
Name: "{group}\Filter Wizard"; Filename: {app}\bin\install-filter-win.exe;
|
||||
Name: "{group}\Filter Console Help"; Filename: {app}\install-filter-help.txt;
|
||||
Name: "{group}\Class Filter\Install all class filters"; Filename: {app}\bin\install-filter-win.exe; Parameters:"i -ac -p -w"; Comment: "Installs all libusb-win32 class filters."
|
||||
Name: "{group}\Class Filter\Remove all class filters"; Filename: {app}\bin\install-filter-win.exe; Parameters:"u -ac -w"; Comment: "Removes all libusb-win32 class filters."
|
||||
Name: "{group}\License\GPL License"; Filename: {app}\COPYING_GPL.txt;
|
||||
Name: "{group}\License\LGPL License"; Filename: {app}\COPYING_LGPL.txt;
|
||||
Name: "{group}\Uninstall LibUsb-Win32"; Filename: {uninstallexe};
|
||||
|
||||
[Run]
|
||||
Filename: "{app}\bin\install-filter-win.exe"; Description: "Launch filter installer wizard"; Flags: postinstall nowait runascurrentuser; Check: not WizardNoIcons;
|
||||
|
||||
[UninstallRun]
|
||||
Filename: "rundll32.exe"; RunOnceID:"FilterAllDeviceClasses"; Parameters: "libusb0,usb_install_np_rundll u -ac";
|
||||
|
||||
[Messages]
|
||||
StatusUninstalling=Uninstalling %1 and removing all class filters..
|
||||
@@ -0,0 +1,110 @@
|
||||
; oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
|
||||
; LIBUSB-WIN32 WINDDK MAKE CONFIGURATION FILE
|
||||
; Travis Robinson (libusbdotnet@gmail.com)
|
||||
;
|
||||
; NOTE: param/values passed into make.cmd will override these values
|
||||
; NOTE: destination directories are automatically created
|
||||
; oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
|
||||
|
||||
;
|
||||
; Sets the libusb-win32 build version
|
||||
;
|
||||
VERSION_MAJOR=1
|
||||
VERSION_MINOR=2
|
||||
VERSION_MICRO=4
|
||||
VERSION_NANO=0
|
||||
|
||||
;
|
||||
; The libusb-win32 version string.
|
||||
; (Should not be changed)
|
||||
VERSION=!VERSION_MAJOR!.!VERSION_MINOR!.!VERSION_MICRO!.!VERSION_NANO!
|
||||
|
||||
;
|
||||
; Default WinDDK directory(s) Adjust these values to match your environment
|
||||
; (REQUIRED)
|
||||
WINDDK_BASE=Z:\WinDDK
|
||||
WINDDK_DIR=!WINDDK_BASE!\6001.18002\
|
||||
;
|
||||
; (optional)
|
||||
WINDDK_W2K_DIR=!WINDDK_BASE!\6001.18002\
|
||||
|
||||
;
|
||||
LIBWDI_DIR=..\projects\additional\libwdi\
|
||||
;
|
||||
; Default build app (forced to all when packaging)
|
||||
; (optional)
|
||||
APP=all
|
||||
|
||||
;
|
||||
; Whether or not to use microsofts OACR
|
||||
; (http://msdn.microsoft.com/en-us/library/ff549179%28v=VS.85%29.aspx)
|
||||
;
|
||||
WINDDK_AUTOCODEREVIEW=true
|
||||
|
||||
; ## PACKAGING ONLY
|
||||
; The variables below are only used when packaging. IE: dist, snapshot
|
||||
; (package directories must NOT reside in the libusb-win32 trunk)
|
||||
;
|
||||
; Additional libusb-win32 content is placed here
|
||||
PACKAGE_ROOT_DIR=Z:\packages\libusb-win32\
|
||||
|
||||
; Binaries are placed here (exe,sys,dll)
|
||||
PACKAGE_BIN_DIR=!PACKAGE_ROOT_DIR!bin\
|
||||
;
|
||||
; Libraries are placed here (lib,la)
|
||||
PACKAGE_LIB_DIR=!PACKAGE_ROOT_DIR!lib\
|
||||
;
|
||||
; Distributables and snapshots are placed here
|
||||
PACKAGE_SAVE_DIR=!PACKAGE_ROOT_DIR!package\
|
||||
;
|
||||
; Temporary packaging directory (WARNING: this directory is destroyed/created.)
|
||||
PACKAGE_WORKING=!PACKAGE_ROOT_DIR!_working\
|
||||
;
|
||||
;
|
||||
; Base bin, src, setup package name (version/snapshotid is appended)
|
||||
PACKAGE_BIN_NAME=libusb-win32-bin
|
||||
PACKAGE_SRC_NAME=libusb-win32-src
|
||||
PACKAGE_SETUP_NAME=libusb-win32-devel-filter
|
||||
|
||||
;
|
||||
; Path to 7Zip (http://www.7-zip.org/)
|
||||
; (optional)
|
||||
ZIP=C:\Program Files\7-Zip\7z.exe
|
||||
|
||||
;
|
||||
; Path to Inno Setup Compiler (http://www.jrsoftware.org/isdl.php)
|
||||
ISCC=C:\Program Files (x86)\Inno Setup 5\ISCC.exe
|
||||
|
||||
;
|
||||
; Path to borland c implib tool (http://downloads.embarcadero.com/free/c_builder)
|
||||
; (optional)
|
||||
IMPLIB=C:\Borland\BCC55\Bin\implib.exe
|
||||
|
||||
;
|
||||
; Path to gcc dlltool tool (http://www.mingw.org/)
|
||||
; (optional)
|
||||
DLLTOOL=C:\MinGW\bin\dlltool.exe
|
||||
|
||||
;
|
||||
; Filename (only) of the digital test certificate to use for signing
|
||||
; when the "testsigning=on" argument is used. make.cmd looks for this
|
||||
; file in the !PACKAGE_ROOT_DIR!\cert directory. If the cert file does
|
||||
; not exists is is created and used for subsequent signing requests.
|
||||
; (optional)
|
||||
CERT_FILE=LibusbWin32TestCert.cer
|
||||
|
||||
; The directory where all log files are placed.
|
||||
; File logging is disabled by default (see make.cmd help for more information)
|
||||
; (Consider using DebugView instead of file logging)
|
||||
; http://download.sysinternals.com/Files/DebugView.zip
|
||||
; (optional)
|
||||
;LOG_DIRECTORY=!SystemDrive!\\\\Log\\\\
|
||||
|
||||
|
||||
;
|
||||
; Month, day, year, and snapshot id variables
|
||||
; (Should not be changed)
|
||||
_MM_=!DATE:~4,2!
|
||||
_DD_=!DATE:~7,2!
|
||||
_YYYY_=!DATE:~10,4!
|
||||
SNAPSHOT_ID=!_YYYY_!!_MM_!!_DD_!
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,29 @@
|
||||
@echo off
|
||||
call make_clean.bat
|
||||
SET ERRORLEVEL=0
|
||||
|
||||
call make_dll.bat %*
|
||||
IF NOT %ERRORLEVEL%==0 GOTO BUILD_ERROR
|
||||
call make_driver.bat %*
|
||||
IF NOT %ERRORLEVEL%==0 GOTO BUILD_ERROR
|
||||
call make_test.bat %*
|
||||
IF NOT %ERRORLEVEL%==0 GOTO BUILD_ERROR
|
||||
call make_test_win.bat %*
|
||||
IF NOT %ERRORLEVEL%==0 GOTO BUILD_ERROR
|
||||
call make_install_filter.bat %*
|
||||
IF NOT %ERRORLEVEL%==0 GOTO BUILD_ERROR
|
||||
call make_install_filter_win.bat %*
|
||||
IF NOT %ERRORLEVEL%==0 GOTO BUILD_ERROR
|
||||
|
||||
REM DDK builkdInf-Wizard embeds drivers for multiple
|
||||
REM platforms and can no longer be here.
|
||||
REM
|
||||
REM call make_inf_wizard.bat %*
|
||||
REM IF NOT %ERRORLEVEL%==0 GOTO INF_BUILD_ERROR
|
||||
|
||||
GOTO DONE
|
||||
|
||||
:BUILD_ERROR
|
||||
GOTO DONE
|
||||
|
||||
:DONE
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
@echo off
|
||||
|
||||
set OUTDIR=
|
||||
|
||||
if exist .\output\i386 set OUTDIR=.\output\i386
|
||||
if exist .\output\amd64 set OUTDIR=.\output\amd64
|
||||
if exist .\output\ia64 set OUTDIR=.\output\ia64
|
||||
|
||||
if "%OUTDIR%"=="" GOTO NO_OUTDIR
|
||||
if exist %OUTDIR%\*.exe copy /y %OUTDIR%\*.exe . >NUL
|
||||
if exist %OUTDIR%\*.dll copy /y %OUTDIR%\*.dll . >NUL
|
||||
if exist %OUTDIR%\*.lib copy /y %OUTDIR%\*.lib . >NUL
|
||||
if exist %OUTDIR%\*.sys copy /y %OUTDIR%\*.sys . >NUL
|
||||
:NO_OUTDIR
|
||||
|
||||
if exist .\output rmdir /s /q .\output
|
||||
|
||||
if exist .\objchk_wxp_x86 rmdir /s /q .\objchk_wxp_x86
|
||||
if exist .\objchk_wnet_AMD64 rmdir /s /q .\objchk_wnet_AMD64
|
||||
if exist .\objchk_wnet_IA64 rmdir /s /q .\objchk_wnet_IA64
|
||||
if exist .\objchk_wxp_ia64 rmdir /s /q .\objchk_wxp_ia64
|
||||
if exist .\objchk_w2k_x86 rmdir /s /q .\objchk_w2k_x86
|
||||
|
||||
if exist .\objfre_wxp_x86 rmdir /s /q .\objfre_wxp_x86
|
||||
if exist .\objfre_wnet_AMD64 rmdir /s /q .\objfre_wnet_AMD64
|
||||
if exist .\objfre_wnet_IA64 rmdir /s /q .\objfre_wnet_IA64
|
||||
if exist .\objfre_wxp_ia64 rmdir /s /q .\objfre_wxp_ia64
|
||||
if exist .\objfre_w2k_x86 rmdir /s /q .\objfre_w2k_x86
|
||||
|
||||
if exist sources del /q sources
|
||||
if exist *.def del *.def
|
||||
if exist *.h del *.h
|
||||
if exist *.c del *.c
|
||||
if exist *.rc del *.rc
|
||||
if exist manifest_*.xml del /q manifest_*.xml
|
||||
if exist install-filter*.txt del /q install-filter*.txt
|
||||
DEL /Q "..\*.o" "..\*.dll" "..\*.a" "..\*.exp" "..\*.lib" "..\*.exe" 2>NUL>NUL
|
||||
DEL /Q "..\*.tar.gz" "..\*.iss" "..\*.rc" "..\*.h" "..\*.sys" "..\*.log" 2>NUL>NUL
|
||||
DEL /Q /S "..\*~" 2>NUL>NUL
|
||||
DEL /Q "..\README.txt" 2>NUL>NUL
|
||||
@@ -0,0 +1,26 @@
|
||||
@echo off
|
||||
|
||||
set SRC_DIR=..\src
|
||||
|
||||
call make_clean.bat
|
||||
|
||||
copy sources_dll sources >NUL
|
||||
|
||||
copy %SRC_DIR%\*.c . >NUL
|
||||
copy ..\*.def . >NUL
|
||||
copy %SRC_DIR%\*.h . >NUL
|
||||
copy %SRC_DIR%\*.rc . >NUL
|
||||
copy %SRC_DIR%\driver\driver_api.h . >NUL
|
||||
|
||||
ECHO Building (%BUILD_ALT_DIR%) %0..
|
||||
CALL build_ddk.bat %*
|
||||
IF %BUILD_ERRORLEVEL%==0 GOTO BUILD_SUCCESS
|
||||
GOTO BUILD_ERROR
|
||||
|
||||
:BUILD_ERROR
|
||||
ECHO [%0] WinDDK build failed (%BUILD_ALT_DIR%)
|
||||
EXIT /B 1
|
||||
|
||||
:BUILD_SUCCESS
|
||||
if exist libusb0.lib move /Y libusb0.lib libusb.lib >NUL
|
||||
:BUILD_DONE
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
@echo off
|
||||
|
||||
set SRC_DIR=..\src\driver
|
||||
|
||||
call make_clean.bat
|
||||
|
||||
copy sources_drv sources >NUL
|
||||
|
||||
copy %SRC_DIR%\*.c . >NUL
|
||||
copy %SRC_DIR%\*.h . >NUL
|
||||
copy %SRC_DIR%\*.rc . >NUL
|
||||
copy %SRC_DIR%\..\*.rc . >NUL
|
||||
copy %SRC_DIR%\..\libusb-win32_version.h . >NUL
|
||||
copy %SRC_DIR%\..\error.? . >NUL
|
||||
|
||||
ECHO Building (%BUILD_ALT_DIR%) %0..
|
||||
CALL build_ddk.bat %*
|
||||
IF %BUILD_ERRORLEVEL%==0 GOTO BUILD_SUCCESS
|
||||
GOTO BUILD_ERROR
|
||||
|
||||
:BUILD_ERROR
|
||||
ECHO [%0] WinDDK build failed (%BUILD_ALT_DIR%)
|
||||
EXIT /B 1
|
||||
|
||||
:BUILD_SUCCESS
|
||||
|
||||
:BUILD_DONE
|
||||
+94
@@ -0,0 +1,94 @@
|
||||
@ECHO OFF
|
||||
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
|
||||
|
||||
SET TESTS_DIR=..\tests
|
||||
SET SRC_DIR=..\src
|
||||
call make_clean.bat
|
||||
|
||||
:: Check arguments
|
||||
::
|
||||
|
||||
IF "!LIBWDI_DIR!" EQU "" SET LIBWDI_DIR=..\projects\additional\libwdi\
|
||||
|
||||
:: Check for libwdi ddk_build.cmd
|
||||
::
|
||||
IF NOT EXIST "!LIBWDI_DIR!\ddk_build.cmd" (
|
||||
ECHO libwdi ddk_build.cmd not found at '!LIBWDI_DIR!'
|
||||
GOTO SHOW_LIBWDI_HELP
|
||||
)
|
||||
|
||||
:: Build libwdi
|
||||
::
|
||||
SET BUILD_ERRORLEVEL=0
|
||||
SET _CD_=!CD!
|
||||
PUSHD !_CD_!
|
||||
|
||||
CD /D "!LIBWDI_DIR!"
|
||||
IF EXIST "build%BUILD_ALT_DIR%.err" DEL /Q "build%BUILD_ALT_DIR%.err" >NUL
|
||||
IF EXIST "build%BUILD_ALT_DIR%.wrn" DEL /Q "build%BUILD_ALT_DIR%.wrn" >NUL
|
||||
|
||||
IF EXIST "!LIBUSB0_DIR!" (
|
||||
SET C_DEFINES=/DLIBUSB0_DIR=\"!LIBUSB0_DIR!\" /DOPT_M32 /DOPT_M64 /DOPT_IA64
|
||||
) ELSE (
|
||||
ECHO.
|
||||
ECHO [Warning] The LIBUSB0_DIR environment variable has not been set. This
|
||||
ECHO inf-wizard will contain only the inf generator and not
|
||||
ECHO embedded libusb-win32 binaries.
|
||||
ECHO.
|
||||
ECHO '!LIBUSB0_DIR!'
|
||||
SET C_DEFINES=/DUSER_DIR=\"\" /DOPT_M32 /DOPT_M64
|
||||
)
|
||||
ECHO Building (%BUILD_ALT_DIR%) libwdi..
|
||||
CALL ddk_build.cmd no_samples 2>NUL
|
||||
|
||||
IF EXIST "build%BUILD_ALT_DIR%.err" SET BUILD_ERRORLEVEL=1
|
||||
IF EXIST "build%BUILD_ALT_DIR%.err" SET ERRORLEVEL=1
|
||||
IF !BUILD_ERRORLEVEL! NEQ 0 (
|
||||
|
||||
ECHO Failed building libwdi.
|
||||
GOTO BUILD_ERROR
|
||||
)
|
||||
|
||||
POPD
|
||||
|
||||
::
|
||||
:: Copy in the inf-wizard sources
|
||||
COPY /Y "!LIBWDI_DIR!\libwdi\libwdi.lib" >NUL
|
||||
COPY /Y "!LIBWDI_DIR!\libwdi\libwdi.h" >NUL
|
||||
COPY /Y "!LIBWDI_DIR!\libwdi\msapi_utf8.h" >NUL
|
||||
COPY /Y sources_inf_wizard sources >NUL
|
||||
COPY /Y %SRC_DIR%\inf_wizard*.* >NUL
|
||||
COPY /Y %SRC_DIR%\libusb-win32_version.* >NUL
|
||||
copy %SRC_DIR%\*.manifest . >NUL
|
||||
|
||||
ECHO Building (%BUILD_ALT_DIR%) %0..
|
||||
CALL build_ddk.bat !_ARGS_!
|
||||
IF %BUILD_ERRORLEVEL%==0 GOTO BUILD_SUCCESS
|
||||
GOTO BUILD_ERROR
|
||||
|
||||
:BUILD_ERROR
|
||||
ECHO [%0] WinDDK build failed (%BUILD_ALT_DIR%)
|
||||
EXIT /B 1
|
||||
GOTO BUILD_DONE
|
||||
|
||||
:SHOW_LIBWDI_HELP
|
||||
ECHO.
|
||||
ECHO inf-wizard-libusb-win32 WinDDK build utility
|
||||
ECHO.
|
||||
ECHO Summary: This batch script automates the inf-wizard WinDDK build process
|
||||
ECHO and creates inf-wizard with embedded binaries.
|
||||
ECHO.
|
||||
ECHO NOTE : This batch script must be run from a x86 windkk build environment.
|
||||
ECHO.
|
||||
ECHO USAGE EXAMPLE:
|
||||
ECHO
|
||||
ECHO example #1.
|
||||
ECHO SET LIBUSB0_DIR=Z:\packages\libusb-win32\
|
||||
ECHO make_inf_wizard.bat
|
||||
ECHO.
|
||||
GOTO BUILD_DONE
|
||||
|
||||
:BUILD_SUCCESS
|
||||
GOTO BUILD_DONE
|
||||
|
||||
:BUILD_DONE
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
@echo off
|
||||
set TESTS_DIR=..\tests
|
||||
set SRC_DIR=..\src
|
||||
|
||||
call make_clean.bat
|
||||
|
||||
copy sources_install_filter sources >NUL
|
||||
copy %SRC_DIR%\*.c . >NUL
|
||||
copy %SRC_DIR%\*.h . >NUL
|
||||
copy %SRC_DIR%\*.rc . >NUL
|
||||
copy %SRC_DIR%\driver\driver_api.h . >NUL
|
||||
copy %SRC_DIR%\install-filter*.* . >NUL
|
||||
copy ..\manifest.txt . >NUL
|
||||
|
||||
ECHO Building (%BUILD_ALT_DIR%) %0..
|
||||
CALL build_ddk.bat %*
|
||||
IF %BUILD_ERRORLEVEL%==0 GOTO BUILD_SUCCESS
|
||||
GOTO BUILD_ERROR
|
||||
|
||||
:BUILD_ERROR
|
||||
ECHO [%0] WinDDK build failed (%BUILD_ALT_DIR%)
|
||||
EXIT /B 1
|
||||
|
||||
:BUILD_SUCCESS
|
||||
|
||||
:BUILD_DONE
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
@echo off
|
||||
set TESTS_DIR=..\tests
|
||||
set SRC_DIR=..\src
|
||||
|
||||
call make_clean.bat
|
||||
|
||||
copy sources_install_filter_win sources >NUL
|
||||
copy %SRC_DIR%\*.c . >NUL
|
||||
copy %SRC_DIR%\*.h . >NUL
|
||||
copy %SRC_DIR%\*.rc . >NUL
|
||||
copy %SRC_DIR%\driver\driver_api.h . >NUL
|
||||
copy %SRC_DIR%\install_filter_win.* . >NUL
|
||||
copy %SRC_DIR%\common_controls_admin.manifest . >NUL
|
||||
|
||||
ECHO Building (%BUILD_ALT_DIR%) %0..
|
||||
CALL build_ddk.bat %*
|
||||
IF %BUILD_ERRORLEVEL%==0 GOTO BUILD_SUCCESS
|
||||
GOTO BUILD_ERROR
|
||||
|
||||
:BUILD_ERROR
|
||||
ECHO [%0] WinDDK build failed (%BUILD_ALT_DIR%)
|
||||
EXIT /B 1
|
||||
|
||||
:BUILD_SUCCESS
|
||||
|
||||
:BUILD_DONE
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
@echo off
|
||||
|
||||
call make_clean.bat
|
||||
DEL /Q *.exe *.dll *.sys *.lib *.log *.wrn *.err *.cer *.manifest *.ico ..\*.inf.in 2>NUL>NUL
|
||||
|
||||
if exist .\x86 rmdir /s /q .\x86
|
||||
if exist .\x64 rmdir /s /q .\x64
|
||||
if exist .\AMD64 rmdir /s /q .\AMD64
|
||||
if exist .\i64 rmdir /s /q .\i64
|
||||
if exist .\w2k rmdir /s /q .\w2k
|
||||
|
||||
IF NOT EXIST ..\projects\ GOTO DONE
|
||||
|
||||
PUSHD !CD!
|
||||
CD ..\projects
|
||||
RMDIR /S /Q .\Debug 2>NUL>NUL
|
||||
RMDIR /S /Q .\Release 2>NUL>NUL
|
||||
RMDIR /S /Q .\Win32 2>NUL>NUL
|
||||
RMDIR /S /Q .\x64 2>NUL>NUL
|
||||
RMDIR /S /Q .\_ReSharper.libusb-win32 2>NUL>NUL
|
||||
|
||||
DEL /S /Q *.gitignore *.log *.user *.ncb *.resharper 2>NUL>NUL
|
||||
DEL /S /Q /AH *.suo 2>NUL>NUL
|
||||
DEL /S /Q .\additional\libwdi\*.exe 2>NUL>NUL
|
||||
DEL /S /Q .\additional\libwdi\*.lib 2>NUL>NUL
|
||||
|
||||
RMDIR /S /Q .\additional\libwdi\libwdi\objfre_wxp_x86 2>NUL>NUL
|
||||
RMDIR /S /Q .\additional\libwdi\libwdi\objchk_wxp_x86 2>NUL>NUL
|
||||
RMDIR /S /Q .\additional\libwdi\libwdi\objfre_wxp_amd64 2>NUL>NUL
|
||||
RMDIR /S /Q .\additional\libwdi\libwdi\objchk_wxp_amd64 2>NUL>NUL
|
||||
RMDIR /S /Q .\additional\libwdi\libwdi\objfre_w2k_x86 2>NUL>NUL
|
||||
RMDIR /S /Q .\additional\libwdi\libwdi\objchk_w2k_x86 2>NUL>NUL
|
||||
RMDIR /S /Q .\additional\libwdi\libwdi\objfre_w2k_amd64 2>NUL>NUL
|
||||
RMDIR /S /Q .\additional\libwdi\libwdi\objchk_w2k_amd64 2>NUL>NUL
|
||||
RMDIR /S /Q .\additional\libwdi\Win32 2>NUL>NUL
|
||||
RMDIR /S /Q .\additional\libwdi\x64 2>NUL>NUL
|
||||
RMDIR /S /Q .\additional\libwdi\examples\objfre_wxp_x86 2>NUL>NUL
|
||||
RMDIR /S /Q .\additional\libwdi\examples\objchk_wxp_x86 2>NUL>NUL
|
||||
RMDIR /S /Q .\additional\libwdi\examples\objfre_wxp_w2k 2>NUL>NUL
|
||||
RMDIR /S /Q .\additional\libwdi\examples\objchk_wxp_w2k 2>NUL>NUL
|
||||
|
||||
DEL .\additional\libwdi\libwdi\embedded.h 2>NUL>NUL
|
||||
DEL .\additional\libwdi\libwdi\config.h 2>NUL>NUL
|
||||
DEL /S /Q .\additional\libwdi\*.o 2>NUL>NUL
|
||||
RMDIR /S /Q ".\Win32" 2>NUL>NUL
|
||||
RMDIR /S /Q ".\x64" 2>NUL>NUL
|
||||
POPD
|
||||
|
||||
:DONE
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
@echo off
|
||||
|
||||
set TESTS_DIR=..\tests
|
||||
set SRC_DIR=..\src
|
||||
|
||||
call make_clean.bat
|
||||
|
||||
copy sources_test sources >NUL
|
||||
copy %TESTS_DIR%\testlibusb.c . >NUL
|
||||
copy %SRC_DIR%\usb.h . >NUL
|
||||
copy %SRC_DIR%\*.rc . >NUL
|
||||
|
||||
ECHO Building (%BUILD_ALT_DIR%) %0..
|
||||
CALL build_ddk.bat %*
|
||||
IF %BUILD_ERRORLEVEL%==0 GOTO BUILD_SUCCESS
|
||||
GOTO BUILD_ERROR
|
||||
|
||||
:BUILD_ERROR
|
||||
ECHO [%0] WinDDK build failed (%BUILD_ALT_DIR%)
|
||||
EXIT /B 1
|
||||
|
||||
:BUILD_SUCCESS
|
||||
|
||||
:BUILD_DONE
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
@echo off
|
||||
|
||||
set TESTS_DIR=..\tests
|
||||
set SRC_DIR=..\src
|
||||
|
||||
call make_clean.bat
|
||||
|
||||
copy sources_test_win sources >NUL
|
||||
copy %TESTS_DIR%\testlibusb_win.c . >NUL
|
||||
copy %TESTS_DIR%\testlibusb_win_rc.rc . >NUL
|
||||
copy %SRC_DIR%\usb.h . >NUL
|
||||
copy %SRC_DIR%\libusb-win32_version.h . >NUL
|
||||
copy %SRC_DIR%\*.rc . >NUL
|
||||
copy %SRC_DIR%\*.manifest . >NUL
|
||||
|
||||
ECHO Building (%BUILD_ALT_DIR%) %0..
|
||||
CALL build_ddk.bat %*
|
||||
IF %BUILD_ERRORLEVEL%==0 GOTO BUILD_SUCCESS
|
||||
GOTO BUILD_ERROR
|
||||
|
||||
:BUILD_ERROR
|
||||
ECHO [%0] WinDDK build failed (%BUILD_ALT_DIR%)
|
||||
EXIT /B 1
|
||||
|
||||
:BUILD_SUCCESS
|
||||
|
||||
:BUILD_DONE
|
||||
@@ -0,0 +1 @@
|
||||
!INCLUDE $(NTMAKEENV)\makefile.def
|
||||
@@ -0,0 +1,18 @@
|
||||
TARGETNAME = libusb0
|
||||
TARGETPATH = output
|
||||
TARGETTYPE = DYNLINK
|
||||
USE_MSVCRT = 1
|
||||
386_STDCALL = 0
|
||||
USER_C_FLAGS = /Gd /O2
|
||||
C_DEFINES = $(COMMON_C_DEFINES) /Dwcsicmp=_wcsicmp /Dstricmp=_stricmp /DTARGETTYPE=DYNLINK /DLOG_APPNAME="\"$(TARGETNAME)-dll\""
|
||||
|
||||
TARGETLIBS = $(SDK_LIB_PATH)\setupapi.lib \
|
||||
$(SDK_LIB_PATH)\kernel32.lib \
|
||||
$(SDK_LIB_PATH)\advapi32.lib \
|
||||
$(SDK_LIB_PATH)\user32.lib \
|
||||
$(SDK_LIB_PATH)\gdi32.lib
|
||||
|
||||
INCLUDES=$(INCLUDES);$(DDK_INC_PATH);
|
||||
|
||||
SOURCES = windows.c usb.c error.c install.c descriptors.c registry.c \
|
||||
resource.rc
|
||||
@@ -0,0 +1,36 @@
|
||||
TARGETNAME = libusb0
|
||||
TARGETPATH = output
|
||||
TARGETTYPE = DRIVER
|
||||
USER_C_FLAGS = /O2
|
||||
|
||||
C_DEFINES = $(COMMON_C_DEFINES) /DTARGETTYPE=DRIVER /DLOG_APPNAME="\"$(TARGETNAME)-sys\""
|
||||
|
||||
TARGETLIBS = $(DDK_LIB_PATH)\usbd.lib
|
||||
|
||||
SOURCES = abort_endpoint.c \
|
||||
claim_interface.c \
|
||||
clear_feature.c \
|
||||
dispatch.c \
|
||||
driver_registry.c \
|
||||
get_configuration.c \
|
||||
get_descriptor.c \
|
||||
get_interface.c \
|
||||
get_status.c \
|
||||
ioctl.c \
|
||||
libusb_driver.c \
|
||||
pnp.c \
|
||||
power.c \
|
||||
release_interface.c \
|
||||
reset_device.c \
|
||||
reset_endpoint.c \
|
||||
set_configuration.c \
|
||||
set_descriptor.c \
|
||||
set_feature.c \
|
||||
set_interface.c \
|
||||
transfer.c \
|
||||
vendor_request.c \
|
||||
error.c \
|
||||
libusb_driver_rc.rc
|
||||
|
||||
|
||||
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
TARGETNAME = inf-wizard
|
||||
TARGETPATH = output
|
||||
TARGETTYPE = PROGRAM
|
||||
UMTYPE = windows
|
||||
UMENTRY = winmain
|
||||
USE_MSVCRT = 1
|
||||
386_STDCALL = 0
|
||||
USER_C_FLAGS = /Gd /O2
|
||||
C_DEFINES = $(COMMON_C_DEFINES) /Dstricmp=_stricmp /DTARGETTYPE=PROGRAMwindows /DLOG_APPNAME="\"$(TARGETNAME)\""
|
||||
|
||||
TARGETLIBS = $(SDK_LIB_PATH)\setupapi.lib \
|
||||
$(SDK_LIB_PATH)\kernel32.lib \
|
||||
$(SDK_LIB_PATH)\user32.lib \
|
||||
$(SDK_LIB_PATH)\comctl32.lib \
|
||||
$(SDK_LIB_PATH)\comdlg32.lib \
|
||||
$(SDK_LIB_PATH)\shell32.lib \
|
||||
$(SDK_LIB_PATH)\ole32.lib \
|
||||
libwdi.lib
|
||||
|
||||
SOURCES = inf_wizard.c inf_wizard_rc.rc
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
TARGETNAME = install-filter
|
||||
TARGETPATH = output
|
||||
TARGETTYPE = PROGRAM
|
||||
UMTYPE = console
|
||||
USE_MSVCRT = 1
|
||||
386_STDCALL = 0
|
||||
USER_C_FLAGS = /Gd /O2
|
||||
C_DEFINES = $(COMMON_C_DEFINES) /DLOG_STYLE_SHORT /DTARGETTYPE=PROGRAMconsole /DLOG_APPNAME="\"$(TARGETNAME)\""
|
||||
|
||||
TARGETLIBS = $(SDK_LIB_PATH)\setupapi.lib \
|
||||
$(SDK_LIB_PATH)\kernel32.lib \
|
||||
$(SDK_LIB_PATH)\advapi32.lib \
|
||||
$(SDK_LIB_PATH)\user32.lib \
|
||||
$(SDK_LIB_PATH)\gdi32.lib
|
||||
|
||||
INCLUDES=$(INCLUDES);$(DDK_INC_PATH);
|
||||
|
||||
SOURCES = install_filter.c install.c registry.c error.c install_filter_rc.rc
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
TARGETNAME = install-filter-win
|
||||
TARGETPATH = output
|
||||
TARGETTYPE = PROGRAM
|
||||
UMTYPE = windows
|
||||
UMENTRY = winmain
|
||||
USE_MSVCRT = 1
|
||||
386_STDCALL = 0
|
||||
USER_C_FLAGS = /Gd /O2
|
||||
C_DEFINES = $(COMMON_C_DEFINES) /Dstricmp=_stricmp /DTARGETTYPE=PROGRAMwindows /DLOG_APPNAME="\"$(TARGETNAME)\""
|
||||
|
||||
TARGETLIBS = $(SDK_LIB_PATH)\setupapi.lib \
|
||||
$(SDK_LIB_PATH)\kernel32.lib \
|
||||
$(SDK_LIB_PATH)\advapi32.lib \
|
||||
$(SDK_LIB_PATH)\user32.lib \
|
||||
$(SDK_LIB_PATH)\comctl32.lib \
|
||||
$(SDK_LIB_PATH)\comdlg32.lib \
|
||||
$(SDK_LIB_PATH)\shell32.lib \
|
||||
$(SDK_LIB_PATH)\ole32.lib
|
||||
|
||||
INCLUDES=$(INCLUDES);$(DDK_INC_PATH);
|
||||
|
||||
SOURCES = install_filter_win.c install.c registry.c error.c install_filter_win_rc.rc
|
||||
@@ -0,0 +1,17 @@
|
||||
TARGETNAME = testlibusb
|
||||
TARGETPATH = output
|
||||
TARGETTYPE = PROGRAM
|
||||
UMTYPE = console
|
||||
USE_MSVCRT = 1
|
||||
386_STDCALL = 0
|
||||
USER_C_FLAGS = /Gd /O2
|
||||
C_DEFINES = $(COMMON_C_DEFINES) /Dsnprintf=_snprintf /DTARGETTYPE=PROGRAMconsole \
|
||||
/DLOG_APPNAME="\"$(TARGETNAME)\""
|
||||
|
||||
TARGETLIBS = $(SDK_LIB_PATH)\setupapi.lib \
|
||||
$(SDK_LIB_PATH)\kernel32.lib \
|
||||
$(SDK_LIB_PATH)\advapi32.lib \
|
||||
$(SDK_LIB_PATH)\user32.lib \
|
||||
libusb.lib
|
||||
|
||||
SOURCES = testlibusb.c
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
TARGETNAME = testlibusb-win
|
||||
TARGETPATH = output
|
||||
TARGETTYPE = PROGRAM
|
||||
UMTYPE = windows
|
||||
UMENTRY = winmain
|
||||
USE_MSVCRT = 1
|
||||
386_STDCALL = 0
|
||||
USER_C_FLAGS = /Gd /O2
|
||||
C_DEFINES = $(COMMON_C_DEFINES) /Dvsnprintf=_vsnprintf /DTARGETTYPE=PROGRAMwindows /DLOG_APPNAME="\"$(TARGETNAME)\""
|
||||
|
||||
TARGETLIBS = $(SDK_LIB_PATH)\setupapi.lib \
|
||||
$(SDK_LIB_PATH)\kernel32.lib \
|
||||
$(SDK_LIB_PATH)\advapi32.lib \
|
||||
$(SDK_LIB_PATH)\user32.lib \
|
||||
libusb.lib
|
||||
|
||||
SOURCES = testlibusb_win.c testlibusb_win_rc.rc
|
||||
@@ -0,0 +1,31 @@
|
||||
sgml_files = manual.sgml intro.sgml api.sgml functions.sgml examples.sgml
|
||||
|
||||
# For when we have a man page :)
|
||||
man_MANS =
|
||||
|
||||
EXTRA_DIST = manual.sgml api.sgml examples.sgml functions.sgml \
|
||||
intro.sgml website.dsl $(man_MANS)
|
||||
|
||||
# I grabbed this same hack from the VACM docs/Makfile.am
|
||||
CLEANFILES = manual.dvi manual.aux manual.tex manual.log \
|
||||
manual.ps.gz; rm -rf html
|
||||
|
||||
if BUILD_DOCS
|
||||
#MANUALS = manual.ps.gz html/index.html
|
||||
MANUALS = html/index.html
|
||||
# Generating postscript takes forever on my laptop apparentely
|
||||
else
|
||||
MANUALS =
|
||||
endif
|
||||
|
||||
all: $(MANUALS)
|
||||
|
||||
manual.ps.gz: $(sgml_files) website.dsl
|
||||
@JADE@ -t ps -d $(srcdir)/website.dsl\#print $(srcdir)/manual.sgml
|
||||
gzip manual.ps
|
||||
|
||||
html/index.html: $(sgml_files) website.dsl
|
||||
rm -rf html
|
||||
mkdir html
|
||||
@JADE@ -t sgml -d $(srcdir)/website.dsl\#html $(srcdir)/manual.sgml
|
||||
|
||||
@@ -0,0 +1,236 @@
|
||||
# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = ..
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AS = @AS@
|
||||
BIGENDIAN = @BIGENDIAN@
|
||||
CC = @CC@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
ECHO = @ECHO@
|
||||
EXEEXT = @EXEEXT@
|
||||
JADE = @JADE@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIBUSB_BINARY_AGE = @LIBUSB_BINARY_AGE@
|
||||
LIBUSB_INTERFACE_AGE = @LIBUSB_INTERFACE_AGE@
|
||||
LIBUSB_MAJOR_VERSION = @LIBUSB_MAJOR_VERSION@
|
||||
LIBUSB_MICRO_VERSION = @LIBUSB_MICRO_VERSION@
|
||||
LIBUSB_MINOR_VERSION = @LIBUSB_MINOR_VERSION@
|
||||
LIBUSB_VERSION = @LIBUSB_VERSION@
|
||||
LN_S = @LN_S@
|
||||
LT_AGE = @LT_AGE@
|
||||
LT_CURRENT = @LT_CURRENT@
|
||||
LT_RELEASE = @LT_RELEASE@
|
||||
LT_REVISION = @LT_REVISION@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
RANLIB = @RANLIB@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
|
||||
sgml_files = manual.sgml intro.sgml api.sgml functions.sgml examples.sgml
|
||||
# For when we have a man page :)
|
||||
man_MANS =
|
||||
EXTRA_DIST = manual.sgml api.sgml examples.sgml functions.sgml \
|
||||
# I grabbed this same hack from the VACM docs/Makfile.am
|
||||
CLEANFILES = manual.dvi manual.aux manual.tex manual.log \
|
||||
MANUALS =
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
MANS = $(man_MANS)
|
||||
|
||||
NROFF = nroff
|
||||
DIST_COMMON = Makefile.am Makefile.in
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP_ENV = --best
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
install-man: $(MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(MAKE) $(AM_MAKEFLAGS)
|
||||
uninstall-man:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
$(MAKE) $(AM_MAKEFLAGS)
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
subdir = doc
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
here=`cd $(top_builddir) && pwd`; \
|
||||
top_distdir=`cd $(top_distdir) && pwd`; \
|
||||
distdir=`cd $(distdir) && pwd`; \
|
||||
cd $(top_srcdir) \
|
||||
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu doc/Makefile
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$d/$$file $(distdir)/$$file; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
fi; \
|
||||
done
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
dvi: dvi-am
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
installcheck-am:
|
||||
installcheck: installcheck-am
|
||||
install-exec-am:
|
||||
install-exec: install-exec-am
|
||||
|
||||
install-data-am: install-man
|
||||
install-data: install-data-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-am
|
||||
uninstall-am: uninstall-man
|
||||
uninstall: uninstall-am
|
||||
all-am: Makefile $(MANS)
|
||||
all-redirect: all-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||
installdirs:
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
|
||||
maintainer-clean-generic:
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
|
||||
clean: clean-am
|
||||
|
||||
distclean-am: distclean-generic clean-am
|
||||
-rm -f libtool
|
||||
|
||||
distclean: distclean-am
|
||||
|
||||
maintainer-clean-am: maintainer-clean-generic distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: install-man uninstall-man tags distdir info-am info dvi-am dvi \
|
||||
check check-am installcheck-am installcheck install-exec-am \
|
||||
install-exec install-data-am install-data install-am install \
|
||||
uninstall-am uninstall all-redirect all-am all installdirs \
|
||||
mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
|
||||
intro.sgml website.dsl $(man_MANS)
|
||||
|
||||
manual.ps.gz; rm -rf html
|
||||
|
||||
if BUILD_DOCS
|
||||
# Generating postscript takes forever on my laptop apparentely
|
||||
else
|
||||
endif
|
||||
|
||||
all: $(MANUALS)
|
||||
|
||||
manual.ps.gz: $(sgml_files) website.dsl
|
||||
@JADE@ -t ps -d $(srcdir)/website.dsl\#print $(srcdir)/manual.sgml
|
||||
gzip manual.ps
|
||||
|
||||
html/index.html: $(sgml_files) website.dsl
|
||||
rm -rf html
|
||||
mkdir html
|
||||
@JADE@ -t sgml -d $(srcdir)/website.dsl\#html $(srcdir)/manual.sgml
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
@@ -0,0 +1,38 @@
|
||||
<!-- FIXME: I want this to be displayed as one page, not seperate -->
|
||||
|
||||
<title>API</title>
|
||||
<partintro>
|
||||
<para>This is the external API for applications to use.</para>
|
||||
<para>The API is relatively lean and designed to have close analogies to the USB specification. The v0.1 API was mostly hacked together and kludged together without much forethought and as a result, it's missing quite a few features. v1.0 is intended to rectify this.</para>
|
||||
</partintro>
|
||||
|
||||
<chapter id="api-device-interfaces">
|
||||
<title>Devices and interfaces</title>
|
||||
|
||||
<para>The libusb API ties an open device to a specific interface. This means that if you want to claim multiple interfaces on a device, you should open the device multiple times to receive one usb_dev_handle for each interface you want to communicate with. Don't forget to call <xref linkend="function.usbclaiminterface">.</para>
|
||||
</chapter>
|
||||
|
||||
<chapter id="api-timeouts">
|
||||
<title>Timeouts</title>
|
||||
|
||||
<para>Timeout's in libusb are always specified in milliseconds.</para>
|
||||
</chapter>
|
||||
|
||||
<chapter id="api-types">
|
||||
<title>Data Types</title>
|
||||
|
||||
<para>libusb uses both abstracted and non abstracted structures to maintain portability.</para>
|
||||
</chapter>
|
||||
|
||||
<chapter id="api-synchronous">
|
||||
<title>Synchronous</title>
|
||||
|
||||
<para>All functions in libusb v0.1 are synchronous, meaning the functions block and wait for the operation to finish or timeout before returning execution to the calling application. Asynchronous operation will be supported in v1.0, but not v0.1.</para>
|
||||
</chapter>
|
||||
|
||||
<chapter id="api-return-values">
|
||||
<title>Return values</title>
|
||||
|
||||
<para>There are two types of return values used in libusb v0.1. The first is a handle returned by <xref linkend="function.usbopen">. The second is an int. In all cases where an int is returned, >= 0 is a success and < 0 is an error condition.</para>
|
||||
</chapter>
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
<title>Examples</title>
|
||||
<partintro>
|
||||
<para>There are some nonintuitive parts of libusb v0.1 that aren't difficult, but are probably easier to understand with some examples.</para>
|
||||
</partintro>
|
||||
|
||||
<chapter id="examples-code">
|
||||
<title>Basic Examples</title>
|
||||
<para>Before any communication can occur with a device, it needs to be found. This is accomplished by finding all of the busses and then finding all of the devices on all of the busses:</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
struct usb_bus *busses;
|
||||
|
||||
usb_init();
|
||||
usb_find_busses();
|
||||
usb_find_devices();
|
||||
|
||||
busses = usb_get_busses();
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>After this, the application should manually loop through all of the busess and all of the devices and matching the device by whatever criteria is needed:</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
struct usb_bus *bus;
|
||||
int c, i, a;
|
||||
|
||||
/* ... */
|
||||
|
||||
for (bus = busses; bus; bus = bus->next) {
|
||||
struct usb_device *dev;
|
||||
|
||||
for (dev = bus->devices; dev; dev = dev->next) {
|
||||
/* Check if this device is a printer */
|
||||
if (dev->descriptor.bDeviceClass == 7) {
|
||||
/* Open the device, claim the interface and do your processing */
|
||||
...
|
||||
}
|
||||
|
||||
/* Loop through all of the configurations */
|
||||
for (c = 0; c < dev->descriptor.bNumConfigurations; c++) {
|
||||
/* Loop through all of the interfaces */
|
||||
for (i = 0; i < dev->config[c].bNumInterfaces; i++) {
|
||||
/* Loop through all of the alternate settings */
|
||||
for (a = 0; a < dev->config[c].interface[i].num_altsetting; a++) {
|
||||
/* Check if this interface is a printer */
|
||||
if (dev->config[c].interface[i].altsetting[a].bInterfaceClass == 7) {
|
||||
/* Open the device, set the alternate setting, claim the interface and do your processing */
|
||||
...
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</programlisting>
|
||||
</chapter>
|
||||
|
||||
<chapter id="examples-tests">
|
||||
<title>Examples in the source distribution</title>
|
||||
<para>The tests directory has a program called testlibusb.c. It simply calls libusb to find all of the devices, then iterates through all of the devices and prints out the descriptor dump. It's very simple and as a result, it's of limited usefulness in itself. However, it could serve as a starting point for a new program.</para>
|
||||
</chapter>
|
||||
|
||||
<chapter id="examples-other">
|
||||
<title>Other Applications</title>
|
||||
<para>Another source of examples can be obtained from other applications.</para>
|
||||
<itemizedlist>
|
||||
<listitem><para><ulink url="http://www.gphoto.org/">gPhoto</ulink> uses libusb to communicate with digital still cameras.</para></listitem>
|
||||
<listitem><para><ulink url="http://rio500.sourceforge.net/">rio500</ulink> utils uses libusb to communicate with SONICblue Rio 500 Digital Audio Player.</para></listitem>
|
||||
</itemizedlist>
|
||||
</chapter>
|
||||
|
||||
@@ -0,0 +1,540 @@
|
||||
<title>Functions</title>
|
||||
|
||||
<reference id="ref.core">
|
||||
<title>Core</title>
|
||||
<partintro>
|
||||
<!-- FIXME: Check spelling of "comprise" -->
|
||||
<para>These functions comprise the core of libusb. They are used by all applications that utilize libusb.</para>
|
||||
</partintro>
|
||||
|
||||
<refentry id="function.usbinit">
|
||||
<refnamediv>
|
||||
<refname>usb_init</refname>
|
||||
<refpurpose>Initialize libusb</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>usb_init</function></funcdef>
|
||||
<void>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>Just like the name implies, <function>usb_init</function> sets up some internal structures. <function>usb_init</function> <emphasis>must</emphasis> be called before any other libusb functions.</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.usbfindbusses">
|
||||
<refnamediv>
|
||||
<refname>usb_find_busses</refname>
|
||||
<refpurpose>Finds all USB busses on system</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>int <function>usb_find_busses</function></funcdef>
|
||||
<void>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para><function>usb_find_busses</function> will find all of the busses on the system. Returns the number of changes since previous call to this function (total of new busses and busses removed).</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.usbfinddevices">
|
||||
<refnamediv>
|
||||
<refname>usb_find_devices</refname>
|
||||
<refpurpose>Find all devices on all USB devices</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>int <function>usb_find_devices</function></funcdef>
|
||||
<void>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para><function>usb_find_devices</function> will find all of the devices on each bus. This should be called after <xref linkend="function.usbfindbusses">. Returns the number of changes since the previous call to this function (total of new device and devices removed).</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.usbgetbusses">
|
||||
<refnamediv>
|
||||
<refname>usb_get_busses</refname>
|
||||
<refpurpose>Return the list of USB busses found</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>struct usb_bus *<function>usb_get_busses</function></funcdef>
|
||||
<void>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para><function>usb_get_busses</function> simply returns the value of the global variable <varname>usb_busses</varname>. This was implemented for those languages that support C calling convention and can use shared libraries, but don't support C global variables (like Delphi).</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</reference>
|
||||
|
||||
<reference id="ref.deviceops">
|
||||
<title>Device operations</title>
|
||||
<partintro>
|
||||
<para>This group of functions deal with the device. It allows you to open and close the device as well standard USB operations like setting the configuration, alternate settings, clearing halts and resetting the device. It also provides OS level operations such as claiming and releasing interfaces.</para>
|
||||
</partintro>
|
||||
|
||||
<refentry id="function.usbopen">
|
||||
<refnamediv>
|
||||
<refname>usb_open</refname>
|
||||
<refpurpose>Opens a USB device</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>usb_dev_handle *<function>usb_open</function></funcdef>
|
||||
<paramdef>struct *usb_device <parameter>dev</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para><function>usb_open</function> is to be used to open up a device for use. <function>usb_open</function> must be called before attempting to perform any operations to the device. Returns a handle used in future communication with the device.</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.usbclose">
|
||||
<refnamediv>
|
||||
<refname>usb_close</refname>
|
||||
<refpurpose>Closes a USB device</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>int <function>usb_close</function></funcdef>
|
||||
<paramdef>usb_dev_handle *<parameter>dev</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para><function>usb_close</function> closes a device opened with <xref linkend="function.usbopen">. No further operations may be performed on the handle after <function>usb_close</function> is called. Returns 0 on success or < 0 on error.</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.usbsetconfiguration">
|
||||
<refnamediv>
|
||||
<refname>usb_set_configuration</refname>
|
||||
<refpurpose>Sets the active configuration of a device</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>int <function>usb_set_configuration</function></funcdef>
|
||||
<paramdef>usb_dev_handle *<parameter>dev</parameter></paramdef>
|
||||
<paramdef>int <parameter>configuration</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para><function>usb_set_configuration</function> sets the active configuration of a device. The <varname>configuration</varname> parameter is the value as specified in the descriptor field bConfigurationValue. Returns 0 on success or < 0 on error.</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.usbsetaltinterface">
|
||||
<refnamediv>
|
||||
<refname>usb_set_altinterface</refname>
|
||||
<refpurpose>Sets the active alternate setting of the current interface</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>int <function>usb_set_altinterface</function></funcdef>
|
||||
<paramdef>usb_dev_handle *<parameter>dev</parameter></paramdef>
|
||||
<paramdef>int <parameter>alternate</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para><function>usb_set_altinterface</function> sets the active alternate setting of the current interface. The <varname>alternate</varname> parameter is the value as specified in the descriptor field bAlternateSetting. Returns 0 on success or < 0 on error.</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.usbresetep">
|
||||
<refnamediv>
|
||||
<refname>usb_resetep</refname>
|
||||
<refpurpose>Resets state for an endpoint</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>int <function>usb_resetep</function></funcdef>
|
||||
<paramdef>usb_dev_handle *<parameter>dev</parameter></paramdef>
|
||||
<paramdef>unsigned int <parameter>ep</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para><function>usb_resetep</function> resets all state (like toggles) for the specified endpoint. The <varname>ep</varname> parameter is the value specified in the descriptor field bEndpointAddress. Returns 0 on success or < 0 on error.</para>
|
||||
<note>
|
||||
<title>Deprecated</title>
|
||||
<para><function>usb_resetep</function> is deprecated. You probably want to use <xref linkend="function.usbclearhalt">.</para>
|
||||
</note>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.usbclearhalt">
|
||||
<refnamediv>
|
||||
<refname>usb_clear_halt</refname>
|
||||
<refpurpose>Clears any halt status on an endpoint</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>int <function>usb_clear_halt</function></funcdef>
|
||||
<paramdef>usb_dev_handle *<parameter>dev</parameter></paramdef>
|
||||
<paramdef>unsigned int <parameter>ep</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para><function>usb_clear_halt</function> clears any halt status on the specified endpoint. The <varname>ep</varname> parameter is the value specified in the descriptor field bEndpointAddress. Returns 0 on success or < 0 on error.</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.usbreset">
|
||||
<refnamediv>
|
||||
<refname>usb_reset</refname>
|
||||
<refpurpose>Resets a device</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>int <function>usb_reset</function></funcdef>
|
||||
<paramdef>usb_dev_handle *<parameter>dev</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para><function>usb_reset</function> resets the specified device by sending a RESET down the port it is connected to. Returns 0 on success or < 0 on error.</para>
|
||||
<note>
|
||||
<title>Causes re-enumeration</title>
|
||||
<para>After calling <function>usb_reset</function>, the device will need to re-enumerate and thusly, requires you to find the new device and open a new handle. The handle used to call <function>usb_reset</function> will no longer work.</para>
|
||||
</note>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.usbclaiminterface">
|
||||
<refnamediv>
|
||||
<refname>usb_claim_interface</refname>
|
||||
<refpurpose>Claim an interface of a device</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>int <function>usb_claim_interface</function></funcdef>
|
||||
<paramdef>usb_dev_handle *<parameter>dev</parameter></paramdef>
|
||||
<paramdef>int <parameter>interface</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para><function>usb_claim_interface</function> claims the interface with the Operating System. The interface parameter is the value as specified in the descriptor field bInterfaceNumber. Returns 0 on success or < 0 on error.</para>
|
||||
<important>
|
||||
<title>Must be called!</title>
|
||||
<para><function>usb_claim_interface</function> <emphasis>must</emphasis> be called before you perform any operations related to this interface (like <xref linkend="function.usbsetaltinterface">, <xref linkend="function.usbbulkwrite">, etc).</para>
|
||||
</important>
|
||||
|
||||
<table>
|
||||
<title>Return Codes</title>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>code</entry>
|
||||
<entry>description</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>-EBUSY</entry>
|
||||
<entry>Interface is not available to be claimed</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>-ENOMEM</entry>
|
||||
<entry>Insufficient memory</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.usbreleaseinterface">
|
||||
<refnamediv>
|
||||
<refname>usb_release_interface</refname>
|
||||
<refpurpose>Releases a previously claimed interface</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>int <function>usb_release_interface</function></funcdef>
|
||||
<paramdef>usb_dev_handle *<parameter>dev</parameter></paramdef>
|
||||
<paramdef>int <parameter>interface</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para><function>usb_release_interface</function> releases an interface previously claimed with <xref linkend="function.usbclaiminterface">. The interface parameter is the value as specified in the descriptor field bInterfaceNumber. Returns 0 on success or < 0 on error.</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</reference>
|
||||
|
||||
<reference id="ref.control">
|
||||
<title>Control Transfers</title>
|
||||
<partintro>
|
||||
<para>This group of functions allow applications to send messages to the default control pipe.</para>
|
||||
</partintro>
|
||||
|
||||
<refentry id="function.usbcontrolmsg">
|
||||
<refnamediv>
|
||||
<refname>usb_control_msg</refname>
|
||||
<refpurpose>Send a control message to a device</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>int <function>usb_control_msg</function></funcdef>
|
||||
<paramdef>usb_dev_handle *<parameter>dev</parameter></paramdef>
|
||||
<paramdef>int <parameter>requesttype</parameter></paramdef>
|
||||
<paramdef>int <parameter>request</parameter></paramdef>
|
||||
<paramdef>int <parameter>value</parameter></paramdef>
|
||||
<paramdef>int <parameter>index</parameter></paramdef>
|
||||
<paramdef>char *<parameter>bytes</parameter></paramdef>
|
||||
<paramdef>int <parameter>size</parameter></paramdef>
|
||||
<paramdef>int <parameter>timeout</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para><function>usb_control_msg</function> performs a control request to the default control pipe on a device. The parameters mirror the types of the same name in the USB specification. Returns number of bytes written/read or < 0 on error.</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.usbgetstring">
|
||||
<refnamediv>
|
||||
<refname>usb_get_string</refname>
|
||||
<refpurpose>Retrieves a string descriptor from a device</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>int <function>usb_get_string</function></funcdef>
|
||||
<paramdef>usb_dev_handle *<parameter>dev</parameter></paramdef>
|
||||
<paramdef>int <parameter>index</parameter></paramdef>
|
||||
<paramdef>int <parameter>langid</parameter></paramdef>
|
||||
<paramdef>char *<parameter>buf</parameter></paramdef>
|
||||
<paramdef>size_t <parameter>buflen</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para><function>usb_get_string</function> retrieves the string descriptor specified by index and langid from a device. The string will be returned in Unicode as specified by the USB specification. Returns the number of bytes returned in <varname>buf</varname> or < 0 on error.</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.usbgetstringsimple">
|
||||
<refnamediv>
|
||||
<refname>usb_get_string_simple</refname>
|
||||
<refpurpose>Retrieves a string descriptor from a device using the first language</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>int <function>usb_get_string_simple</function></funcdef>
|
||||
<paramdef>usb_dev_handle *<parameter>dev</parameter></paramdef>
|
||||
<paramdef>int <parameter>index</parameter></paramdef>
|
||||
<paramdef>char *<parameter>buf</parameter></paramdef>
|
||||
<paramdef>size_t <parameter>buflen</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para><function>usb_get_string_simple</function> is a wrapper around <function>usb_get_string</function> that retrieves the string description specified by index in the first language for the descriptor and converts it into C style ASCII. Returns number of bytes returned in <varname>buf</varname> or < 0 on error.</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.usbgetdescriptor">
|
||||
<refnamediv>
|
||||
<refname>usb_get_descriptor</refname>
|
||||
<refpurpose>Retrieves a descriptor from a device's default control pipe</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>int <function>usb_get_descriptor</function></funcdef>
|
||||
<paramdef>usb_dev_handle *<parameter>dev</parameter></paramdef>
|
||||
<paramdef>unsigned char <parameter>type</parameter></paramdef>
|
||||
<paramdef>unsigned char <parameter>index</parameter></paramdef>
|
||||
<paramdef>void *<parameter>buf</parameter></paramdef>
|
||||
<paramdef>int <parameter>size</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para><function>usb_get_descriptor</function> retrieves a descriptor from the device identified by the <varname>type</varname> and <varname>index</varname> of the descriptor from the default control pipe. Returns number of bytes read for the descriptor or < 0 on error.</para>
|
||||
<para>See <xref linkend="function.usbgetdescriptorbyendpoint"> for a function that allows the control endpoint to be specified.</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.usbgetdescriptorbyendpoint">
|
||||
<refnamediv>
|
||||
<refname>usb_get_descriptor_by_endpoint</refname>
|
||||
<refpurpose>Retrieves a descriptor from a device</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>int <function>usb_get_descriptor_by_endpoint</function></funcdef>
|
||||
<paramdef>usb_dev_handle *<parameter>dev</parameter></paramdef>
|
||||
<paramdef>int <parameter>ep</parameter></paramdef>
|
||||
<paramdef>unsigned char <parameter>type</parameter></paramdef>
|
||||
<paramdef>unsigned char <parameter>index</parameter></paramdef>
|
||||
<paramdef>void *<parameter>buf</parameter></paramdef>
|
||||
<paramdef>int <parameter>size</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para><function>usb_get_descriptor_by_endpoint</function> retrieves a descriptor from the device identified by the <varname>type</varname> and <varname>index</varname> of the descriptor from the control pipe identified by <varname>ep</varname>. Returns number of bytes read for the descriptor or < 0 on error.</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</reference>
|
||||
|
||||
<reference id="ref.bulk">
|
||||
<title>Bulk Transfers</title>
|
||||
<partintro>
|
||||
<para>This group of functions allow applications to send and receive data via bulk pipes.</para>
|
||||
</partintro>
|
||||
|
||||
<refentry id="function.usbbulkwrite">
|
||||
<refnamediv>
|
||||
<refname>usb_bulk_write</refname>
|
||||
<refpurpose>Write data to a bulk endpoint</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>int <function>usb_bulk_write</function></funcdef>
|
||||
<paramdef>usb_dev_handle *<parameter>dev</parameter></paramdef>
|
||||
<paramdef>int <parameter>ep</parameter></paramdef>
|
||||
<paramdef>char *<parameter>bytes</parameter></paramdef>
|
||||
<paramdef>int <parameter>size</parameter></paramdef>
|
||||
<paramdef>int <parameter>timeout</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para><function>usb_bulk_write</function> performs a bulk write request to the endpoint specified by <varname>ep</varname>. Returns number of bytes written on success or < 0 on error.</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.usbbulkread">
|
||||
<refnamediv>
|
||||
<refname>usb_bulk_read</refname>
|
||||
<refpurpose>Read data from a bulk endpoint</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>int <function>usb_bulk_read</function></funcdef>
|
||||
<paramdef>usb_dev_handle *<parameter>dev</parameter></paramdef>
|
||||
<paramdef>int <parameter>ep</parameter></paramdef>
|
||||
<paramdef>char *<parameter>bytes</parameter></paramdef>
|
||||
<paramdef>int <parameter>size</parameter></paramdef>
|
||||
<paramdef>int <parameter>timeout</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para><function>usb_bulk_read</function> performs a bulk read request to the endpoint specified by <varname>ep</varname>. Returns number of bytes read on success or < 0 on error.</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</reference>
|
||||
|
||||
<reference id="ref.interrupt">
|
||||
<title>Interrupt Transfers</title>
|
||||
<partintro>
|
||||
<para>This group of functions allow applications to send and receive data via interrupt pipes.</para>
|
||||
</partintro>
|
||||
|
||||
<refentry id="function.usbinterruptwrite">
|
||||
<refnamediv>
|
||||
<refname>usb_interrupt_write</refname>
|
||||
<refpurpose>Write data to an interrupt endpoint</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>int <function>usb_interrupt_write</function></funcdef>
|
||||
<paramdef>usb_dev_handle *<parameter>dev</parameter></paramdef>
|
||||
<paramdef>int <parameter>ep</parameter></paramdef>
|
||||
<paramdef>char *<parameter>bytes</parameter></paramdef>
|
||||
<paramdef>int <parameter>size</parameter></paramdef>
|
||||
<paramdef>int <parameter>timeout</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para><function>usb_interrupt_write</function> performs an interrupt write request to the endpoint specified by <varname>ep</varname>. Returns number of bytes written on success or < 0 on error.</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.usbinterruptread">
|
||||
<refnamediv>
|
||||
<refname>usb_interrupt_read</refname>
|
||||
<refpurpose>Read data from a interrupt endpoint</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>int <function>usb_interrupt_read</function></funcdef>
|
||||
<paramdef>usb_dev_handle *<parameter>dev</parameter></paramdef>
|
||||
<paramdef>int <parameter>ep</parameter></paramdef>
|
||||
<paramdef>char *<parameter>bytes</parameter></paramdef>
|
||||
<paramdef>int <parameter>size</parameter></paramdef>
|
||||
<paramdef>int <parameter>timeout</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para><function>usb_interrupt_read</function> performs a interrupt read request to the endpoint specified by <varname>ep</varname>. Returns number of bytes read on success or < 0 on error.</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</reference>
|
||||
|
||||
<reference id="ref.nonportable">
|
||||
<title>Non Portable</title>
|
||||
<partintro>
|
||||
<para>These functions are non portable. They may expose some part of the USB API on one OS or perhaps a couple, but not all. They are all marked with the string _np at the end of the function name.</para>
|
||||
<para>A C preprocessor macro will be defined if the function is implemented. The form is LIBUSB_HAS_ prepended to the function name, without the leading "usb_", in all caps. For example, if usb_get_driver_np is implemented, LIBUSB_HAS_GET_DRIVER_NP will be defined.</para>
|
||||
</partintro>
|
||||
|
||||
<refentry id="function.usbgetdrivernp">
|
||||
<refnamediv>
|
||||
<refname>usb_get_driver_np</refname>
|
||||
<refpurpose>Get driver name bound to interface</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>int <function>usb_get_driver_np</function></funcdef>
|
||||
<paramdef>usb_dev_handle *<parameter>dev</parameter></paramdef>
|
||||
<paramdef>int <parameter>interface</parameter></paramdef>
|
||||
<paramdef>char *<parameter>name</parameter></paramdef>
|
||||
<paramdef>int <parameter>namelen</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>This function will obtain the name of the driver bound to the interface specified by the parameter <parameter>interface</parameter> and place it into the buffer named <parameter>name</parameter> limited to <parameter>namelen</parameter> characters. Returns 0 on success or < 0 on error.</para>
|
||||
<para>Implemented on Linux only.</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.usbdetachkerneldrivernp">
|
||||
<refnamediv>
|
||||
<refname>usb_detach_kernel_driver_np</refname>
|
||||
<refpurpose>Detach kernel driver from interface</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>int <function>usb_detach_kernel_driver_np</function></funcdef>
|
||||
<paramdef>usb_dev_handle *<parameter>dev</parameter></paramdef>
|
||||
<paramdef>int <parameter>interface</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>This function will detach a kernel driver from the interface specified by parameter <parameter>interface</parameter>. Applications using libusb can then try claiming the interface. Returns 0 on success or < 0 on error.</para>
|
||||
<para>Implemented on Linux only.</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</reference>
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
<title>Introduction</title>
|
||||
<chapter id="intro-overview">
|
||||
<title>Overview</title>
|
||||
<para>This documentation will give an overview of how the v0.1 libusb API works and relates to &usb;. Work is rapidly progressing on a newer version of libusb, to be v1.0, which will be a redesigned API and is intended to obsolete v0.1. You may want to check the <ulink url="http://libusb.sourceforge.net/">libusb</ulink> website to see if it is stable and recommended.</para>
|
||||
<para>This documentation assumes that you have a good understanding of &usb; and how it works. If you don't have a good understanding of USB, it is recommended you obtain the USB <ulink url="http://www.usb.org/developers/docs/usbspec.zip">v1.1</ulink> and/or <ulink url="http://www.usb.org/developers/docs/usb_20.zip">v2.0</ulink> specs and read them.</para>
|
||||
<para>libusb is geared towards &usb; 1.1, however from the perspective of libusb, &usb; 2.0 won't be a significant change for libusb</para>
|
||||
</chapter>
|
||||
|
||||
<chapter id="intro-support">
|
||||
<title>Current OS support</title>
|
||||
<itemizedlist>
|
||||
<listitem><para><ulink url="http://www.kernel.org/">Linux</ulink> (2.2, 2.4 and on)</para></listitem>
|
||||
<listitem><para><ulink url="http://www.freebsd.org/">FreeBSD</ulink>, <ulink url="http://www.netbsd.org/">NetBSD</ulink> and <ulink url="http://www.openbsd.org/">OpenBSD</ulink></para></listitem>
|
||||
<listitem><para><ulink url="http://developer.apple.com/darwin/">Darwin</ulink>/<ulink url="http://developer.apple.com/macosx/">MacOS X</ulink></para></listitem>
|
||||
</itemizedlist>
|
||||
</chapter>
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [
|
||||
|
||||
<!ENTITY intro SYSTEM "intro.sgml">
|
||||
<!ENTITY api SYSTEM "api.sgml">
|
||||
<!ENTITY functions SYSTEM "functions.sgml">
|
||||
<!ENTITY examples SYSTEM "examples.sgml">
|
||||
|
||||
<!-- I'm lazy -->
|
||||
<!ENTITY usb "<acronym>USB</acronym>">
|
||||
]>
|
||||
|
||||
<book id="manual">
|
||||
<title>libusb Developers Guide</title>
|
||||
<bookinfo>
|
||||
<author>
|
||||
<firstname>Johannes</firstname>
|
||||
<surname>Erdfelt</surname>
|
||||
</author>
|
||||
<affiliation>
|
||||
<address><email>johannes@erdfelt.com</email></address>
|
||||
</affiliation>
|
||||
|
||||
<revhistory>
|
||||
<revision>
|
||||
<revnumber>0.3</revnumber>
|
||||
<date>June 28, 2002</date>
|
||||
<authorinitials>jerdfelt</authorinitials>
|
||||
<revremark>More cleanups. Add the rest of the API and clean up some places. Add some examples. Hopefully, this should document the entire 0.1 API now.</revremark>
|
||||
</revision>
|
||||
|
||||
<revision>
|
||||
<revnumber>0.2</revnumber>
|
||||
<date>June 11, 2002</date>
|
||||
<authorinitials>jerdfelt</authorinitials>
|
||||
<revremark>Cleanup, update for all of the changes that have happened in the last couple of months.</revremark>
|
||||
</revision>
|
||||
|
||||
<revision>
|
||||
<revnumber>0.1</revnumber>
|
||||
<date>August 26, 2001</date>
|
||||
<authorinitials>jerdfelt</authorinitials>
|
||||
<revremark>First stab.</revremark>
|
||||
</revision>
|
||||
</revhistory>
|
||||
|
||||
<keywordset>
|
||||
<keyword>libusb</keyword>
|
||||
</keywordset>
|
||||
</bookinfo>
|
||||
|
||||
<preface id="preface">
|
||||
<title>Preface</title>
|
||||
|
||||
<abstract>
|
||||
<simpara>This document's purpose is to explain the API for libusb and how to use it to make a &usb; aware application</simpara>
|
||||
<simpara>Any suggestions, corrections and comments regarding this document can be sent to the author: <ulink url="mailto:johannes@erdfelt.com">Johannes Erdfelt</ulink> or the <ulink url="mailto:libusb-devel@lists.sourceforge.net">libusb developers mailing list</ulink>.</simpara>
|
||||
</abstract>
|
||||
</preface>
|
||||
|
||||
<part id="intro">
|
||||
&intro;
|
||||
</part>
|
||||
|
||||
<part id="api">
|
||||
&api;
|
||||
</part>
|
||||
|
||||
<part id="functions">
|
||||
&functions;
|
||||
</part>
|
||||
|
||||
<part id="examples">
|
||||
&examples;
|
||||
</part>
|
||||
</book>
|
||||
@@ -0,0 +1,197 @@
|
||||
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
|
||||
<!entity docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN" CDATA DSSSL>
|
||||
]>
|
||||
|
||||
<!--
|
||||
|
||||
Document: website.dsl
|
||||
Version: 0.2
|
||||
|
||||
Author: Johannes Erdfelt <johannes@erdfelt.com>
|
||||
|
||||
This stylesheet handles the website (html) and rtf/ps (print) stylesheets
|
||||
|
||||
-->
|
||||
|
||||
<style-sheet>
|
||||
|
||||
<style-specification id="print" use="docbook">
|
||||
<style-specification-body> ;; ==============================
|
||||
;; customize the print stylesheet
|
||||
;; ==============================
|
||||
|
||||
(declare-characteristic preserve-sdata?
|
||||
;; this is necessary because right now jadetex does not understand
|
||||
;; symbolic entities, whereas things work well with numeric entities.
|
||||
"UNREGISTERED::James Clark//Characteristic::preserve-sdata?"
|
||||
#f)
|
||||
|
||||
(define %generate-article-toc%
|
||||
;; Should a Table of Contents be produced for Articles?
|
||||
#t)
|
||||
|
||||
(define (toc-depth nd)
|
||||
2)
|
||||
|
||||
(define %generate-article-titlepage-on-separate-page%
|
||||
;; Should the article title page be on a separate page?
|
||||
#t)
|
||||
|
||||
(define %section-autolabel%
|
||||
;; Are sections enumerated?
|
||||
#t)
|
||||
|
||||
(define %footnote-ulinks%
|
||||
;; Generate footnotes for ULinks?
|
||||
#f)
|
||||
|
||||
(define %bop-footnotes%
|
||||
;; Make "bottom-of-page" footnotes?
|
||||
#f)
|
||||
|
||||
(define %body-start-indent%
|
||||
;; Default indent of body text
|
||||
0pi)
|
||||
|
||||
(define %para-indent-firstpara%
|
||||
;; First line start-indent for the first paragraph
|
||||
0pt)
|
||||
|
||||
(define %para-indent%
|
||||
;; First line start-indent for paragraphs (other than the first)
|
||||
0pt)
|
||||
|
||||
(define %block-start-indent%
|
||||
;; Extra start-indent for block-elements
|
||||
0pt)
|
||||
|
||||
(define formal-object-float
|
||||
;; Do formal objects float?
|
||||
#t)
|
||||
|
||||
(define %hyphenation%
|
||||
;; Allow automatic hyphenation?
|
||||
#t)
|
||||
|
||||
(define %admon-graphics%
|
||||
;; Use graphics in admonitions?
|
||||
#f)
|
||||
|
||||
</style-specification-body>
|
||||
</style-specification>
|
||||
|
||||
|
||||
<!--
|
||||
;; ===================================================
|
||||
;; customize the html stylesheet; borrowed from Cygnus
|
||||
;; at http://sourceware.cygnus.com/ (cygnus-both.dsl)
|
||||
;; ===================================================
|
||||
-->
|
||||
|
||||
|
||||
<style-specification id="html" use="docbook">
|
||||
<style-specification-body>
|
||||
|
||||
|
||||
;; =========================
|
||||
;; Indexes
|
||||
|
||||
;; Returns the depth of the auto-generated TOC (table of contents) that
|
||||
;; should be made at the nd-level
|
||||
(define (toc-depth nd)
|
||||
(if (string=? (gi nd) "book")
|
||||
2 ; the depth of the top-level TOC
|
||||
2 ; the depth of all other TOCs
|
||||
))
|
||||
|
||||
(define %page-n-columns%
|
||||
;; Sets the number of columns on each page
|
||||
2)
|
||||
|
||||
(define %generate-article-toc%
|
||||
#t)
|
||||
|
||||
|
||||
(define %header-navigation%
|
||||
#t)
|
||||
|
||||
(define %footer-navigation%
|
||||
#t)
|
||||
|
||||
(define %gentext-nav-use-tables%
|
||||
#t)
|
||||
|
||||
(define %gentext-nav-tblwidth%
|
||||
"100%")
|
||||
|
||||
|
||||
(define %indent-programlisting-lines%
|
||||
" ")
|
||||
|
||||
(define %indent-screen-lines%
|
||||
" ")
|
||||
|
||||
(define %shade-verbatim%
|
||||
#t)
|
||||
|
||||
(define ($shade-verbatim-attr$)
|
||||
(list
|
||||
(list "BORDER" "0")
|
||||
(list "BGCOLOR" "#E0E0E0")
|
||||
(list "WIDTH" ($table-width$))))
|
||||
|
||||
(define %callout-default-col%
|
||||
70)
|
||||
|
||||
(define biblio-number
|
||||
#t)
|
||||
|
||||
(define %graphic-default-extension%
|
||||
"jpg")
|
||||
|
||||
(define %graphic-extensions%
|
||||
'("gif" "jpg" "jpeg" "png" "tif" "tiff" "eps" "epsf"))
|
||||
|
||||
(define %stylesheet%
|
||||
"/base.css")
|
||||
|
||||
(define %stylesheet-type%
|
||||
"text/css")
|
||||
|
||||
(define %use-id-as-filename%
|
||||
#t)
|
||||
|
||||
(define use-output-dir
|
||||
#t)
|
||||
|
||||
(define %output-dir%
|
||||
"html")
|
||||
|
||||
(define %html-ext%
|
||||
".html")
|
||||
|
||||
(define %root-filename%
|
||||
"index")
|
||||
|
||||
(define %html-use-lang-in-filename%
|
||||
#f)
|
||||
|
||||
(define %html40%
|
||||
#t)
|
||||
|
||||
(define %fix-para-wrappers%
|
||||
#t)
|
||||
|
||||
(define %section-autolabel%
|
||||
#t)
|
||||
|
||||
(define (chunk-skip-first-element-list)
|
||||
'())
|
||||
|
||||
</style-specification-body>
|
||||
</style-specification>
|
||||
|
||||
<external-specification id="docbook" document="docbook.dsl">
|
||||
|
||||
</style-sheet>
|
||||
|
||||
+68
@@ -0,0 +1,68 @@
|
||||
|
||||
USAGE: benchmark [list]
|
||||
[pid=] [vid=] [ep=] [intf=] [altf=]
|
||||
[read|write|loop] [notestselect]
|
||||
[verify|verifydetail]
|
||||
[retry=] [timeout=] [refresh=] [priority=]
|
||||
[mode=] [buffersize=] [buffercount=] [packetsize=]
|
||||
|
||||
Commands:
|
||||
list : Display a list of connected devices before starting.
|
||||
Select the device to use for the test from the list.
|
||||
read : Read from the device.
|
||||
write : Write to the device.
|
||||
loop : [Default] Read and write to the device at the same time.
|
||||
|
||||
notestselect : Skips submitting the control transfers to get/set the
|
||||
test type. This makes the application compatible
|
||||
with non-benchmark firmwared. Use at your own risk!
|
||||
|
||||
verify : Verify received data for loop and read tests. Report
|
||||
basic information on data validation errors.
|
||||
verifydetail : Same as verify except reports detail information for
|
||||
each byte that fails validation.
|
||||
|
||||
Switches:
|
||||
vid : Vendor id of device. (hex) (Default=0x0666)
|
||||
pid : Product id of device. (hex) (Default=0x0001)
|
||||
retry : Number of times to retry a transfer that timeout.
|
||||
(Default = 0)
|
||||
timeout : Transfer timeout value. (milliseconds) (Default=5000)
|
||||
The timeout value used for read/write operations. If a
|
||||
transfer times out more than {retry} times, the test
|
||||
fails and the operation is aborted.
|
||||
mode : Sync|Async (Default=Sync)
|
||||
Sync uses the libusb-win32 sync transfer functions.
|
||||
Async uses the libusb-win32 asynchronous api.
|
||||
buffersize : Transfer test size in bytes. (Default=4096)
|
||||
Increasing this value will generally yield higher
|
||||
transfer rates.
|
||||
buffercount: (Async mode only) Number of outstanding transfers on
|
||||
an endpoint (Default=1, Max=10). Increasing this value
|
||||
will generally yield higher transfer rates.
|
||||
refresh : The display refresh interval. (in milliseconds)
|
||||
(Default=1000) This also effect the running status.
|
||||
priority : AboveNormal|BelowNormal|Highest|Lowest|Normal
|
||||
(Default=Normal) The thread priority level to use
|
||||
for the test.
|
||||
ep : The loopback endpoint to use. For example ep=0x01, would
|
||||
read from 0x81 and write to 0x01. (default is to use the
|
||||
(first read/write endpoint(s) in the interface)
|
||||
intf : The interface id the read/write endpoints reside in.
|
||||
intf : The alt interface id the read/write endpoints reside in.
|
||||
packetsize : For isochronous use only. Sets the iso packet size.
|
||||
If not specified, the endpoints maximum packet size
|
||||
is used.
|
||||
WARNING:
|
||||
This program should only be used with USB devices which implement
|
||||
one more more "Benchmark" interface(s). Using this application
|
||||
with a USB device it was not designed for can result in permanent
|
||||
damage to the device.
|
||||
|
||||
Examples:
|
||||
|
||||
benchmark vid=0x0666 pid=0x0001
|
||||
benchmark vid=0x4D2 pid=0x162E
|
||||
benchmark vid=0x4D2 pid=0x162E buffersize=65536
|
||||
benchmark read vid=0x4D2 pid=0x162E
|
||||
benchmark vid=0x4D2 pid=0x162E buffercount=3 buffersize=0x2000
|
||||
File diff suppressed because it is too large
Load Diff
+56
@@ -0,0 +1,56 @@
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define _WIN32_IE 0x0400
|
||||
#endif
|
||||
|
||||
#define RC_VERSION 1,1,0,0
|
||||
#define RC_VERSION_STR "1.1.0.0"
|
||||
|
||||
#ifndef _BENCHMARK_VER_ONLY
|
||||
|
||||
#include <windows.h>
|
||||
#include <winver.h>
|
||||
|
||||
#define RC_FILE_TYPE VFT_APP
|
||||
#define RC_FILE_SUB_TYPE VFT2_UNKNOWN
|
||||
#define RC_PRODUCT_STR "Benchmark Application"
|
||||
#define RC_FILE_NAME_STR "Benchmark.exe"
|
||||
|
||||
#define RT_MANIFEST 24
|
||||
#define ID_MANIFEST 1
|
||||
#define ID_HELP_TEXT 10020
|
||||
#define ID_DOS_TEXT 300
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION RC_VERSION
|
||||
PRODUCTVERSION RC_VERSION
|
||||
FILEFLAGSMASK 0x3FL
|
||||
FILEFLAGS 0x0L
|
||||
FILEOS VOS_NT_WINDOWS32
|
||||
FILETYPE RC_FILE_TYPE
|
||||
FILESUBTYPE RC_FILE_SUB_TYPE
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Travis Robinson"
|
||||
VALUE "FileDescription", RC_PRODUCT_STR
|
||||
VALUE "FileVersion", RC_VERSION_STR
|
||||
VALUE "InternalName", RC_FILE_NAME_STR
|
||||
VALUE "LegalCopyright", "Copyright (C) 2010 Travis Robinson"
|
||||
VALUE "OriginalFilename",RC_FILE_NAME_STR
|
||||
VALUE "ProductName", RC_PRODUCT_STR
|
||||
VALUE "ProductVersion", RC_VERSION_STR
|
||||
END
|
||||
END
|
||||
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
||||
|
||||
ID_HELP_TEXT ID_DOS_TEXT "BenchmarkHelp.txt"
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,240 @@
|
||||
#include <usb.h>
|
||||
#include <stdio.h>
|
||||
|
||||
// Enables this example to work with a device running the
|
||||
// libusb-win32 PIC Benchmark Firmware.
|
||||
#define BENCHMARK_DEVICE
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// TEST SETUP (User configurable)
|
||||
|
||||
// Issues a Set configuration request
|
||||
#define TEST_SET_CONFIGURATION
|
||||
|
||||
// Issues a claim interface request
|
||||
#define TEST_CLAIM_INTERFACE
|
||||
|
||||
// Use the libusb-win32 async transfer functions. see
|
||||
// transfer_bulk_async() below.
|
||||
#define TEST_ASYNC
|
||||
|
||||
// Attempts one bulk read.
|
||||
#define TEST_BULK_READ
|
||||
|
||||
// Attempts one bulk write.
|
||||
// #define TEST_BULK_WRITE
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// DEVICE SETUP (User configurable)
|
||||
|
||||
// Device vendor and product id.
|
||||
#define MY_VID 0x0666
|
||||
#define MY_PID 0x0001
|
||||
|
||||
// Device configuration and interface id.
|
||||
#define MY_CONFIG 1
|
||||
#define MY_INTF 0
|
||||
|
||||
// Device endpoint(s)
|
||||
#define EP_IN 0x81
|
||||
#define EP_OUT 0x01
|
||||
|
||||
// Device of bytes to transfer.
|
||||
#define BUF_SIZE 64
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
usb_dev_handle *open_dev(void);
|
||||
|
||||
static int transfer_bulk_async(usb_dev_handle *dev,
|
||||
int ep,
|
||||
char *bytes,
|
||||
int size,
|
||||
int timeout);
|
||||
|
||||
usb_dev_handle *open_dev(void)
|
||||
{
|
||||
struct usb_bus *bus;
|
||||
struct usb_device *dev;
|
||||
|
||||
for (bus = usb_get_busses(); bus; bus = bus->next)
|
||||
{
|
||||
for (dev = bus->devices; dev; dev = dev->next)
|
||||
{
|
||||
if (dev->descriptor.idVendor == MY_VID
|
||||
&& dev->descriptor.idProduct == MY_PID)
|
||||
{
|
||||
return usb_open(dev);
|
||||
}
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
usb_dev_handle *dev = NULL; /* the device handle */
|
||||
char tmp[BUF_SIZE];
|
||||
int ret;
|
||||
void* async_read_context = NULL;
|
||||
void* async_write_context = NULL;
|
||||
|
||||
usb_init(); /* initialize the library */
|
||||
usb_find_busses(); /* find all busses */
|
||||
usb_find_devices(); /* find all connected devices */
|
||||
|
||||
|
||||
if (!(dev = open_dev()))
|
||||
{
|
||||
printf("error opening device: \n%s\n", usb_strerror());
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("success: device %04X:%04X opened\n", MY_VID, MY_PID);
|
||||
}
|
||||
|
||||
#ifdef TEST_SET_CONFIGURATION
|
||||
if (usb_set_configuration(dev, MY_CONFIG) < 0)
|
||||
{
|
||||
printf("error setting config #%d: %s\n", MY_CONFIG, usb_strerror());
|
||||
usb_close(dev);
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("success: set configuration #%d\n", MY_CONFIG);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef TEST_CLAIM_INTERFACE
|
||||
if (usb_claim_interface(dev, 0) < 0)
|
||||
{
|
||||
printf("error claiming interface #%d:\n%s\n", MY_INTF, usb_strerror());
|
||||
usb_close(dev);
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("success: claim_interface #%d\n", MY_INTF);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef TEST_BULK_WRITE
|
||||
|
||||
#ifdef BENCHMARK_DEVICE
|
||||
ret = usb_control_msg(dev, USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_ENDPOINT_IN,
|
||||
14, /* set/get test */
|
||||
2, /* test type */
|
||||
MY_INTF, /* interface id */
|
||||
tmp, 1, 1000);
|
||||
#endif
|
||||
|
||||
#ifdef TEST_ASYNC
|
||||
// Running an async write test
|
||||
ret = transfer_bulk_async(dev, EP_OUT, tmp, sizeof(tmp), 5000);
|
||||
#else
|
||||
// Running a sync write test
|
||||
ret = usb_bulk_write(dev, EP_OUT, tmp, sizeof(tmp), 5000);
|
||||
#endif
|
||||
if (ret < 0)
|
||||
{
|
||||
printf("error writing:\n%s\n", usb_strerror());
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("success: bulk write %d bytes\n", ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef TEST_BULK_READ
|
||||
|
||||
#ifdef BENCHMARK_DEVICE
|
||||
ret = usb_control_msg(dev, USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_ENDPOINT_IN,
|
||||
14, /* set/get test */
|
||||
1, /* test type */
|
||||
MY_INTF, /* interface id */
|
||||
tmp, 1, 1000);
|
||||
#endif
|
||||
|
||||
#ifdef TEST_ASYNC
|
||||
// Running an async read test
|
||||
ret = transfer_bulk_async(dev, EP_IN, tmp, sizeof(tmp), 5000);
|
||||
#else
|
||||
// Running a sync read test
|
||||
ret = usb_bulk_read(dev, EP_IN, tmp, sizeof(tmp), 5000);
|
||||
#endif
|
||||
if (ret < 0)
|
||||
{
|
||||
printf("error reading:\n%s\n", usb_strerror());
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("success: bulk read %d bytes\n", ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef TEST_CLAIM_INTERFACE
|
||||
usb_release_interface(dev, 0);
|
||||
#endif
|
||||
|
||||
if (dev)
|
||||
{
|
||||
usb_close(dev);
|
||||
}
|
||||
printf("Done.\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Read/Write using async transfer functions.
|
||||
*
|
||||
* NOTE: This function waits for the transfer to complete essentially making
|
||||
* it a sync transfer function so it only serves as an example of how one might
|
||||
* implement async transfers into thier own code.
|
||||
*/
|
||||
static int transfer_bulk_async(usb_dev_handle *dev,
|
||||
int ep,
|
||||
char *bytes,
|
||||
int size,
|
||||
int timeout)
|
||||
{
|
||||
// Each async transfer requires it's own context. A transfer
|
||||
// context can be re-used. When no longer needed they must be
|
||||
// freed with usb_free_async().
|
||||
//
|
||||
void* async_context = NULL;
|
||||
int ret;
|
||||
|
||||
// Setup the async transfer. This only needs to be done once
|
||||
// for multiple submit/reaps. (more below)
|
||||
//
|
||||
ret = usb_bulk_setup_async(dev, &async_context, ep);
|
||||
if (ret < 0)
|
||||
{
|
||||
printf("error usb_bulk_setup_async:\n%s\n", usb_strerror());
|
||||
goto Done;
|
||||
}
|
||||
|
||||
// Submit this transfer. This function returns immediately and the
|
||||
// transfer is on it's way to the device.
|
||||
//
|
||||
ret = usb_submit_async(async_context, bytes, size);
|
||||
if (ret < 0)
|
||||
{
|
||||
printf("error usb_submit_async:\n%s\n", usb_strerror());
|
||||
usb_free_async(&async_context);
|
||||
goto Done;
|
||||
}
|
||||
|
||||
// Wait for the transfer to complete. If it doesn't complete in the
|
||||
// specified time it is cancelled. see also usb_reap_async_nocancel().
|
||||
//
|
||||
ret = usb_reap_async(async_context, timeout);
|
||||
|
||||
// Free the context.
|
||||
usb_free_async(&async_context);
|
||||
|
||||
Done:
|
||||
return ret;
|
||||
}
|
||||
Vendored
+82
@@ -0,0 +1,82 @@
|
||||
; This examples demonstrates how libusb's drivers
|
||||
; can be installed automatically along with your application using an installer.
|
||||
;
|
||||
; Requirements: Inno Setup (http://www.jrsoftware.org/isdl.php)
|
||||
;
|
||||
; To use this script, do the following:
|
||||
; - generate a setup package using inf-wizard and save the generated files to
|
||||
; "this folder\driver"
|
||||
; - in this script replace <your_inf_file.inf> with the name of your .inf file
|
||||
; - customize other settings (strings)
|
||||
; - open this script with Inno Setup
|
||||
; - compile and run
|
||||
|
||||
[Setup]
|
||||
AppName = TestDrivers
|
||||
AppVerName = TestDrivers 0.1.10.2
|
||||
AppPublisher = TestDrivers
|
||||
AppPublisherURL = http://test.url.com/
|
||||
AppVersion = 0.1.10.1
|
||||
DefaultDirName = {pf}\TestApp
|
||||
DefaultGroupName = TestDrivers
|
||||
Compression = lzma
|
||||
SolidCompression = yes
|
||||
; Win2000 or higher
|
||||
MinVersion = 5,5
|
||||
|
||||
; This installation requires admin priveledges. This is needed to install
|
||||
; drivers on windows vista and later.
|
||||
PrivilegesRequired = admin
|
||||
|
||||
; "ArchitecturesInstallIn64BitMode=x64 ia64" requests that the install
|
||||
; be done in "64-bit mode" on x64 & Itanium, meaning it should use the
|
||||
; native 64-bit Program Files directory and the 64-bit view of the
|
||||
; registry. On all other architectures it will install in "32-bit mode".
|
||||
ArchitecturesInstallIn64BitMode=x64 ia64
|
||||
|
||||
; Inno pascal functions for determining the processor type.
|
||||
; you can use these to use (in an inno "check" parameter for example) to
|
||||
; customize the installation depending on the architecture.
|
||||
[Code]
|
||||
function IsX64: Boolean;
|
||||
begin
|
||||
Result := Is64BitInstallMode and (ProcessorArchitecture = paX64);
|
||||
end;
|
||||
|
||||
function IsI64: Boolean;
|
||||
begin
|
||||
Result := Is64BitInstallMode and (ProcessorArchitecture = paIA64);
|
||||
end;
|
||||
|
||||
function IsX86: Boolean;
|
||||
begin
|
||||
Result := not IsX64 and not IsI64;
|
||||
end;
|
||||
|
||||
function Is64: Boolean;
|
||||
begin
|
||||
Result := IsX64 or IsI64;
|
||||
end;
|
||||
|
||||
[Files]
|
||||
; copy your libusb-win32 setup package to the App folder
|
||||
Source: "driver\*"; Excludes: "*.exe"; Flags: recursesubdirs; DestDir: "{app}\driver"
|
||||
|
||||
; also copy the native (32bit or 64 bit) libusb0.dll to the
|
||||
; system folder so that rundll32.exe will find it
|
||||
Source: "driver\x86\libusb0_x86.dll"; DestName: "libusb0.dll"; DestDir: "{sys}"; Flags: uninsneveruninstall replacesameversion restartreplace promptifolder; Check: IsX86;
|
||||
Source: "driver\amd64\libusb0.dll"; DestDir: "{sys}"; Flags: uninsneveruninstall replacesameversion restartreplace promptifolder; Check: IsX64;
|
||||
Source: "driver\ia64\libusb0.dll"; DestDir: {sys}; Flags: uninsneveruninstall replacesameversion restartreplace promptifolder; Check: IsI64;
|
||||
|
||||
[Icons]
|
||||
Name: "{group}\Uninstall TestDrivers"; Filename: "{uninstallexe}"
|
||||
|
||||
[Run]
|
||||
|
||||
; touch the HID .inf file to break its digital signature
|
||||
; this is only required if the device is a mouse or a keyboard !!
|
||||
;Filename: "rundll32"; Parameters: "libusb0.dll,usb_touch_inf_file_np_rundll {win}\inf\input.inf"
|
||||
|
||||
; invoke libusb's DLL to install the .inf file
|
||||
Filename: "rundll32"; Parameters: "libusb0.dll,usb_install_driver_np_rundll {app}\driver\<your_inf_file.inf>"; StatusMsg: "Installing driver (this may take a few seconds) ..."
|
||||
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
/* libusb-win32, Generic Windows USB Library
|
||||
* Copyright (c) 2002-2006 Stephan Meyer <ste_meyer@web.de>
|
||||
* Copyright (c) 2010 Travis Robinson <libusbdotnet@gmail.com>
|
||||
*
|
||||
* This library 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 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#define RC_FILE_TYPE VFT_APP
|
||||
#define RC_FILE_SUB_TYPE VFT2_UNKNOWN
|
||||
#define RC_PRODUCT_STR "libusb-win32 - Test Program"
|
||||
#define RC_FILE_NAME_STR "testbulk.exe"
|
||||
|
||||
#include "libusb-win32_version.rc"
|
||||
@@ -0,0 +1,851 @@
|
||||
Copyright (c) 2002-2004 Stephan Meyer, <ste_meyer@web.de>
|
||||
Copyright (c) 2000-2004 Johannes Erdfelt, <johannes@erdfelt.com>
|
||||
Copyright (c) 2000-2004 Thomas Sailer, <sailer@ife.ee.ethz.ch>
|
||||
Copyright (c) 2010 Travis Robinson, <libusbdotnet@gmail.com>
|
||||
|
||||
This software is distributed under the following licenses:
|
||||
Driver: GNU General Public License (GPL)
|
||||
Library, Test Files, Installer: GNU Lesser General Public License (LGPL)
|
||||
|
||||
***********************************************************************
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 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 General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
|
||||
0. Additional Definitions.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||
General Public License.
|
||||
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort to
|
||||
ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the
|
||||
Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
4. Combined Works.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that,
|
||||
taken together, effectively do not restrict modification of the
|
||||
portions of the Library contained in the Combined Work and reverse
|
||||
engineering for debugging such modifications, if you also do each of
|
||||
the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this
|
||||
License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (a) uses at run time
|
||||
a copy of the Library already present on the user's computer
|
||||
system, and (b) will operate properly with a modified version
|
||||
of the Library that is interface-compatible with the Linked
|
||||
Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise
|
||||
be required to provide such information under section 6 of the
|
||||
GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the
|
||||
Application with a modified version of the Linked Version. (If
|
||||
you use option 4d0, the Installation Information must accompany
|
||||
the Minimal Corresponding Source and Corresponding Application
|
||||
Code. If you use option 4d1, you must provide the Installation
|
||||
Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
|
||||
You may place library facilities that are a work based on the
|
||||
Library side by side in a single library together with other library
|
||||
facilities that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities,
|
||||
conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it
|
||||
is a work based on the Library, and explaining where to find the
|
||||
accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Lesser General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Library as you received it specifies that a certain numbered version
|
||||
of the GNU Lesser General Public License "or any later version"
|
||||
applies to it, you have the option of following the terms and
|
||||
conditions either of that published version or of any later version
|
||||
published by the Free Software Foundation. If the Library as you
|
||||
received it does not specify a version number of the GNU Lesser
|
||||
General Public License, you may choose any version of the GNU Lesser
|
||||
General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
||||
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
@PACKAGE_BIN_NAME@ v@VERSION@ (@_MM_@/@_DD_@/@_YYYY_@) - [Package Information]
|
||||
|
||||
ALL ARCHITECTURES:
|
||||
x86\libusb0_x86.dll: x86 32-bit library. Must be renamed to libusb0.dll!
|
||||
On 64 bit, Installs to Windows\syswow64\libusb0.dll.
|
||||
On 32 bit, Installs to Windows\system32\libusb0.dll.
|
||||
|
||||
x86\inf-wizard.exe: inf-wizard application with embedded libusb-win32
|
||||
v@VERSION@ binaries.
|
||||
|
||||
X86 ONLY ARCHITECTURES:
|
||||
x86\libusb0.sys: x86 32-bit driver.
|
||||
Installs to Windows\system32\drivers\libusb0.sys
|
||||
|
||||
AMD64-INTEL64 ONLY ARCHITECTURES:
|
||||
amd64\libusb0.sys: x64 64-bit driver.
|
||||
Installs to Windows\system32\drivers\libusb0.sys
|
||||
|
||||
amd64\libusb0.dll: x64 64-bit library.
|
||||
Installs to Windows\system32\libusb0.dll
|
||||
|
||||
IA64 ONLY ARCHITECTURES:
|
||||
ia64\libusb0.sys: IA64 64-bit driver.
|
||||
Installs to Windows\system32\drivers\libusb0.sys
|
||||
|
||||
ia64\libusb0.dll: IA64 64-bit library.
|
||||
Installs to Windows\system32\libusb0.dll
|
||||
+162
@@ -0,0 +1,162 @@
|
||||
LibUsb-Win32 Change Log
|
||||
|
||||
V1.2.4.0 (04/11/2011)
|
||||
=======================
|
||||
* Removed get configuration request from the core driver
|
||||
set_configuration function. This caused problems with
|
||||
some non-compliant usb devices.
|
||||
|
||||
* Added device descriptor dump to test applications.
|
||||
|
||||
V1.2.3.0 (03/16/2011)
|
||||
=======================
|
||||
* Fixed bug-id 3117686 reported by Tim Schuerewegen.
|
||||
|
||||
* Added LIBUSB_IOCTL_GET_OBJECT_NAME. This new IOCTL code retrieves object
|
||||
from the driver. The only valid object name index is 0. Index 0 is
|
||||
returns the devices plug and play registry key pathname.
|
||||
|
||||
* Removed maximum timeout restriction for vendor class requests.
|
||||
|
||||
V1.2.2.0 (10/02/2010)
|
||||
=======================
|
||||
* Added install-filter-win.exe. A gui installer for device filters.
|
||||
|
||||
* Added new libusb0.dll function usb_install_np_rundll(). This function
|
||||
is designed for rundll32.exe and takes the same parameters as
|
||||
install-filter.exe.
|
||||
|
||||
* Updated install-filter.exe. This application has several new features.
|
||||
Type "install-filter --help" for more details.
|
||||
|
||||
* Updated libusb-win32-devel-filter package. This package is once again
|
||||
available for download as a setup.exe.
|
||||
|
||||
* Updated libusb-win32 "bin" package format. inf-wizard.exe has been moved
|
||||
up one directory.
|
||||
|
||||
* Updated driver_installer_template.iss example. This is an Inno Setup
|
||||
Script showing how to create your own setup.exe for installing your
|
||||
application and driver.
|
||||
|
||||
* Fixed missing byte order marker in inf-wizard.exe .inf files. (libwdi)
|
||||
|
||||
* Fixed auto-configuration issue when there is more than one driver in the
|
||||
stack.
|
||||
|
||||
* Fixed BSOD when using the filter driver with devices that are auto
|
||||
suspended by other drivers in the stack.
|
||||
|
||||
* Fixed BSOD for devices with endpoints that have '0' for wMaxPacketSize.
|
||||
|
||||
* Fixed BSOD when cancelling large transfers on high speed devices.
|
||||
|
||||
|
||||
V1.2.1.0 (07/28/2010)
|
||||
=======================
|
||||
* Updated bulk.c to include async i/o example code.
|
||||
|
||||
* Fixed usb_install_driver_np() issue with inf-wizard generated infs.
|
||||
|
||||
* Fixed inf2cat.exe issue with inf-wizard generated infs.
|
||||
|
||||
* Added 'Install Now' feature to inf-wizard. (libwdi)
|
||||
|
||||
* Added embedded libusb-win32 binaries to inf-wizard. (libwdi)
|
||||
|
||||
* Added libwdi (http://www.libusb.org/wiki/libwdi) to inf-wizard.
|
||||
|
||||
* Added get cached configuration request to usb_open(). This is a new
|
||||
control code that involves no device i/o and allows
|
||||
usb_set_configuration() to be omitted if the driver has already
|
||||
configured it.
|
||||
|
||||
* Fixed set_configuration() failure for devices that do not properly
|
||||
support get_configuration().
|
||||
|
||||
V1.2.0.0 (07/07/2010)
|
||||
=======================
|
||||
* First signed driver release! The libusb-win32 kernel driver (libusb0.sys)
|
||||
can now be used on x64 Windows machines that require signed drivers.
|
||||
|
||||
* Fixed 2128187 reported by Tim Green. usb_get_descriptor() can fail
|
||||
because the given buffer of 8 bytes is too small.
|
||||
|
||||
* Fixed 2928293 reported by Tim Green. Sometimes the call to
|
||||
usb_fetch_and_parse_descriptors() in usb_find_devices() can fail. This
|
||||
patch moves the LIST_ADD to after a successful read of the device's
|
||||
configuration descriptors.
|
||||
|
||||
* Fixed issue causing libusb-win32 to not act as power policy owner
|
||||
when it should.
|
||||
|
||||
* Fixed issue in which on rare occasion, a libusb-win32 filter device could
|
||||
run as a "normal" device.
|
||||
|
||||
* Fixed filter driver issue for device using wudfr.sys.
|
||||
|
||||
* Added large transfer splitting to driver (bulk, int, iso). NOTE:
|
||||
The dll continues to break transfers in the same manner it always has.
|
||||
|
||||
|
||||
V1.1.14.3 (06/12/2010)
|
||||
=======================
|
||||
* Remove get_configuration() request from usb_open(). This caused claim
|
||||
interface to fail when used as a filter driver.
|
||||
|
||||
V1.1.14.0 (06/01/2010)
|
||||
=======================
|
||||
* Updated logging functions and standardized log message display format.
|
||||
|
||||
* Updated inf-wizard to use the new directory format for the libusb-win32
|
||||
binaries.
|
||||
|
||||
* Updated package directories to reflect the winddk BUILDARCH env variable.
|
||||
(i64 := ia64, x64 := amd64)
|
||||
|
||||
* Added request to get the current configuration in usb_open().
|
||||
|
||||
* Fixed 2960644 (reported by farthen) crash on shutdown with x64 based
|
||||
systems while using inf files for each libusb device.
|
||||
|
||||
* Added additional log message only included in debug/chk builds.
|
||||
|
||||
* Updated default log levels to highest verbose level for debug builds.
|
||||
|
||||
* Added test signing support to the libusb-win32 make.cmd. This allows
|
||||
libusb0.sys and libusb0.dll to be signed with a digital signature.
|
||||
(see make.cmd for mmore details)
|
||||
|
||||
* Added MSVC 2008 project files
|
||||
|
||||
* Moved version defines to an include file (libusb_version.h)
|
||||
This file is generated from libusb_version_h.in with "make.cmd makever"
|
||||
|
||||
* Removed all "dist" commands from cyg/mingw makefile. Instead use "make.cmd"
|
||||
in the "ddk_make" directory.
|
||||
|
||||
* Fixed filter setup not running in 64bit mode
|
||||
|
||||
* Fixed 64bit inf-wizard, testlibusb-win builds
|
||||
|
||||
* Added set initial config value #1 when the driver is not a filter.
|
||||
optionally, the initial configuration value can be specified in the inf
|
||||
file: HKR,,"InitialConfigValue",0x00010001,<your config value>
|
||||
|
||||
* Added support for querying device registry keys
|
||||
(LIBUSB_IOCTL_GET_CUSTOM_REG_PROPERTY)
|
||||
|
||||
* Added support for querying device properties
|
||||
(LIBUSB_IOCTL_GET_DEVICE_PROPERTY)
|
||||
|
||||
* Fixed possible race condition in kernel add_device()
|
||||
|
||||
* Updated default ddk build version number to 1.1.14.0 to facilitate
|
||||
Microsoft WHQL submission.
|
||||
|
||||
* Added DDK build distribution system. Official libusb-win32 releases
|
||||
(after 0.1.12.2) are built using Microsoft's WinDDK. (see make.cmd)
|
||||
|
||||
* Fixed 2658937 (reported by Tim Roberts) The libusb-win32 driver always
|
||||
acts as a power policy owner.
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
EXPORTS
|
||||
usb_open
|
||||
usb_close
|
||||
usb_get_string
|
||||
usb_get_string_simple
|
||||
usb_get_descriptor_by_endpoint
|
||||
usb_get_descriptor
|
||||
usb_bulk_write
|
||||
usb_bulk_read
|
||||
usb_interrupt_write
|
||||
usb_interrupt_read
|
||||
usb_control_msg
|
||||
usb_set_configuration
|
||||
usb_claim_interface
|
||||
usb_release_interface
|
||||
usb_set_altinterface
|
||||
usb_resetep
|
||||
usb_clear_halt
|
||||
usb_reset
|
||||
usb_strerror
|
||||
usb_init
|
||||
usb_set_debug
|
||||
usb_find_busses
|
||||
usb_find_devices
|
||||
usb_device
|
||||
usb_get_busses
|
||||
usb_install_service_np
|
||||
usb_install_service_np_rundll
|
||||
usb_uninstall_service_np
|
||||
usb_uninstall_service_np_rundll
|
||||
usb_install_driver_np
|
||||
usb_install_driver_np_rundll
|
||||
usb_touch_inf_file_np
|
||||
usb_touch_inf_file_np_rundll
|
||||
usb_get_version
|
||||
usb_isochronous_setup_async
|
||||
usb_bulk_setup_async
|
||||
usb_interrupt_setup_async
|
||||
usb_submit_async
|
||||
usb_reap_async
|
||||
usb_reap_async_nocancel
|
||||
usb_cancel_async
|
||||
usb_free_async
|
||||
usb_install_needs_restart_np
|
||||
usb_install_npW
|
||||
usb_install_npA
|
||||
usb_install_np_rundll
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
EXPORTS
|
||||
DriverEntry = DriverEntry@8
|
||||
+388
@@ -0,0 +1,388 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="Benchmark"
|
||||
ProjectGUID="{930C04F7-EA05-49D4-8741-5C6AC3B9D72A}"
|
||||
RootNamespace="Benchmark"
|
||||
TargetFrameworkVersion="131072"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
<Platform
|
||||
Name="x64"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\$(ProjectName)\"
|
||||
IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\$(ProjectName)\"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\src;..\src\driver"
|
||||
PreprocessorDefinitions="_WIN32_WINNT=0x0500;LOG_APPNAME="\"$(ProjectName)\"""
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
CompileAs="1"
|
||||
DisableSpecificWarnings="4996"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="LOG_APPNAME="\"$(ProjectName)\"""
|
||||
AdditionalIncludeDirectories="..\src"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalLibraryDirectories=""
|
||||
GenerateManifest="true"
|
||||
EnableUAC="false"
|
||||
UACExecutionLevel="0"
|
||||
GenerateDebugInformation="true"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
EmbedManifest="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\$(ProjectName)\"
|
||||
IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\$(ProjectName)\"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\src;..\src\driver"
|
||||
PreprocessorDefinitions="_WIN32_WINNT=0x0500;LOG_APPNAME="\"$(ProjectName)\"""
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="1"
|
||||
DisableSpecificWarnings="4996"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="LOG_APPNAME="\"$(ProjectName)\"""
|
||||
AdditionalIncludeDirectories="..\src"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalLibraryDirectories=""
|
||||
GenerateManifest="true"
|
||||
EnableUAC="false"
|
||||
UACExecutionLevel="0"
|
||||
GenerateDebugInformation="true"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
EmbedManifest="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\$(ProjectName)\"
|
||||
IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\$(ProjectName)\"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
EnableIntrinsicFunctions="true"
|
||||
AdditionalIncludeDirectories="..\src;..\src\driver"
|
||||
PreprocessorDefinitions="_WIN32_WINNT=0x0500;LOG_APPNAME="\"$(ProjectName)\"""
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="true"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="1"
|
||||
DisableSpecificWarnings="4996"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="LOG_APPNAME="\"$(ProjectName)\"""
|
||||
AdditionalIncludeDirectories="..\src"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalLibraryDirectories=""
|
||||
GenerateManifest="true"
|
||||
EnableUAC="false"
|
||||
UACExecutionLevel="0"
|
||||
GenerateDebugInformation="true"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
EmbedManifest="true"
|
||||
VerboseOutput="false"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|x64"
|
||||
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\$(ProjectName)\"
|
||||
IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\$(ProjectName)\"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
EnableIntrinsicFunctions="true"
|
||||
AdditionalIncludeDirectories="..\src;..\src\driver"
|
||||
PreprocessorDefinitions="_WIN32_WINNT=0x0500;LOG_APPNAME="\"$(ProjectName)\"""
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="true"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="1"
|
||||
DisableSpecificWarnings="4996"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="LOG_APPNAME="\"$(ProjectName)\"""
|
||||
AdditionalIncludeDirectories="..\src"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalLibraryDirectories=""
|
||||
GenerateManifest="true"
|
||||
EnableUAC="false"
|
||||
UACExecutionLevel="0"
|
||||
GenerateDebugInformation="true"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
EmbedManifest="true"
|
||||
VerboseOutput="false"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\examples\benchmark.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\resource.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\usb.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\examples\benchmark_rc.rc"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath="..\examples\BenchmarkHelp.txt"
|
||||
>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
+229
@@ -0,0 +1,229 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{930C04F7-EA05-49D4-8741-5C6AC3B9D72A}</ProjectGuid>
|
||||
<RootNamespace>Benchmark</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</GenerateManifest>
|
||||
<EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</GenerateManifest>
|
||||
<EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</EmbedManifest>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</GenerateManifest>
|
||||
<EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</EmbedManifest>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</GenerateManifest>
|
||||
<EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</EmbedManifest>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\src;..\src\driver;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_WIN32_WINNT=0x0500;LOG_APPNAME="$(ProjectName)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
<DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>LOG_APPNAME="$(ProjectName)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<EnableUAC>false</EnableUAC>
|
||||
<UACExecutionLevel>AsInvoker</UACExecutionLevel>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\src;..\src\driver;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_WIN32_WINNT=0x0500;LOG_APPNAME="$(ProjectName)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
<DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>LOG_APPNAME="$(ProjectName)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<EnableUAC>false</EnableUAC>
|
||||
<UACExecutionLevel>AsInvoker</UACExecutionLevel>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>..\src;..\src\driver;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_WIN32_WINNT=0x0500;LOG_APPNAME="$(ProjectName)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
<DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>LOG_APPNAME="$(ProjectName)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<EnableUAC>false</EnableUAC>
|
||||
<UACExecutionLevel>AsInvoker</UACExecutionLevel>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<VerboseOutput>false</VerboseOutput>
|
||||
</Manifest>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>..\src;..\src\driver;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_WIN32_WINNT=0x0500;LOG_APPNAME="$(ProjectName)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
<DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>LOG_APPNAME="$(ProjectName)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<EnableUAC>false</EnableUAC>
|
||||
<UACExecutionLevel>AsInvoker</UACExecutionLevel>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<VerboseOutput>false</VerboseOutput>
|
||||
</Manifest>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\examples\benchmark.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="resource.h" />
|
||||
<ClInclude Include="..\src\usb.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\examples\benchmark_rc.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\examples\BenchmarkHelp.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="libusb-dll.vcxproj">
|
||||
<Project>{c52e6fa6-aff5-468d-a82f-e9932e8203d4}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\examples\benchmark.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="resource.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\usb.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\examples\benchmark_rc.rc">
|
||||
<Filter>Resource Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\examples\BenchmarkHelp.txt" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
</Project>
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type='text/xsl' href='_UpgradeReport_Files/UpgradeReport.xslt'?><UpgradeLog>
|
||||
<Properties><Property Name="Solution" Value="libusb-win32">
|
||||
</Property><Property Name="解决方案文件" Value="D:\ThirdParty\UsbSupport\libusb-win32-src-1.2.4.0\projects\libusb-win32.sln">
|
||||
</Property><Property Name="Date" Value="2012年5月23日">
|
||||
</Property><Property Name="Time" Value="10:50 陶程">
|
||||
</Property></Properties><Event ErrorLevel="0" Project="install-filter" Source="install-filter.vcproj" Description="Converting project file 'D:\ThirdParty\UsbSupport\libusb-win32-src-1.2.4.0\projects\install-filter.vcproj'.">
|
||||
</Event><Event ErrorLevel="1" Project="install-filter" Source="install-filter.vcproj" Description="VCWebServiceProxyGeneratorTool is no longer supported. The tool has been removed from your project settings.">
|
||||
</Event><Event ErrorLevel="0" Project="install-filter" Source="install-filter.vcproj" Description="Done converting to new project file 'D:\ThirdParty\UsbSupport\libusb-win32-src-1.2.4.0\projects\install-filter.vcxproj'.">
|
||||
</Event><Event ErrorLevel="3" Project="install-filter" Source="install-filter.vcproj" Description="Converted">
|
||||
</Event><Event ErrorLevel="0" Project="libusb-dll" Source="libusb-dll.vcproj" Description="Converting project file 'D:\ThirdParty\UsbSupport\libusb-win32-src-1.2.4.0\projects\libusb-dll.vcproj'.">
|
||||
</Event><Event ErrorLevel="1" Project="libusb-dll" Source="libusb-dll.vcproj" Description="VCWebServiceProxyGeneratorTool is no longer supported. The tool has been removed from your project settings.">
|
||||
</Event><Event ErrorLevel="0" Project="libusb-dll" Source="libusb-dll.vcproj" Description="Done converting to new project file 'D:\ThirdParty\UsbSupport\libusb-win32-src-1.2.4.0\projects\libusb-dll.vcxproj'.">
|
||||
</Event><Event ErrorLevel="3" Project="libusb-dll" Source="libusb-dll.vcproj" Description="Converted">
|
||||
</Event><Event ErrorLevel="0" Project="inf-wizard" Source="inf-wizard.vcproj" Description="Converting project file 'D:\ThirdParty\UsbSupport\libusb-win32-src-1.2.4.0\projects\inf-wizard.vcproj'.">
|
||||
</Event><Event ErrorLevel="1" Project="inf-wizard" Source="inf-wizard.vcproj" Description="VCWebServiceProxyGeneratorTool is no longer supported. The tool has been removed from your project settings.">
|
||||
</Event><Event ErrorLevel="0" Project="inf-wizard" Source="inf-wizard.vcproj" Description="Done converting to new project file 'D:\ThirdParty\UsbSupport\libusb-win32-src-1.2.4.0\projects\inf-wizard.vcxproj'.">
|
||||
</Event><Event ErrorLevel="3" Project="inf-wizard" Source="inf-wizard.vcproj" Description="Converted">
|
||||
</Event><Event ErrorLevel="0" Project="testlibusb-win" Source="testlibusb-win.vcproj" Description="Converting project file 'D:\ThirdParty\UsbSupport\libusb-win32-src-1.2.4.0\projects\testlibusb-win.vcproj'.">
|
||||
</Event><Event ErrorLevel="1" Project="testlibusb-win" Source="testlibusb-win.vcproj" Description="VCWebServiceProxyGeneratorTool is no longer supported. The tool has been removed from your project settings.">
|
||||
</Event><Event ErrorLevel="0" Project="testlibusb-win" Source="testlibusb-win.vcproj" Description="Done converting to new project file 'D:\ThirdParty\UsbSupport\libusb-win32-src-1.2.4.0\projects\testlibusb-win.vcxproj'.">
|
||||
</Event><Event ErrorLevel="3" Project="testlibusb-win" Source="testlibusb-win.vcproj" Description="Converted">
|
||||
</Event><Event ErrorLevel="0" Project="testlibusb" Source="testlibusb.vcproj" Description="Converting project file 'D:\ThirdParty\UsbSupport\libusb-win32-src-1.2.4.0\projects\testlibusb.vcproj'.">
|
||||
</Event><Event ErrorLevel="1" Project="testlibusb" Source="testlibusb.vcproj" Description="VCWebServiceProxyGeneratorTool is no longer supported. The tool has been removed from your project settings.">
|
||||
</Event><Event ErrorLevel="0" Project="testlibusb" Source="testlibusb.vcproj" Description="Done converting to new project file 'D:\ThirdParty\UsbSupport\libusb-win32-src-1.2.4.0\projects\testlibusb.vcxproj'.">
|
||||
</Event><Event ErrorLevel="3" Project="testlibusb" Source="testlibusb.vcproj" Description="Converted">
|
||||
</Event><Event ErrorLevel="0" Project="libusb-sys" Source="libusb-sys.vcproj" Description="Converting project file 'D:\ThirdParty\UsbSupport\libusb-win32-src-1.2.4.0\projects\libusb-sys.vcproj'.">
|
||||
</Event><Event ErrorLevel="1" Project="libusb-sys" Source="libusb-sys.vcproj" Description="Attribute 'EnableManagedIncrementalBuild' of 'Debug|Win32' is not supported in this version and has been removed during conversion.">
|
||||
</Event><Event ErrorLevel="1" Project="libusb-sys" Source="libusb-sys.vcproj" Description="VCConvertEngine could not convert attribute CompileAsManaged = under Tool VCNMakeTool.">
|
||||
</Event><Event ErrorLevel="1" Project="libusb-sys" Source="libusb-sys.vcproj" Description="Attribute 'EnableManagedIncrementalBuild' of 'Debug|x64' is not supported in this version and has been removed during conversion.">
|
||||
</Event><Event ErrorLevel="1" Project="libusb-sys" Source="libusb-sys.vcproj" Description="VCConvertEngine could not convert attribute CompileAsManaged = under Tool VCNMakeTool.">
|
||||
</Event><Event ErrorLevel="1" Project="libusb-sys" Source="libusb-sys.vcproj" Description="Attribute 'EnableManagedIncrementalBuild' of 'Release|Win32' is not supported in this version and has been removed during conversion.">
|
||||
</Event><Event ErrorLevel="1" Project="libusb-sys" Source="libusb-sys.vcproj" Description="VCConvertEngine could not convert attribute CompileAsManaged = under Tool VCNMakeTool.">
|
||||
</Event><Event ErrorLevel="1" Project="libusb-sys" Source="libusb-sys.vcproj" Description="Attribute 'EnableManagedIncrementalBuild' of 'Release|x64' is not supported in this version and has been removed during conversion.">
|
||||
</Event><Event ErrorLevel="1" Project="libusb-sys" Source="libusb-sys.vcproj" Description="VCConvertEngine could not convert attribute CompileAsManaged = under Tool VCNMakeTool.">
|
||||
</Event><Event ErrorLevel="0" Project="libusb-sys" Source="libusb-sys.vcproj" Description="Done converting to new project file 'D:\ThirdParty\UsbSupport\libusb-win32-src-1.2.4.0\projects\libusb-sys.vcxproj'.">
|
||||
</Event><Event ErrorLevel="3" Project="libusb-sys" Source="libusb-sys.vcproj" Description="Converted">
|
||||
</Event><Event ErrorLevel="0" Project="testbulk" Source="testbulk.vcproj" Description="Converting project file 'D:\ThirdParty\UsbSupport\libusb-win32-src-1.2.4.0\projects\testbulk.vcproj'.">
|
||||
</Event><Event ErrorLevel="1" Project="testbulk" Source="testbulk.vcproj" Description="VCWebServiceProxyGeneratorTool is no longer supported. The tool has been removed from your project settings.">
|
||||
</Event><Event ErrorLevel="0" Project="testbulk" Source="testbulk.vcproj" Description="Done converting to new project file 'D:\ThirdParty\UsbSupport\libusb-win32-src-1.2.4.0\projects\testbulk.vcxproj'.">
|
||||
</Event><Event ErrorLevel="3" Project="testbulk" Source="testbulk.vcproj" Description="Converted">
|
||||
</Event><Event ErrorLevel="0" Project="Benchmark" Source="Benchmark.vcproj" Description="Converting project file 'D:\ThirdParty\UsbSupport\libusb-win32-src-1.2.4.0\projects\Benchmark.vcproj'.">
|
||||
</Event><Event ErrorLevel="1" Project="Benchmark" Source="Benchmark.vcproj" Description="VCWebServiceProxyGeneratorTool is no longer supported. The tool has been removed from your project settings.">
|
||||
</Event><Event ErrorLevel="0" Project="Benchmark" Source="Benchmark.vcproj" Description="Done converting to new project file 'D:\ThirdParty\UsbSupport\libusb-win32-src-1.2.4.0\projects\Benchmark.vcxproj'.">
|
||||
</Event><Event ErrorLevel="3" Project="Benchmark" Source="Benchmark.vcproj" Description="Converted">
|
||||
</Event><Event ErrorLevel="0" Project="embedder_2008" Source="additional\libwdi\libwdi\embedder_2008.vcproj" Description="Converting project file 'D:\ThirdParty\UsbSupport\libusb-win32-src-1.2.4.0\projects\additional\libwdi\libwdi\embedder_2008.vcproj'.">
|
||||
</Event><Event ErrorLevel="1" Project="embedder_2008" Source="additional\libwdi\libwdi\embedder_2008.vcproj" Description="VCWebServiceProxyGeneratorTool is no longer supported. The tool has been removed from your project settings.">
|
||||
</Event><Event ErrorLevel="0" Project="embedder_2008" Source="additional\libwdi\libwdi\embedder_2008.vcproj" Description="Done converting to new project file 'D:\ThirdParty\UsbSupport\libusb-win32-src-1.2.4.0\projects\additional\libwdi\libwdi\embedder_2008.vcxproj'.">
|
||||
</Event><Event ErrorLevel="3" Project="embedder_2008" Source="additional\libwdi\libwdi\embedder_2008.vcproj" Description="Converted">
|
||||
</Event><Event ErrorLevel="0" Project="installer_x64_2008" Source="additional\libwdi\libwdi\installer_x64_2008.vcproj" Description="Converting project file 'D:\ThirdParty\UsbSupport\libusb-win32-src-1.2.4.0\projects\additional\libwdi\libwdi\installer_x64_2008.vcproj'.">
|
||||
</Event><Event ErrorLevel="1" Project="installer_x64_2008" Source="additional\libwdi\libwdi\installer_x64_2008.vcproj" Description="VCWebServiceProxyGeneratorTool is no longer supported. The tool has been removed from your project settings.">
|
||||
</Event><Event ErrorLevel="0" Project="installer_x64_2008" Source="additional\libwdi\libwdi\installer_x64_2008.vcproj" Description="Done converting to new project file 'D:\ThirdParty\UsbSupport\libusb-win32-src-1.2.4.0\projects\additional\libwdi\libwdi\installer_x64_2008.vcxproj'.">
|
||||
</Event><Event ErrorLevel="3" Project="installer_x64_2008" Source="additional\libwdi\libwdi\installer_x64_2008.vcproj" Description="Converted">
|
||||
</Event><Event ErrorLevel="0" Project="installer_x86_2008" Source="additional\libwdi\libwdi\installer_x86_2008.vcproj" Description="Converting project file 'D:\ThirdParty\UsbSupport\libusb-win32-src-1.2.4.0\projects\additional\libwdi\libwdi\installer_x86_2008.vcproj'.">
|
||||
</Event><Event ErrorLevel="1" Project="installer_x86_2008" Source="additional\libwdi\libwdi\installer_x86_2008.vcproj" Description="VCWebServiceProxyGeneratorTool is no longer supported. The tool has been removed from your project settings.">
|
||||
</Event><Event ErrorLevel="0" Project="installer_x86_2008" Source="additional\libwdi\libwdi\installer_x86_2008.vcproj" Description="Done converting to new project file 'D:\ThirdParty\UsbSupport\libusb-win32-src-1.2.4.0\projects\additional\libwdi\libwdi\installer_x86_2008.vcxproj'.">
|
||||
</Event><Event ErrorLevel="3" Project="installer_x86_2008" Source="additional\libwdi\libwdi\installer_x86_2008.vcproj" Description="Converted">
|
||||
</Event><Event ErrorLevel="0" Project="libwdi_static_2008" Source="additional\libwdi\libwdi\libwdi_static_2008.vcproj" Description="Converting project file 'D:\ThirdParty\UsbSupport\libusb-win32-src-1.2.4.0\projects\additional\libwdi\libwdi\libwdi_static_2008.vcproj'.">
|
||||
</Event><Event ErrorLevel="1" Project="libwdi_static_2008" Source="additional\libwdi\libwdi\libwdi_static_2008.vcproj" Description="VCWebServiceProxyGeneratorTool is no longer supported. The tool has been removed from your project settings.">
|
||||
</Event><Event ErrorLevel="0" Project="libwdi_static_2008" Source="additional\libwdi\libwdi\libwdi_static_2008.vcproj" Description="Done converting to new project file 'D:\ThirdParty\UsbSupport\libusb-win32-src-1.2.4.0\projects\additional\libwdi\libwdi\libwdi_static_2008.vcxproj'.">
|
||||
</Event><Event ErrorLevel="3" Project="libwdi_static_2008" Source="additional\libwdi\libwdi\libwdi_static_2008.vcproj" Description="Converted">
|
||||
</Event><Event ErrorLevel="0" Project="install-filter-win" Source="install-filter-win.vcproj" Description="Converting project file 'D:\ThirdParty\UsbSupport\libusb-win32-src-1.2.4.0\projects\install-filter-win.vcproj'.">
|
||||
</Event><Event ErrorLevel="1" Project="install-filter-win" Source="install-filter-win.vcproj" Description="VCWebServiceProxyGeneratorTool is no longer supported. The tool has been removed from your project settings.">
|
||||
</Event><Event ErrorLevel="0" Project="install-filter-win" Source="install-filter-win.vcproj" Description="Done converting to new project file 'D:\ThirdParty\UsbSupport\libusb-win32-src-1.2.4.0\projects\install-filter-win.vcxproj'.">
|
||||
</Event><Event ErrorLevel="3" Project="install-filter-win" Source="install-filter-win.vcproj" Description="Converted">
|
||||
</Event><Event ErrorLevel="0" Project="" Source="libusb-win32.sln" Description="成功转换解决方案">
|
||||
</Event><Event ErrorLevel="3" Project="" Source="libusb-win32.sln" Description="Converted">
|
||||
</Event></UpgradeLog>
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
+207
@@ -0,0 +1,207 @@
|
||||
BODY
|
||||
{
|
||||
BACKGROUND-COLOR: white;
|
||||
FONT-FAMILY: "Verdana", sans-serif;
|
||||
FONT-SIZE: 100%;
|
||||
MARGIN-LEFT: 0px;
|
||||
MARGIN-TOP: 0px
|
||||
}
|
||||
P
|
||||
{
|
||||
FONT-FAMILY: "Verdana", sans-serif;
|
||||
FONT-SIZE: 70%;
|
||||
LINE-HEIGHT: 12pt;
|
||||
MARGIN-BOTTOM: 0px;
|
||||
MARGIN-LEFT: 10px;
|
||||
MARGIN-TOP: 10px
|
||||
}
|
||||
.note
|
||||
{
|
||||
BACKGROUND-COLOR: #ffffff;
|
||||
COLOR: #336699;
|
||||
FONT-FAMILY: "Verdana", sans-serif;
|
||||
FONT-SIZE: 100%;
|
||||
MARGIN-BOTTOM: 0px;
|
||||
MARGIN-LEFT: 0px;
|
||||
MARGIN-TOP: 0px;
|
||||
PADDING-RIGHT: 10px
|
||||
}
|
||||
.infotable
|
||||
{
|
||||
BACKGROUND-COLOR: #f0f0e0;
|
||||
BORDER-BOTTOM: #ffffff 0px solid;
|
||||
BORDER-COLLAPSE: collapse;
|
||||
BORDER-LEFT: #ffffff 0px solid;
|
||||
BORDER-RIGHT: #ffffff 0px solid;
|
||||
BORDER-TOP: #ffffff 0px solid;
|
||||
FONT-SIZE: 70%;
|
||||
MARGIN-LEFT: 10px
|
||||
}
|
||||
.issuetable
|
||||
{
|
||||
BACKGROUND-COLOR: #ffffe8;
|
||||
BORDER-COLLAPSE: collapse;
|
||||
COLOR: #000000;
|
||||
FONT-SIZE: 100%;
|
||||
MARGIN-BOTTOM: 10px;
|
||||
MARGIN-LEFT: 13px;
|
||||
MARGIN-TOP: 0px
|
||||
}
|
||||
.issuetitle
|
||||
{
|
||||
BACKGROUND-COLOR: #ffffff;
|
||||
BORDER-BOTTOM: #dcdcdc 1px solid;
|
||||
BORDER-TOP: #dcdcdc 1px;
|
||||
COLOR: #003366;
|
||||
FONT-WEIGHT: normal
|
||||
}
|
||||
.header
|
||||
{
|
||||
BACKGROUND-COLOR: #cecf9c;
|
||||
BORDER-BOTTOM: #ffffff 1px solid;
|
||||
BORDER-LEFT: #ffffff 1px solid;
|
||||
BORDER-RIGHT: #ffffff 1px solid;
|
||||
BORDER-TOP: #ffffff 1px solid;
|
||||
COLOR: #000000;
|
||||
FONT-WEIGHT: bold
|
||||
}
|
||||
.issuehdr
|
||||
{
|
||||
BACKGROUND-COLOR: #E0EBF5;
|
||||
BORDER-BOTTOM: #dcdcdc 1px solid;
|
||||
BORDER-TOP: #dcdcdc 1px solid;
|
||||
COLOR: #000000;
|
||||
FONT-WEIGHT: normal
|
||||
}
|
||||
.issuenone
|
||||
{
|
||||
BACKGROUND-COLOR: #ffffff;
|
||||
BORDER-BOTTOM: 0px;
|
||||
BORDER-LEFT: 0px;
|
||||
BORDER-RIGHT: 0px;
|
||||
BORDER-TOP: 0px;
|
||||
COLOR: #000000;
|
||||
FONT-WEIGHT: normal
|
||||
}
|
||||
.content
|
||||
{
|
||||
BACKGROUND-COLOR: #e7e7ce;
|
||||
BORDER-BOTTOM: #ffffff 1px solid;
|
||||
BORDER-LEFT: #ffffff 1px solid;
|
||||
BORDER-RIGHT: #ffffff 1px solid;
|
||||
BORDER-TOP: #ffffff 1px solid;
|
||||
PADDING-LEFT: 3px
|
||||
}
|
||||
.issuecontent
|
||||
{
|
||||
BACKGROUND-COLOR: #ffffff;
|
||||
BORDER-BOTTOM: #dcdcdc 1px solid;
|
||||
BORDER-TOP: #dcdcdc 1px solid;
|
||||
PADDING-LEFT: 3px
|
||||
}
|
||||
A:link
|
||||
{
|
||||
COLOR: #cc6633;
|
||||
TEXT-DECORATION: underline
|
||||
}
|
||||
A:visited
|
||||
{
|
||||
COLOR: #cc6633;
|
||||
}
|
||||
A:active
|
||||
{
|
||||
COLOR: #cc6633;
|
||||
}
|
||||
A:hover
|
||||
{
|
||||
COLOR: #cc3300;
|
||||
TEXT-DECORATION: underline
|
||||
}
|
||||
H1
|
||||
{
|
||||
BACKGROUND-COLOR: #003366;
|
||||
BORDER-BOTTOM: #336699 6px solid;
|
||||
COLOR: #ffffff;
|
||||
FONT-SIZE: 130%;
|
||||
FONT-WEIGHT: normal;
|
||||
MARGIN: 0em 0em 0em -20px;
|
||||
PADDING-BOTTOM: 8px;
|
||||
PADDING-LEFT: 30px;
|
||||
PADDING-TOP: 16px
|
||||
}
|
||||
H2
|
||||
{
|
||||
COLOR: #000000;
|
||||
FONT-SIZE: 80%;
|
||||
FONT-WEIGHT: bold;
|
||||
MARGIN-BOTTOM: 3px;
|
||||
MARGIN-LEFT: 10px;
|
||||
MARGIN-TOP: 20px;
|
||||
PADDING-LEFT: 0px
|
||||
}
|
||||
H3
|
||||
{
|
||||
COLOR: #000000;
|
||||
FONT-SIZE: 80%;
|
||||
FONT-WEIGHT: bold;
|
||||
MARGIN-BOTTOM: -5px;
|
||||
MARGIN-LEFT: 10px;
|
||||
MARGIN-TOP: 20px
|
||||
}
|
||||
H4
|
||||
{
|
||||
COLOR: #000000;
|
||||
FONT-SIZE: 70%;
|
||||
FONT-WEIGHT: bold;
|
||||
MARGIN-BOTTOM: 0px;
|
||||
MARGIN-TOP: 15px;
|
||||
PADDING-BOTTOM: 0px
|
||||
}
|
||||
UL
|
||||
{
|
||||
COLOR: #000000;
|
||||
FONT-SIZE: 70%;
|
||||
LIST-STYLE: square;
|
||||
MARGIN-BOTTOM: 0pt;
|
||||
MARGIN-TOP: 0pt
|
||||
}
|
||||
OL
|
||||
{
|
||||
COLOR: #000000;
|
||||
FONT-SIZE: 70%;
|
||||
LIST-STYLE: square;
|
||||
MARGIN-BOTTOM: 0pt;
|
||||
MARGIN-TOP: 0pt
|
||||
}
|
||||
LI
|
||||
{
|
||||
LIST-STYLE: square;
|
||||
MARGIN-LEFT: 0px
|
||||
}
|
||||
.expandable
|
||||
{
|
||||
CURSOR: hand
|
||||
}
|
||||
.expanded
|
||||
{
|
||||
color: black
|
||||
}
|
||||
.collapsed
|
||||
{
|
||||
DISPLAY: none
|
||||
}
|
||||
.foot
|
||||
{
|
||||
BACKGROUND-COLOR: #ffffff;
|
||||
BORDER-BOTTOM: #cecf9c 1px solid;
|
||||
BORDER-TOP: #cecf9c 2px solid
|
||||
}
|
||||
.settings
|
||||
{
|
||||
MARGIN-LEFT: 25PX;
|
||||
}
|
||||
.help
|
||||
{
|
||||
TEXT-ALIGN: right;
|
||||
margin-right: 10px;
|
||||
}
|
||||
+232
@@ -0,0 +1,232 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt">
|
||||
|
||||
<xsl:key name="ProjectKey" match="Event" use="@Project"/>
|
||||
|
||||
<xsl:template match="Events" mode="createProjects">
|
||||
<projects>
|
||||
<xsl:for-each select="Event">
|
||||
<!--xsl:sort select="@Project" order="descending"/-->
|
||||
<xsl:if test="(1=position()) or (preceding-sibling::*[1]/@Project != @Project)">
|
||||
|
||||
<xsl:variable name="ProjectName" select="@Project"/>
|
||||
|
||||
<project>
|
||||
<xsl:attribute name="name">
|
||||
<xsl:value-of select="@Project"/>
|
||||
</xsl:attribute>
|
||||
|
||||
<xsl:if test="@Project=''">
|
||||
<xsl:attribute name="solution">
|
||||
<xsl:value-of select="@Solution"/>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:for-each select="key('ProjectKey', $ProjectName)">
|
||||
<!--xsl:sort select="@Source" /-->
|
||||
<xsl:if test="(1=position()) or (preceding-sibling::*[1]/@Source != @Source)">
|
||||
|
||||
<source>
|
||||
<xsl:attribute name="name">
|
||||
<xsl:value-of select="@Source"/>
|
||||
</xsl:attribute>
|
||||
|
||||
<xsl:variable name="Source">
|
||||
<xsl:value-of select="@Source"/>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:for-each select="key('ProjectKey', $ProjectName)[ @Source = $Source ]">
|
||||
|
||||
<event>
|
||||
<xsl:attribute name="error-level">
|
||||
<xsl:value-of select="@ErrorLevel"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="description">
|
||||
<xsl:value-of select="@Description"/>
|
||||
</xsl:attribute>
|
||||
</event>
|
||||
</xsl:for-each>
|
||||
</source>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
|
||||
</project>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</projects>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="projects">
|
||||
<xsl:for-each select="project">
|
||||
<xsl:sort select="@Name" order="ascending"/>
|
||||
<h2>
|
||||
<xsl:if test="@solution"><a _locID="Solution">解决方案</a>: <xsl:value-of select="@solution"/></xsl:if>
|
||||
<xsl:if test="not(@solution)"><a _locID="Project">项目</a>: <xsl:value-of select="@name"/>
|
||||
<xsl:for-each select="source">
|
||||
<xsl:variable name="Hyperlink" select="@name"/>
|
||||
<xsl:for-each select="event[@error-level='4']">
|
||||
<A class="note"><xsl:attribute name="HREF"><xsl:value-of select="$Hyperlink"/></xsl:attribute><xsl:value-of select="@description"/></A>
|
||||
</xsl:for-each>
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
</h2>
|
||||
|
||||
<table cellpadding="2" cellspacing="0" width="98%" border="1" bordercolor="white" class="infotable">
|
||||
<tr>
|
||||
<td nowrap="1" class="header" _locID="Filename">文件名</td>
|
||||
<td nowrap="1" class="header" _locID="Status">状态</td>
|
||||
<td nowrap="1" class="header" _locID="Errors">错误</td>
|
||||
<td nowrap="1" class="header" _locID="Warnings">警告</td>
|
||||
</tr>
|
||||
|
||||
<xsl:for-each select="source">
|
||||
<xsl:sort select="@name" order="ascending"/>
|
||||
<xsl:variable name="source-id" select="generate-id(.)"/>
|
||||
|
||||
<xsl:if test="count(event)!=count(event[@error-level='4'])">
|
||||
|
||||
<tr class="row">
|
||||
<td class="content">
|
||||
<A HREF="javascript:"><xsl:attribute name="onClick">javascript:document.images['<xsl:value-of select="$source-id"/>'].click()</xsl:attribute><IMG border="0" _locID="IMG.alt" _locAttrData="alt" alt="展开/折叠节" class="expandable" height="11" onclick="changepic()" src="_UpgradeReport_Files/UpgradeReport_Plus.gif" width="9"><xsl:attribute name="name"><xsl:value-of select="$source-id"/></xsl:attribute><xsl:attribute name="child">src<xsl:value-of select="$source-id"/></xsl:attribute></IMG></A> <xsl:value-of select="@name"/>
|
||||
</td>
|
||||
<td class="content">
|
||||
<xsl:if test="count(event[@error-level='3'])=1">
|
||||
<xsl:for-each select="event[@error-level='3']">
|
||||
<xsl:if test="@description='Converted'"><a _locID="Converted1">已转换</a></xsl:if>
|
||||
<xsl:if test="@description!='Converted'"><xsl:value-of select="@description"/></xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
<xsl:if test="count(event[@error-level='3'])!=1 and count(event[@error-level='3' and @description='Converted'])!=0"><a _locID="Converted2">已转换</a>
|
||||
</xsl:if>
|
||||
</td>
|
||||
<td class="content"><xsl:value-of select="count(event[@error-level='2'])"/></td>
|
||||
<td class="content"><xsl:value-of select="count(event[@error-level='1'])"/></td>
|
||||
</tr>
|
||||
|
||||
<tr class="collapsed" bgcolor="#ffffff">
|
||||
<xsl:attribute name="id">src<xsl:value-of select="$source-id"/></xsl:attribute>
|
||||
|
||||
<td colspan="7">
|
||||
<table width="97%" border="1" bordercolor="#dcdcdc" rules="cols" class="issuetable">
|
||||
<tr>
|
||||
<td colspan="7" class="issuetitle" _locID="ConversionIssues">转换报告 - <xsl:value-of select="@name"/>:</td>
|
||||
</tr>
|
||||
|
||||
<xsl:for-each select="event[@error-level!='3']">
|
||||
<xsl:if test="@error-level!='4'">
|
||||
<tr>
|
||||
<td class="issuenone" style="border-bottom:solid 1 lightgray">
|
||||
<xsl:value-of select="@description"/>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
|
||||
<tr valign="top">
|
||||
<td class="foot">
|
||||
<xsl:if test="count(source)!=1">
|
||||
<xsl:value-of select="count(source)"/><a _locID="file1"> 个文件</a>
|
||||
</xsl:if>
|
||||
<xsl:if test="count(source)=1">
|
||||
<a _locID="file2">1 个文件</a>
|
||||
</xsl:if>
|
||||
</td>
|
||||
<td class="foot">
|
||||
<a _locID="Converted3">已转换</a>: <xsl:value-of select="count(source/event[@error-level='3' and @description='Converted'])"/><BR/>
|
||||
<a _locID="NotConverted">未转换</a>: <xsl:value-of select="count(source) - count(source/event[@error-level='3' and @description='Converted'])"/>
|
||||
</td>
|
||||
<td class="foot"><xsl:value-of select="count(source/event[@error-level='2'])"/></td>
|
||||
<td class="foot"><xsl:value-of select="count(source/event[@error-level='1'])"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="Property">
|
||||
<xsl:if test="@Name!='Date' and @Name!='Time' and @Name!='LogNumber' and @Name!='Solution'">
|
||||
<tr><td nowrap="1"><b><xsl:value-of select="@Name"/>: </b><xsl:value-of select="@Value"/></td></tr>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="UpgradeLog">
|
||||
<html>
|
||||
<head>
|
||||
<META HTTP-EQUIV="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<link rel="stylesheet" href="_UpgradeReport_Files\UpgradeReport.css"/>
|
||||
<title _locID="ConversionReport0">转换报告
|
||||
<xsl:if test="Properties/Property[@Name='LogNumber']">
|
||||
<xsl:value-of select="Properties/Property[@Name='LogNumber']/@Value"/>
|
||||
</xsl:if>
|
||||
</title>
|
||||
<script language="javascript">
|
||||
function outliner () {
|
||||
oMe = window.event.srcElement
|
||||
//get child element
|
||||
var child = document.all[event.srcElement.getAttribute("child",false)];
|
||||
//if child element exists, expand or collapse it.
|
||||
if (null != child)
|
||||
child.className = child.className == "collapsed" ? "expanded" : "collapsed";
|
||||
}
|
||||
|
||||
function changepic() {
|
||||
uMe = window.event.srcElement;
|
||||
var check = uMe.src.toLowerCase();
|
||||
if (check.lastIndexOf("upgradereport_plus.gif") != -1)
|
||||
{
|
||||
uMe.src = "_UpgradeReport_Files/UpgradeReport_Minus.gif"
|
||||
}
|
||||
else
|
||||
{
|
||||
uMe.src = "_UpgradeReport_Files/UpgradeReport_Plus.gif"
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body topmargin="0" leftmargin="0" rightmargin="0" onclick="outliner();">
|
||||
<h1 _locID="ConversionReport">转换报告 - <xsl:value-of select="Properties/Property[@Name='Solution']/@Value"/></h1>
|
||||
|
||||
<p><span class="note">
|
||||
<b _locID="TimeOfConversion">转换时间:</b> <xsl:value-of select="Properties/Property[@Name='Date']/@Value"/> <xsl:value-of select="Properties/Property[@Name='Time']/@Value"/><br/>
|
||||
</span></p>
|
||||
|
||||
<xsl:variable name="SortedEvents">
|
||||
<Events>
|
||||
<xsl:for-each select="Event">
|
||||
<xsl:sort select="@Project" order="ascending"/>
|
||||
<xsl:sort select="@Source" order="ascending"/>
|
||||
<xsl:sort select="@ErrorLevel" order="ascending"/>
|
||||
<Event>
|
||||
<xsl:attribute name="Project"><xsl:value-of select="@Project"/> </xsl:attribute>
|
||||
<xsl:attribute name="Solution"><xsl:value-of select="/UpgradeLog/Properties/Property[@Name='Solution']/@Value"/> </xsl:attribute>
|
||||
<xsl:attribute name="Source"><xsl:value-of select="@Source"/> </xsl:attribute>
|
||||
<xsl:attribute name="ErrorLevel"><xsl:value-of select="@ErrorLevel"/> </xsl:attribute>
|
||||
<xsl:attribute name="Description"><xsl:value-of select="@Description"/> </xsl:attribute>
|
||||
</Event>
|
||||
</xsl:for-each>
|
||||
</Events>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:variable name="Projects">
|
||||
<xsl:apply-templates select="msxsl:node-set($SortedEvents)/*" mode="createProjects"/>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:apply-templates select="msxsl:node-set($Projects)/*"/>
|
||||
|
||||
<p></p><p>
|
||||
<table class="note">
|
||||
<tr>
|
||||
<td nowrap="1">
|
||||
<b _locID="ConversionSettings">转换设置</b>
|
||||
</td>
|
||||
</tr>
|
||||
<xsl:apply-templates select="Properties"/>
|
||||
</table></p>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
BIN
Binary file not shown.
|
After Width: | Height: | Size: 69 B |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 71 B |
+8
@@ -0,0 +1,8 @@
|
||||
copyright (c) 2010 Pete Batard <pbatard@gmail.com>
|
||||
copyright (c) 2010 Travis Robinson <libusbdotnet@gmail.com>
|
||||
|
||||
zadic improvements:
|
||||
copyright (c) 2010 Joseph Marshall <jmarshall@gcdataconcepts.com>
|
||||
|
||||
libconfig authors:
|
||||
Mark Lindner, Daniel Marjamäki, Andrew Tytula, Glenn Herteg
|
||||
+504
@@ -0,0 +1,504 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library 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 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library 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
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
1.0.0 ALPHA
|
||||
Vendored
+27
@@ -0,0 +1,27 @@
|
||||
AUTOMAKE_OPTIONS = dist-bzip2 no-dist-gzip
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
#DISTCLEANFILES = ChangeLog libusb-1.0.pc
|
||||
#EXTRA_DIST = TODO PORTING
|
||||
SUBDIRS = libwdi
|
||||
|
||||
if BUILD_EXAMPLES
|
||||
SUBDIRS += examples
|
||||
endif
|
||||
|
||||
#pkgconfigdir=$(libdir)/pkgconfig
|
||||
#pkgconfig_DATA=libusb-1.0.pc
|
||||
|
||||
#.PHONY: ChangeLog dist-up
|
||||
#ChangeLog:
|
||||
# git --git-dir $(top_srcdir)/.git log > ChangeLog || touch ChangeLog
|
||||
|
||||
#dist-hook: ChangeLog
|
||||
|
||||
reldir = .release/$(distdir)
|
||||
dist-up: dist
|
||||
rm -rf $(reldir)
|
||||
mkdir -p $(reldir)
|
||||
cp $(distdir).tar.bz2 $(reldir)
|
||||
rsync -rv $(reldir) dsd_,libusb@frs.sourceforge.net:/home/frs/project/l/li/libusb/libusb-1.0/
|
||||
rm -rf $(reldir)
|
||||
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
libwdi: Windows Driver Installer library for USB devices
|
||||
|
||||
Features:
|
||||
- Automated driverless device detection
|
||||
- Automated inf creation, using the name reported by the USB device
|
||||
- Automated driver files extraction, for both 32 and 64 bit platforms
|
||||
- Automated driver installation, including UAC elevation where necessary
|
||||
- When statically linked, only the final executable needs to be redistributed to
|
||||
ensure that a driver can be automatically installed on any Windows platform.
|
||||
|
||||
For the reditributale library to work on both 64 and 32 bit, you must use a
|
||||
compiler that can produce both 32 and 64 bit binaries, and compile the library
|
||||
as 32 bit.
|
||||
For gcc, that means that your compiler should support both the -m32 and -m64
|
||||
options, and for Visual Studio, that means using a non Express version.
|
||||
Note that you still have the possibility to use other compilers to produce a 32
|
||||
bit (or 64 bit) only library, and automated configuration will be smart enough
|
||||
to detect this, and compile/embed only the required 32 or 64 bit resources.
|
||||
If you want to compile a 64 bit only library, make sure you comment OPT_M32 in
|
||||
config.h, or use the --disable-32bit option when runing configure.
|
||||
|
||||
For gcc, the best solution right now, to have -m32 and -m64 with very little
|
||||
effort, is to download WPG System 64 from http://www.cadforte.com/system64.html
|
||||
as the MinGW-32 and cygwin only compile 32 bit binaries by default, and the
|
||||
official binary packages from MinGW-w64 don't have multilib enabled, so they are
|
||||
64 bit only.
|
||||
|
||||
Compiling:
|
||||
Regardless of your development environment, you must either have the Windows DDK
|
||||
installed, or have the winusb/wdf 32 and 64 bit redistributable DLLs.
|
||||
On cygwin/mingw, you need to supply the path to your DDK with the --with-ddkdir
|
||||
option when calling configure (see autogen.sh).
|
||||
For MSVC, you must edit msvc/config.h and set DDK_PATH path accordingly.
|
||||
|
||||
Dependencies:
|
||||
The Zadig GUI application uses a slightly modified version of libconfig 1.4.5
|
||||
(LGPL v2.1), which is copyright Mark Lindner et al.
|
||||
See http://www.hyperrealm.com/libconfig/ for details.
|
||||
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
# use glibtoolize if it is available (darwin)
|
||||
(glibtoolize --version) < /dev/null > /dev/null 2>&1 && LIBTOOLIZE=glibtoolize || LIBTOOLIZE=libtoolize
|
||||
|
||||
$LIBTOOLIZE --copy --force || exit 1
|
||||
# Force ltmain's NLS test to set locale to C always. Prevents an
|
||||
# issue when compiling shared libs with MinGW on Chinese locale.
|
||||
type -P sed &>/dev/null || { echo "sed command not found. Aborting." >&2; exit 1; }
|
||||
sed -e s/\\\\\${\$lt_var+set}/set/g ltmain.sh > lttmp.sh
|
||||
mv lttmp.sh ltmain.sh
|
||||
#
|
||||
aclocal || exit 1
|
||||
autoheader || exit 1
|
||||
autoconf || exit 1
|
||||
automake -a -c || exit 1
|
||||
./configure --enable-toggable-debug --enable-examples-build --disable-debug --with-ddkdir="E:/WinDDK/7600.16385.0" --with-libusb0="D:/libusb-win32" $*
|
||||
Vendored
+282
@@ -0,0 +1,282 @@
|
||||
AC_INIT([libwdi], [1.0.0], [libusb-devel@lists.sourceforge.net], [libwdi], [http://libusb.org/wiki/windows_backend])
|
||||
AM_INIT_AUTOMAKE
|
||||
AC_CONFIG_SRCDIR([libwdi/libwdi.c])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
AM_CONFIG_HEADER([config.h])
|
||||
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
|
||||
|
||||
AC_PREREQ([2.50])
|
||||
AC_PROG_CC
|
||||
AC_PROG_LIBTOOL
|
||||
AC_C_INLINE
|
||||
AM_PROG_CC_C_O
|
||||
AC_DEFINE([_GNU_SOURCE], [], [Use GNU extensions])
|
||||
WDF_VER="01009"
|
||||
AC_DEFINE_UNQUOTED([WDF_VER], ["${WDF_VER}"], [DDK WDF coinstaller version (string)])
|
||||
|
||||
AC_ARG_WITH(ddkdir,
|
||||
AS_HELP_STRING([--with-ddkdir], [embed WinUSB driver files from the following DDK location]),
|
||||
DDK_DIR=$withval,
|
||||
DDK_DIR="")
|
||||
if test "x$DDK_DIR" != "x"; then
|
||||
AC_DEFINE_UNQUOTED([DDK_DIR], ["${DDK_DIR}"], [embed WinUSB driver files from the following DDK location])
|
||||
fi
|
||||
|
||||
AC_ARG_WITH(libusb0,
|
||||
AS_HELP_STRING([--with-libusb0], [embed libusb0 driver files from the following location]),
|
||||
LIBUSB0_DIR=$withval,
|
||||
LIBUSB0_DIR="")
|
||||
if test "x$LIBUSB0_DIR" != "x"; then
|
||||
AC_DEFINE_UNQUOTED([LIBUSB0_DIR], ["${LIBUSB0_DIR}"], [embed libusb0 driver files from the following location])
|
||||
fi
|
||||
|
||||
AC_ARG_WITH(userdir,
|
||||
AS_HELP_STRING([--with-userdir], [embed user defined driver files from the following location]),
|
||||
USER_DIR=$withval,
|
||||
USER_DIR="")
|
||||
if test "x$USER_DIR" != "x"; then
|
||||
AC_DEFINE_UNQUOTED([USER_DIR], ["${USER_DIR}"], [embed user defined driver files from the following location])
|
||||
fi
|
||||
|
||||
if test "x$USER_DIR" == "x" -a "x$DDK_DIR" == "x" -a "x$LIBUSB0_DIR" == "x"; then
|
||||
AC_MSG_ERROR([One of --with-ddkdir, --with-libusb0 or --with-userdir options MUST be provided.])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([development environment])
|
||||
case $host in
|
||||
*-mingw*)
|
||||
AC_MSG_RESULT([MinGW])
|
||||
AM_CFLAGS="-Wshadow -DWINVER=0x500"
|
||||
NO_CYGWIN=""
|
||||
LIBCONFIG_LIBADD=""
|
||||
LIBCONFIG_CFLAGS=""
|
||||
;;
|
||||
*-cygwin*)
|
||||
AC_MSG_RESULT([cygwin])
|
||||
AM_CFLAGS="-DWINVER=0x500"
|
||||
save_CFLAGS="${CFLAGS}"
|
||||
CFLAGS="${CFLAGS} -mno-cygwin"
|
||||
AC_MSG_CHECKING([if -mno-cygwin is supported])
|
||||
AC_TRY_COMPILE(, [;],
|
||||
has_mno_cygwin=yes,
|
||||
has_mno_cygwin=no)
|
||||
if test "x$has_mno_cygwin" == "xyes"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([you must ensure that -mno-cygwin is supported on cygwin])
|
||||
fi
|
||||
CFLAGS="${save_CFLAGS}"
|
||||
# if you try to redefine CC to "gcc -mno-cygwin", all kind of bad things happen
|
||||
# => use a variable instead
|
||||
NO_CYGWIN="-mno-cygwin"
|
||||
LIBCONFIG_LIBADD="-L/lib/mingw -lcrtdll -lmingwex"
|
||||
LIBCONFIG_CFLAGS="-static -I/usr/include/mingw -D__MINGW_FEATURES__"
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([unsupported development environment])
|
||||
esac
|
||||
|
||||
AM_LDFLAGS="-no-undefined -avoid-version"
|
||||
AC_CHECK_TOOL(RC, windres, no)
|
||||
|
||||
# 32 bit support
|
||||
save_CFLAGS="${CFLAGS}"
|
||||
CFLAGS="${CFLAGS} -m32"
|
||||
AC_MSG_CHECKING([whether the compiler can produce 32 bit binaries])
|
||||
AC_TRY_COMPILE(, [;],
|
||||
compiler_has_m32=yes,
|
||||
compiler_has_m32=no)
|
||||
if test "x$compiler_has_m32" == "xyes"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
CFLAGS="${save_CFLAGS}"
|
||||
|
||||
# 64 bit support
|
||||
save_CFLAGS="${CFLAGS}"
|
||||
CFLAGS="${CFLAGS} -m64"
|
||||
AC_MSG_CHECKING([whether the compiler can produce 64 bit binaries])
|
||||
AC_TRY_COMPILE(, [;],
|
||||
compiler_has_m64=yes,
|
||||
compiler_has_m64=no)
|
||||
if test "x$compiler_has_m64" == "xyes"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
CFLAGS="${save_CFLAGS}"
|
||||
|
||||
if test "x$compiler_has_m64" != "xyes" -a "x$compiler_has_m32" != "xyes"; then
|
||||
AC_MSG_ERROR([neither -m32 nor -m64 is supported by your compiler])
|
||||
fi
|
||||
|
||||
# 32 and 64 bit selection
|
||||
AC_ARG_ENABLE([32bit], [AS_HELP_STRING([--enable-32bit],
|
||||
[build 32 bit compatible library (default y)])],
|
||||
[enable_32bit=$enableval],
|
||||
[enable_32bit='yes'])
|
||||
AC_ARG_ENABLE([64bit], [AS_HELP_STRING([--enable-64bit],
|
||||
[build 64 bit compatible library (default y)])],
|
||||
[enable_64bit='$enableval'],
|
||||
[enable_64bit='yes'])
|
||||
AC_ARG_ENABLE([ia64], [AS_HELP_STRING([--enable-ia64],
|
||||
[embed IA64/Itanium driver files (default n)])],
|
||||
[enable_ia64='$enableval'],
|
||||
[enable_ia64='no'])
|
||||
if test "x$enable_64bit" == "xno" -a "x$enable_32bit" == "xno"; then
|
||||
AC_MSG_ERROR([you cannot disable both 32 and 64 bit support])
|
||||
fi
|
||||
|
||||
# OK, let's make some sense of all this 32/64 bit mess...
|
||||
if test "x$enable_64bit" != "xno" -a "x$compiler_has_m64" == "xno"; then
|
||||
if test "x$enable_32bit" == "xno"; then
|
||||
AC_MSG_ERROR([compiler cannot produce 64 bit binaries, and 32 bit support is disabled])
|
||||
fi
|
||||
AC_MSG_WARN([compiler cannot produce 64 bit binaries - disabling 64 bit support])
|
||||
enable_64bit="no"
|
||||
fi
|
||||
|
||||
if test "x$enable_32bit" != "xno" -a "x$compiler_has_m32" == "xno"; then
|
||||
if test "x$enable_64bit" == "xno"; then
|
||||
AC_MSG_ERROR([compiler cannot produce 32 bit binaries, and 64 bit support is disabled])
|
||||
fi
|
||||
AC_MSG_WARN([compiler cannot produce 32 bit binaries - disabling 32 bit support])
|
||||
enable_32bit="no"
|
||||
fi
|
||||
|
||||
# define the automake and config.h variables
|
||||
if test "x$enable_32bit" != "xno"; then
|
||||
AC_DEFINE([OPT_M32], [], [32 bit support])
|
||||
AC_SUBST(OPT_M32)
|
||||
fi
|
||||
AM_CONDITIONAL([OPT_M32], [test "x$enable_32bit" != "xno"])
|
||||
if test "x$enable_64bit" != "xno"; then
|
||||
AC_DEFINE([OPT_M64], [], [64 bit support])
|
||||
AC_SUBST(OPT_M64)
|
||||
fi
|
||||
AM_CONDITIONAL([OPT_M64], [test "x$enable_64bit" != "xno"])
|
||||
if test "x$enable_ia64" != "xno"; then
|
||||
AC_DEFINE([OPT_IA64], [], [embed IA64 driver files])
|
||||
AC_SUBST(OPT_IA64)
|
||||
fi
|
||||
|
||||
if test "x$enable_64bit" != "xno"; then
|
||||
# the default is to produce 32 bit, when both 64 and 32 bit support are available
|
||||
if test "x$enable_32bit" != "xno"; then
|
||||
AC_MSG_NOTICE([will produce 32 bit library and samples, compatible with 64 bit platforms])
|
||||
AC_MSG_NOTICE([if you want to produce 64 bit only library and samples, use --disable-32bit])
|
||||
ARCH_CFLAGS="-m32"
|
||||
ARCH_RCFLAGS="--target=pe-i386"
|
||||
|
||||
else
|
||||
AC_MSG_WARN([will produce a 64 bit library that is INCOMPATIBLE with 32 bit platforms])
|
||||
ARCH_CFLAGS="-m64 -D_WIN64"
|
||||
ARCH_RCFLAGS=""
|
||||
fi
|
||||
else
|
||||
AC_MSG_WARN([will produce a 32 bit library that is INCOMPATIBLE with 64 bit platforms])
|
||||
ARCH_CFLAGS=""
|
||||
ARCH_RCFLAGS=""
|
||||
|
||||
fi
|
||||
AC_SUBST([ARCH_CFLAGS])
|
||||
AC_SUBST([ARCH_RCFLAGS])
|
||||
|
||||
if test "x$DDK_DIR" != "x"; then
|
||||
# check that the required WinUSB DDK files are available
|
||||
if test "x$enable_64bit" != "xno"; then
|
||||
# NB: I found the hard way that cygwin doesn't like multiple files to be provided on multiple lines - YOU HAVE BEEN WARNED!
|
||||
AC_CHECK_FILES([$DDK_DIR/redist/wdf/amd64/WdfCoInstaller${WDF_VER}.dll $DDK_DIR/redist/winusb/amd64/winusbcoinstaller2.dll],,
|
||||
[AC_MSG_ERROR([the WinUSB amd64 driver files could not be detected (--with-ddkdir)])])
|
||||
fi
|
||||
if test "x$enable_32bit" != "xno"; then
|
||||
AC_CHECK_FILES([$DDK_DIR/redist/wdf/x86/WdfCoInstaller${WDF_VER}.dll $DDK_DIR/redist/winusb/x86/winusbcoinstaller2.dll],,
|
||||
[AC_MSG_ERROR([the WinUSB x86 driver files could not be detected (--with-ddkdir)])])
|
||||
fi
|
||||
if test "x$enable_ia64" != "xno"; then
|
||||
AC_CHECK_FILES([$DDK_DIR/redist/wdf/ia64/WdfCoInstaller${WDF_VER}.dll $DDK_DIR/redist/winusb/ia64/winusbcoinstaller2.dll],,
|
||||
[AC_MSG_ERROR([the WinUSB ia64 driver files could not be detected (--with-ddkdir)])])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$LIBUSB0_DIR" != "x"; then
|
||||
# check that the required libusb0 driver files are available
|
||||
AC_CHECK_FILES([$LIBUSB0_DIR/bin/x86/libusb0.sys $LIBUSB0_DIR/bin/x86/libusb0_x86.dll],,
|
||||
[AC_MSG_ERROR([the libusb0 x86 driver files could not be detected (--with-libusb0)])])
|
||||
if test "x$enable_64bit" != "xno"; then
|
||||
AC_CHECK_FILES([$LIBUSB0_DIR/bin/amd64/libusb0.sys $LIBUSB0_DIR/bin/amd64/libusb0.dll],,
|
||||
[AC_MSG_ERROR([the libusb0 amd64 driver files could not be detected (--with-libusb0)])])
|
||||
fi
|
||||
if test "x$enable_ia64" != "xno"; then
|
||||
AC_CHECK_FILES([$LIBUSB0_DIR/bin/ia64/libusb0.sys $LIBUSB0_DIR/bin/ia64/libusb0.dll],,
|
||||
[AC_MSG_ERROR([the libusb0 ia64 driver files could not be detected (--with-libusb0)])])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$USER_DIR" != "x"; then
|
||||
AC_CHECK_FILE([$USER_DIR],,[AC_MSG_ERROR([the custom driver directory could not be detected (--with-userdir)])])
|
||||
fi
|
||||
|
||||
# Message logging
|
||||
AC_ARG_ENABLE([log], [AS_HELP_STRING([--enable-log], [enable logging (default y)])],
|
||||
[log_enabled=$enableval],
|
||||
[log_enabled='yes'])
|
||||
if test "x$log_enabled" != "xno"; then
|
||||
AC_DEFINE([ENABLE_LOGGING], 1, [Message logging])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE([debug-log], [AS_HELP_STRING([--enable-debug-log],
|
||||
[force debug logging always (default n)])],
|
||||
[debug_log_enabled=$enableval],
|
||||
[debug_log_enabled='no'])
|
||||
|
||||
AC_ARG_ENABLE([toggable-debug], [AS_HELP_STRING([--enable-toggable-debug],
|
||||
[enable switchable debug logging (default n)])],
|
||||
[toggable_debug=$enableval],
|
||||
[toggable_debug='no'])
|
||||
|
||||
if test "x$debug_log_enabled" != "xno"; then
|
||||
AC_DEFINE([ENABLE_DEBUG_LOGGING], 1, [Debug message logging (forced)])
|
||||
else
|
||||
if test "x$toggable_debug" != "xno"; then
|
||||
AC_DEFINE([INCLUDE_DEBUG_LOGGING], 1, [Debug message logging (toggable)])
|
||||
fi
|
||||
fi
|
||||
|
||||
# --enable-debug : check whether they want to have debug symbols:
|
||||
AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], [include debug symbols for gdb (default y)]),
|
||||
[debug_enabled=$enableval],
|
||||
[debug_enabled='yes'])
|
||||
if test "x$debug_enabled" = "xyes" ; then
|
||||
CFLAGS="-g -O2"
|
||||
else
|
||||
CFLAGS="-O2"
|
||||
fi
|
||||
|
||||
# Examples build
|
||||
AC_ARG_ENABLE([examples-build], [AS_HELP_STRING([--enable-examples-build],
|
||||
[build example applications (default n)])],
|
||||
[build_examples=$enableval],
|
||||
[build_examples='no'])
|
||||
AM_CONDITIONAL([BUILD_EXAMPLES], [test "x$build_examples" != "xno"])
|
||||
|
||||
# check for -Wno-pointer-sign compiler support (GCC >= 4)
|
||||
saved_cflags="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -Wno-pointer-sign"
|
||||
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]),
|
||||
nopointersign_cflags="-Wno-pointer-sign", nopointersign_cflags="")
|
||||
CFLAGS="$saved_cflags"
|
||||
|
||||
AM_CFLAGS="$AM_CFLAGS -std=gnu99 -Wall -Wundef -Wunused -Wstrict-prototypes -Werror-implicit-function-declaration $nopointersign_cflags"
|
||||
|
||||
AC_SUBST(VISIBILITY_CFLAGS)
|
||||
AC_SUBST(AM_CFLAGS)
|
||||
AC_SUBST(AM_LDFLAGS)
|
||||
AC_SUBST(NO_CYGWIN)
|
||||
AC_SUBST(LIBCONFIG_CFLAGS)
|
||||
AC_SUBST(LIBCONFIG_LIBADD)
|
||||
|
||||
AC_CONFIG_FILES([Makefile] [libwdi/Makefile] [examples/libconfig/Makefile] [examples/Makefile])
|
||||
AC_OUTPUT
|
||||
Vendored
+196
@@ -0,0 +1,196 @@
|
||||
@rem default builds static library.
|
||||
@rem you can pass the following arguments (case insensitive):
|
||||
@rem - "DLL" to build a DLL instead of a static library
|
||||
@rem - "no_samples" to build the library only
|
||||
@echo off
|
||||
|
||||
if Test%BUILD_ALT_DIR%==Test goto usage
|
||||
|
||||
rem process commandline parameters
|
||||
set TARGET=LIBRARY
|
||||
set BUILD_SAMPLES=YES
|
||||
|
||||
:more_args
|
||||
if "%1" == "" goto no_more_args
|
||||
rem /I for case insensitive
|
||||
if /I Test%1==TestDLL set TARGET=DYNLINK
|
||||
if /I Test%1==Testno_samples set BUILD_SAMPLES=NO
|
||||
rem - shift the arguments and examine %1 again
|
||||
shift
|
||||
goto more_args
|
||||
:no_more_args
|
||||
|
||||
set DDK_DIR=%BASEDIR:\=\\%
|
||||
set ORG_BUILD_ALT_DIR=%BUILD_ALT_DIR%
|
||||
set ORG_BUILDARCH=%_BUILDARCH%
|
||||
set ORG_PATH=%PATH%
|
||||
set ORG_BUILD_DEFAULT_TARGETS=%BUILD_DEFAULT_TARGETS%
|
||||
|
||||
set version=1.0
|
||||
|
||||
set cpudir=i386
|
||||
if %ORG_BUILDARCH%==x86 goto isI386
|
||||
set cpudir=amd64
|
||||
echo #define BUILD64> libwdi\build64.h
|
||||
goto main_start
|
||||
:isI386
|
||||
echo #define NO_BUILD64> libwdi\build64.h
|
||||
|
||||
:main_start
|
||||
cd libwdi
|
||||
set srcPath=obj%BUILD_ALT_DIR%\%cpudir%
|
||||
|
||||
del Makefile.hide >NUL 2>&1
|
||||
if EXIST Makefile ren Makefile Makefile.hide
|
||||
|
||||
set 386=1
|
||||
set AMD64=
|
||||
set BUILD_DEFAULT_TARGETS=-386
|
||||
set _AMD64bit=
|
||||
set _BUILDARCH=x86
|
||||
set PATH=%BASEDIR%\bin\x86;%BASEDIR%\bin\x86\x86
|
||||
|
||||
copy embedder_sources sources >NUL 2>&1
|
||||
@echo on
|
||||
build -cwgZ
|
||||
@echo off
|
||||
if errorlevel 1 goto builderror
|
||||
copy obj%BUILD_ALT_DIR%\i386\embedder.exe . >NUL 2>&1
|
||||
|
||||
copy installer_x86_sources sources >NUL 2>&1
|
||||
@echo on
|
||||
build -cwgZ
|
||||
@echo off
|
||||
if errorlevel 1 goto builderror
|
||||
copy obj%BUILD_ALT_DIR%\i386\installer_x86.exe . >NUL 2>&1
|
||||
|
||||
set 386=
|
||||
set AMD64=1
|
||||
set BUILD_DEFAULT_TARGETS=-amd64
|
||||
set _AMD64bit=true
|
||||
set _BUILDARCH=AMD64
|
||||
set PATH=%BASEDIR%\bin\x86\amd64;%BASEDIR%\bin\x86
|
||||
|
||||
copy installer_x64_sources sources >NUL 2>&1
|
||||
@echo on
|
||||
build -cwgZ
|
||||
@echo off
|
||||
if errorlevel 1 goto builderror
|
||||
copy obj%BUILD_ALT_DIR%\amd64\installer_x64.exe . >NUL 2>&1
|
||||
|
||||
if %ORG_BUILDARCH%==AMD64 goto restorePath
|
||||
set 386=1
|
||||
set AMD64=
|
||||
set BUILD_DEFAULT_TARGETS=-386
|
||||
set _AMD64bit=
|
||||
set _BUILDARCH=x86
|
||||
|
||||
:restorePath
|
||||
set PATH=%ORG_PATH%
|
||||
|
||||
echo.
|
||||
echo Embedding binary resources
|
||||
embedder.exe embedded.h
|
||||
|
||||
rem DLL or static lib selection (must use concatenation)
|
||||
echo TARGETTYPE=%TARGET% > target
|
||||
copy target+libwdi_sources sources >NUL 2>&1
|
||||
del target
|
||||
@echo on
|
||||
build -cwgZ
|
||||
@echo off
|
||||
if errorlevel 1 goto builderror
|
||||
copy obj%BUILD_ALT_DIR%\%cpudir%\libwdi.lib . >NUL 2>&1
|
||||
copy obj%BUILD_ALT_DIR%\%cpudir%\libwdi.dll . >NUL 2>&1
|
||||
|
||||
if EXIST Makefile.hide ren Makefile.hide Makefile
|
||||
cd ..
|
||||
if Test%BUILD_SAMPLES%==TestNO goto done
|
||||
cd examples\getopt
|
||||
|
||||
del Makefile.hide >NUL 2>&1
|
||||
if EXIST Makefile ren Makefile Makefile.hide
|
||||
copy getopt_sources sources >NUL 2>&1
|
||||
@echo on
|
||||
build -cwgZ
|
||||
@echo off
|
||||
if errorlevel 1 goto builderror
|
||||
copy obj%BUILD_ALT_DIR%\%cpudir%\getopt.lib . >NUL 2>&1
|
||||
|
||||
if EXIST Makefile.hide ren Makefile.hide Makefile
|
||||
cd ..\libconfig
|
||||
|
||||
del Makefile.hide >NUL 2>&1
|
||||
if EXIST Makefile ren Makefile Makefile.hide
|
||||
copy libconfig_sources sources >NUL 2>&1
|
||||
@echo on
|
||||
build -cwgZ
|
||||
@echo off
|
||||
if errorlevel 1 goto builderror
|
||||
copy obj%BUILD_ALT_DIR%\%cpudir%\libconfig.lib . >NUL 2>&1
|
||||
|
||||
if EXIST Makefile.hide ren Makefile.hide Makefile
|
||||
cd ..
|
||||
|
||||
del Makefile.hide >NUL 2>&1
|
||||
if EXIST Makefile ren Makefile Makefile.hide
|
||||
copy zadic_sources sources >NUL 2>&1
|
||||
@echo on
|
||||
build -cwgZ
|
||||
@echo off
|
||||
if errorlevel 1 goto builderror
|
||||
copy obj%BUILD_ALT_DIR%\%cpudir%\zadic.exe . >NUL 2>&1
|
||||
|
||||
rem Work around MS's VC++ and DDK weird icompatibilities wth regards to rc files
|
||||
echo #include ^<windows.h^> > afxres.h
|
||||
echo #ifndef IDC_STATIC >> afxres.h
|
||||
echo #define IDC_STATIC -1 >> afxres.h
|
||||
echo #endif >> afxres.h
|
||||
copy zadig_sources sources >NUL 2>&1
|
||||
@echo on
|
||||
build -cwgZ
|
||||
@echo off
|
||||
if errorlevel 1 goto builderror
|
||||
del afxres.h
|
||||
copy obj%BUILD_ALT_DIR%\%cpudir%\zadig.exe . >NUL 2>&1
|
||||
|
||||
copy inf_wizard_sources sources >NUL 2>&1
|
||||
@echo on
|
||||
build -cwgZ
|
||||
@echo off
|
||||
if errorlevel 1 goto builderror
|
||||
copy obj%BUILD_ALT_DIR%\%cpudir%\inf-wizard.exe . >NUL 2>&1
|
||||
|
||||
if EXIST Makefile.hide ren Makefile.hide Makefile
|
||||
cd ..
|
||||
|
||||
goto done
|
||||
|
||||
:builderror
|
||||
if EXIST Makefile.hide ren Makefile.hide Makefile
|
||||
if EXIST afxres.h del afxres.h
|
||||
cd ..
|
||||
echo Build failed
|
||||
goto done
|
||||
|
||||
:usage
|
||||
echo ddk_build must be run in a Windows Driver Kit build environment
|
||||
pause
|
||||
goto done
|
||||
|
||||
:done
|
||||
set BUILD_ALT_DIR=%ORG_BUILD_ALT_DIR%
|
||||
set _BUILDARCH=%ORG_BUILDARCH%
|
||||
set PATH=%ORG_PATH%
|
||||
set BUILD_DEFAULT_TARGETS=%ORG_BUILD_DEFAULT_TARGETS%
|
||||
|
||||
if Test%DDK_TARGET_OS%==TestWinXP goto nowarn
|
||||
|
||||
echo.
|
||||
echo.
|
||||
echo WARNING: You do not seem to use the Windows XP DDK build environment.
|
||||
echo Be mindful that using the Windows Vista or Windows 7 DDK build environments
|
||||
echo will result in library and applications that do NOT run on Windows XP.
|
||||
echo.
|
||||
|
||||
:nowarn
|
||||
Vendored
+45
@@ -0,0 +1,45 @@
|
||||
INCLUDES = -I$(top_srcdir)
|
||||
|
||||
BUILT_SOURCES = embedded.h
|
||||
noinst_PROGRAMS = embedder
|
||||
noinst_EXES = embedder.exe
|
||||
lib_LTLIBRARIES = libwdi.la
|
||||
LIB_SRC = resource.h logging.h tokenizer.h installer.h libwdi.h logging.c tokenizer.c vid_data.c libwdi_dlg.c libwdi.c
|
||||
|
||||
if OPT_M32
|
||||
noinst_PROGRAMS += installer_x86
|
||||
noinst_EXES += installer_x86.exe
|
||||
installer_x86_SOURCES = installer.h installer.c
|
||||
installer_x86_CFLAGS = -m32 $(NO_CYGWIN) $(AM_CFLAGS)
|
||||
installer_x86_LDFLAGS = $(NO_CYGWIN) $(AM_LDFLAGS) -static
|
||||
installer_x86_LDADD = -lsetupapi -lnewdev
|
||||
endif
|
||||
|
||||
if OPT_M64
|
||||
noinst_PROGRAMS += installer_x64
|
||||
noinst_EXES += installer_x64.exe
|
||||
installer_x64_CC = gcc $(NO_CYGWIN)
|
||||
installer_x64_SOURCES = installer.h installer.c
|
||||
installer_x64_CFLAGS = -m64 -D_WIN64 $(NO_CYGWIN) $(AM_CFLAGS)
|
||||
installer_x64_LDFLAGS = $(NO_CYGWIN) $(AM_LDFLAGS) -static
|
||||
installer_x64_LDADD = -lsetupapi -lnewdev
|
||||
endif
|
||||
|
||||
embedder_SOURCES = embedder.h embedder_files.h embedder.c
|
||||
embedder_LDADD = -lversion
|
||||
|
||||
EXTRA_DIST = $(LIB_SRC)
|
||||
|
||||
libwdi_rc.lo: libwdi.rc
|
||||
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(RC) $(ARCH_RCFLAGS) -i $< -o $@
|
||||
|
||||
libwdi_la_CFLAGS = $(ARCH_CFLAGS) $(NO_CYGWIN) $(VISIBILITY_CFLAGS) $(AM_CFLAGS)
|
||||
libwdi_la_LDLAGS = $(NO_CYGWIN) $(AM_LDFLAGS)
|
||||
libwdi_la_LIBADD = libwdi_rc.lo -lsetupapi -lole32
|
||||
libwdi_la_SOURCES = $(LIB_SRC)
|
||||
|
||||
embedded.h: $(noinst_EXES)
|
||||
./embedder.exe embedded.h
|
||||
|
||||
clean-local:
|
||||
-rm -rf embedded.h
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user