+++ /dev/null
-bd.cmd eol=crlf
-wbs.txt eol=crlf
+++ /dev/null
-@echo off
-rem produce the DDK binary files for snapshots
-rem !!!THIS SCRIPT IS FOR INTERNAL DEVELOPER USE ONLY!!!
-
-if NOT x%DDK_TARGET_OS%==xWinXP goto usage
-
-set IWD=%~dp0
-cd ..
-mkdir E:\dailies\%DATE%
-for %%A in (MS32 MS64) do mkdir E:\dailies\%DATE%\%%A
-for %%A in (MS32 MS64) do mkdir E:\dailies\%DATE%\%%A\static
-for %%A in (MS32 MS64) do mkdir E:\dailies\%DATE%\%%A\dll
-for %%A in (source bin32 bin64) do mkdir E:\dailies\%DATE%\examples\%%A
-copy examples\listdevs.c E:\dailies\%DATE%\examples\source
-copy examples\xusb.c E:\dailies\%DATE%\examples\source
-copy examples\ezusb.? E:\dailies\%DATE%\examples\source
-copy examples\fxload.c E:\dailies\%DATE%\examples\source
-copy msvc\stdint.h E:\dailies\%DATE%\examples\source
-copy .private\wbs.txt E:\dailies\%DATE%\README.txt
-
-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 386=1
-set AMD64=
-set BUILD_DEFAULT_TARGETS=-386
-set _AMD64bit=
-set _BUILDARCH=x86
-set PATH=%BASEDIR%\bin\x86;%BASEDIR%\bin\x86\x86
-
-cd msvc
-call ddk_build
-cd ..
-
-@echo off
-copy Win32\Release\lib\libusb-1.0.lib E:\dailies\%DATE%\MS32\static
-copy Win32\Release\examples\listdevs.exe E:\dailies\%DATE%\examples\bin32
-copy Win32\Release\examples\xusb.exe E:\dailies\%DATE%\examples\bin32
-copy Win32\Release\examples\fxload.exe E:\dailies\%DATE%\examples\bin32
-
-cd msvc
-call ddk_build DLL
-cd ..
-
-@echo off
-copy Win32\Release\lib\libusb-1.0.lib E:\dailies\%DATE%\MS32\dll
-copy Win32\Release\dll\libusb-1.0.dll E:\dailies\%DATE%\MS32\dll
-copy Win32\Release\dll\libusb-1.0.pdb E:\dailies\%DATE%\MS32\dll
-
-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
-
-cd msvc
-call ddk_build
-cd ..
-
-@echo off
-copy x64\Release\lib\libusb-1.0.lib E:\dailies\%DATE%\MS64\static
-copy x64\Release\examples\listdevs.exe E:\dailies\%DATE%\examples\bin64
-copy x64\Release\examples\xusb.exe E:\dailies\%DATE%\examples\bin64
-copy x64\Release\examples\fxload.exe E:\dailies\%DATE%\examples\bin64
-
-cd msvc
-call ddk_build DLL
-cd ..
-
-@echo off
-copy x64\Release\lib\libusb-1.0.lib E:\dailies\%DATE%\MS64\dll
-copy x64\Release\dll\libusb-1.0.dll E:\dailies\%DATE%\MS64\dll
-copy x64\Release\dll\libusb-1.0.pdb E:\dailies\%DATE%\MS64\dll
-
-set BUILD_ALT_DIR=%ORG_BUILD_ALT_DIR%
-set _BUILDARCH=%ORG_BUILDARCH%
-set PATH=%ORG_PATH%
-set BUILD_DEFAULT_TARGETS=%ORG_BUILD_DEFAULT_TARGETS%
-
-goto done
-
-:usage
-echo must be run in a WXP build environment!
-
-:done
-cd %IWD%
\ No newline at end of file
remember that you need to have a copy of the DLL either in the runtime
directory or in system32
-o WDK/DDK:
- - The following is an example of a sources files that you can use to compile
- a libusb 1.0 based console application. In this sample ..\libusb\ is the
- directory where you would have copied libusb.h as well as the relevant
- libusb-1.0.lib
-
- TARGETNAME=your_app
- TARGETTYPE=PROGRAM
- USE_MSVCRT=1
- UMTYPE=console
- INCLUDES=..\libusb;$(DDK_INC_PATH)
- TARGETLIBS=..\libusb\libusb-1.0.lib
- SOURCES=your_app.c
-
- - Note that if you plan to use libCMT instead of MSVCRT (USE_LIBCMT=1 instead
- of USE_MSVCRT=1), you will need to recompile libusb to use libCMT. This can
- easily be achieved, in the DDK environment, by running 'ddk_build /MT'
-
o MinGW/cygwin
- Copy libusb.h, from include/libusb-1.0/ to your default include directory,
and copy the MinGW32/ or MinGW64/ .a files to your default library directory.
- The MinGW and MS generated DLLs are fully interchangeable, provided that you
use the import libs provided or generate one from the .def also provided.
- If you find any issue, please visit http://libusb.info/ and check the
- Support section
\ No newline at end of file
+ Support section
in msvc\config.h
- Select your configuration and compile the project
-Note that if you are using Visual Studio Express, you may have to install the
-Windows SDK to be able to compile the 64 bit version of the library.
-
-If you are using the freely available Windows DDK/WDK (Driver Development Kit)
-- If you want to debug the library, uncomment the ENABLE_DEBUG_LOGGING define
- in msvc\config.h
-- Open one of the relevant Free Build or Checked Build prompt for your target
- platform
-- Navigate to the msvc\ directory where the ddk_build.cmd file is located, and
- run 'ddk_build'
-- To produce a DLL rather than a static library, use: 'ddk_build DLL'
-- To produce a static library that uses LIBCMT[d] instead of MSVCRT[d] (/MT[d]
- vs /MD[d] in Visual Studio) use: 'ddk_build /MT'
-
-Note that using the Windows DDK, it is possible to compile both the 32 and 64
-bit versions of the library.
-
Destination directories
***********************
-The 32 bit binaries compiled either from Visual Studio or the DDK are placed in
-a Win32\ directory at the root of the library
-The 64 bit binaries are placed in an x64\ directory
+The 32-bit binaries are placed in a Win32\ directory at the root of the
+library.
+The 64-bit binaries are placed in a x64\ directory.
Troubleshooting
***************
If the compilation process complains about missing libraries, ensure that the
default library paths for your project points to the relevant directories.
-If needed, these libraries can be obtained by installing either the latest
-Windows SDK or the DDK (Links provided at the end of this file).
+If needed, these libraries can be obtained by installing the latest Windows
+SDK.
Links
*****
Additional information related to the Windows backend:
http://windows.libusb.info
-Latest Windows Driver (Development) Kit (WDK):
- http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=36a2630f-5d56-43b5-b996-7633f2ec14ff
-
-Latest Microsoft Windows SDK:
- http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=c17ba869-9671-4330-a63e-1fd44e0e2505
\ No newline at end of file
+Microsoft Windows SDK Archive:
+ https://developer.microsoft.com/en-us/windows/downloads/sdk-archive
\ No newline at end of file
-#define LIBUSB_NANO 11430
+#define LIBUSB_NANO 11431
*.sln eol=crlf
*.vcxproj eol=crlf
-ddk_build.cmd eol=crlf
-*_sources eol=crlf
+++ /dev/null
-@echo off
-::# default builds static library.
-::# you can pass the following arguments (case insensitive):
-::# - "DLL" to build a DLL instead of a static library
-::# - "/MT" to build a static library compatible with MSVC's /MT option (LIBCMT vs MSVCRT)
-
-if Test%BUILD_ALT_DIR%==Test goto usage
-
-::# process commandline parameters
-set TARGET=LIBRARY
-set STATIC_LIBC=
-set version=1.0
-set PWD=%~dp0
-set BUILD_CMD=build /bcwgZ /M2
-
-if "%1" == "" goto no_more_args
-::# /I for case insensitive
-if /I Test%1==TestDLL set TARGET=DYNLINK
-if /I Test%1==Test/MT set STATIC_LIBC=1
-
-:no_more_args
-
-cd ..\libusb\os
-echo TARGETTYPE=%TARGET% > target
-copy target+..\..\msvc\libusb_sources sources >NUL 2>&1
-del target
-@echo on
-%BUILD_CMD%
-@echo off
-if errorlevel 1 goto builderror
-cd ..\..
-
-set cpudir=i386
-set destType=Win32
-if %_BUILDARCH%==x86 goto isI386
-set cpudir=amd64
-set destType=x64
-:isI386
-
-set srcPath=libusb\os\obj%BUILD_ALT_DIR%\%cpudir%
-
-set dstPath=%destType%\Debug
-if %DDKBUILDENV%==chk goto isDebug
-set dstPath=%destType%\Release
-:isDebug
-
-if exist %destType% goto md2
-md %destType%
-:md2
-if exist %dstPath% goto md3
-md %dstPath%
-:md3
-if exist %dstPath%\dll goto md4
-md %dstPath%\dll
-:md4
-if exist %dstPath%\lib goto md5
-md %dstPath%\lib
-:md5
-if exist %dstPath%\examples goto md6
-md %dstPath%\examples
-:md6
-if exist %dstPath%\tests goto md7
-md %dstPath%\tests
-:md7
-@echo on
-
-if %TARGET%==LIBRARY goto copylib
-copy %srcPath%\libusb-%version%.dll %dstPath%\dll
-copy %srcPath%\libusb-%version%.pdb %dstPath%\dll
-:copylib
-copy %srcPath%\libusb-%version%.lib %dstPath%\lib
-
-@echo off
-
-if exist examples\getopt\getopt_ddkbuild goto md8
-md examples\getopt\getopt_ddkbuild
-:md8
-
-cd examples\getopt\getopt_ddkbuild
-copy ..\..\..\msvc\getopt_sources sources >NUL 2>&1
-@echo on
-%BUILD_CMD%
-@echo off
-if errorlevel 1 goto builderror
-cd ..\..\..
-
-if exist examples\fxload_ddkbuild goto md9
-md examples\fxload_ddkbuild
-:md9
-
-cd examples\fxload_ddkbuild
-copy ..\..\msvc\fxload_sources sources >NUL 2>&1
-@echo on
-%BUILD_CMD%
-@echo off
-if errorlevel 1 goto builderror
-cd ..\..
-
-set srcPath=examples\fxload_ddkbuild\obj%BUILD_ALT_DIR%\%cpudir%
-@echo on
-
-copy %srcPath%\fxload.exe %dstPath%\examples
-copy %srcPath%\fxload.pdb %dstPath%\examples
-
-@echo off
-
-if exist examples\hotplugtest_ddkbuild goto md10
-md examples\hotplugtest_ddkbuild
-:md10
-
-cd examples\hotplugtest_ddkbuild
-copy ..\..\msvc\hotplugtest_sources sources >NUL 2>&1
-@echo on
-%BUILD_CMD%
-@echo off
-if errorlevel 1 goto builderror
-cd ..\..
-
-set srcPath=examples\hotplugtest_ddkbuild\obj%BUILD_ALT_DIR%\%cpudir%
-@echo on
-
-copy %srcPath%\hotplugtest.exe %dstPath%\examples
-copy %srcPath%\hotplugtest.pdb %dstPath%\examples
-
-@echo off
-
-if exist examples\listdevs_ddkbuild goto md11
-md examples\listdevs_ddkbuild
-:md11
-
-cd examples\listdevs_ddkbuild
-copy ..\..\msvc\listdevs_sources sources >NUL 2>&1
-@echo on
-%BUILD_CMD%
-@echo off
-if errorlevel 1 goto builderror
-cd ..\..
-
-set srcPath=examples\listdevs_ddkbuild\obj%BUILD_ALT_DIR%\%cpudir%
-@echo on
-
-copy %srcPath%\listdevs.exe %dstPath%\examples
-copy %srcPath%\listdevs.pdb %dstPath%\examples
-
-@echo off
-
-if exist examples\testlibusb_ddkbuild goto md12
-md examples\testlibusb_ddkbuild
-:md12
-
-cd examples\testlibusb_ddkbuild
-copy ..\..\msvc\testlibusb_sources sources >NUL 2>&1
-@echo on
-%BUILD_CMD%
-@echo off
-if errorlevel 1 goto builderror
-cd ..\..
-
-set srcPath=examples\testlibusb_ddkbuild\obj%BUILD_ALT_DIR%\%cpudir%
-@echo on
-
-copy %srcPath%\testlibusb.exe %dstPath%\examples
-copy %srcPath%\testlibusb.pdb %dstPath%\examples
-
-@echo off
-
-if exist examples\xusb_ddkbuild goto md13
-md examples\xusb_ddkbuild
-:md13
-
-cd examples\xusb_ddkbuild
-copy ..\..\msvc\xusb_sources sources >NUL 2>&1
-@echo on
-%BUILD_CMD%
-@echo off
-if errorlevel 1 goto builderror
-cd ..\..
-
-set srcPath=examples\xusb_ddkbuild\obj%BUILD_ALT_DIR%\%cpudir%
-@echo on
-
-copy %srcPath%\xusb.exe %dstPath%\examples
-copy %srcPath%\xusb.pdb %dstPath%\examples
-
-@echo off
-
-if exist tests\stress_ddkbuild goto md14
-md tests\stress_ddkbuild
-:md14
-
-cd tests\stress_ddkbuild
-copy ..\..\msvc\stress_sources sources >NUL 2>&1
-@echo on
-%BUILD_CMD%
-@echo off
-if errorlevel 1 goto builderror
-cd ..\..
-
-set srcPath=tests\stress_ddkbuild\obj%BUILD_ALT_DIR%\%cpudir%
-@echo on
-
-copy %srcPath%\stress.exe %dstPath%\tests
-copy %srcPath%\stress.pdb %dstPath%\tests
-
-@echo off
-
-cd msvc
-goto done
-
-:usage
-echo ddk_build must be run in a WDK build environment
-pause
-goto done
-
-:builderror
-echo Build failed
-
-:done
-cd %PWD%
\ No newline at end of file
+++ /dev/null
-TARGETNAME=fxload
-TARGETTYPE=PROGRAM
-386_STDCALL=0
-
-_NT_TARGET_VERSION=$(_NT_TARGET_VERSION_WINXP)
-
-!IFNDEF MSC_WARNING_LEVEL
-MSC_WARNING_LEVEL=/W3
-!ENDIF
-
-!IFDEF STATIC_LIBC
-USE_LIBCMT=1
-!ELSE
-USE_MSVCRT=1
-!ENDIF
-
-UMTYPE=console
-INCLUDES=..\..\msvc;..\..\libusb;..\getopt;$(DDK_INC_PATH)
-C_DEFINES=$(C_DEFINES) /D__GNU_LIBRARY__
-UMLIBS=..\..\libusb\os\obj$(BUILD_ALT_DIR)\*\libusb-1.0.lib \
- ..\getopt\getopt_ddkbuild\obj$(BUILD_ALT_DIR)\*\getopt.lib
-SOURCES=..\ezusb.c \
- ..\fxload.c
\ No newline at end of file
+++ /dev/null
-TARGETTYPE=LIBRARY
-TARGETNAME=getopt
-386_STDCALL=0
-
-_NT_TARGET_VERSION=$(_NT_TARGET_VERSION_WINXP)
-
-!IFNDEF MSC_WARNING_LEVEL
-MSC_WARNING_LEVEL=/W3
-!ENDIF
-
-!IFDEF STATIC_LIBC
-USE_LIBCMT=1
-!ELSE
-USE_MSVCRT=1
-!ENDIF
-
-INCLUDES=$(DDK_INC_PATH)
-C_DEFINES=$(C_DEFINES) /DDDKBUILD /DHAVE_STRING_H
-
-TARGETLIBS=$(SDK_LIB_PATH)\kernel32.lib
-
-SOURCES=..\getopt1.c \
- ..\getopt.c
\ No newline at end of file
+++ /dev/null
-TARGETNAME=hotplugtest
-TARGETTYPE=PROGRAM
-386_STDCALL=0
-
-_NT_TARGET_VERSION=$(_NT_TARGET_VERSION_WINXP)
-
-!IFNDEF MSC_WARNING_LEVEL
-MSC_WARNING_LEVEL=/W3
-!ENDIF
-
-!IFDEF STATIC_LIBC
-USE_LIBCMT=1
-!ELSE
-USE_MSVCRT=1
-!ENDIF
-
-UMTYPE=console
-INCLUDES=..\..\msvc;..\..\libusb;$(DDK_INC_PATH)
-UMLIBS=..\..\libusb\os\obj$(BUILD_ALT_DIR)\*\libusb-1.0.lib
-SOURCES=..\hotplugtest.c
\ No newline at end of file
+++ /dev/null
-#TARGETTYPE is not defined, to allow selection between static lib or DLL with ddk_build
-TARGETNAME=libusb-1.0
-DLLDEF=..\libusb-1.0.def
-
-_NT_TARGET_VERSION=$(_NT_TARGET_VERSION_WINXP)
-
-!IFNDEF MSC_WARNING_LEVEL
-MSC_WARNING_LEVEL=/W3
-!ENDIF
-
-!IFDEF STATIC_LIBC
-USE_LIBCMT=1
-!ELSE
-USE_MSVCRT=1
-!ENDIF
-
-INCLUDES=..;..\..\msvc;$(DDK_INC_PATH)
-C_DEFINES=$(C_DEFINES) $(LIBUSB_DEFINES) /DDDKBUILD
-
-# http://jpassing.com/2009/10/21/ltcg-issues-with-the-win7amd64-environment-of-wdk-7600/
-# prevents the following error when using the 64 bit static lib with Visual Studio 2010:
-# "fatal error C1001: An internal error has occurred in the compiler.
-# (compiler file 'f:\dd\vctools\compiler\utc\src\p2\p2symtab.c', line 1823)"
-# and the following with Visual Studio 2010:
-# "fatal error C1047: The object or library file 'libusb-1.0.lib' was created with
-# an older compiler than other objects; rebuild old objects and libraries"
-USER_C_FLAGS=/GL-
-
-TARGETLIBS=$(SDK_LIB_PATH)\kernel32.lib
-
-SOURCES=..\core.c \
- ..\descriptor.c \
- ..\hotplug.c \
- ..\io.c \
- poll_windows.c \
- ..\strerror.c \
- ..\sync.c \
- threads_windows.c \
- windows_common.c \
- windows_usbdk.c \
- windows_winusb.c \
- ..\libusb-1.0.rc
\ No newline at end of file
+++ /dev/null
-TARGETNAME=listdevs
-TARGETTYPE=PROGRAM
-386_STDCALL=0
-
-_NT_TARGET_VERSION=$(_NT_TARGET_VERSION_WINXP)
-
-!IFNDEF MSC_WARNING_LEVEL
-MSC_WARNING_LEVEL=/W3
-!ENDIF
-
-!IFDEF STATIC_LIBC
-USE_LIBCMT=1
-!ELSE
-USE_MSVCRT=1
-!ENDIF
-
-UMTYPE=console
-INCLUDES=..\..\libusb;$(DDK_INC_PATH)
-UMLIBS=..\..\libusb\os\obj$(BUILD_ALT_DIR)\*\libusb-1.0.lib
-SOURCES=..\listdevs.c
\ No newline at end of file
+++ /dev/null
-TARGETNAME=stress
-TARGETTYPE=PROGRAM
-386_STDCALL=0
-
-_NT_TARGET_VERSION=$(_NT_TARGET_VERSION_WINXP)
-
-!IFNDEF MSC_WARNING_LEVEL
-MSC_WARNING_LEVEL=/W3
-!ENDIF
-
-!IFDEF STATIC_LIBC
-USE_LIBCMT=1
-!ELSE
-USE_MSVCRT=1
-!ENDIF
-
-UMTYPE=console
-INCLUDES=..\..\msvc;..\..\libusb;$(DDK_INC_PATH)
-UMLIBS=..\..\libusb\os\obj$(BUILD_ALT_DIR)\*\libusb-1.0.lib
-SOURCES=..\stress.c \
- ..\testlib.c
\ No newline at end of file
+++ /dev/null
-TARGETNAME=testlibusb
-TARGETTYPE=PROGRAM
-386_STDCALL=0
-
-_NT_TARGET_VERSION=$(_NT_TARGET_VERSION_WINXP)
-
-!IFNDEF MSC_WARNING_LEVEL
-MSC_WARNING_LEVEL=/W3
-!ENDIF
-
-!IFDEF STATIC_LIBC
-USE_LIBCMT=1
-!ELSE
-USE_MSVCRT=1
-!ENDIF
-
-UMTYPE=console
-INCLUDES=..\..\msvc;..\..\libusb;$(DDK_INC_PATH)
-UMLIBS=..\..\libusb\os\obj$(BUILD_ALT_DIR)\*\libusb-1.0.lib
-SOURCES=..\testlibusb.c
\ No newline at end of file
+++ /dev/null
-TARGETNAME=xusb
-TARGETTYPE=PROGRAM
-386_STDCALL=0
-
-_NT_TARGET_VERSION=$(_NT_TARGET_VERSION_WINXP)
-
-!IFNDEF MSC_WARNING_LEVEL
-MSC_WARNING_LEVEL=/W3
-!ENDIF
-
-!IFDEF STATIC_LIBC
-USE_LIBCMT=1
-!ELSE
-USE_MSVCRT=1
-!ENDIF
-
-UMTYPE=console
-INCLUDES=..\..\msvc;..\..\libusb;$(DDK_INC_PATH)
-UMLIBS=..\..\libusb\os\obj$(BUILD_ALT_DIR)\*\libusb-1.0.lib
-SOURCES=..\xusb.c
\ No newline at end of file